code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
<?php /* -------------------------------------------------------------- $Id: products_vpe.php 1497 2010-11-15 18:06:58Z dokuman $ xtcModified - community made shopping http://www.xtc-modified.org Copyright (c) 2010 xtcModified -------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(order_status.php,v 1.19 2003/02/06); www.oscommerce.com (c) 2003 nextcommerce (order_status.php,v 1.9 2003/08/18); www.nextcommerce.org (c) 2006 XT-Commerce (products_vpe.php 1125 2005-07-28) Released under the GNU General Public License --------------------------------------------------------------*/ define('DEFAULT_PRODUCTS_VPE_ID', '1'); require ('includes/application_top.php'); $action = (isset($_GET['action']) ? $_GET['action'] : ''); if (xtc_not_null($action)) { switch ($action) { case 'insert': case 'save': $products_vpe_id = xtc_db_prepare_input($_GET['oID']); $languages = xtc_get_languages(); for ($i = 0, $n = sizeof($languages);$i < $n;$i++) { $products_vpe_name_array = $_POST['products_vpe_name']; $language_id = $languages[$i]['id']; $sql_data_array = array('products_vpe_name' => xtc_db_prepare_input($products_vpe_name_array[$language_id])); if ($action == 'insert') { if (!xtc_not_null($products_vpe_id)) { $next_id_query = xtc_db_query("select max(products_vpe_id) as products_vpe_id from " . TABLE_PRODUCTS_VPE . ""); $next_id = xtc_db_fetch_array($next_id_query); $products_vpe_id = $next_id['products_vpe_id'] + 1; } $insert_sql_data = array('products_vpe_id' => $products_vpe_id, 'language_id' => $language_id); $sql_data_array = xtc_array_merge($sql_data_array, $insert_sql_data); xtc_db_perform(TABLE_PRODUCTS_VPE, $sql_data_array); } elseif ($action == 'save') { //BOF - web28 - 2010-07-11 - BUGFIX no entry stored for previous deactivated languages $vpe_query = xtc_db_query("select * from " . TABLE_PRODUCTS_VPE . " where language_id = '" . $language_id . "' and products_vpe_id = '" . xtc_db_input($products_vpe_id) . "'"); if (xtc_db_num_rows($vpe_query) == 0) xtc_db_perform(TABLE_PRODUCTS_VPE, array('products_vpe_id' => xtc_db_input($products_vpe_id), 'language_id' => $language_id)); //EOF - web28 - 2010-07-11 - BUGFIX no entry stored for previous deactivated languages xtc_db_perform(TABLE_PRODUCTS_VPE, $sql_data_array, 'update', "products_vpe_id = '" . xtc_db_input($products_vpe_id) . "' and language_id = '" . $language_id . "'"); } } if ($_POST['default'] == 'on') { xtc_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . xtc_db_input($products_vpe_id) . "' where configuration_key = 'DEFAULT_PRODUCTS_VPE_ID'"); } xtc_redirect(xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $products_vpe_id)); break; case 'deleteconfirm': $oID = xtc_db_prepare_input($_GET['oID']); $products_vpe_query = xtc_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'DEFAULT_PRODUCTS_VPE_ID'"); $products_vpe = xtc_db_fetch_array($products_vpe_query); if ($products_vpe['configuration_value'] == $oID) { xtc_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '' where configuration_key = 'DEFAULT_PRODUCTS_VPE_ID'"); } xtc_db_query("delete from " . TABLE_PRODUCTS_VPE . " where products_vpe_id = '" . xtc_db_input($oID) . "'"); xtc_redirect(xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'])); break; case 'delete': $oID = xtc_db_prepare_input($_GET['oID']); $remove_status = true; if ($oID == DEFAULT_PRODUCTS_VPE_ID) { $remove_status = false; $messageStack->add(ERROR_REMOVE_DEFAULT_PRODUCTS_VPE, 'error'); } break; } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_SESSION['language_charset']; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script type="text/javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require (DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td class="columnLeft2" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require (DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td class="boxCenter" width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="80" rowspan="2"><?php echo xtc_image(DIR_WS_ICONS . 'heading_configuration.gif'); ?></td> <td class="pageHeading"><?php echo BOX_PRODUCTS_VPE; ?></td> </tr> <tr> <td class="main" valign="top">XT Configuration</td> </tr> </table></td> </tr> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_VPE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td> </tr> <?php $products_vpe_query_raw = "select products_vpe_id, products_vpe_name from " . TABLE_PRODUCTS_VPE . " where language_id = '" . $_SESSION['languages_id'] . "' order by products_vpe_id"; $products_vpe_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_vpe_query_raw, $products_vpe_query_numrows); $products_vpe_query = xtc_db_query($products_vpe_query_raw); while ($products_vpe = xtc_db_fetch_array($products_vpe_query)) { if ((!isset($_GET['oID']) || (isset($_GET['oID']) && ($_GET['oID'] == $products_vpe['products_vpe_id']))) && !isset($oInfo) && (substr($action, 0, 3) != 'new')) { $oInfo = new objectInfo($products_vpe); } if (isset($oInfo) && is_object($oInfo) && ($products_vpe['products_vpe_id'] == $oInfo->products_vpe_id)) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $products_vpe['products_vpe_id']) . '\'">' . "\n"; } if (DEFAULT_PRODUCTS_VPE_ID == $products_vpe['products_vpe_id']) { echo ' <td class="dataTableContent"><b>' . $products_vpe['products_vpe_name'] . ' (' . TEXT_DEFAULT . ')</b></td>' . "\n"; } else { echo ' <td class="dataTableContent">' . $products_vpe['products_vpe_name'] . '</td>' . "\n"; } ?> <?php /*<!-- BOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons --> <td class="dataTableContent" align="right"><?php if ( (is_object($oInfo)) && ($products_vpe['products_vpe_id'] == $oInfo->products_vpe_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $products_vpe['products_vpe_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td> */ ?> <td class="dataTableContent" align="right"><?php if (isset($oInfo) && is_object($oInfo) && ($products_vpe['products_vpe_id'] == $oInfo->products_vpe_id)) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ICON_ARROW_RIGHT); } else { echo '<a href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $products_vpe['products_vpe_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td> <?php /*<!-- EOF - Tomcraft - 2009-06-10 - added some missing alternative text on admin icons --> */ ?> </tr> <?php } ?> <tr> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $products_vpe_split->display_count($products_vpe_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS_VPE); ?></td> <td class="smallText" align="right"><?php echo $products_vpe_split->display_links($products_vpe_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td> </tr> <?php if (empty($action)) { ?> <tr> <td colspan="2" align="right"><?php echo '<a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&action=new') . '">' . BUTTON_INSERT . '</a>'; ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'new': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_PRODUCTS_VPE . '</b>'); $contents = array('form' => xtc_draw_form('status', FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&action=insert')); $contents[] = array('text' => TEXT_INFO_INSERT_INTRO); $products_vpe_inputs_string = ''; $languages = xtc_get_languages(); for ($i = 0, $n = sizeof($languages);$i < $n;$i++) { $products_vpe_inputs_string.= '<br />' . xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image']) . '&nbsp;' . xtc_draw_input_field('products_vpe_name[' . $languages[$i]['id'] . ']'); } $contents[] = array('text' => '<br />' . TEXT_INFO_PRODUCTS_VPE_NAME . $products_vpe_inputs_string); $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT); $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_INSERT . '"/> <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page']) . '">' . BUTTON_CANCEL . '</a>'); break; case 'edit': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_PRODUCTS_VPE . '</b>'); $contents = array('form' => xtc_draw_form('status', FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id . '&action=save')); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $products_vpe_inputs_string = ''; $languages = xtc_get_languages(); for ($i = 0, $n = sizeof($languages);$i < $n;$i++) { $products_vpe_inputs_string.= '<br />' . xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image']) . '&nbsp;' . xtc_draw_input_field('products_vpe_name[' . $languages[$i]['id'] . ']', xtc_get_products_vpe_name($oInfo->products_vpe_id, $languages[$i]['id'])); } $contents[] = array('text' => '<br />' . TEXT_INFO_PRODUCTS_VPE_NAME . $products_vpe_inputs_string); if (DEFAULT_PRODUCTS_VPE_ID != $oInfo->products_vpe_id) $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('default') . ' ' . TEXT_SET_DEFAULT); $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_UPDATE . '"/> <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id) . '">' . BUTTON_CANCEL . '</a>'); break; case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PRODUCTS_VPE . '</b>'); $contents = array('form' => xtc_draw_form('status', FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $oInfo->products_vpe_name . '</b>'); if ($remove_status) $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="button" onclick="this.blur();" value="' . BUTTON_DELETE . '"/> <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id) . '">' . BUTTON_CANCEL . '</a>'); break; default: if (isset($oInfo) && is_object($oInfo)) { $heading[] = array('text' => '<b>' . $oInfo->products_vpe_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id . '&action=edit') . '">' . BUTTON_EDIT . '</a> <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_PRODUCTS_VPE, 'page=' . $_GET['page'] . '&oID=' . $oInfo->products_vpe_id . '&action=delete') . '">' . BUTTON_DELETE . '</a>'); $products_vpe_inputs_string = ''; $languages = xtc_get_languages(); for ($i = 0, $n = sizeof($languages);$i < $n;$i++) { $products_vpe_inputs_string.= '<br />' . xtc_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/admin/images/' . $languages[$i]['image']) . '&nbsp;' . xtc_get_products_vpe_name($oInfo->products_vpe_id, $languages[$i]['id']); } $contents[] = array('text' => $products_vpe_inputs_string); } break; } if ((xtc_not_null($heading)) && (xtc_not_null($contents))) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require (DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br /> </body> </html> <?php require (DIR_WS_INCLUDES . 'application_bottom.php'); ?>
kiang/xtcmodified
admin/products_vpe.php
PHP
gpl-2.0
15,649
/** * @file * @author TehKevin for Laenalith-WoW * @date 23.09.2014 * * Contact kevin.unegg@ainet.at * Website: http://www.laenalith-wow.com/ * * @section LICENSE * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program 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 * General Public License for more details at * http://www.gnu.org/copyleft/gpl.html * * @copyright Copyright 2014 Laenalith-WoW. All rights reserved. */ #include "Npc_TheLichKingHor.h" #include "Encounter_TheLichKingHor.h" using namespace NPC_THELICHKINGHOR; typedef Npc_RagingGhoul::Npc_RagingGhoulAI RagingGhoulAI; typedef Npc_RisenWitchDoctor::Npc_RisenWitchDoctorAI WitchDoctorAI; typedef Npc_Abon::Npc_AbonAI AbonAI; void Npc_TheLichKingHorAI::DoAction(int32 action) { switch (action) { case ACTION_MOVEMENT_THIRD_WALL: { eventMap.CancelEvent(EVENT_EMERGE); me->GetMotionMaster()->MovePoint(ACTION_MOVEMENT_THIRD_WALL, ThirdWaveMovePosition); }break; case ACTION_MOVEMENT_FOURTH_WALL: { eventMap.CancelEvent(EVENT_EMERGE); me->GetMotionMaster()->MovePoint(ACTION_MOVEMENT_FOURTH_WALL, FourthWaveMovePosition); }break; } } void Npc_TheLichKingHorAI::Reset() { if (!pInstance) return; DoCast(me, SPELL_EMERGE_VISUAL); eventMap.Reset(); eventMap.ScheduleEvent(EVENT_EMERGE, ((me->GetEntry() == NPC_RAGING_GHOUL ? 3 : 0.5) * IN_MILLISECONDS)); } void Npc_TheLichKingHorAI::MovementInform(uint32 type, uint32 point) { if (type != POINT_MOTION_TYPE) return; if (point == ACTION_MOVEMENT_THIRD_WALL || point == ACTION_MOVEMENT_FOURTH_WALL) { if (pInstance && pInstance->GetBossState(DATA_LICHKING_EVENT) == IN_PROGRESS) { me->SetInCombatWithZone(); if (Creature* pCreature = sObjectAccessor->GetCreature(*me, pInstance->GetData64(NPC_JAINA_OR_SYLVANAS_O))) { me->AddThreat(pCreature, 100.0f); me->AI()->AttackStart(pCreature); } } } } void Npc_TheLichKingHorAI::JustDied(Unit* pUnit) { if (!pInstance) return; pInstance->SetData(ENCOUNTER_THELICHKINGHOR::ENCOUNTER_DATA_ADDS_DEFEATED, 1); } void Npc_TheLichKingHorAI::UpdateAI(const uint32 diff) { eventMap.Update(diff); if (me->HasUnitState(UNIT_STATE_CASTING)) return; if (uint32 eventID = eventMap.ExecuteEvent()) { if (eventID == EVENT_EMERGE) { if (pInstance && pInstance->GetBossState(DATA_LICHKING_EVENT) == IN_PROGRESS) { me->SetInCombatWithZone(); if (Creature* pCreature = sObjectAccessor->GetCreature(*me, pInstance->GetData64(NPC_JAINA_OR_SYLVANAS_O))) { me->AddThreat(pCreature, 100.0f); me->AI()->AttackStart(pCreature); } } } else executeEvent(eventID); return; } if (!eventMap.IsEventActive(EVENT_EMERGE)) if (UpdateVictim()) DoMeleeAttackIfReady(); } void RagingGhoulAI::EnterCombat(Unit* /*attacker*/) { eventMap.ScheduleEvent(EVENT_SPELL_GNOUL_JUMP, 2 * IN_MILLISECONDS); } void RagingGhoulAI::executeEvent(uint32 eventID) { uint32 timer = 0; switch (eventID) { case EVENT_SPELL_GNOUL_JUMP: { if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f)) { if (me->GetDistance(pUnit) >= 5.0f) { DoCast(pUnit, SPELL_GNOUL_JUMP); return; } } timer = 1 * IN_MILLISECONDS; } default: return; } if (eventID && timer) eventMap.ScheduleEvent(eventID, timer); } void WitchDoctorAI::EnterCombat(Unit* /*attacker*/) { eventMap.ScheduleEvent(EVENT_COURSE_OF_DOOM, 7 * IN_MILLISECONDS); eventMap.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT_VOLLEY, 15 * IN_MILLISECONDS); eventMap.ScheduleEvent(EVENT_SPELL_SHADOW_BOLT, 6 * IN_MILLISECONDS); } void WitchDoctorAI::executeEvent(uint32 eventID) { uint32 timer = 0; switch (eventID) { case EVENT_COURSE_OF_DOOM: { if (Unit* pUnit = SelectTarget(SELECT_TARGET_RANDOM, 0, 30.0f)) DoCast(pUnit, SPELL_COURSE_OF_DOOM); timer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS); }break; case EVENT_SPELL_SHADOW_BOLT_VOLLEY: { if (Unit* pUnit = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 30.0f)) DoCast(pUnit, SPELL_SHADOW_BOLT_VOLLEY); timer = urand(15 * IN_MILLISECONDS, 22 * IN_MILLISECONDS); }break; case EVENT_SPELL_SHADOW_BOLT: { if (Unit* pUnit = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 30.0f)) DoCast(pUnit, SPELL_SHADOW_BOLT); timer = urand(2 * IN_MILLISECONDS, 3 * IN_MILLISECONDS); }break; default: return; } if (eventID && timer) eventMap.ScheduleEvent(eventID, timer); } void AbonAI::EnterCombat(Unit* /*attacker*/) { eventMap.ScheduleEvent(EVENT_SPELL_ABON_STRIKE, 6 * IN_MILLISECONDS); eventMap.ScheduleEvent(EVENT_SPELL_VOMIT_SPRAY, 15 * IN_MILLISECONDS); } void AbonAI::executeEvent(uint32 eventID) { uint32 timer = 0; switch (eventID) { case EVENT_SPELL_ABON_STRIKE: { if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 5.0f)) DoCast(target, SPELL_ABON_STRIKE); timer = urand(7 * IN_MILLISECONDS, 9 * IN_MILLISECONDS); }break; case EVENT_SPELL_VOMIT_SPRAY: { if (Unit *target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0, 5.0f)) DoCast(target, SPELL_VOMIT_SPRAY); timer = urand(15 * IN_MILLISECONDS, 20 * IN_MILLISECONDS); }break; default: return; } if (eventID && timer) eventMap.ScheduleEvent(eventID, timer); }
GiR-Zippo/Strawberry335
src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/TheLichKingHor/Npc_TheLichKingHor.cpp
C++
gpl-2.0
6,516
/* * Copyright (C) 2016-2017 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) 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 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #pragma once #include <wtf/Forward.h> namespace JSC { class VM; } namespace WebCore { class Frame; Frame* lexicalFrameFromCommonVM(); WEBCORE_EXPORT extern JSC::VM* g_commonVMOrNull; WEBCORE_EXPORT JSC::VM& commonVMSlow(); inline JSC::VM* commonVMOrNull() { return g_commonVMOrNull; } inline JSC::VM& commonVM() { if (JSC::VM* result = g_commonVMOrNull) return *result; return commonVMSlow(); } void addImpureProperty(const AtomicString&); } // namespace WebCore
teamfx/openjfx-8u-dev-rt
modules/web/src/main/native/Source/WebCore/bindings/js/CommonVM.h
C
gpl-2.0
1,831
function onSay(cid, words, param) local player = Player(cid) print("> " .. player:getName() .. " broadcasted: \"" .. param .. "\".") for _, tmpPlayer in ipairs(Game.getPlayers()) do tmpPlayer:sendPrivateMessage(player, param, TALKTYPE_BROADCAST) end return false end
EvilHero90/OTChronos
data/talkactions/scripts/broadcast.lua
Lua
gpl-2.0
274
/* * This file is part of the coreboot project. * * Copyright (C) 2007 Uwe Hermann <uwe@hermann-uwe.de> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <arch/romcc_io.h> #include "pc87309.h" static void pc87309_enable_serial(device_t dev, unsigned int iobase) { pnp_set_logical_device(dev); pnp_set_enable(dev, 0); pnp_set_iobase(dev, PNP_IDX_IO0, iobase); pnp_set_enable(dev, 1); }
wt/coreboot
src/superio/nsc/pc87309/pc87309_early_serial.c
C
gpl-2.0
1,073
/* * Copyright 2010 Cisco Systems, Inc. All rights reserved. * * This program is free software; you may redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * 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. * */ #include <pthread.h> #include <time.h> #include <linux/if_ether.h> #include <arpa/inet.h> struct sk_buff { struct sk_buff *next; struct timespec tstamp; int buf_size; int len; unsigned short frag; unsigned short csum; unsigned short ip_summed; unsigned short csum_offset; unsigned long long dma_addr; unsigned char *buf; unsigned char *data; unsigned char *transport_hdr; }; #define CHECKSUM_NONE 0 #define CHECKSUM_COMPLETE 1 #define CHECKSUM_PARTIAL 2 #define CHECKSUM_UNNECESSARY 3 extern __thread struct sk_buff *skb_local_free; extern __thread int skb_local_count; struct sk_buff *skb_global_free; pthread_spinlock_t skb_global_lock; struct uld; #define SKB_LOCAL_THRESH 50 struct sk_buff *skb_alloc_new(struct uld *); static inline struct sk_buff *skb_alloc(struct uld *uld) { struct sk_buff *skb; if (skb_local_free) { skb = skb_local_free; skb_local_free = skb->next; skb->next = NULL; skb_local_count--; return skb; } pthread_spin_lock(&skb_global_lock); if (skb_global_free) { skb = skb_global_free; skb_global_free = skb->next; skb->next = NULL; pthread_spin_unlock(&skb_global_lock); return skb; } skb = skb_alloc_new(uld); pthread_spin_unlock(&skb_global_lock); return skb; } static void inline skb_free(struct sk_buff *skb) { int i; struct sk_buff *nskb; while (skb) { nskb = skb->next; skb->data = skb->buf; skb->csum = skb->ip_summed = 0; skb->frag = skb->len = 0; skb->next = skb_local_free; skb_local_free = skb; skb_local_count++; skb = nskb; } if (skb_local_count > SKB_LOCAL_THRESH) { pthread_spin_lock(&skb_global_lock); for (i=0; i<SKB_LOCAL_THRESH/2; i++) { skb = skb_local_free; if (!skb) break; skb_local_free = skb->next; skb_local_count--; skb->next = skb_global_free; skb_global_free = skb; } pthread_spin_unlock(&skb_global_lock); } } static inline unsigned char *skb_pull(struct sk_buff *skb, unsigned int len) { skb->len -= len; return skb->data += len; } static inline unsigned short skb_ether_protocol(struct sk_buff *skb) { struct ethhdr *h = (struct ethhdr *)skb->data; unsigned short *p; p = &h->h_proto; while (*p == htons(ETH_P_8021Q)) p += 2; return ntohs(*p); } static inline unsigned int skb_network_offset(struct sk_buff *skb) { struct ethhdr *h = (struct ethhdr *)skb->data; unsigned short *p; p = &h->h_proto; while (*p == htons(ETH_P_8021Q)) p += 2; return ((unsigned char *)p) + 2 - skb->data; } static inline unsigned char *skb_network_header(struct sk_buff *skb) { return skb->data + skb_network_offset(skb); } static inline int skb_ip_protocol(struct sk_buff *skb) { if (skb_ether_protocol(skb) == ETH_P_IP) return skb_network_header(skb)[9]; if (skb_ether_protocol(skb) == ETH_P_IPV6) return skb_network_header(skb)[6]; return 0; } static inline unsigned char *skb_transport_header(struct sk_buff *skb) { unsigned char *h = skb_network_header(skb); if (skb_ether_protocol(skb) == ETH_P_IP) return h + 4 * ((*h) & 0xF); /* ihl */ if (skb_ether_protocol(skb) == ETH_P_IPV6) return h + 20; return NULL; }
pugs/vfio-user-level-drivers
uld/skbuff.h
C
gpl-2.0
3,876
/* * Copyright (C) 2012 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.mmnn.zxing.camera; import android.annotation.SuppressLint; import android.content.Context; import android.hardware.Camera; import android.os.AsyncTask; import android.os.Build; import android.util.Log; import java.util.ArrayList; import java.util.Collection; import java.util.concurrent.RejectedExecutionException; public class AutoFocusManager implements Camera.AutoFocusCallback { private static final String TAG = AutoFocusManager.class.getSimpleName(); private static final long AUTO_FOCUS_INTERVAL_MS = 2000L; private static final Collection<String> FOCUS_MODES_CALLING_AF; static { FOCUS_MODES_CALLING_AF = new ArrayList<String>(2); FOCUS_MODES_CALLING_AF.add(Camera.Parameters.FOCUS_MODE_AUTO); FOCUS_MODES_CALLING_AF.add(Camera.Parameters.FOCUS_MODE_MACRO); } private final boolean useAutoFocus; private final Camera camera; private boolean stopped; private boolean focusing; private AsyncTask<?, ?, ?> outstandingTask; public AutoFocusManager(Context context, Camera camera) { this.camera = camera; String currentFocusMode = camera.getParameters().getFocusMode(); useAutoFocus = FOCUS_MODES_CALLING_AF.contains(currentFocusMode); Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus); start(); } @Override public synchronized void onAutoFocus(boolean success, Camera theCamera) { focusing = false; autoFocusAgainLater(); } @SuppressLint("NewApi") private synchronized void autoFocusAgainLater() { if (!stopped && outstandingTask == null) { AutoFocusTask newTask = new AutoFocusTask(); try { if (Build.VERSION.SDK_INT >= 11) { newTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { newTask.execute(); } outstandingTask = newTask; } catch (RejectedExecutionException ree) { Log.w(TAG, "Could not request auto focus", ree); } } } public synchronized void start() { if (useAutoFocus) { outstandingTask = null; if (!stopped && !focusing) { try { camera.autoFocus(this); focusing = true; } catch (RuntimeException re) { // Have heard RuntimeException reported in Android 4.0.x+; // continue? Log.w(TAG, "Unexpected exception while focusing", re); // Try again later to keep cycle going autoFocusAgainLater(); } } } } private synchronized void cancelOutstandingTask() { if (outstandingTask != null) { if (outstandingTask.getStatus() != AsyncTask.Status.FINISHED) { outstandingTask.cancel(true); } outstandingTask = null; } } public synchronized void stop() { stopped = true; if (useAutoFocus) { cancelOutstandingTask(); // Doesn't hurt to call this even if not focusing try { camera.cancelAutoFocus(); } catch (RuntimeException re) { // Have heard RuntimeException reported in Android 4.0.x+; // continue? Log.w(TAG, "Unexpected exception while cancelling focusing", re); } } } private final class AutoFocusTask extends AsyncTask<Object, Object, Object> { @Override protected Object doInBackground(Object... voids) { try { Thread.sleep(AUTO_FOCUS_INTERVAL_MS); } catch (InterruptedException e) { // continue } start(); return null; } } }
bonn036/Zoo
zxing/src/main/java/com/mmnn/zxing/camera/AutoFocusManager.java
Java
gpl-2.0
4,562
<?php //edit /* Plugin Name: WooCommerce - Alter Inventory Stock Admin Plugin URI: http://www.altertech.it/woocommerce-alter-inventory/ Description: This plugin display all your Woocommerce inventory products and variable products as variation, in user friendly mode on front-end in a reserved page, you can create this page simply adding a shortcode [alterinventory] to a new page. You also can simply use your woocommerce to make CMR for direct sells and keep all report of yours sells in a page with shortcode [altereports] . Tested on Wordpress 3.8.1 and Woocommerce 2.1.2 Version: 1.1b Author: Bigbabert Author URI: http://www.blog.altertech.it Copyright: © 2014 Alberto Cocchiara (email : bigbabertgmail.com) License: GNU General Public License v3.0 License URI: http://www.gnu.org/licenses/gpl-3.0.html */ // Check if WooCommerce is active if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { // Localization load_plugin_textdomain( 'woocommerce-alter-inventory', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); // Class if ( ! class_exists( 'WC_alterinventory') ) { class WC_alterinventory { public function __construct() { $this->alterinventory_enabled = get_option( 'alterinventory_enable' ) == 'yes' ? true : false; $this->altereports_enabled = get_option( 'altereports_enable' ) == 'yes' ? true : false; $this->alter_wp_login_form_enabled = get_option( 'alter_wp_login_form_enable' ) == 'yes' ? true : false; // called only after woocommerce has finished loading add_action( 'init', array( $this, 'plugin_init' ) ); //disable entering of billing& shipping address on the checkout page add_action('woocommerce_checkout_init','alter_disable_billing_shipping'); function alter_disable_billing_shipping($checkout){ $checkout->checkout_fields['billing']=array(); $checkout->checkout_fields['shipping']=array(); return $checkout; /** * * Make "state" field not required on checkout * */ add_filter( 'woocommerce_billing_fields', 'woo_filter_state_billing', 10, 1 ); add_filter( 'woocommerce_shipping_fields', 'woo_filter_state_shipping', 10, 1 ); function woo_filter_state_billing( $address_fields ) { $address_fields['billing_state']['required'] = false; } function woo_filter_state_shipping( $address_fields ) { $address_fields['shipping_state']['required'] = false; } /** * Add payment method to admin new order email * */ add_action( 'woocommerce_email_after_order_table', 'woo_add_payment_method_to_admin_new_order', 15, 2 ); function woo_add_payment_method_to_admin_new_order( $order, $is_admin_email ) { if ( $is_admin_email ) { echo '<p><strong>Payment Method:</strong> ' . $order->cod . '</p>'; } } } // Init settings $this->settings = array( array( 'name' => __( 'Opzioni del plugin Alter Inventory', 'woocommerce-alter-inventory' ), 'type' => 'title', 'id' => 'alterinventory_options' ), array( 'name' => __( 'Alter Inventory', 'woocommerce-alter-inventory' ), 'desc' => __( 'Abilita Alter Inventory, usa lo shortcode: [alterinventory] nella pagina che userai come Front End Inventory.', 'woocommerce-alter-inventory' ), 'id' => 'alterinventory_enable', 'type' => 'checkbox' ), array( 'name' => __( 'Alter Reports', 'woocommerce-alter-inventory' ), 'desc' => __( 'Abilita Alter Reports, usa lo shortcode: [altereports] nella pagina che userai come Front End Reports.', 'woocommerce-alter-inventory' ), 'id' => 'altereports_enable', 'type' => 'checkbox' ), array( 'name' => __( 'Abilita Login', 'woocommerce-alter-inventory' ), 'desc' => __( 'Abilita Login nella pagina di Inventory', 'woocommerce-alter-inventory' ), 'id' => 'alter_wp_login_form_enable', 'type' => 'checkbox' ), array( 'name' => __( 'Abilita Vendita', 'woocommerce-alter-inventory' ), 'desc_tip' => __( 'Attiva Carrello e Cassa direttamente nella pagina di Alter-Inventory, potrai effettuare le vendite dirette da lì.', 'woocommerce-alter-inventory' ), 'id' => 'alter_wp_seller_form_enable', 'type' => 'select', 'options' => array( 'enable' => __( 'Attiva', 'woocommerce' ), 'disable' => __( 'Disattiva', 'woocommerce' ), ), 'css' => 'min-width:50px;', 'desc' => __( 'Abilita la Vendita diretta nella pagina di Inventory', 'woocommerce-alter-inventory' ), ), array( 'name' => __( 'Messaggio di Errore', 'woocommerce-alter-inventory' ), 'desc_tip' => __( 'Inserisci il Messaggio di Errore, sarà mostrato a tutti gli utenti senza autorizzazione per vedere inventory.', 'woocommerce-alter-inventory' ), 'id' => 'alterinventory_error_message', 'type' => 'textarea', 'css' => 'min-width:500px;', 'desc' => __( 'Inserisci il tuo Messaggio di Errore.', 'woocommerce-alter-inventory' ), ), 'desc_tip' => true, array( 'type' => 'sectionend', 'id' => 'alter_inventory_options'), ); // Default options add_option( 'alterinventory_enable', 'yes' ); add_option( 'altereports_enable', 'yes' ); add_option( 'alter_wp_login_form_enable', 'yes' ); add_option( 'alter_wp_seller_form_enable', 'yes' ); add_option( 'alterinventory_error_message', '<h1 style="color:#F00">Please Login ! enter your user name and password!</h1>' ); // Admin add_action( 'woocommerce_settings_inventory_options_after', array( $this, 'admin_settings' ), 40); add_action( 'woocommerce_update_alterinventory_options', array( $this, 'save_admin_settings' )); get_option('alterinventory_options'); // Trigger actions do_action( 'woocommerce_update_options' ); } function plugin_init() { if ( $this->alterinventory_enabled ) { function get_inventory() { $options = get_option('alterinventory_options'); $out = (!isset($options['<h1 style="color:#F00">errormessage_template</h1>']) || $options['<h1 style="color:#F00">errormessage_template</h1>']=="") ? '<h1 style="color:#F00">Please Login ! enter your Username and password!</h1>' : $options['errormessage_template']; $out = get_option('<h1 style="color:#F00">alterinventory_error_message</h1>', '<h1 style="color:#F00">Please Log In ! enter your Username and Password!</h1>'); $user = wp_get_current_user(); if ( empty( $user->ID )) { echo $out; } if (!is_user_logged_in()) { wp_login_form(); } else { global $woocommerce, $woo_options; ?> <div> <div align="right" style="margin-bottom:-64px" > <script type="text/javascript"> function printPage(){ var tableData = '<table border="1">'+document.getElementsByTagName('table')[0].innerHTML+'</table>'; var data = '<button onclick="window.print()"> Print </button>'+tableData; myWindow=window.open('','','width=2000,height=800px'); myWindow.innerWidth = screen.width; myWindow.innerHeight = screen.height; myWindow.screenX = 0; myWindow.screenY = 0; myWindow.document.write(data); myWindow.focus(); }; </script> <script > jQuery( document ).ready(function() { jQuery(".pro_weight").keyup(function() { var idc = jQuery(this).attr('id'); var id = idc.split('_'); id = id[1]; var price = jQuery('span#price_'+id+'').next().val(); var weight =jQuery(this).val(); console.log(weight); if(isNaN(weight)==false){ console.log ('number'); var total_price = weight * price; jQuery('span#price_'+id+'').text(total_price); console.log (total_price); }else{ alert("Please enter only number !"); return false; } }); }); </script> <br /> <a href="javascript:void(0);" class="button" type="submit" id="printPage" onclick="printPage();">Print</a> | <a href="alter-inventory/" class="button" type="submit" > Refresh</a> </div> <div align="left" > </div> </div> <style> .shipping_calculator, .cart-collaterals, .woocommerce-info {display: none;} .hentry img { height: auto; max-width: 35%;} h2 { padding-top: 20px;} .woocommerce-message { display:none;} .customer_details, .col2-set { display:none;} #reviews {display: none;} </style> <h2>STOCK ADMIN</h2> <table width="100%" style="border: 1px solid #000; width: 100%; margin-bottom: 50px" cellspacing="0" cellpadding="2" > <thead> <tr style="text-align:center;background-color: #1e73be;"> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Image', 'woothemes'); ?></th> --> <!--<th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Product', 'woothemes'); ?></th>--> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('SKU', 'woothemes'); ?></th> --> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Sale', 'woothemes'); ?></th>--> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Supplier', 'woothemes'); ?></th> --> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Lot ID', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('QTY', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Lab', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Shape', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Size', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Weight', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Color', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Clarity', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Measurments', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Depth', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Table', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('CutG', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Symty', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Polish', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Fluor', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Cert No.', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Price', 'woothemes'); ?></th> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Location', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Parcel Status', 'woothemes'); ?></th> --> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Cost', 'woothemes'); ?></th> <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Sale Price', 'woothemes'); ?></th> --> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;white-space:nowrap;"><?php _e('List Price', 'woothemes'); ?></th> --> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;white-space:nowrap;"><?php _e('%(-)Cost', 'woothemes'); ?></th> <th scope="col" style=" border: 1px solid #000; padding: 6px;white-space:nowrap;"><?php _e('%(-)Sale', 'woothemes'); ?></th> --> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Memo', 'woothemes'); ?></th> --> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Stock', 'woothemes'); ?></th> --> <!-- <th scope="col" style="border: 1px solid #000; padding: 6px;"><?php _e('Buy', 'woothemes'); ?></th> --> </tr> </thead> <tbody> <?php $args2 = array( 'post_type' => 'product', 'post_status' => 'publish', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC', 'tax_query' => array( array( 'taxonomy' => 'product_type', 'field' => 'slug', 'terms' => array('simple'), 'operator' => 'IN' ) ) ); $loop = new WP_Query( $args2 ); while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?> <tr style="text-align: center;" > <!-- <td class="thumb column-thumb" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_image( $size ='shop_thumbnail' ); ?></td> --><!-- <td class="order-number" style="padding: 0 5px;border: 1px solid #000;" style="padding: 0 5px;border: 1px solid #000;text-transform:uppercase"><?php echo $product->get_title(); ?></td> --> <!-- <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->sku; ?></td> <td class="order-number nowrap"><?php echo $product->price; ?></td> <td class="order-number nowrap" style="color:#F00;"><?php echo $product->sale_price; ?></td> --> <!-- <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_zsupplier' ); ?></td> --> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->sku; ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_zqty' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_zlab' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_shape' ); ?></td> <td class="order-number nowrap" style="padding: 0 5px;border: 1px solid #000;white-space:nowrap;"><?php echo $product->get_attribute( 'pa_zsize' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"> <input type="text" id="weight_<?php _e(get_the_id()); ?>" class="pro_weight" value="<?php echo $product->get_attribute( 'pa_zweight' ); ?>" /></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_zcolor' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_zclarity' ); ?></td> <td class="order-number nowrap" style="padding: 0 5px;border: 1px solid #000;white-space:nowrap;"><?php echo $product->get_attribute( 'pa_measurment' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_zdepth' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_ztable' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_cutg' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_symty' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_polish' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_fluor' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_certno' ); ?></td> <?php $sale_price = get_post_meta( get_the_ID(), '_price', true); if($sale_price=='' || !$sale_price){ $pro_price = get_post_meta( get_the_ID(), '_regular_price', true); }else{ $pro_price = $sale_price; }?> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"> <span id = "price_<?php echo get_the_id();?>" ><?php _e($pro_price);?></span> <input type='hidden' class="unit_price" value="<?php _e($pro_price); ?>" /> </td> <!-- <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_zlocation' ); ?></td> <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->get_attribute( 'pa_parcel' ); ?></td> --> <!-- <td class="order-number nowrap" style="padding: 0 5px;border: 1px solid #000;white-space:nowrap;"><?php echo $product->price; ?></td> --> <!-- <td class="order-number nowrap" style="padding: 0 5px;border: 1px solid #000;white-space:nowrap;"><?php echo $product->get_attribute( 'pa_zcost' ); ?></td> --> <!-- <td class="order-number nowrap"><?php echo $product->get_attribute( 'pa_xsale' ); ?></td> --> <!-- <td class="order-number nowrap" style="padding: 0 5px;border: 1px solid #000;white-space:nowrap;"><?php echo $product->get_attribute( 'pa_zsale' ); ?></td> --> <!-- <td class="order-number nowrap" style="padding: 0 5px;border: 1px solid #000;white-space:nowrap;"><?php echo $product->get_attribute( 'pa_memo' ); ?></td> --> <!-- <td class="order-number" style="padding: 0 5px;border: 1px solid #000;"><?php echo $product->stock; ?></td> --> <!-- <td class="order-number" style="padding: 0 5px;border: 1px solid #000;" meta http-equiv="refresh" content="0; url=/alter-inventory/" /> --><!-- <?php echo apply_filters( 'woocommerce_loop_add_to_cart_link', sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" class="button %s product_type_%s" >%s</a>', esc_url( $product->add_to_cart_url('alter-inventory/') ), esc_attr( $product->id ), esc_attr( $product->get_sku() ), $product->is_purchasable() ? 'add_to_cart_button' : '', esc_attr( $product->product_type ), esc_html( $product->add_to_cart_text() ) ), $product ); ?> --><!-- <div id="ajax-response"></div> </td> --> </tr> <?php endwhile; ?> </tbody> </table> <div > <!-- <h2>PRODUCT SALES</h2> </div> <?php echo do_shortcode('[woocommerce_cart]','alterinventory'); //Change text in ceckout add_action( 'woocommerce_order_button_text', 'alter_custom_checkout_text' ); function alter_custom_checkout_text() { return "Concludi Vendita"; } ?> --> <!-- <div> <h1 align="center"> <a href="../stock/">@- Refresh -@</a></a></h1> </div> --> <?php echo do_shortcode('[woocommerce_checkout]','alterinventory'); ?> <?php } } add_shortcode( 'alterinventory', 'get_inventory','manage_inventory' ); } } // Load the settings function admin_settings() { woocommerce_admin_fields( $this->settings ); } // Save the settings function save_admin_settings() { woocommerce_update_settings( $this->settings ); } //Add support links to plugin page public function add_support_links( $links, $file ) { if ( !current_user_can( 'install_plugins' ) ) { return $links; } if ( $file == WC_alterinventory::$plugin_basefile ) { $links[] = '<a href="http://www.altertech.it/woocommerce-alter-inventory/" target="_blank" title="' . __( 'Homepage', 'woocommerce-alter-inventory' ) . '">' . __( 'Homepage', 'woocommerce-alter-inventory' ) . '</a>'; } return $links; } function add_action_links( $links ) { return array( array( 'settings' => '<a href="' . admin_url( 'admin_settings' . $this->plugin_slug ) . '">' . __( 'Settings', $this->plugin_slug ) . '</a>' ), $links ); } //Add settings link to plugin page function add_settings_link( $settings ) { $settings = sprintf( '<a href="/admin.php?page=wc-settings&tab=products&section=inventory"</a>' , admin_url( '/admin.php?page=wc-settings&tab=products&section=inventory' . $this->settings ) , __( 'Go to the settings page', 'woocommerce-alter-inventory' ) , __( 'Settings', 'woocommerce-alter-inventory' ) ); array_unshift( $links, $settings ); return $links; } } // Instantiate our plugin class and add it to the set of globals $GLOBALS['wc_alterinventory'] = new WC_alterinventory(); } } else { function check_woo_notices() { if (!is_plugin_active('woocommerce/woocommerce.php')) { ob_start(); ?><div class="error"> <h1 style="color:#F00"><p><strong>ATTENZIONE</strong>: WooCommerce non è attivo e Alter Inventory non può funzionare!</p></h1> </div><?php echo ob_get_clean(); } } add_action('admin_notices', 'check_woo_notices'); } /** * Add payment method to admin new order email * */ add_action( 'woocommerce_email_after_order_table', 'woo_add_payment_method_to_admin_new_order', 15, 2 ); function woo_add_payment_method_to_admin_new_order( $order, $is_admin_email ) { if ( $is_admin_email ) { echo '<p><strong>Payment Method:</strong> ' . $order->cod . '</p>'; } } /** * Auto Complete all WooCommerce orders. * http://docs.woothemes.com/document/automaticaaly-complete-orders/ */ add_action( 'woocommerce_thankyou', 'alter_woocommerce_auto_complete_order' ); function alter_woocommerce_auto_complete_order( $order_id ) { global $woocommerce; if ( ! $order_id ) { return; } $order = new WC_Order( $order_id ); $order->update_status( 'completed' ); wp_redirect( home_url('/alter-reports/') ); exit; // or whatever url you want } // rename the coupon field on the checkout page function woocommerce_rename_coupon_field_on_checkout( $translated_text, $text, $text_domain ) { // bail if not modifying frontend woocommerce text if ( is_admin() || 'woocommerce' !== $text_domain ) { return $translated_text; } if ( 'Coupon code' === $text ) { $translated_text = 'Operatore'; } elseif ( 'Apply Coupon' === $text ) { $translated_text = 'Inserisci il tuo codice Operatore per la % di sconto.'; } return $translated_text; } add_filter( 'gettext', 'woocommerce_rename_coupon_field_on_checkout', 10, 3 ); //////////////////////////////// DASHBOARD WIDGET add_action( 'wp_dashboard_setup', 'prefix_add_dashboard_widget' ); function prefix_add_dashboard_widget() { wp_add_dashboard_widget( 'my_dashboard_widget', 'Alter Reports Page', 'prefix_dashboard_widget', 'prefix_dashboard_widget_handle' ); } function prefix_dashboard_widget() { # get saved data if( !$widget_options = get_option( 'my_dashboard_widget_options' ) ) $widget_options = array( ); # default output $output = sprintf( '<h2 style="text-align:right">%s</h2>', __( 'Please, configure the widget ☝' ) ); # check if saved data contains content $saved_feature_post = isset( $widget_options['feature_post'] ) ? $widget_options['feature_post'] : false; # custom content saved by control callback, modify output if( $saved_feature_post ) { $post = get_post( $saved_feature_post ); if( $post ) { $content = do_shortcode( html_entity_decode( $post->post_content ) ); $output = "<h2>{$post->post_title}</h2><p>{$content}</p>"; } } echo "<div class='feature_post_class_wrap'> <label style='background:#ccc;'>$output</label> </div> "; } function prefix_dashboard_widget_handle() { # get saved data if( !$widget_options = get_option( 'my_dashboard_widget_options' ) ) $widget_options = array( ); # process update if( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['my_dashboard_widget_options'] ) ) { # minor validation $widget_options['feature_post'] = absint( $_POST['my_dashboard_widget_options']['feature_post'] ); # save update update_option( 'my_dashboard_widget_options', $widget_options ); } # set defaults if( !isset( $widget_options['feature_post'] ) ) $widget_options['feature_post'] = ''; echo "<p><strong>Available Pages</strong></p> <div class='feature_post_class_wrap'> <label>Title</label>"; wp_dropdown_pages( array( 'post_type' => 'page', 'selected' => $widget_options['feature_post'], 'name' => 'my_dashboard_widget_options[feature_post]', 'id' => 'feature_post', 'show_option_none' => '- Select -' ) ); echo "</div>"; } ///////////////////// ?> <?php function shortcode_altereports_func() { ?> <?php include_once ABSPATH . 'wp-admin/includes/plugin.php'; include_once (ABSPATH . WPINC . '/functions.php'); global $wpdb, $woocommerce, $WC_Order, $woo_options, $WC_API_Reports, $WC_Admin_Dashboard, $WC_Admin_Reports, $WC_Admin_Report, $WC_Report_Customers, $WC_Report_Stock, $WC_alterinventory; $results = $wpdb->get_results( 'SELECT * FROM wp_options WHERE option_id = 1', OBJECT ); $out = get_option('<h1 style="color:#F00">alterinventory_error_message</h1>', '<h1 style="color:#F00">Please use your Username and Password to Log In </h1>'); $options = get_option('alterinventory_options'); $user = wp_get_current_user(); if ( empty( $user->ID )) { echo $out; } if (!is_user_logged_in()) { wp_login_form(); } else { ?> <?php /** * Template for Direct Sells */ if ( ! defined( 'ABSPATH' ) ) { exit; } global $wpdb, $Product, $item, $item_meta, $product, $woocommerce, $woo_options, $order_count, $WC_API_Reports, $WC_Admin_Dashboard, $WC_Admin_Reports, $WC_Admin_Report, $WC_Report_Customers, $WC_Report_Stock, $WC_alterinventory; $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array( 'numberposts' => $order_count, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => 'shop_order', 'post_status' => 'publish', 'posts_per_page' => -1, 'paged' => get_query_var('paged') ) ) ); if ( $customer_orders ) : ?> <div align="right" style="margin-bottom:-60px" > <script type="text/javascript"> function printPage(){ var tableData = '<table border="1">'+document.getElementsByTagName('table')[0].innerHTML+'</table>'; var data = '<button onclick="window.print()"> Print </button>'+tableData; myWindow=window.open('','','width=1000,height=800px'); myWindow.innerWidth = screen.width; myWindow.innerHeight = screen.height; myWindow.screenX = 0; myWindow.screenY = 0; myWindow.document.write(data); myWindow.focus(); }; </script> <br /> <a href="javascript:void(0);" class="button" type="submit" id="printPage" onclick="printPage();">Print</a> | <a href="alter-inventory/" class="button" type="submit" > Aggiorna</a> <br /> </div> <div style="margin-bottom: 40px;" > <?php $form = '<form role="search" method="get" id="searchform" action="' . esc_url( home_url( '/' ) ) . '"> <div> <label class="screen-reader-text" for="s">' . __( 'Cerca Vendite:', 'woocommerce' ) . '</label> <input type="text" value="' . get_search_query() . '" name="s" id="s" placeholder="' . __( 'Vendite..', 'woocommerce' ) . '" /> <input class="button" type="submit" id="searchsubmit" value="'. esc_attr__( 'Search', 'woocommerce' ) .'" /> <input type="hidden" name="post_type" value="product" /> </div> </form>'; echo $form; ?> </div> <h2>VENDITE</h2> <table class="shop_table my_account_orders"> <thead> <tr> <th class="order-number"><span class="nobr"><?php _e( '#ID Vendita', 'woocommerce' ); ?></span></th> <th class="order-date"><span class="nobr"><?php _e( 'Data', 'woocommerce' ); ?></span></th> <th class="order-status"><span class="nobr"><?php _e( 'Stato', 'woocommerce' ); ?></span></th> <th class="order-total"><span class="nobr"><?php _e( 'Totale', 'woocommerce' ); ?></span></th> <th class="order-actions"><span class="nobr"><?php _e( 'Prodotti / Attributi / Totale', 'woocommerce' ); ?></span></th> <th class="order-actions"><span class="nobr"><?php _e( 'Dettagli', 'woocommerce' ); ?></span></th> <th class="order-actions"><span class="nobr"><?php _e( 'Annullare', 'woocommerce' ); ?></span></th> </tr> </thead> <style> .hentry img { height: auto; max-width: 35%;} .woocommerce-message { display:none;} </style> <tbody><?php foreach ( $customer_orders as $customer_order ) { $order = new WC_Order(); $order->populate( $customer_order ); $status = get_term_by( 'slug', $order->status, 'shop_order_status' ); $item_count = $order->get_item_count(); ?><tr class="order"> <td class="order-number"> <a href="<?php echo $order->get_view_order_url(); ?>"> <?php echo $order->get_order_number(); ?> </a> </td> <td class="order-date"> <time datetime="<?php echo date( 'Y-m-d', strtotime( $order->order_date ) ); ?>" title="<?php echo esc_attr( strtotime( $order->order_date ) ); ?>"><?php echo date_i18n( get_option( 'date_format' ), strtotime( $order->order_date ) ); ?></time> </td> <td class="order-status" style="text-align:left; text-transform:uppercase; white-space:nowrap; color:#0C0" > <?php echo ucfirst( __( $status->name, 'woocommerce' ) ); ?> </td> <td class="order-total"> <?php echo sprintf( _n( '<strong>%s</strong> x <strong>%s Prodotto</strong>', '%s for %s items', $item_count, 'woocommerce' ), $order->get_formatted_order_total(), $item_count ); ?> </td> <td class="order-actions"> <table class="shop_table order_details"> <thead> <tr> <th class="product-name"><?php _e( 'Product', 'woocommerce' ); ?></th> <th class="product-total"><?php _e( 'Total', 'woocommerce' ); ?></th> </tr> </thead> <tfoot> </tfoot> <tbody> <?php if ( sizeof( $order->get_items() ) > 0 ) { foreach( $order->get_items() as $item ) { $_product = apply_filters( 'woocommerce_order_item_product', $order->get_product_from_item( $item ), $item ); $item_meta = new WC_Order_Item_Meta( $item['item_meta'], $_product ); ?> <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>"> <td style="text-transform:uppercase;"> <?php if ( $_product && ! $_product->is_visible() ) echo apply_filters( 'woocommerce_order_item_name', $item['name'], $item ); else echo apply_filters( 'woocommerce_order_item_name', sprintf( '<a href="%s">%s</a>', get_permalink( $item['product_id'] ), $item['name'] ), $item ); echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '&times; %s', $item['qty'] ) . '</strong>', $item ); $item_meta->display(); if ( $_product && $_product->exists() && $_product->is_downloadable() && $order->is_download_permitted() ) { $download_files = $order->get_item_downloads( $item ); $i = 0; $links = array(); foreach ( $download_files as $download_id => $file ) { $i++; $links[] = '<small><a href="' . esc_url( $file['download_url'] ) . '">' . sprintf( __( 'Download file%s', 'woocommerce' ), ( count( $download_files ) > 1 ? ' ' . $i . ': ' : ': ' ) ) . esc_html( $file['name'] ) . '</a></small>'; } echo '<br/>' . implode( '<br/>', $links ); } ?> </td> <td class="product-total" style="color:#F00"> <?php echo $order->get_formatted_line_subtotal( $item ); ?> </td> </tr> <?php } } ?> </tbody> </table> <div class="clear"></div> </td> <td class="order-actions"> <?php $actions = array(); if ( in_array( $order->status, apply_filters( 'woocommerce_valid_order_statuses_for_payment', array( 'Incompleta', 'Fallita' ), $order ) ) ) { } $actions['view'] = array( 'url' => $order->get_view_order_url(), 'name' => __( 'Dettagli', 'woocommerce' ) ); $actions = apply_filters( 'woocommerce_my_account_my_orders_actions', $actions, $order ); if ($actions) { foreach ( $actions as $key => $action ) { echo '<a href="' . esc_url( $action['url'] ) . '" class="button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>'; } } ?> </td> <td class="order-actions"> <?php $actions = array(); $actions['cancel'] = array( 'url' => $order->get_cancel_order_url( get_permalink( wc_get_page_id( 'alter-inventory' ) ) ), 'name' => __( 'Cancel', 'woocommerce' ) ); if ($actions) { foreach ( $actions as $key => $action ) { echo '<a href="' . esc_url( $action['url'] ) . '" class="button ' . sanitize_html_class( $key ) . '">' . esc_html( $action['name'] ) . '</a>'; } } ?> </td> </tr><?php } ?></tbody> </table> <?php endif; ?> <?php } } add_shortcode('altereports','shortcode_altereports_func'); ?>
sawan34/tanzi
wp-content/plugins/woocommerce-alter-inventory/alter-inventory.php
PHP
gpl-2.0
34,571
cmd_kernel/exit.o := ppc_4xx-gcc -m32 -Wp,-MD,kernel/.exit.o.d -nostdinc -isystem /tools/dev/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/include -I/tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include -Iinclude -include include/generated/autoconf.h -D__KERNEL__ -Iarch/powerpc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -msoft-float -pipe -Iarch/powerpc -ffixed-r2 -mmultiple -mno-altivec -mno-spe -mspe=no -funit-at-a-time -mno-string -Wa,-m405 -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(exit)" -D"KBUILD_MODNAME=KBUILD_STR(exit)" -c -o kernel/.tmp_exit.o kernel/exit.c deps_kernel/exit.o := \ kernel/exit.c \ $(wildcard include/config/perf/events.h) \ $(wildcard include/config/mm/owner.h) \ $(wildcard include/config/debug/stack/usage.h) \ $(wildcard include/config/numa.h) \ $(wildcard include/config/futex.h) \ include/linux/mm.h \ $(wildcard include/config/discontigmem.h) \ $(wildcard include/config/sysctl.h) \ $(wildcard include/config/mmu.h) \ $(wildcard include/config/stack/growsup.h) \ $(wildcard include/config/sparsemem.h) \ $(wildcard include/config/sparsemem/vmemmap.h) \ $(wildcard include/config/highmem.h) \ $(wildcard include/config/ksm.h) \ $(wildcard include/config/arch/populates/node/map.h) \ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \ $(wildcard include/config/proc/fs.h) \ $(wildcard include/config/ia64.h) \ $(wildcard include/config/debug/pagealloc.h) \ $(wildcard include/config/hibernation.h) \ include/linux/errno.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/errno.h \ include/asm-generic/errno.h \ include/asm-generic/errno-base.h \ include/linux/gfp.h \ $(wildcard include/config/kmemcheck.h) \ $(wildcard include/config/zone/dma.h) \ $(wildcard include/config/zone/dma32.h) \ $(wildcard include/config/debug/vm.h) \ include/linux/mmzone.h \ $(wildcard include/config/force/max/zoneorder.h) \ $(wildcard include/config/smp.h) \ $(wildcard include/config/memory/hotplug.h) \ $(wildcard include/config/flat/node/mem/map.h) \ $(wildcard include/config/cgroup/mem/res/ctlr.h) \ $(wildcard include/config/have/memory/present.h) \ $(wildcard include/config/need/node/memmap/size.h) \ $(wildcard include/config/need/multiple/nodes.h) \ $(wildcard include/config/flatmem.h) \ $(wildcard include/config/sparsemem/extreme.h) \ $(wildcard include/config/nodes/span/other/nodes.h) \ $(wildcard include/config/holes/in/zone.h) \ $(wildcard include/config/arch/has/holes/memorymodel.h) \ include/linux/spinlock.h \ $(wildcard include/config/debug/spinlock.h) \ $(wildcard include/config/generic/lockbreak.h) \ $(wildcard include/config/preempt.h) \ $(wildcard include/config/debug/lock/alloc.h) \ include/linux/typecheck.h \ include/linux/preempt.h \ $(wildcard include/config/debug/preempt.h) \ $(wildcard include/config/preempt/tracer.h) \ $(wildcard include/config/preempt/notifiers.h) \ include/linux/thread_info.h \ $(wildcard include/config/compat.h) \ include/linux/types.h \ $(wildcard include/config/uid16.h) \ $(wildcard include/config/lbdaf.h) \ $(wildcard include/config/phys/addr/t/64bit.h) \ $(wildcard include/config/64bit.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/types.h \ $(wildcard include/config/phys/64bit.h) \ include/asm-generic/int-ll64.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/bitsperlong.h \ include/asm-generic/bitsperlong.h \ include/linux/posix_types.h \ include/linux/stddef.h \ include/linux/compiler.h \ $(wildcard include/config/trace/branch/profiling.h) \ $(wildcard include/config/profile/all/branches.h) \ $(wildcard include/config/enable/must/check.h) \ $(wildcard include/config/enable/warn/deprecated.h) \ include/linux/compiler-gcc.h \ $(wildcard include/config/arch/supports/optimized/inlining.h) \ $(wildcard include/config/optimize/inlining.h) \ include/linux/compiler-gcc4.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/posix_types.h \ include/linux/bitops.h \ $(wildcard include/config/generic/find/first/bit.h) \ $(wildcard include/config/generic/find/last/bit.h) \ $(wildcard include/config/generic/find/next/bit.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/bitops.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/asm-compat.h \ $(wildcard include/config/power4/only.h) \ $(wildcard include/config/ibm405/err77.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/synch.h \ $(wildcard include/config/ppc/e500mc.h) \ $(wildcard include/config/e500.h) \ include/linux/stringify.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/feature-fixups.h \ $(wildcard include/config/ppc64.h) \ include/asm-generic/bitops/non-atomic.h \ include/asm-generic/bitops/fls64.h \ include/asm-generic/bitops/hweight.h \ include/asm-generic/bitops/find.h \ include/asm-generic/bitops/sched.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/thread_info.h \ $(wildcard include/config/ppc/256k/pages.h) \ include/linux/cache.h \ $(wildcard include/config/arch/has/cache/line/size.h) \ include/linux/kernel.h \ $(wildcard include/config/preempt/voluntary.h) \ $(wildcard include/config/debug/spinlock/sleep.h) \ $(wildcard include/config/prove/locking.h) \ $(wildcard include/config/printk.h) \ $(wildcard include/config/dynamic/debug.h) \ $(wildcard include/config/ring/buffer.h) \ $(wildcard include/config/tracing.h) \ $(wildcard include/config/ftrace/mcount/record.h) \ /tools/dev/eldk/usr/bin/../lib/gcc/powerpc-linux/4.2.2/include/stdarg.h \ include/linux/linkage.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/linkage.h \ include/linux/log2.h \ $(wildcard include/config/arch/has/ilog2/u32.h) \ $(wildcard include/config/arch/has/ilog2/u64.h) \ include/linux/dynamic_debug.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/byteorder.h \ include/linux/byteorder/big_endian.h \ include/linux/swab.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/swab.h \ include/linux/byteorder/generic.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/bug.h \ $(wildcard include/config/bug.h) \ $(wildcard include/config/debug/bugverbose.h) \ include/asm-generic/bug.h \ $(wildcard include/config/generic/bug.h) \ $(wildcard include/config/generic/bug/relative/pointers.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/div64.h \ include/asm-generic/div64.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/cache.h \ $(wildcard include/config/8xx.h) \ $(wildcard include/config/403gcx.h) \ $(wildcard include/config/ppc32.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/processor.h \ $(wildcard include/config/vsx.h) \ $(wildcard include/config/ppc/prep.h) \ $(wildcard include/config/task/size.h) \ $(wildcard include/config/kernel/start.h) \ $(wildcard include/config/4xx.h) \ $(wildcard include/config/booke.h) \ $(wildcard include/config/altivec.h) \ $(wildcard include/config/spe.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/reg.h \ $(wildcard include/config/40x.h) \ $(wildcard include/config/fsl/emb/perfmon.h) \ $(wildcard include/config/ppc/book3s/64.h) \ $(wildcard include/config/ppc/book3s/32.h) \ $(wildcard include/config/ppc/book3e/64.h) \ $(wildcard include/config/e200.h) \ $(wildcard include/config/ppc/cell.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/cputable.h \ $(wildcard include/config/mpc10x/bridge.h) \ $(wildcard include/config/ppc/83xx.h) \ $(wildcard include/config/8260.h) \ $(wildcard include/config/ppc/mpc52xx.h) \ $(wildcard include/config/bdi/switch.h) \ $(wildcard include/config/power3.h) \ $(wildcard include/config/power4.h) \ $(wildcard include/config/44x.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/reg_booke.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/ptrace.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/page.h \ $(wildcard include/config/ppc/64k/pages.h) \ $(wildcard include/config/ppc/16k/pages.h) \ $(wildcard include/config/page/offset.h) \ $(wildcard include/config/physical/start.h) \ $(wildcard include/config/relocatable.h) \ $(wildcard include/config/ppc/std/mmu/64.h) \ $(wildcard include/config/hugetlb/page.h) \ $(wildcard include/config/ppc/smlpar.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/kdump.h \ $(wildcard include/config/crash/dump.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/page_32.h \ $(wildcard include/config/physical/align.h) \ $(wildcard include/config/not/coherent/cache.h) \ $(wildcard include/config/pte/64bit.h) \ include/asm-generic/getorder.h \ include/asm-generic/memory_model.h \ include/linux/list.h \ $(wildcard include/config/debug/list.h) \ include/linux/poison.h \ $(wildcard include/config/illegal/pointer/value.h) \ include/linux/prefetch.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/system.h \ $(wildcard include/config/debugger.h) \ $(wildcard include/config/kexec.h) \ $(wildcard include/config/6xx.h) \ $(wildcard include/config/booke/wdt.h) \ $(wildcard include/config/virt/cpu/accounting.h) \ include/linux/irqflags.h \ $(wildcard include/config/trace/irqflags.h) \ $(wildcard include/config/irqsoff/tracer.h) \ $(wildcard include/config/trace/irqflags/support.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/irqflags.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/hw_irq.h \ $(wildcard include/config/ppc/book3e.h) \ include/asm-generic/cmpxchg-local.h \ include/linux/bottom_half.h \ include/linux/spinlock_types.h \ include/linux/spinlock_types_up.h \ include/linux/lockdep.h \ $(wildcard include/config/lockdep.h) \ $(wildcard include/config/lock/stat.h) \ $(wildcard include/config/generic/hardirqs.h) \ include/linux/rwlock_types.h \ include/linux/spinlock_up.h \ include/linux/rwlock.h \ include/linux/spinlock_api_up.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/atomic.h \ include/asm-generic/atomic64.h \ include/asm-generic/atomic-long.h \ include/linux/wait.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/current.h \ include/linux/threads.h \ $(wildcard include/config/nr/cpus.h) \ $(wildcard include/config/base/small.h) \ include/linux/numa.h \ $(wildcard include/config/nodes/shift.h) \ include/linux/init.h \ $(wildcard include/config/modules.h) \ $(wildcard include/config/hotplug.h) \ include/linux/seqlock.h \ include/linux/nodemask.h \ include/linux/bitmap.h \ include/linux/string.h \ $(wildcard include/config/binary/printf.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/string.h \ include/linux/pageblock-flags.h \ $(wildcard include/config/hugetlb/page/size/variable.h) \ include/generated/bounds.h \ include/linux/memory_hotplug.h \ $(wildcard include/config/have/arch/nodedata/extension.h) \ $(wildcard include/config/memory/hotremove.h) \ include/linux/notifier.h \ include/linux/mutex.h \ $(wildcard include/config/debug/mutexes.h) \ include/linux/rwsem.h \ $(wildcard include/config/rwsem/generic/spinlock.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/rwsem.h \ include/linux/srcu.h \ include/linux/topology.h \ $(wildcard include/config/sched/smt.h) \ $(wildcard include/config/sched/mc.h) \ include/linux/cpumask.h \ $(wildcard include/config/cpumask/offstack.h) \ $(wildcard include/config/hotplug/cpu.h) \ $(wildcard include/config/debug/per/cpu/maps.h) \ $(wildcard include/config/disable/obsolete/cpumask/functions.h) \ include/linux/smp.h \ $(wildcard include/config/use/generic/smp/helpers.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/topology.h \ $(wildcard include/config/pci.h) \ include/asm-generic/topology.h \ include/linux/mmdebug.h \ $(wildcard include/config/debug/virtual.h) \ include/linux/rbtree.h \ include/linux/prio_tree.h \ include/linux/debug_locks.h \ $(wildcard include/config/debug/locking/api/selftests.h) \ include/linux/mm_types.h \ $(wildcard include/config/split/ptlock/cpus.h) \ $(wildcard include/config/want/page/debug/flags.h) \ $(wildcard include/config/aio.h) \ $(wildcard include/config/mmu/notifier.h) \ include/linux/auxvec.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/auxvec.h \ include/linux/completion.h \ include/linux/page-debug-flags.h \ $(wildcard include/config/page/poisoning.h) \ $(wildcard include/config/page/debug/something/else.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/mmu.h \ $(wildcard include/config/ppc/std/mmu/32.h) \ $(wildcard include/config/ppc/book3e/mmu.h) \ $(wildcard include/config/ppc/8xx.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/mmu-44x.h \ $(wildcard include/config/ppc/early/debug/44x.h) \ $(wildcard include/config/ppc/early/debug/44x/physlow.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/pgtable.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/pgtable-ppc32.h \ $(wildcard include/config/consistent/size.h) \ $(wildcard include/config/fsl/booke.h) \ include/asm-generic/pgtable-nopmd.h \ include/asm-generic/pgtable-nopud.h \ include/linux/sched.h \ $(wildcard include/config/sched/debug.h) \ $(wildcard include/config/no/hz.h) \ $(wildcard include/config/detect/softlockup.h) \ $(wildcard include/config/detect/hung/task.h) \ $(wildcard include/config/core/dump/default/elf/headers.h) \ $(wildcard include/config/bsd/process/acct.h) \ $(wildcard include/config/taskstats.h) \ $(wildcard include/config/audit.h) \ $(wildcard include/config/inotify/user.h) \ $(wildcard include/config/epoll.h) \ $(wildcard include/config/posix/mqueue.h) \ $(wildcard include/config/keys.h) \ $(wildcard include/config/user/sched.h) \ $(wildcard include/config/sysfs.h) \ $(wildcard include/config/schedstats.h) \ $(wildcard include/config/task/delay/acct.h) \ $(wildcard include/config/fair/group/sched.h) \ $(wildcard include/config/rt/group/sched.h) \ $(wildcard include/config/blk/dev/io/trace.h) \ $(wildcard include/config/tree/preempt/rcu.h) \ $(wildcard include/config/cc/stackprotector.h) \ $(wildcard include/config/sysvipc.h) \ $(wildcard include/config/auditsyscall.h) \ $(wildcard include/config/rt/mutexes.h) \ $(wildcard include/config/task/xacct.h) \ $(wildcard include/config/cpusets.h) \ $(wildcard include/config/cgroups.h) \ $(wildcard include/config/fault/injection.h) \ $(wildcard include/config/latencytop.h) \ $(wildcard include/config/function/graph/tracer.h) \ $(wildcard include/config/have/unstable/sched/clock.h) \ $(wildcard include/config/group/sched.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/param.h \ $(wildcard include/config/hz.h) \ include/linux/capability.h \ include/linux/timex.h \ include/linux/time.h \ $(wildcard include/config/arch/uses/gettimeoffset.h) \ include/linux/math64.h \ include/linux/param.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/timex.h \ include/linux/jiffies.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/cputime.h \ include/asm-generic/cputime.h \ include/linux/sem.h \ include/linux/ipc.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/ipcbuf.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/sembuf.h \ include/linux/rcupdate.h \ $(wildcard include/config/tree/rcu.h) \ $(wildcard include/config/tiny/rcu.h) \ include/linux/rcutree.h \ include/linux/signal.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/signal.h \ include/asm-generic/signal-defs.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/siginfo.h \ include/asm-generic/siginfo.h \ include/linux/path.h \ include/linux/pid.h \ include/linux/percpu.h \ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \ $(wildcard include/config/have/setup/per/cpu/area.h) \ include/linux/slab.h \ $(wildcard include/config/slab/debug.h) \ $(wildcard include/config/debug/objects.h) \ $(wildcard include/config/slub.h) \ $(wildcard include/config/slob.h) \ $(wildcard include/config/debug/slab.h) \ include/linux/slab_def.h \ include/linux/kmemtrace.h \ $(wildcard include/config/kmemtrace.h) \ include/trace/events/kmem.h \ include/linux/tracepoint.h \ $(wildcard include/config/tracepoints.h) \ include/trace/define_trace.h \ $(wildcard include/config/event/tracing.h) \ include/linux/kmalloc_sizes.h \ include/linux/pfn.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/percpu.h \ include/asm-generic/percpu.h \ include/linux/percpu-defs.h \ $(wildcard include/config/debug/force/weak/per/cpu.h) \ include/linux/proportions.h \ include/linux/percpu_counter.h \ include/linux/seccomp.h \ $(wildcard include/config/seccomp.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/seccomp.h \ include/linux/unistd.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/unistd.h \ include/linux/rculist.h \ include/linux/rtmutex.h \ $(wildcard include/config/debug/rt/mutexes.h) \ include/linux/plist.h \ $(wildcard include/config/debug/pi/list.h) \ include/linux/resource.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/resource.h \ include/asm-generic/resource.h \ include/linux/timer.h \ $(wildcard include/config/timer/stats.h) \ $(wildcard include/config/debug/objects/timers.h) \ include/linux/ktime.h \ $(wildcard include/config/ktime/scalar.h) \ include/linux/debugobjects.h \ $(wildcard include/config/debug/objects/free.h) \ include/linux/hrtimer.h \ $(wildcard include/config/high/res/timers.h) \ include/linux/task_io_accounting.h \ $(wildcard include/config/task/io/accounting.h) \ include/linux/kobject.h \ include/linux/sysfs.h \ include/linux/kref.h \ include/linux/latencytop.h \ include/linux/cred.h \ $(wildcard include/config/debug/credentials.h) \ $(wildcard include/config/security.h) \ include/linux/key.h \ include/linux/sysctl.h \ include/linux/selinux.h \ $(wildcard include/config/security/selinux.h) \ include/linux/aio.h \ include/linux/workqueue.h \ $(wildcard include/config/debug/objects/work.h) \ include/linux/aio_abi.h \ include/linux/uio.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/io.h \ $(wildcard include/config/ra.h) \ $(wildcard include/config/rd.h) \ $(wildcard include/config/ppc/indirect/io.h) \ $(wildcard include/config/eeh.h) \ include/linux/device.h \ $(wildcard include/config/debug/devres.h) \ $(wildcard include/config/devtmpfs.h) \ include/linux/ioport.h \ include/linux/klist.h \ include/linux/module.h \ $(wildcard include/config/symbol/prefix.h) \ $(wildcard include/config/modversions.h) \ $(wildcard include/config/unused/symbols.h) \ $(wildcard include/config/kallsyms.h) \ $(wildcard include/config/module/unload.h) \ $(wildcard include/config/constructors.h) \ include/linux/stat.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/stat.h \ include/linux/kmod.h \ include/linux/elf.h \ include/linux/elf-em.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/elf.h \ $(wildcard include/config/spu/base.h) \ include/linux/moduleparam.h \ $(wildcard include/config/alpha.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/local.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/module.h \ $(wildcard include/config/dynamic/ftrace.h) \ include/trace/events/module.h \ include/linux/pm.h \ $(wildcard include/config/pm/sleep.h) \ $(wildcard include/config/pm/runtime.h) \ include/linux/semaphore.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/device.h \ $(wildcard include/config/swiotlb.h) \ include/linux/pm_wakeup.h \ $(wildcard include/config/pm.h) \ include/linux/io.h \ $(wildcard include/config/has/ioport.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/delay.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/time.h \ $(wildcard include/config/ppc/iseries.h) \ $(wildcard include/config/power.h) \ $(wildcard include/config/8xx/cpu6.h) \ include/asm-generic/iomap.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/io-defs.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/pte-44x.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/pte-common.h \ $(wildcard include/config/ppc/std/mmu.h) \ $(wildcard include/config/kgdb.h) \ $(wildcard include/config/xmon.h) \ $(wildcard include/config/kprobes.h) \ include/asm-generic/pgtable.h \ include/linux/page-flags.h \ $(wildcard include/config/pageflags/extended.h) \ $(wildcard include/config/arch/uses/pg/uncached.h) \ $(wildcard include/config/memory/failure.h) \ $(wildcard include/config/swap.h) \ $(wildcard include/config/s390.h) \ include/linux/vmstat.h \ $(wildcard include/config/vm/event/counters.h) \ include/linux/interrupt.h \ $(wildcard include/config/generic/irq/probe.h) \ include/linux/irqreturn.h \ include/linux/irqnr.h \ include/linux/hardirq.h \ include/linux/smp_lock.h \ $(wildcard include/config/lock/kernel.h) \ include/linux/ftrace_irq.h \ $(wildcard include/config/ftrace/nmi/enter.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/hardirq.h \ include/asm-generic/hardirq.h \ include/linux/irq.h \ $(wildcard include/config/irq/per/cpu.h) \ $(wildcard include/config/irq/release/method.h) \ $(wildcard include/config/intr/remap.h) \ $(wildcard include/config/generic/pending/irq.h) \ $(wildcard include/config/sparse/irq.h) \ $(wildcard include/config/numa/irq/desc.h) \ $(wildcard include/config/generic/hardirqs/no//do/irq.h) \ $(wildcard include/config/cpumasks/offstack.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/irq.h \ $(wildcard include/config/nr/irqs.h) \ $(wildcard include/config/irqstacks.h) \ include/linux/radix-tree.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/irq_regs.h \ include/asm-generic/irq_regs.h \ include/linux/irq_cpustat.h \ include/linux/personality.h \ include/linux/tty.h \ include/linux/fs.h \ $(wildcard include/config/dnotify.h) \ $(wildcard include/config/quota.h) \ $(wildcard include/config/fsnotify.h) \ $(wildcard include/config/inotify.h) \ $(wildcard include/config/fs/posix/acl.h) \ $(wildcard include/config/debug/writecount.h) \ $(wildcard include/config/file/locking.h) \ $(wildcard include/config/block.h) \ $(wildcard include/config/fs/xip.h) \ $(wildcard include/config/migration.h) \ include/linux/limits.h \ include/linux/ioctl.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/ioctl.h \ include/asm-generic/ioctl.h \ include/linux/kdev_t.h \ include/linux/dcache.h \ include/linux/fiemap.h \ include/linux/quota.h \ $(wildcard include/config/quota/netlink/interface.h) \ include/linux/dqblk_xfs.h \ include/linux/dqblk_v1.h \ include/linux/dqblk_v2.h \ include/linux/dqblk_qtree.h \ include/linux/nfs_fs_i.h \ include/linux/nfs.h \ include/linux/sunrpc/msg_prot.h \ include/linux/inet.h \ include/linux/fcntl.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/fcntl.h \ include/asm-generic/fcntl.h \ include/linux/err.h \ include/linux/major.h \ include/linux/termios.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/termios.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/ioctls.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/termbits.h \ include/asm-generic/termios-base.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/uaccess.h \ include/linux/tty_driver.h \ $(wildcard include/config/console/poll.h) \ include/linux/cdev.h \ include/linux/tty_ldisc.h \ include/linux/iocontext.h \ $(wildcard include/config/blk/cgroup.h) \ include/linux/security.h \ $(wildcard include/config/security/path.h) \ $(wildcard include/config/security/network.h) \ $(wildcard include/config/security/network/xfrm.h) \ $(wildcard include/config/securityfs.h) \ include/linux/binfmts.h \ include/linux/shm.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/shmparam.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/shmbuf.h \ include/linux/msg.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/msgbuf.h \ include/linux/xfrm.h \ include/net/flow.h \ include/linux/in6.h \ include/linux/cpu.h \ $(wildcard include/config/arch/cpu/probe/release.h) \ $(wildcard include/config/pm/sleep/smp.h) \ include/linux/sysdev.h \ include/linux/node.h \ $(wildcard include/config/memory/hotplug/sparse.h) \ $(wildcard include/config/hugetlbfs.h) \ include/linux/acct.h \ $(wildcard include/config/m68k.h) \ $(wildcard include/config/bsd/process/acct/v3.h) \ include/linux/tsacct_kern.h \ include/linux/taskstats.h \ include/linux/file.h \ include/linux/fdtable.h \ include/linux/nsproxy.h \ $(wildcard include/config/cgroup/ns.h) \ include/linux/pid_namespace.h \ $(wildcard include/config/pid/ns.h) \ include/linux/ptrace.h \ include/linux/profile.h \ $(wildcard include/config/profiling.h) \ include/linux/mount.h \ include/linux/proc_fs.h \ $(wildcard include/config/proc/devicetree.h) \ $(wildcard include/config/proc/kcore.h) \ include/linux/magic.h \ include/linux/kthread.h \ include/linux/mempolicy.h \ $(wildcard include/config/tmpfs.h) \ include/linux/pagemap.h \ include/linux/highmem.h \ $(wildcard include/config/debug/highmem.h) \ include/linux/uaccess.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/cacheflush.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/kmap_types.h \ include/linux/taskstats_kern.h \ include/linux/delayacct.h \ include/linux/freezer.h \ $(wildcard include/config/freezer.h) \ $(wildcard include/config/cgroup/freezer.h) \ include/linux/cgroup.h \ include/linux/cgroupstats.h \ include/linux/prio_heap.h \ include/linux/idr.h \ include/linux/syscalls.h \ $(wildcard include/config/event/profile.h) \ $(wildcard include/config/ftrace/syscalls.h) \ $(wildcard include/config/mips.h) \ $(wildcard include/config/have/syscall/wrappers.h) \ include/trace/syscall.h \ include/linux/ftrace_event.h \ include/linux/ring_buffer.h \ $(wildcard include/config/ring/buffer/allow/swap.h) \ include/linux/kmemcheck.h \ include/linux/seq_file.h \ include/linux/trace_seq.h \ include/linux/posix-timers.h \ include/linux/cn_proc.h \ $(wildcard include/config/proc/events.h) \ include/linux/futex.h \ include/linux/pipe_fs_i.h \ include/linux/audit.h \ $(wildcard include/config/change.h) \ include/linux/blkdev.h \ $(wildcard include/config/blk/dev/bsg.h) \ $(wildcard include/config/bounce.h) \ $(wildcard include/config/blk/dev/integrity.h) \ include/linux/genhd.h \ $(wildcard include/config/fail/make/request.h) \ $(wildcard include/config/solaris/x86/partition.h) \ $(wildcard include/config/bsd/disklabel.h) \ $(wildcard include/config/unixware/disklabel.h) \ $(wildcard include/config/minix/subpartition.h) \ include/linux/backing-dev.h \ $(wildcard include/config/debug/fs.h) \ include/linux/writeback.h \ include/linux/mempool.h \ include/linux/bio.h \ include/linux/ioprio.h \ include/linux/bsg.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/scatterlist.h \ $(wildcard include/config/debug/sg.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/dma.h \ include/linux/elevator.h \ include/linux/task_io_accounting_ops.h \ include/linux/tracehook.h \ include/linux/fs_struct.h \ include/linux/init_task.h \ include/linux/utsname.h \ $(wildcard include/config/uts/ns.h) \ include/linux/ftrace.h \ $(wildcard include/config/function/tracer.h) \ $(wildcard include/config/stack/tracer.h) \ $(wildcard include/config/frame/pointer.h) \ $(wildcard include/config/hw/branch/tracer.h) \ include/linux/trace_clock.h \ include/linux/kallsyms.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/ftrace.h \ include/linux/user_namespace.h \ $(wildcard include/config/user/ns.h) \ include/linux/securebits.h \ include/net/net_namespace.h \ $(wildcard include/config/nf/conntrack.h) \ $(wildcard include/config/ipv6.h) \ $(wildcard include/config/ip/dccp.h) \ $(wildcard include/config/netfilter.h) \ $(wildcard include/config/xfrm.h) \ $(wildcard include/config/wext/core.h) \ $(wildcard include/config/net.h) \ $(wildcard include/config/net/ns.h) \ include/net/netns/core.h \ include/net/netns/mib.h \ $(wildcard include/config/xfrm/statistics.h) \ include/net/snmp.h \ include/linux/snmp.h \ include/net/netns/unix.h \ include/net/netns/packet.h \ include/net/netns/ipv4.h \ $(wildcard include/config/ip/multiple/tables.h) \ $(wildcard include/config/ip/mroute.h) \ $(wildcard include/config/ip/pimsm/v1.h) \ $(wildcard include/config/ip/pimsm/v2.h) \ include/net/inet_frag.h \ include/net/netns/ipv6.h \ $(wildcard include/config/ipv6/multiple/tables.h) \ $(wildcard include/config/ipv6/mroute.h) \ $(wildcard include/config/ipv6/pimsm/v2.h) \ include/net/dst_ops.h \ include/net/netns/dccp.h \ include/net/netns/x_tables.h \ $(wildcard include/config/bridge/nf/ebtables.h) \ include/linux/netfilter.h \ $(wildcard include/config/netfilter/debug.h) \ $(wildcard include/config/nf/nat/needed.h) \ include/linux/skbuff.h \ $(wildcard include/config/bridge/netfilter.h) \ $(wildcard include/config/has/dma.h) \ $(wildcard include/config/net/sched.h) \ $(wildcard include/config/net/cls/act.h) \ $(wildcard include/config/ipv6/ndisc/nodetype.h) \ $(wildcard include/config/net/dma.h) \ $(wildcard include/config/network/secmark.h) \ include/linux/net.h \ include/linux/socket.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/socket.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/sockios.h \ include/linux/sockios.h \ include/linux/random.h \ include/linux/ratelimit.h \ include/linux/textsearch.h \ include/net/checksum.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/checksum.h \ include/linux/dmaengine.h \ $(wildcard include/config/dma/engine.h) \ $(wildcard include/config/async/tx/dma.h) \ $(wildcard include/config/async/tx/disable/channel/switch.h) \ include/linux/dma-mapping.h \ $(wildcard include/config/have/dma/attrs.h) \ include/linux/dma-attrs.h \ include/linux/bug.h \ include/linux/scatterlist.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/dma-mapping.h \ include/linux/dma-debug.h \ $(wildcard include/config/dma/api/debug.h) \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/swiotlb.h \ include/linux/swiotlb.h \ include/asm-generic/dma-mapping-common.h \ include/linux/if.h \ include/linux/hdlc/ioctl.h \ include/linux/in.h \ include/net/netns/xfrm.h \ include/linux/seq_file_net.h \ include/linux/perf_event.h \ $(wildcard include/config/have/hw/breakpoint.h) \ $(wildcard include/config/perf/use/vmalloc.h) \ include/trace/events/sched.h \ include/linux/hw_breakpoint.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/mmu_context.h \ include/asm-generic/mm_hooks.h \ /tools/dev/repos/linux-2.6-xlnx/arch/powerpc/include/asm/cputhreads.h \ kernel/cred-internals.h \ kernel/exit.o: $(deps_kernel/exit.o) $(deps_kernel/exit.o):
mattkelly/linux-2.6-xlnx
kernel/.exit.o.cmd
Batchfile
gpl-2.0
32,971
/*------------------------------------------------------------------------- atanf.c - Computes arctan of a 32-bit float as outlined in [1] Copyright (C) 2001, 2002, Jesus Calvino-Fraga <jesusc At ieee.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1, 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this library; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, if you link this library with other files, some of which are compiled with SDCC, to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. -------------------------------------------------------------------------*/ /* [1] William James Cody and W. M. Waite. _Software manual for the elementary functions_, Englewood Cliffs, N.J.:Prentice-Hall, 1980. */ #include <math.h> #include <errno.h> #define P0 -0.4708325141E+0 #define P1 -0.5090958253E-1 #define Q0 0.1412500740E+1 #define Q1 0.1000000000E+1 #define P(g,f) ((P1*g+P0)*g*f) #define Q(g) (Q1*g+Q0) #define K1 0.2679491924 /* 2-sqrt(3) */ #define K2 0.7320508076 /* sqrt(3)-1 */ #define K3 1.7320508076 /* sqrt(3) */ #ifdef SDCC_mcs51 #define myconst code #else #define myconst const #endif float atanf(const float x) _MATH_REENTRANT { float f, r, g; int n=0; static myconst float a[]={ 0.0, 0.5235987756, 1.5707963268, 1.0471975512 }; f=fabsf(x); if(f>1.0) { f=1.0/f; n=2; } if(f>K1) { f=((K2*f-1.0)+f)/(K3+f); // What it is actually wanted is this more accurate formula, // but SDCC optimizes it and then it does not work: // f=(((K2*f-0.5)-0.5)+f)/(K3+f); n++; } if(fabsf(f)<EPS) r=f; else { g=f*f; r=f+P(g,f)/Q(g); } if(n>1) r=-r; r+=a[n]; if(x<0.0) r=-r; return r; }
darconeous/sdcc
device/lib/pic16/libm/atanf.c
C
gpl-2.0
2,590
package module6.task2; public class Rosebush { private Rose[] roses; }
alenab/MyLabs
src/module6/task2/Rosebush.java
Java
gpl-2.0
76
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_51) on Sun May 11 19:21:42 BST 2014 --> <title>Constant Field Values (MetaMap JavaDoc)</title> <meta name="date" content="2014-05-11"> <link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Constant Field Values (MetaMap JavaDoc)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li><a href="overview-tree.html">Tree</a></li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-all.html">Index</a></li> <li><a href="help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?constant-values.html" target="_top">Frames</a></li> <li><a href="constant-values.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 title="Constant Field Values" class="title">Constant Field Values</h1> <h2 title="Contents">Contents</h2> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li><a href="overview-tree.html">Tree</a></li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-all.html">Index</a></li> <li><a href="help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?constant-values.html" target="_top">Frames</a></li> <li><a href="constant-values.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
SONIAGroup/S.O.N.I.A.
GATE_Developer_8.0/plugins/Tagger_MetaMap/doc/javadoc/constant-values.html
HTML
gpl-2.0
3,360
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* Rosegarden A sequencer and musical notation editor. Copyright 2000-2010 the Rosegarden development team. See the AUTHORS file for more details. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the file COPYING included with this distribution for more information. */ #include "AudioProcess.h" #include "MappedEventList.h" #include <string.h> #ifndef _MIDIPROCESS_H #define _MIDIPROCESS_H namespace Rosegarden { class MidiThread : public AudioThread { public: MidiThread(std::string name, // for diagnostics SoundDriver *driver, unsigned int sampleRate); virtual ~MidiThread(); void bufferMidiOut(); // These are the two RingBuffers we use to pass MappedEvents in and out // of this thread. // RingBuffer<MappedEvent> *getMidiOutBuffer() { return m_outBuffer; } RingBuffer<MappedEvent> *getMidiInBuffer() { return m_inBuffer; } void logMsg(const std::string &message); RealTime getTimeOfDay(); // Process note off events as we need to - if we want to force all notes off // then pass true to the first argument. // void processNotesOff(bool everything = false); // On jump - clear the out buffers // void clearBuffersOut(); // Initialise MIDI IN to a given port and set the callback // void initialiseMidiIn(unsigned int port); // The RTMidi MIDI in callback // static void midiInCallback(double deltatime, std::vector< unsigned char > *message, void *userData); // Static method for accessing any recorded/captured MIDI notes // static MappedEventList getReturnComposition(); // Ability to set elapsed time to reset this at start of playback/recording // static void setElapsedTime(double elapsedTime) { m_elapsedTime = elapsedTime; } protected: // A thread-local MappedEventList which is populated and returned to // the PortableSoundDriver on request. // static MappedEventList *m_returnComposition; // Static locks for the return mappedcomposition thing // static pthread_mutex_t m_recLock; //static pthread_cond_t m_condition; virtual void threadRun(); void processBuffers(); RingBuffer<MappedEvent> *m_outBuffer; RingBuffer<MappedEvent> *m_inBuffer; RealTime m_startTime; QFile *m_threadLogFile; // Locally maintained midi output list // MappedEventList m_midiOutList; // Fetch buffer // MappedEvent *m_fetchBuffer; unsigned int m_fetchBufferSize; // MIDI Note-off handling - copy from SoundDriver // NoteOffQueue m_noteOffQueue; // Keep a track of the current RtMidi output port // unsigned int m_currentRtOutPort; // Keep a track of note ons coming in while recording so we can get durations // static std::map<unsigned int, std::multimap<unsigned int, MappedEvent*> > m_noteOnMap; // Keep a track of elapsed time for events as we only get deltatimes from RtMidi // static double m_elapsedTime; }; } #endif // MIDIPROCESS_H
bownie/RosegardenW
sound/MidiProcess.h
C
gpl-2.0
3,580
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Aria: Member List</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.2 --> <div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <a class="qindex" href="examples.html">Examples</a></div> <h1>ArMapFileLineSet Member List</h1>This is the complete list of members for <a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a>, including all inherited members.<p><table> <tr class="memlist"><td><a class="el" href="classArMapFileLineSet.html#a1">ArMapFileLineSet</a>()</td><td><a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a></td><td><code> [inline]</code></td></tr> <tr class="memlist"><td><a class="el" href="classArMapFileLineSet.html#a0">ArMapFileLineSet</a>(const ArMapFileLineSet &amp;other)</td><td><a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a></td><td><code> [inline]</code></td></tr> <tr class="memlist"><td><a class="el" href="classArMapFileLineSet.html#e0">calculateChanges</a>(ArMapFileLineSet &amp;origLines, ArMapFileLineSet &amp;newLines, ArMapFileLineSet *deletedLinesOut, ArMapFileLineSet *addedLinesOut, bool isCheckChildren=true)</td><td><a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a></td><td><code> [static]</code></td></tr> <tr class="memlist"><td><a class="el" href="classArMapFileLineSet.html#a2">find</a>(const ArMapFileLine &amp;groupParent)</td><td><a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classArMapFileLineSet.html#a3">log</a>(const char *prefix)</td><td><a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classArMapFileLineSet.html#a4">operator=</a>(const ArMapFileLineSet &amp;other)</td><td><a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a></td><td><code> [inline]</code></td></tr> <tr class="memlist"><td><a class="el" href="classArMapFileLineSet.html#a5">~ArMapFileLineSet</a>()</td><td><a class="el" href="classArMapFileLineSet.html">ArMapFileLineSet</a></td><td><code> [inline]</code></td></tr> </table><hr size="1"><address style="align: right;"><small>Generated on Thu Jan 7 10:34:42 2010 for Aria by&nbsp; <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address> </body> </html>
charismaticchiu/Robotics
docs/classArMapFileLineSet-members.html
HTML
gpl-2.0
3,053
#!/usr/bin/env python #coding=utf-8 # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import webapp2 import time import dbcontroller as dc import speak import User import logging class MainHandler(webapp2.RequestHandler): def get(self): list = dc.refresh() lines = speak.speak(list) import twitter for user in User.users: for i in lines: str1 = i logging.log(logging.INFO, u"twitter length is " + \ str(len(str1))) try: twitter.sendMessage(str1) except: logging.log(logging.WARNING, u"twitter send fail:" + str1) return self.response.out.write('ok') app = webapp2.WSGIApplication([ ('/whyisme', MainHandler) ], debug=True)
ariwaranosai/twitter_bot
twitter_bot/main.py
Python
gpl-2.0
1,342
<?php /*////////////////////////////////////////////////////////////////////////*/ //////////////////CMS CREATO INTERAMENTE DA ZAMBAHACKER//////////////////// //////////////////SCRITTO IN PHP 5 OOP + AJAX///////////////////////////// /////////////////E' VIETATA LA COPIA///////////////////////////////////// //////////////////O LA QUALSIASI VIOLAZIONE DI COPYRIGHT//////////////// /*///////////////////////////////////////////////////////////////////*/ require_once "../../generale.php"; if($_SERVER['SERVER_NAME'] != $config->url_sito){ echo '<center>Errore nella configurazion dell\'url<center>'; }else{ $login = new login($mysql,$config->colore); $login->accesso($_POST['username'],$_POST['password']); $mysql->close(); }
ZambaHacker-PHP/ZambaHacker-CMS-2014
ajax/login/login.php
PHP
gpl-2.0
747
package org.saiku.web.rest.resources; import org.saiku.service.ISessionService; import org.saiku.web.bean.DatabaseInfoBean; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.List; import java.util.UUID; import javax.ws.rs.FormParam; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import org.saiku.web.bean.DatabaseInfoBean; import org.saiku.web.dao.DatabaseInfoDao; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.stereotype.Component; /** * Created with IntelliJ IDEA. * User: zhisheng.hzs * Date: 12-9-6 * Time: 上午10:32 * 保存连接配置信息 */ @Component @Path("/saiku/database") @XmlAccessorType(XmlAccessType.NONE) public class DatabaseConfigResource { private static final Logger log = LoggerFactory.getLogger(DatabaseConfigResource.class); DatabaseInfoDao dao=null; /*public void setConnection(ISessionService connection) throws Exception{ try{ } catch (Exception e){ System.out.println(e.getMessage()); e.printStackTrace(); } }*/ //TODO 保存 @POST @Path("/save") public String saveConfig(@FormParam("con_name") String con_name, @FormParam("con_server") String con_server, @FormParam("con_port") String con_port, @FormParam("con_type") String con_type, @FormParam("user") String user, @FormParam("password") String password){ ApplicationContext ctx=new ClassPathXmlApplicationContext("soasManager.xml"); dao=(DatabaseInfoDao)ctx.getBean("DatabaseInfoDao"); String s_UUID=UUID.randomUUID().toString(); DatabaseInfoBean config_info=new DatabaseInfoBean(); config_info.setConnection_name(con_name); config_info.setConnection_type(con_type); config_info.setDatabase_server(con_server); config_info.setDatabase_port(con_port); config_info.setUserid(user); config_info.setPassword(password);//设置好保存的内容 dao.insertConfigInfo(config_info); return "saved"; } //TODO 返回已存信息 @GET @Path("/load") @Produces("application/json") public List showConfigInfo() throws Exception{ List<DatabaseInfoBean> config_information=new ArrayList<DatabaseInfoBean>(); try{ ApplicationContext ctx=new ClassPathXmlApplicationContext("soasManager.xml"); dao=(DatabaseInfoDao)ctx.getBean("DatabaseInfoDao"); List[] config_info_tmp=dao.showConfigInfo();//获取到数据库的配置信息。 List<String> config_name= config_info_tmp[0]; List<String> config_type= config_info_tmp[1]; List<String> config_server= config_info_tmp[2]; List<String> config_port=config_info_tmp[3]; List<String> config_user= config_info_tmp[4]; List<String> config_password= config_info_tmp[5];//依次为name,type,server.port,user, for(int i=0;i<config_name.size();i++){ DatabaseInfoBean databaseInfoBean=new DatabaseInfoBean(); databaseInfoBean.setConnection_name(config_name.get(i)); databaseInfoBean.setConnection_type(config_type.get(i)); databaseInfoBean.setDatabase_server(config_server.get(i)); databaseInfoBean.setDatabase_port(config_port.get(i)); databaseInfoBean.setUserid(config_user.get(i)); databaseInfoBean.setPassword(config_password.get(i)); config_information.add(databaseInfoBean);//依次添加 } } catch (Exception e){ System.out.println(e.getMessage()); //System.out.println(e.getErrorCode()); e.printStackTrace(); } return config_information; } //TODO 删除信息 @POST @Path("/delete") public String deleteConfigInfo(@FormParam("con_name") String con_name) throws Exception{ try{ ApplicationContext ctx=new ClassPathXmlApplicationContext("soasManager.xml"); dao=(DatabaseInfoDao)ctx.getBean("DatabaseInfoDao"); DatabaseInfoBean config_info=new DatabaseInfoBean(); config_info.setConnection_name(con_name);//根据保存名称来删除 dao.deleteConfigInfo(config_info); } catch (Exception e){ System.out.println(e.getMessage()); //System.out.println(e.getErrorCode()); e.printStackTrace(); } return "deleted!"; } }
hzssean/soas
soas-core/soas-web/src/main/java/org/saiku/web/rest/resources/DatabaseConfigResource.java
Java
gpl-2.0
5,162
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication4 { class CSV { string rutaArchivo; public void leerArchivo() { Console.WriteLine("Dame la ruta del archivo a leer"); this.rutaArchivo = Console.ReadLine(); } public Boolean VerificarRuta() { Boolean ArchivoExiste; if (File.Exists(this.rutaArchivo)) ArchivoExiste = true; else ArchivoExiste = false; return ArchivoExiste; } public void VerificaArchivo() { if (VerificarRuta()) if (Path.GetExtension(this.rutaArchivo) == ".csv") Console.WriteLine("\nTu archivo si tiene la extensión CSV\n"); else Console.WriteLine("\nTu archivo no tiene la extensión CSV.. pertenece a la extensión.. " + Path.GetExtension(this.rutaArchivo)); } public List<string[]> ObtenerContenido() { List<string[]> csvArreglo = new List<string[]>(); try { string linea; string[] fila; StreamReader readFile = new StreamReader(this.rutaArchivo); while ((linea = readFile.ReadLine()) != null) { fila = linea.Split(','); csvArreglo.Add(fila); } } catch (Exception e) { Console.WriteLine("\nEl archivo con extensión .CSV no existe\n", e); } return csvArreglo; } } }
AnthonyPuentes/LeerArchivosCsv
ConsoleAplication4/CSV.cs
C#
gpl-2.0
1,264
/* * The ManaPlus Client * Copyright (C) 2012-2014 The ManaPlus Developers * * This file is part of The ManaPlus Client. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef EVENTS_INPUTEVENT_H #define EVENTS_INPUTEVENT_H #include <map> #include <vector> #include "localconsts.h" typedef std::vector<int> KeysVector; typedef KeysVector::iterator KeysVectorIter; typedef KeysVector::const_iterator KeysVectorCIter; typedef std::map<int, KeysVector> KeyToActionMap; typedef KeyToActionMap::iterator KeyToActionMapIter; typedef std::map<int, int> KeyToIdMap; typedef KeyToIdMap::iterator KeyToIdMapIter; typedef std::map<int, int> KeyTimeMap; typedef KeyTimeMap::iterator KeyTimeMapIter; struct InputEvent final { InputEvent(const int action0, const int mask0) : action(action0), mask(mask0) { } int action; int mask; }; #endif // EVENTS_INPUTEVENT_H
KaneHart/Elmlor-Client
src/events/inputevent.h
C
gpl-2.0
1,501
\documentclass{article} \usepackage{amsmath} \begin{document} \section{Testing overrightarrow} Compare $$ \vec{p} $$ and $$ \overrightarrow{p} $$ \begin{tabular}{rl} \multicolumn{2}{c}{$\overrightarrow{p} = m\overrightarrow{v}$}\\ \\ $\overrightarrow{p}$&: momentum ($kg.m.s^{-1}$ + direction)\\ $m$&: mass ($kg$)\\ $\overrightarrow{v}$&: velocity ($m.s^{-1}$ + direction)\\ \end{tabular} \section{looking at font styles in equations} For example, in \[ {\bf n}(t+1) = A {\bf n}(t) {\rm Q} \] both the $\rm Q$ and the bold font $\bf n$ should not be italicized in the .rtf output. LaTeX never italicizes bold font in math mode (as this is never needed/wanted). \section{testing \texttt{align} environment} First \verb#\begin{align}# without an asterisk. \begin{align} zw &= (3+2i)(2-i) \notag \\ &= 6-3i+4i-2i^2 \notag \\ &= 8+i \notag \end{align} Next \verb#\begin{eqnarray}# without an asterisk. \begin{eqnarray} zw &=& (3+2i)(2-i) \nonumber \\ &=& 6-3i+4i-2i^2 \nonumber \\ &=& 8+i \nonumber \end{eqnarray} Now align with an asterisk. \begin{align*} zw &= (3+2i)(2-i) \\ &= 6-3i+4i-2i^2 \\ &= 8+i \end{align*} \section{testing equation references} \begin{equation} x=y \label{eqn1} \end{equation} The equation before this is equation \ref{eqn1}. Alternatively one might use \eqref{eqn1}. \section{reported (non-) problems in 1.9.15} First commas in equations $$ \hbox{for } x,y \hbox{ in } A $$ as an inline $\forall x, y \in Z$. Yet another comma example $R_1, R_2$ Now for the problem associated with \verb#\sum# $$ \sum = 1 $$ \section{Inline equations} First, test an inline equation in a paragraph of its own $x^2+y^2=z^2$ Lets test baselines of equations. First compare these ...$\ldots$... as well as ...$.$... Now descenders like y $y$ and finally x$^2$ vs $x^2$ or x$_2$ vs $x_2$ Parsing the tricky \verb#$$# properly $\varepsilon $$_o$ as an example. First begin with simple \verb#$# delimited equation such as $x+y=w$ as an example. All the equations in this section should look identical. Next how about a simple \verb#\begin{math}# delimited equation such as \begin{math}x+y=w\end{math} as an example. All the equations in this section should look identical. Now consider \verb#\(# and \verb#\)# delimited equation such as \(x+y=w\) as an example. All the equations in this section should look identical. \section{Unnumbered equations} I will start with a simple \verb#$$# wave equation that will have no number $$ \nabla^2 \phi -{1\over c} {\partial \phi\over \partial t} = 0 $$ Bug that caused crash when equation began with \verb#\ldots# $$ \ldots\nabla^2 \phi -{1\over c} {\partial \phi\over \partial t} = 0 $$ another reported crash with ldots \begin{eqnarray*} \ldots & = & b \\ c & = & d \end{eqnarray*} Note: Delimiting an equation by \verb|$$| is a plain\TeX{} command which causes inconsistent vertical distances and does not obey the class option \textsf{fleqn}. Therefore it should \emph{not} be used in \LaTeX{} documents. Use \verb#\[...\]# instead: \[ \nabla^2 \phi -{1\over c} {\partial \phi\over \partial t} = 0 \] This is followed by a \verb#displaymath# environment \begin{displaymath} \nabla^2 \phi -{1\over c} {\partial \phi\over \partial t} = 0 \end{displaymath} Here is an example of the \verb#\[# environment \[ \nabla^2 \phi -{1\over c} {\partial \phi\over \partial t} = 0 \] \noindent Here we check indentation \[ a=b \] displaymath \begin{displaymath} a=b \end{displaymath} enddisplaymath \section{Numbered equations} Next comes an \verb#equation# environment \begin{equation} \nabla^2 \phi -{1\over c} {\partial \phi\over \partial t} = 0 \end{equation} Note that \verb#\nonumber# in an \verb#equation# environment does not get an equation number usually. However, when the \verb#amsmath# package gets loaded then it is suppressed, \begin{equation} \nabla^2 \phi -{1\over c} {\partial \phi\over \partial t} = 0 \nonumber \end{equation} \section{Testing equation array} Here the equation array is being tested. This equation has no equation number and is about as simple as an equation array can get. \begin{eqnarray*} z & = & w + x + \\ & & 5w - 8c \end{eqnarray*} Here the equation array is being tested. This equation has equation numbers and is almost as simple as an equation array can get. \begin{eqnarray} z & = & w + x + \\ & & 5w - 8c \end{eqnarray} Here the equation array is being tested. This equation the first and third equations numbered \begin{eqnarray} z & = & w + x \\ z & = & w + x \nonumber\\ z & = & w + x \end{eqnarray} Here the equation array is being tested. This checks for a bug when \verb#\nonumber# is present in an \verb#\begin{eqnarray*}# environment. No equations should be numbered. \begin{eqnarray*} z & = & w + x \\ z & = & w + x \nonumber\\ z & = & w + x \end{eqnarray*} \section{Equation numbering test} This equation needs a number \begin{equation}\label{ab3} \,\varphi\,=\,\left|\, \begin{array}{c} \psi_1 \\ \psi_2 \end{array}\,\right|\,; \quad {\rm and} \quad \,\chi\,=\,\left|\, \begin{array}{c} \psi_3 \\ \psi_4 \end{array}\,\right|\,; \quad {\rm or} \quad \,\eta\,=\,\left|\, \begin{array}{c} \tilde{\psi}_1 \\ \tilde{\psi}_2 \end{array}\,\right|\,; \quad {\rm and} \quad \,\lambda\,=\,\left|\, \begin{array}{c} \tilde{\psi}_3 \\ \tilde{\psi}_4 \end{array}\,\right|\,; \end{equation} more text following \section{Testing math environment closing} For a while, getting \texttt{latex2rtf} to contain all the math elements to the enclosing was a major headache. It is working for now. Here are a few test cases. Case 1 Here a math environment is found within an italic environment \textit{s$_c+1$} or {\it s$_c$} Case 2 The odd construction \verb#$a+\bf R$# follows $a+\bf R$ which should make ``a'' italic and ``R'' bold Case 3 Same as above but using \verb#\(# to enter a math environment \(a+\bf R\) roman type follows Case 4 Same as above but using \verb#\[# to enter a math environment \[a+\bf R\] roman type follows Case 5 Same as above but using \verb#\begin{math}# to enter a math environment \begin{math}a+\bf R\end{math} roman type follows Case 6 Same as above but using \verb#\begin{equation}# to enter a math environment \begin{equation}a+ \bf R\end{equation} roman type follows Case 7 Same as above but using \verb#\begin{eqnarray}# to enter a math environment \begin{eqnarray}a+ \bf R\end{eqnarray} roman type follows Case 8 Same as above but using \verb#\begin{equation*}# to enter a math environment \\ Note: \verb#\begin{equation*}# produces LaTeX error.\\ Use \verb#\begin{displaymath}# instead. Case 8a Same as above but using \verb#\begin{displaymath}# to enter a math environment \begin{displaymath}a+ \bf R\end{displaymath} roman type follows Case 9 Same as above but using \verb#$$# to enter a math environment $$a+ \bf R$$ roman type follows Note: Delimiting an equation by \verb|$$| is a plain\TeX{} command and should \emph{not} be used in \LaTeX{} documents. \section{Large Delimiters} \subsection{Determinant} \[ \det A = \left| \begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1n}\\ a_{21} & a_{22} & \cdots & a_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{array} \right| \] \subsection{Mixed Delimiters} \[ w = \left| 4 x^3 + \left( (x-y) + \frac{42}{1+x^4} \right) \right|. \] \subsection{Submatrices} \[ A = \left[ \begin{array}{cccc} \left|\begin{array}{cc} b_{11}&b_{12}\\ b_{21}&b_{22} \end{array}\right| & a_{12} & \cdots & a_{1n}\\ a_{21} & a_{22} & \cdots & a_{2n}\\ \vdots & \vdots & \ddots & \vdots\\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{array} \right] \] \subsection{Fractions} Simple \[ {x \over y} \] More complicated \[ {x+1 \over {x+2 \over y+z +w}} \] Missing braces \[ x \over y \] Including braces \[ {\{ x+y \} \over w} \] Including left \[ {\left\{\sqrt{y+z}\right\}\over w} \] \section{fields} Problem with mbox containing \$ in a field \[ x[l]\leftarrow x[(l+m) \bmod n] \oplus \mbox{shiftright}(x[l]) \oplus \left\{ \begin{array}{ll} 0 & \mbox{if LSB of $x[l]$=0} \\ b & \mbox{if LSB of $x[l]$=1,} \end{array} \right. \] problem with correctly delimiting the above equation $ x[l]\leftarrow x[(l+m) \bmod n] \oplus \mbox{shiftright}(x[l]) \oplus \left\{ \begin{array}{ll} 0 & \mbox{if LSB of $x[l]$=0} \\ b & \mbox{if LSB of $x[l]$=1,} \end{array} \right. $ Look at the position of the superscript in this: \[ \left[ \begin{array}{ccc} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{array} \right]^T \] or the superscript and subscript superposition: \[ s = \sum_{i=1}^n x^2_i \] or embedded sub/superscripts: \[ s_n=s^{n^2} \] and \[ s_n=s^{n_2} \] \end{document}
zvr/latex2rtf-zvr
test/eqns.tex
TeX
gpl-2.0
8,860
/* * %kadu copyright begin% * Copyright 2017 Rafał Przemysław Malinowski (rafal.przemyslaw.malinowski@gmail.com) * %kadu copyright end% * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "facebook-plugin-object.h" #include "facebook-protocol-factory.h" #include "protocols/protocols-manager.h" FacebookPluginObject::FacebookPluginObject(QObject *parent) : QObject{parent} { } FacebookPluginObject::~FacebookPluginObject() { } void FacebookPluginObject::setFacebookProtocolFactory(FacebookProtocolFactory *facebookProtocolFactory) { m_facebookProtocolFactory = facebookProtocolFactory; } void FacebookPluginObject::setProtocolsManager(ProtocolsManager *protocolsManager) { m_protocolsManager = protocolsManager; } void FacebookPluginObject::init() { m_protocolsManager->registerProtocolFactory(m_facebookProtocolFactory); } void FacebookPluginObject::done() { m_protocolsManager->unregisterProtocolFactory(m_facebookProtocolFactory); } #include "facebook-plugin-object.moc"
vogel/kadu
plugins/facebook_protocol/facebook-plugin-object.cpp
C++
gpl-2.0
1,613
class FillLevelAttributeInToThesismodalities < ActiveRecord::Migration def up Thesismodality.all.each do |record| record.update_attribute :level, record.id end end def down end end
ifunam/salva
db/migrate/20121121002142_fill_level_attribute_in_to_thesismodalities.rb
Ruby
gpl-2.0
204
<section id="section__content--services"> <article id="section__content--services--main" class="wrapper text-center"> <h4><?=$section['section_subtitle']?></h4> <h1><?=$section['section_title']?></h1> <p><?=$section['section_content']?></p> <ul id="section__content--services--list" class="column-parent-six-items list-clear equal-height" data-group-by="6"> <?php foreach ($section['services_list'] as $item => $block) : ?> <li class="column six-item animate fadeIn wow"> <div class="image"><img src="<?=$block['service_icon']?>"/></div><aside><h5 class="caps"><?=$block['service_title']?></h5></aside> </li> <?php endforeach; ?> </ul> <a class="button bg-green" href="<?=$section['button_link']?>"><?=$section['button_text']?></a> </article> </section>
LindseyLeanne/cqb
wp-content/themes/creativequarterback/inc-services.php
PHP
gpl-2.0
796
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Tests\Constraints; use Symfony\Bridge\PhpUnit\DnsMock; use Symfony\Component\Validator\Constraints\Url; use Symfony\Component\Validator\Constraints\UrlValidator; use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; /** * @group dns-sensitive */ class UrlValidatorTest extends ConstraintValidatorTestCase { protected function createValidator() { return new UrlValidator(); } public function testNullIsValid() { $this->validator->validate(null, new Url()); $this->assertNoViolation(); } public function testEmptyStringIsValid() { $this->validator->validate('', new Url()); $this->assertNoViolation(); } public function testEmptyStringFromObjectIsValid() { $this->validator->validate(new EmailProvider(), new Url()); $this->assertNoViolation(); } public function testExpectsStringCompatibleType() { $this->expectException('Symfony\Component\Validator\Exception\UnexpectedTypeException'); $this->validator->validate(new \stdClass(), new Url()); } /** * @dataProvider getValidUrls */ public function testValidUrls($url) { $this->validator->validate($url, new Url()); $this->assertNoViolation(); } public function getValidUrls() { return [ ['http://a.pl'], ['http://www.example.com'], ['http://www.example.com.'], ['http://www.example.museum'], ['https://example.com/'], ['https://example.com:80/'], ['http://examp_le.com'], ['http://www.sub_domain.examp_le.com'], ['http://www.example.coop/'], ['http://www.test-example.com/'], ['http://www.symfony.com/'], ['http://symfony.fake/blog/'], ['http://symfony.com/?'], ['http://symfony.com/search?type=&q=url+validator'], ['http://symfony.com/#'], ['http://symfony.com/#?'], ['http://www.symfony.com/doc/current/book/validation.html#supported-constraints'], ['http://very.long.domain.name.com/'], ['http://localhost/'], ['http://myhost123/'], ['http://127.0.0.1/'], ['http://127.0.0.1:80/'], ['http://[::1]/'], ['http://[::1]:80/'], ['http://[1:2:3::4:5:6:7]/'], ['http://sãopaulo.com/'], ['http://xn--sopaulo-xwa.com/'], ['http://sãopaulo.com.br/'], ['http://xn--sopaulo-xwa.com.br/'], ['http://пример.испытание/'], ['http://xn--e1afmkfd.xn--80akhbyknj4f/'], ['http://مثال.إختبار/'], ['http://xn--mgbh0fb.xn--kgbechtv/'], ['http://例子.测试/'], ['http://xn--fsqu00a.xn--0zwm56d/'], ['http://例子.測試/'], ['http://xn--fsqu00a.xn--g6w251d/'], ['http://例え.テスト/'], ['http://xn--r8jz45g.xn--zckzah/'], ['http://مثال.آزمایشی/'], ['http://xn--mgbh0fb.xn--hgbk6aj7f53bba/'], ['http://실례.테스트/'], ['http://xn--9n2bp8q.xn--9t4b11yi5a/'], ['http://العربية.idn.icann.org/'], ['http://xn--ogb.idn.icann.org/'], ['http://xn--e1afmkfd.xn--80akhbyknj4f.xn--e1afmkfd/'], ['http://xn--espaa-rta.xn--ca-ol-fsay5a/'], ['http://xn--d1abbgf6aiiy.xn--p1ai/'], ['http://☎.com/'], ['http://username:password@symfony.com'], ['http://user.name:password@symfony.com'], ['http://user_name:pass_word@symfony.com'], ['http://username:pass.word@symfony.com'], ['http://user.name:pass.word@symfony.com'], ['http://user-name@symfony.com'], ['http://user_name@symfony.com'], ['http://u%24er:password@symfony.com'], ['http://user:pa%24%24word@symfony.com'], ['http://symfony.com?'], ['http://symfony.com?query=1'], ['http://symfony.com/?query=1'], ['http://symfony.com#'], ['http://symfony.com#fragment'], ['http://symfony.com/#fragment'], ['http://symfony.com/#one_more%20test'], ]; } /** * @dataProvider getInvalidUrls */ public function testInvalidUrls($url) { $constraint = new Url([ 'message' => 'myMessage', ]); $this->validator->validate($url, $constraint); $this->buildViolation('myMessage') ->setParameter('{{ value }}', '"'.$url.'"') ->setCode(Url::INVALID_URL_ERROR) ->assertRaised(); } public function getInvalidUrls() { return [ ['example.com'], ['://example.com'], ['http ://example.com'], ['http:/example.com'], ['http://example.com::aa'], ['http://example.com:aa'], ['ftp://example.fr'], ['faked://example.fr'], ['http://127.0.0.1:aa/'], ['ftp://[::1]/'], ['http://[::1'], ['http://hello.☎/'], ['http://:password@symfony.com'], ['http://:password@@symfony.com'], ['http://username:passwordsymfony.com'], ['http://usern@me:password@symfony.com'], ['http://nota%hex:password@symfony.com'], ['http://username:nota%hex@symfony.com'], ['http://example.com/exploit.html?<script>alert(1);</script>'], ['http://example.com/exploit.html?hel lo'], ['http://example.com/exploit.html?not_a%hex'], ['http://'], ]; } /** * @dataProvider getValidCustomUrls */ public function testCustomProtocolIsValid($url) { $constraint = new Url([ 'protocols' => ['ftp', 'file', 'git'], ]); $this->validator->validate($url, $constraint); $this->assertNoViolation(); } public function getValidCustomUrls() { return [ ['ftp://example.com'], ['file://127.0.0.1'], ['git://[::1]/'], ]; } /** * @dataProvider getCheckDns * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts */ public function testCheckDns($violation) { DnsMock::withMockedHosts(['example.com' => [['type' => $violation ? '' : 'A']]]); $constraint = new Url([ 'checkDNS' => 'ANY', 'dnsMessage' => 'myMessage', ]); $this->validator->validate('http://example.com', $constraint); if (!$violation) { $this->assertNoViolation(); } else { $this->buildViolation('myMessage') ->setParameter('{{ value }}', '"example.com"') ->setCode(Url::INVALID_URL_ERROR) ->assertRaised(); } } public function getCheckDns() { return [[true], [false]]; } /** * @dataProvider getCheckDnsTypes * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts */ public function testCheckDnsByType($type) { DnsMock::withMockedHosts(['example.com' => [['type' => $type]]]); $constraint = new Url([ 'checkDNS' => $type, 'dnsMessage' => 'myMessage', ]); $this->validator->validate('http://example.com', $constraint); $this->assertNoViolation(); } public function getCheckDnsTypes() { return [ ['ANY'], ['A'], ['A6'], ['AAAA'], ['CNAME'], ['MX'], ['NAPTR'], ['NS'], ['PTR'], ['SOA'], ['SRV'], ['TXT'], ]; } /** * @group legacy */ public function testCheckDnsWithBoolean() { DnsMock::withMockedHosts(['example.com' => [['type' => 'A']]]); $constraint = new Url([ 'checkDNS' => true, 'dnsMessage' => 'myMessage', ]); $this->validator->validate('http://example.com', $constraint); $this->assertNoViolation(); } /** * @requires function Symfony\Bridge\PhpUnit\DnsMock::withMockedHosts */ public function testCheckDnsWithInvalidType() { $this->expectException('Symfony\Component\Validator\Exception\InvalidOptionsException'); DnsMock::withMockedHosts(['example.com' => [['type' => 'A']]]); $constraint = new Url([ 'checkDNS' => 'BOGUS', 'dnsMessage' => 'myMessage', ]); $this->validator->validate('http://example.com', $constraint); } } class EmailProvider { public function __toString() { return ''; } }
CCI-Studios/Bluewater-Health
vendor/symfony/validator/Tests/Constraints/UrlValidatorTest.php
PHP
gpl-2.0
9,232
<!doctype html> <html lang="es"> <head> <title>Incendio en LOBEIRA en GALICIA</title> <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" /> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" /> <script type="text/javascript" src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js?2"></script> </head> <body> <div id="map" style="width:100%; height:400px;"></div> <h1>Incendio en LOBEIRA (GALICIA)</h1> <p>El incendio que afectó al municipio de LOBEIRA quemó una superficie forestal de 230.0000} de la comarca de A LIMIA de la provincia de OURENSE (GALICIA).</p> <p>Se inició en 2004-08-01, se controló en 1430 y se extinguió en 1700.</p> <p>La causa del incendio fue Sin datos. En la extinción del incendio participaron 9 personas, 2 vehiculos pesados y 1 medios aereos. Hubo 0 muertos y 0 heridos.</p> <script type="text/javascript"> var map = L.map('map').setView([42.02957700, -8.06500000], 8); var mapquestLayer = new L.TileLayer('http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { maxZoom: 18, attribution: 'Data, imagery and map information provided by <a href="http://open.mapquest.co.uk" target="_blank">MapQuest</a>,<a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> and contributors.', subdomains: ['otile1','otile2','otile3','otile4'] }); map.addLayer(mapquestLayer); var marker = L.marker([42.02957700, -8.06500000]).addTo(map); </script> </body> </html>
flowsta/mi-news-app
build/2004322594/index.html
HTML
gpl-2.0
1,626
__author__ = 'bruno' import unittest import algorithms.math.abacus as Abacus class TestAbacus(unittest.TestCase): def setUp(self): pass def test_abacus1(self): abacus = Abacus.generate_abacus(0) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |'], abacus) def test_abacus2(self): abacus = Abacus.generate_abacus(8) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00 000*****|'], abacus) def test_abacus3(self): abacus = Abacus.generate_abacus(32) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000** ***|', '|00000*** **|'], abacus) def test_abacus4(self): abacus = Abacus.generate_abacus(147) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000**** *|', '|00000* ****|', '|000 00*****|'], abacus) def test_abacus5(self): abacus = Abacus.generate_abacus(986) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|0 0000*****|', '|00 000*****|', '|0000 0*****|'], abacus) def test_abacus6(self): abacus = Abacus.generate_abacus(5821) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000 *****|', '|00 000*****|', '|00000*** **|', '|00000**** *|'], abacus) def test_abacus7(self): abacus = Abacus.generate_abacus(1234) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000**** *|', '|00000*** **|', '|00000** ***|', '|00000* ****|'], abacus) def test_abacus8(self): abacus = Abacus.generate_abacus(999) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|0 0000*****|', '|0 0000*****|', '|0 0000*****|'], abacus) def test_abacus9(self): abacus = Abacus.generate_abacus(13) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000**** *|', '|00000** ***|'], abacus) def test_abacus10(self): abacus = Abacus.generate_abacus(49) self.assertEqual(['|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000***** |', '|00000* ****|', '|0 0000*****|'], abacus)
bnsantos/python-junk-code
tests/math/abacusTest.py
Python
gpl-2.0
5,476
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ #ifndef XPATH_ROUTING_HELPER_H #define XPATH_ROUTING_HELPER_H #include "ns3/ipv4-xpath-routing.h" #include "ns3/ipv4-routing-helper.h" namespace ns3 { class Ipv4XPathRoutingHelper : public Ipv4RoutingHelper { public: Ipv4XPathRoutingHelper (); Ipv4XPathRoutingHelper (const Ipv4XPathRoutingHelper &); Ipv4XPathRoutingHelper* Copy (void) const; virtual Ptr<Ipv4RoutingProtocol> Create (Ptr<Node> node) const; Ptr<Ipv4XPathRouting> GetXPathRouting (Ptr<Ipv4> ipv4) const; }; } #endif /* XPATH_ROUTING_HELPER_H */
snowzjx/ns3-buffer-management
src/xpath-routing/helper/ipv4-xpath-routing-helper.h
C
gpl-2.0
606
<?php /** * File containing the ManagerInterface interface. * * @copyright Copyright (C) 1999-2013 eZ Systems AS. All rights reserved. * @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 * @version //autogentag// */ namespace eZ\Publish\Core\MVC\Symfony\Controller; use eZ\Publish\API\Repository\Values\ValueObject; interface ManagerInterface { /** * Returns a ControllerReference object corresponding to $valueObject and $viewType * * @param ValueObject $valueObject * @param string $viewType * * @return \Symfony\Component\HttpKernel\Controller\ControllerReference|null */ public function getControllerReference( ValueObject $valueObject, $viewType ); }
gbentley/ezpublish-kernel
eZ/Publish/Core/MVC/Symfony/Controller/ManagerInterface.php
PHP
gpl-2.0
737
package HopfieldModel.HopfieldModel.v1_1_1.src; import HopfieldModel.HopfieldNetwork.v1_1_1.src.*; /*********************************/ /* */ /* Importing all Nsl classes */ /* */ /*********************************/ import nslj.src.system.*; import nslj.src.cmd.*; import nslj.src.lang.*; import nslj.src.math.*; import nslj.src.display.*; import nslj.src.display.j3d.*; /*********************************/ public class HopfieldModel extends NslModel{ //NSL Version: 3_0_n //Sif Version: 9 //libNickName: HopfieldModel //moduleName: HopfieldModel //versionName: 1_1_1 //floatSubModules: true //variables public HopfieldNetwork net; // private int size=6; // //methods public void initSys() { system.setRunEndTime(300); system.setTrainEndTime(1); system.setTrainDelta(1); system.setRunDelta(1); } public void initModule() { nslSetTrainDelta(1); nslSetRunDelta(1); NslInt2 in= new NslInt2(size, size); in.set(-1); net.input.setReference(in); nslAddAreaCanvas("output", "output", net.output,-1,1); nslAddTemporalCanvas("output", "energy", net.energy, -size*size,0, NslColor.getColor("BLACK")); nslAddInputImageCanvas("input","input", net.input, -1, 1); addPanel("control", "input"); addButtonToPanel("clear", "Clear Image", "control", "input"); } public void clearPushed() { net.input.set(-1); } public void makeConn(){ } /******************************************************/ /* */ /* Generated by nslc.src.NslCompiler. Do not edit these lines! */ /* */ /******************************************************/ /* Constructor and related methods */ /* makeinst() declared variables */ /* EMPTY CONSTRUCTOR: Called only for the top level module */ public HopfieldModel() { super("hopfieldModel",(NslModel)null); initSys(); makeInstHopfieldModel("hopfieldModel",null); } /* Formal parameters */ /* Temporary variables */ /* GENERIC CONSTRUCTOR: */ public HopfieldModel(String nslName, NslModule nslParent) { super(nslName, nslParent); initSys(); makeInstHopfieldModel(nslName, nslParent); } public void makeInstHopfieldModel(String nslName, NslModule nslParent) { Object[] nslArgs=new Object[]{}; callFromConstructorTop(nslArgs); net = new HopfieldNetwork("net", this, size); callFromConstructorBottom(); } /******************************************************/ /* */ /* End of automatic declaration statements. */ /* */ /******************************************************/ }//end HopfieldModel
uscbp/scs
nsl_models/HopfieldModel/HopfieldModel/v1_1_1/src/HopfieldModel.java
Java
gpl-2.0
2,764
<!doctype html> <title>CodeMirror: Release History</title> <meta charset="utf-8"/> <link rel=stylesheet href="docs.css"> <script src="activebookmark.js"></script> <div id=nav> <a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="logo.png"></a> <ul> <li><a href="../index.html">Home</a> <li><a href="manual.html">Manual</a> <li><a href="https://github.com/codemirror/codemirror">Code</a> </ul> <ul> <li><a class=active data-default="true" href="#v5">Version 5.x</a> <li><a href="#v4">Version 4.x</a> <li><a href="#v3">Version 3.x</a> <li><a href="#v2">Version 2.x</a> <li><a href="#v1">Version 0.x</a> </ul> </div> <article> <h2>Release notes and version history</h2> <section id=v5 class=first> <h2>Version 5.x</h2> <p class="rel">20-09-2017: <a href="http://codemirror.net/codemirror-5.30.0.zip">Version 5.30.0</a>:</p> <ul class="rel-note"> <li>Fixed a number of issues with drawing right-to-left selections and mouse selection in bidirectional text.</li> <li><a href="http://codemirror.net/demo/search/">search addon</a>: Fix crash when restarting search after doing empty search.</li> <li><a href="http://cm/doc/manual.html#addon_mark-selection">mark-selection addon</a>: Fix off-by-one bug.</li> <li><a href="http://codemirror.net/demo/tern.html">tern addon</a>: Fix bad request made when editing at the bottom of a large document.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Improve parsing in a number of corner cases.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Fix crash when a sub-mode doesn't support indentation, allow uppercase X in task lists.</li> <li><a href="http://codemirror.net/mode/gfm/">gfm mode</a>: Don't highlight SHA1 'hashes' without numbers to avoid false positives.</li> <li><a href="http://codemirror.net/mode/soy/">soy mode</a>: Support injected data and <code>@param</code> in comments.</li> <li><a href="http://codemirror.net/demo/simplemode.html">simple mode addon</a>: Allow groups in regexps when <code>token</code> isn't an array.</li> </ul> <p class="rel">24-08-2017: <a href="http://codemirror.net/codemirror-5.29.0.zip">Version 5.29.0</a>:</p> <ul class="rel-note"> <li>Fix crash in contentEditable input style when editing near a bookmark.</li> <li>Make sure change origins are preserved when splitting changes on <a href="http://codemirror.net/doc/manual.html#mark_readOnly">read-only marks</a>.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: More support for TypeScript syntax.</li> <li><a href="http://codemirror.net/mode/d/">d mode</a>: Support nested comments.</li> <li><a href="http://codemirror.net/mode/python/">python mode</a>: Improve tokenizing of operators.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Further improve CommonMark conformance.</li> <li><a href="http://codemirror.net/mode/css/">css mode</a>: Don't run comment tokens through the mode's state machine.</li> <li><a href="http://codemirror.net/mode/shell/">shell mode</a>: Allow strings to span lines.</li> <li><a href="http://codemirror.net/demo/search/">search addon</a>: Fix crash in persistent search when <code>extraKeys</code> is null.</li> </ul> <p class="rel">21-07-2017: <a href="http://codemirror.net/codemirror-5.28.0.zip">Version 5.28.0</a>:</p> <ul class="rel-note"> <li>Fix copying of, or replacing editor content with, a single dash character when copying a big selection in some corner cases.</li> <li>Make <a href="http://codemirror.net/doc/manual.html#command_goLineLeft"><code>&quot;goLineLeft&quot;</code></a>/<code>&quot;goLineRight&quot;</code> behave better on wrapped lines.</li> <li><a href="http://codemirror.net/mode/sql/">sql mode</a>: Fix tokenizing of multi-dot operator and allow digits in subfield names.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_searchcursor">searchcursor addon</a>: Fix infinite loop on some composed character inputs.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Make list parsing more CommonMark-compliant.</li> <li><a href="http://codemirror.net/mode/gfm/">gfm mode</a>: Highlight colon syntax for emoji.</li> </ul> <p class="rel">29-06-2017: <a href="http://codemirror.net/codemirror-5.27.4.zip">Version 5.27.4</a>:</p> <ul class="rel-note"> <li>Fix crash when using mode lookahead.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Don't block inner mode's indentation support.</li> </ul> <p class="rel">22-06-2017: <a href="http://codemirror.net/codemirror-5.27.2.zip">Version 5.27.2</a>:</p> <ul class="rel-note"> <li>Fix crash in the <a href="http://codemirror.net/demo/simplemode.html">simple mode</a> addon.</li> </ul> <p class="rel">22-06-2017: <a href="http://codemirror.net/codemirror-5.27.0.zip">Version 5.27.0</a>:</p> <ul class="rel-note"> <li>Fix infinite loop in forced display update.</li> <li>Properly disable the hidden textarea when <code>readOnly</code> is <code>&quot;nocursor&quot;</code>.</li> <li>Calling the <code>Doc</code> constructor without <code>new</code> works again.</li> <li><a href="http://codemirror.net/mode/sql/">sql mode</a>: Handle nested comments.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Improve support for TypeScript syntax.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Fix bug where markup was ignored on indented paragraph lines.</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Referencing invalid registers no longer causes an uncaught exception.</li> <li><a href="http://codemirror.net/mode/rust/">rust mode</a>: Add the correct MIME type.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_matchbrackets">matchbrackets addon</a>: Document options.</li> <li>Mouse button clicks can now be bound in keymaps by using names like <code>&quot;LeftClick&quot;</code> or <code>&quot;Ctrl-Alt-MiddleTripleClick&quot;</code>. When bound to a function, that function will be passed the position of the click as second argument.</li> <li>The behavior of mouse selection and dragging can now be customized with the <a href="http://codemirror.net/doc/manual.html#option_configureMouse"><code>configureMouse</code></a> option.</li> <li>Modes can now look ahead across line boundaries with the <a href="http://codemirror.net/doc/manual.html#StringStream"><code>StringStream</code></a><code>.lookahead</code> method.</li> <li>Introduces a <code>&quot;type&quot;</code> token type, makes modes that recognize types output it, and add styling for it to the themes.</li> <li>New <a href="http://codemirror.net/doc/manual.html#option_pasteLinesPerSelection"><code>pasteLinesPerSelection</code></a> option to control the behavior of pasting multiple lines into multiple selections.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_searchcursor">searchcursor addon</a>: Support multi-line regular expression matches, and normalize strings when matching.</li> </ul> <p class="rel">22-05-2017: <a href="http://codemirror.net/codemirror-5.26.0.zip">Version 5.26.0</a>:</p> <ul class="rel-note"> <li>In textarea-mode, don't reset the input field during composition.</li> <li>More careful restoration of selections in widgets, during editor redraw.</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Parse line offsets in line or range specs.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: More TypeScript parsing fixes.</li> <li><a href="http://codemirror.net/mode/julia/">julia mode</a>: Fix issue where the mode gets stuck.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Understand cross-line links, parse all bracketed things as links.</li> <li><a href="http://codemirror.net/mode/soy/">soy mode</a>: Support single-quoted strings.</li> <li><a href="http://codemirror.net/mode/go/">go mode</a>: Don't try to indent inside strings or comments.</li> </ul> <p class="rel">20-04-2017: <a href="http://codemirror.net/codemirror-5.25.2.zip">Version 5.25.2</a>:</p> <ul class="rel-note"> <li>Better handling of selections that cover the whole viewport in contentEditable-mode.</li> <li>No longer accidentally scroll the editor into view when calling <code>setValue</code>.</li> <li>Work around Chrome Android bug when converting screen coordinates to editor positions.</li> <li>Make sure long-clicking a selection sets a cursor and doesn't show the editor losing focus.</li> <li>Fix issue where pointer events were incorrectly disabled on Chrome's overlay scrollbars.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Recognize annotations and TypeScript-style type parameters.</li> <li><a href="http://codemirror.net/mode/shell/">shell mode</a>: Handle nested braces.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Make parsing of strong/em delimiters CommonMark-compliant.</li> </ul> <p class="rel">20-03-2017: <a href="http://codemirror.net/codemirror-5.25.0.zip">Version 5.25.0</a>:</p> <ul class=rel-note> <li>In contentEditable-mode, properly locate changes that repeat a character when inserted with IME.</li> <li>Fix handling of selections bigger than the viewport in contentEditable mode.</li> <li>Improve handling of changes that insert or delete lines in contentEditable mode.</li> <li>Count Unicode control characters 0x80 to 0x9F as special (non-printing) chars.</li> <li>Fix handling of shadow DOM roots when finding the active element.</li> <li>Add <code>role=presentation</code> to more DOM elements to improve screen reader support.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_merge">merge addon</a>: Make aligning of unchanged chunks more robust.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_comment">comment addon</a>: Fix comment-toggling on a block of text that starts and ends in a (differnet) block comment.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Improve support for TypeScript syntax.</li> <li><a href="http://codemirror.net/mode/r/">r mode</a>: Fix indentation after semicolon-less statements.</li> <li><a href="http://codemirror.net/mode/shell/">shell mode</a>: Properly handle escaped parentheses in parenthesized expressions.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Fix a few bugs around leaving fenced code blocks.</li> <li><a href="http://codemirror.net/mode/soy/">soy mode</a>: Improve indentation.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_lint">lint addon</a>: Support asynchronous linters that return promises.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_continuelist">continuelist addon</a>: Support continuing task lists.</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Make Y behave like yy.</li> <li><a href="http://codemirror.net/mode/sql/">sql mode</a>: Support sqlite dialect.</li> </ul> <p class="rel">22-02-2017: <a href="http://codemirror.net/codemirror-5.24.2.zip">Version 5.24.2</a>:</p> <ul class=rel-note> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Support computed class method names.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_merge">merge addon</a>: Improve aligning of unchanged code in the presence of marks and line widgets.</li> </ul> <p class="rel">20-02-2017: <a href="http://codemirror.net/codemirror-5.24.0.zip">Version 5.24.0</a>:</p> <ul class=rel-note> <li>Positions now support a <code>sticky</code> property which determines whether they should be associated with the character before (value <code>"before"</code>) or after (value <code>"after"</code>) them.</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Make it possible to remove built-in bindings through the API.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_comment">comment addon</a>: Support a per-mode <code>useInnerComments</code> option to optionally suppress descending to the inner modes to get comment strings.</li> <li>A cursor directly before a line-wrapping break is now drawn before or after the line break depending on which direction you arrived from.</li> <li>Visual cursor motion in line-wrapped right-to-left text should be much more correct.</li> <li>Fix bug in handling of read-only marked text.</li> <li><a href="http://codemirror.net/mode/shell/">shell mode</a>: Properly tokenize nested parentheses.</li> <li><a href="http://codemirror.net/mode/python/">python mode</a>: Support underscores in number literals.</li> <li><a href="http://codemirror.net/mode/sass/">sass mode</a>: Uses the full list of CSS properties and keywords from the CSS mode, rather than defining its own incomplete subset. Now depends on the css mode.</li> <li><a href="http://codemirror.net/mode/css/">css mode</a>: Expose <code>lineComment</code> property for LESS and SCSS dialects. Recognize vendor prefixes on pseudo-elements.</li> <li><a href="http://codemirror.net/mode/julia/">julia mode</a>: Properly indent <code>elseif</code> lines.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Properly recognize the end of fenced code blocks when inside other markup.</li> <li><a href="http://codemirror.net/mode/clike/">scala mode</a>: Improve handling of operators containing <code>#</code>, <code>@</code>, and <code>:</code> chars.</li> <li><a href="http://codemirror.net/mode/xml/">xml mode</a>: Allow dashes in HTML tag names.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Improve parsing of async methods, TypeScript-style comma-separated superclass lists.</li> <li><a href="http://codemirror.net/demo/folding.html">indent-fold addon</a>: Ignore comment lines.</li> </ul> <p class="rel">19-01-2017: <a href="http://codemirror.net/codemirror-5.23.0.zip">Version 5.23.0</a>:</p> <ul class=rel-note> <li>Presentation-related elements DOM elements are now marked as such to help screen readers.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Be more picky about what HTML tags look like to avoid false positives.</li> <li><code>findModeByMIME</code> now understands <code>+json</code> and <code>+xml</code> MIME suffixes.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_closebrackets">closebrackets addon</a>: Add support for an <code>override</code> option to ignore language-specific defaults.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_panel">panel addon</a>: Add a <code>stable</code> option that auto-scrolls the content to keep it in the same place when inserting/removing a panel.</li> </ul> <p class="rel">20-12-2016: <a href="http://codemirror.net/codemirror-5.22.0.zip">Version 5.22.0</a>:</p> <ul class=rel-note> <li><a href="http://codemirror.net/demo/sublime.html">sublime bindings</a>: Make <code>selectBetweenBrackets</code> work with multiple cursors.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Fix issues with parsing complex TypeScript types, imports, and exports.</li> <li>A contentEditable editor instance with autofocus enabled no longer crashes during initializing.</li> <li><a href="http://codemirror.net/demo/emacs.html">emacs bindings</a>: Export <code>CodeMirror.emacs</code> to allow other addons to hook into Emacs-style functionality.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_active-line">active-line addon</a>: Add <code>nonEmpty</code> option.</li> <li>New event: <a href="http://codemirror.net/doc/manual.html#event_optionChange"><code>optionChange</code></a>.</li> </ul> <p class="rel">21-11-2016: <a href="http://codemirror.net/codemirror-5.21.0.zip">Version 5.21.0</a>:</p> <ul class=rel-note> <li>Tapping/clicking the editor in <a href="http://codemirror.net/doc/manual.html#option_inputStyle">contentEditable mode</a> on Chrome now puts the cursor at the tapped position.</li> <li>Fix various crashes and misbehaviors when reading composition events in <a href="http://codemirror.net/doc/manual.html#option_inputStyle">contentEditable mode</a>.</li> <li>Catches and ignores an IE 'Unspecified Error' when creating an editor in an iframe before there is a <code>&lt;body&gt;</code>.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_merge">merge addon</a>: Fix several issues in the chunk-aligning feature.</li> <li><a href="http://codemirror.net/mode/verilog">verilog mode</a>: Rewritten to address various issues.</li> <li><a href="http://codemirror.net/mode/julia">julia mode</a>: Recognize Julia 0.5 syntax.</li> <li><a href="http://codemirror.net/mode/swift">swift mode</a>: Various fixes and adjustments to current syntax.</li> <li><a href="http://codemirror.net/mode/markdown">markdown mode</a>: Allow lists without a blank line above them.</li> <li>The <a href="http://codemirror.net/doc/manual.html#setGutterMarker"><code>setGutterMarker</code></a>, <a href="http://codemirror.net/doc/manual.html#clearGutter"><code>clearGutter</code></a>, and <a href="http://codemirror.net/doc/manual.html#lineInfo"><code>lineInfo</code></a> methods are now available on <code>Doc</code> objects.</li> <li>The <a href="http://codemirror.net/doc/manual.html#heightAtLine"><code>heightAtLine</code></a> method now takes an extra argument to allow finding the height at the top of the line's line widgets.</li> <li><a href="http://codemirror.net/mode/ruby">ruby mode</a>: <code>else</code> and <code>elsif</code> are now immediately indented.</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Bind Ctrl-T and Ctrl-D to in- and dedent in insert mode.</li> </ul> <p class="rel">20-10-2016: <a href="http://codemirror.net/codemirror-5.20.0.zip">Version 5.20.0</a>:</p> <ul class=rel-note> <li>Make <code>newlineAndIndent</code> command work with multiple cursors on the same line.</li> <li>Make sure keypress events for backspace are ignored.</li> <li>Tokens styled with overlays no longer get a nonsense <code>cm-cm-overlay</code> class.</li> <li>Line endings for pasted content are now normalized to the editor's <a href="http://codemirror.net/doc/manual.html#option_lineSeparator">preferred ending</a>.</li> <li><a href="http://codemirror.net/mode/javascript">javascript mode</a>: Improve support for class expressions. Support TypeScript optional class properties, the <code>abstract</code> keyword, and return type declarations for arrow functions.</li> <li><a href="http://codemirror.net/mode/css">css mode</a>: Fix highlighting of mixed-case keywords.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_closebrackets">closebrackets addon</a>: Improve behavior when typing a quote before a string.</li> <li>The core is now maintained as a number of small files, using ES6 syntax and modules, under the <code>src/</code> directory. A git checkout no longer contains a working <code>codemirror.js</code> until you <code>npm build</code> (but when installing from NPM, it is included).</li> <li>The <a href="http://codemirror.net/doc/manual.html#event_refresh"><code>refresh</code></a> event is now documented and stable.</li> </ul> <p class="rel">20-09-2016: <a href="http://codemirror.net/codemirror-5.19.0.zip">Version 5.19.0</a>:</p> <ul class=rel-note> <li><a href="http://codemirror.net/mode/erlang">erlang mode</a>: Fix mode crash when trying to read an empty context.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_comment">comment addon</a>: Fix broken behavior when toggling comments inside a comment.</li> <li>xml-fold addon: Fix a null-dereference bug.</li> <li>InstallationPage up and page down now do something even in single-line documents.</li> <li>Fix an issue where the cursor position could be off in really long (~8000 character) tokens.</li> <li><a href="http://codemirror.net/mode/javascript">javascript mode</a>: Better indentation when semicolons are missing. Better support for TypeScript classes, optional parameters, and the <code>type</code> keyword.</li> <li>The <a href="http://codemirror.net/doc/manual.html#event_blur"><code>blur</code></a> and <a href="http://codemirror.net/doc/manual.html#event_focus"><code>focus</code></a> events now pass the DOM event to their handlers.</li> </ul> <p class="rel">23-08-2016: <a href="http://codemirror.net/codemirror-5.18.2.zip">Version 5.18.2</a>:</p> <ul class=rel-note> <li><a href="http://codemirror.net/mode/vue">vue mode</a>: Fix outdated references to renamed Pug mode dependency.</li> </ul> <p class="rel">22-08-2016: <a href="http://codemirror.net/codemirror-5.18.0.zip">Version 5.18.0</a>:</p> <ul class=rel-note> <li>Make sure <a href="http://codemirror.net/doc/manual.html#addLineClass">gutter backgrounds</a> stick to the rest of the gutter during horizontal scrolling.</li> <li>The contenteditable <a href="http://codemirror.net/doc/manual.html#option_inputStyle"><code>inputStyle</code></a> now properly supports pasting on pre-Edge IE versions.</li> <li><a href="http://codemirror.net/mode/javascript">javascript mode</a>: Fix some small parsing bugs and improve TypeScript support.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_matchbrackets">matchbrackets addon</a>: Fix bug where active highlighting was left in editor when the addon was disabled.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_match-highlighter">match-highlighter addon</a>: Only start highlighting things when the editor gains focus.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_javascript-hint">javascript-hint addon</a>: Also complete non-enumerable properties.</li> <li>The <a href="http://codemirror.net/doc/manual.html#addOverlay"><code>addOverlay</code></a> method now supports a <code>priority</code> option to control the order in which overlays are applied.</li> <li>MIME types that end in <code>+json</code> now default to the JSON mode when the MIME itself is not defined.</li> <li>The mode formerly known as Jade was renamed to <a href="http://codemirror.net/mode/pug">Pug</a>.</li> <li>The <a href="http://codemirror.net/mode/python">Python mode</a> now defaults to Python 3 (rather than 2) syntax.</li> </ul> <p class="rel">19-07-2016: <a href="http://codemirror.net/codemirror-5.17.0.zip">Version 5.17.0</a>:</p> <ul class="rel-note"> <li>Fix problem with wrapped trailing whitespace displaying incorrectly.</li> <li>Prevent IME dialog from overlapping typed content in Chrome.</li> <li>Improve measuring of characters near a line wrap.</li> <li><a href="http://codemirror.net/mode/javascript">javascript mode</a>: Improve support for <code>async</code>, allow trailing commas in <code>import</code> lists.</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Fix backspace in replace mode.</li> <li><a href="http://codemirror.net/demo/sublime.html">sublime bindings</a>: Fix some key bindings on OS X to match Sublime Text.</li> <li><a href="http://codemirror.net/mode/markdown">markdown mode</a>: Add more classes to image links in highlight-formatting mode.</li> </ul> <p class="rel">20-06-2016: <a href="http://codemirror.net/codemirror-5.16.0.zip">Version 5.16.0</a>:</p> <ul class="rel-note"> <li>Fix glitches when dragging content caused by the drop indicator receiving mouse events.</li> <li>Make Control-drag work on Firefox.</li> <li>Make clicking or selection-dragging at the end of a wrapped line select the right position.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_show-hint">show-hint addon</a>: Prevent widget scrollbar from hiding part of the hint text.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_rulers">rulers addon</a>: Prevent rulers from forcing a horizontal editor scrollbar.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_search">search addon</a>: Automatically bind search-related keys in persistent dialog.</li> <li><a href="http://codemirror.net/demo/sublime.html">sublime keymap</a>: Add a multi-cursor aware smart backspace binding.</li> </ul> <p class="rel">20-05-2016: <a href="http://codemirror.net/codemirror-5.15.2.zip">Version 5.15.2</a>:</p> <ul class="rel-note"> <li>Fix a critical document corruption bug that occurs when a document is gradually grown.</li> </ul> <p class="rel">20-05-2016: <a href="http://codemirror.net/codemirror-5.15.0.zip">Version 5.15.0</a>:</p> <ul class="rel-note"> <li>Fix bug that caused the selection to reset when focusing the editor in contentEditable input mode.</li> <li>Fix issue where not all ASCII control characters were being replaced by placeholders.</li> <li>Remove the assumption that all modes have a <code>startState</code> method from several wrapping modes.</li> <li>Fix issue where the editor would complain about overlapping collapsed ranges when there weren't any.</li> <li>Optimize document tree building when loading or pasting huge chunks of content.</li> <li>Explicitly bind Ctrl-O on OS X to make that binding (“open line”) act as expected.</li> <li>Pasting <a href="http://codemirror.net/doc/manual.html#option_lineWiseCopyCut">linewise-copied</a> content when there is no selection now inserts the lines above the current line.</li> <li><a href="http://codemirror.net/mode/markdown/">markdown mode</a>: Fix several issues in matching link targets.</li> <li><a href="http://codemirror.net/mode/clike/">clike mode</a>: Improve indentation of C++ template declarations.</li> <li><a href="http://codemirror.net/mode/javascript/">javascript mode</a>: Support <code>async</code>/<code>await</code> and improve support for TypeScript type syntax.</li> </ul> <p class="rel">20-04-2016: <a href="http://codemirror.net/codemirror-5.14.0.zip">Version 5.14.0</a>:</p> <ul class="rel-note"> <li><a href="http://codemirror.net/doc/manual.html#posFromIndex"><code>posFromIndex</code></a> and <a href="http://codemirror.net/doc/manual.html#indexFromPos"><code>indexFromPos</code></a> now take <a href="http://codemirror.net/doc/manual.html#option_lineSeparator"><code>lineSeparator</code></a> into account</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Only call <code>.save()</code> when it is actually available</li> <li><a href="http://codemirror.net/doc/manual.html#addon_comment">comment addon</a>: Be careful not to mangle multi-line strings</li> <li><a href="http://codemirror.net/mode/python/index.html">Python mode</a>: Improve distinguishing of decorators from <code>@</code> operators</li> <li><a href="http://codemirror.net/doc/manual.html#findMarks"><code>findMarks</code></a>: No longer return marks that touch but don't overlap given range</li> <li><a href="http://codemirror.net/demo/vim.html">vim bindings</a>: Add yank command</li> <li><a href="http://codemirror.net/doc/manual.html#addon_match-highlighter">match-highlighter addon</a>: Add <code>trim</code> option to disable ignoring of whitespace</li> <li><a href="http://codemirror.net/mode/powershell/index.html">PowerShell mode</a>: Added</li> <li><a href="http://codemirror.net/mode/yacas/index.html">Yacas mode</a>: Added</li> <li><a href="http://codemirror.net/mode/webidl/index.html">Web IDL mode</a>: Added</li> <li><a href="http://codemirror.net/mode/sas/index.html">SAS mode</a>: Added</li> <li><a href="http://codemirror.net/mode/mbox/index.html">mbox mode</a>: Added</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.13.4...5.14.0">list of patches</a></li> </ul> <p class="rel">21-03-2016: <a href="http://codemirror.net/codemirror-5.13.2.zip">Version 5.13.2</a>:</p> <ul class="rel-note"> <li>Solves a problem where the gutter would sometimes not extend all the way to the end of the document.</li> </ul> <p class="rel">21-03-2016: <a href="http://codemirror.net/codemirror-5.13.zip">Version 5.13</a>:</p> <ul class="rel-note"> <li>New DOM event forwarded: <a href="http://codemirror.net/doc/manual.html#event_dom"><code>&quot;dragleave&quot;</code></a>.</li> <li><a href="http://codemirror.net/mode/protobuf/index.html">protobuf mode</a>: Newly added.</li> <li>Fix problem where <a href="http://codemirror.net/doc/manual.html#findMarks"><code>findMarks</code></a> sometimes failed to find multi-line marks.</li> <li>Fix crash that showed up when atomic ranges and bidi text were combined.</li> <li><a href="http://codemirror.net/demo/complete.html">show-hint addon</a>: Completion widgets no longer close when the line indented or dedented.</li> <li><a href="http://codemirror.net/demo/merge.html">merge addon</a>: Fix bug when merging chunks at the end of the file.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_placeholder">placeholder addon</a>: No longer gets confused by <a href="http://codemirror.net/doc/manual.html#swapDoc"><code>swapDoc</code></a>.</li> <li><a href="http://codemirror.net/doc/manual.html#addon_simplescrollbars">simplescrollbars addon</a>: Fix invalid state when deleting at end of document.</li> <li><a href="http://codemirror.net/mode/clike/index.html">clike mode</a>: No longer gets confused when a comment starts after an operator.</li> <li><a href="http://codemirror.net/mode/markdown/index.html">markdown mode</a>: Now supports CommonMark-style flexible list indentation.</li> <li><a href="http://codemirror.net/mode/dylan/index.html">dylan mode</a>: Several improvements and fixes.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.12.0...5.13.0">list of patches</a></li> </ul> <p class="rel">19-02-2016: <a href="http://codemirror.net/codemirror-5.12.zip">Version 5.12</a>:</p> <ul class="rel-note"> <li><a href="http://codemirror.net/demo/vim.html">Vim bindings</a>: Ctrl-Q is now an alias for Ctrl-V.</li> <li><a href="http://codemirror.net/demo/vim.html">Vim bindings</a>: The Vim API now exposes an <code>unmap</code> method to unmap bindings.</li> <li><a href="http://codemirror.net/demo/activeline.html">active-line addon</a>: This addon can now style the active line's gutter.</li> <li><a href="http://codemirror.net/mode/fcl/">FCL mode</a>: Newly added.</li> <li><a href="http://codemirror.net/mode/sql/">SQL mode</a>: Now has a Postgresql dialect.</li> <li>Fix <a href="https://github.com/codemirror/CodeMirror/issues/3781">issue</a> where trying to scroll to a horizontal position outside of the document's width could cause the gutter to be positioned incorrectly.</li> <li>Use absolute, rather than fixed positioning in the context-menu intercept hack, to work around a <a href="https://github.com/codemirror/CodeMirror/issues/3238">problem</a> when the editor is inside a transformed parent container.</li> <li>Solve a <a href="https://github.com/codemirror/CodeMirror/issues/3821">problem</a> where the horizontal scrollbar could hide text in Firefox.</li> <li>Fix a <a href="https://github.com/codemirror/CodeMirror/issues/3834">bug</a> that caused phantom scroll space under the text in some situations.</li> <li><a href="http://codemirror.net/demo/sublime.html">Sublime Text bindings</a>: Bind delete-line to Shift-Ctrl-K on OS X.</li> <li><a href="http://codemirror.net/mode/markdown/">Markdown mode</a>: Fix <a href="https://github.com/codemirror/CodeMirror/issues/3787">issue</a> where the mode would keep state related to fenced code blocks in an unsafe way, leading to occasional corrupted parses.</li> <li><a href="http://codemirror.net/mode/markdown/">Markdown mode</a>: Ignore backslashes in code fragments.</li> <li><a href="http://codemirror.net/mode/markdown/">Markdown mode</a>: Use whichever mode is registered as <code>text/html</code> to parse HTML.</li> <li><a href="http://codemirror.net/mode/clike/">Clike mode</a>: Improve indentation of Scala <code>=&gt;</code> functions.</li> <li><a href="http://codemirror.net/mode/python/">Python mode</a>: Improve indentation of bracketed code.</li> <li><a href="http://codemirror.net/mode/htmlmixed/">HTMLMixed mode</a>: Support multi-line opening tags for sub-languages (<code>&lt;script&gt;</code>, <code>&lt;style&gt;</code>, etc).</li> <li><a href="http://codemirror.net/mode/spreadsheet/">Spreadsheet mode</a>: Fix bug where the mode did not advance the stream when finding a backslash.</li> <li><a href="http://codemirror.net/mode/xml/">XML mode</a>: The mode now takes a <code>matchClosing</code> option to configure whether mismatched closing tags should be highlighted as errors.</li> </ul> <p class="rel">20-01-2016: <a href="http://codemirror.net/codemirror-5.11.zip">Version 5.11</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/jsx/index.html">JSX</a>, <a href="../mode/haskell-literate/index.html">literate Haskell</a></li> <li>The editor now forwards more <a href="manual.html#event_dom">DOM events</a>: <code>cut</code>, <code>copy</code>, <code>paste</code>, and <code>touchstart</code>. It will also forward <code>mousedown</code> for drag events</li> <li>Fixes a bug where bookmarks next to collapsed spans were not rendered</li> <li>The <a href="../mode/swift/index.html">Swift</a> mode now supports auto-indentation</li> <li>Frontmatters in the <a href="../mode/yaml-frontmatter/index.html">YAML frontmatter</a> mode are now optional as intended</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.10.0...5.11.0">list of patches</a></li> </ul> <p class="rel">21-12-2015: <a href="http://codemirror.net/codemirror-5.10.zip">Version 5.10</a>:</p> <ul class="rel-note"> <li>Modify the way <a href="manual.html#mark_atomic">atomic ranges</a> are skipped by selection to try and make it less surprising.</li> <li>The <a href="../mode/swift/index.html">Swift mode</a> was rewritten.</li> <li>New addon: <a href="manual.html#addon_jump-to-line">jump-to-line</a>.</li> <li>New method: <a href="manual.html#isReadOnly"><code>isReadOnly</code></a>.</li> <li>The <a href="manual.html#addon_show-hint">show-hint addon</a> now defaults to picking completions on single click.</li> <li>The object passed to <a href="manual.html#event_beforeSelectionChange"><code>&quot;beforeSelectionChange&quot;</code></a> events now has an <code>origin</code> property.</li> <li>New mode: <a href="../mode/crystal/index.html">Crystal</a>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.9.0...5.10.0">list of patches</a></li> </ul> <p class="rel">23-11-2015: <a href="http://codemirror.net/codemirror-5.9.zip">Version 5.9</a>:</p> <ul class="rel-note"> <li>Improve the way overlay (OS X-style) scrollbars are handled</li> <li>Make <a href="manual.html#addon_annotatescrollbar">annotatescrollbar</a> and scrollpastend addons work properly together</li> <li>Make <a href="manual.html#addon_show-hint">show-hint</a> addon select options on single click by default, move selection to hovered item</li> <li>Properly fold comments that include block-comment-start markers</li> <li>Many small language mode fixes</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.8.0...5.9.0">list of patches</a></li> </ul> <p class="rel">20-10-2015: <a href="http://codemirror.net/codemirror-5.8.zip">Version 5.8</a>:</p> <ul class="rel-note"> <li>Fixes an infinite loop in the <a href="manual.html#addon_hardwrap">hardwrap addon</a></li> <li>New modes: <a href="../mode/nsis/index.html">NSIS</a>, <a href="../mode/clike/index.html">Ceylon</a></li> <li>The Kotlin mode is now a <a href="../mode/clike/index.html">clike</a> dialect, rather than a stand-alone mode</li> <li>New option: <a href="manual.html#option_allowDropFileTypes"><code>allowDropFileTypes</code></a>. Binary files can no longer be dropped into CodeMirror</li> <li>New themes: <a href="../demo/theme.html#bespin">bespin</a>, <a href="../demo/theme.html#hopscotch">hopscotch</a>, <a href="../demo/theme.html#isotope">isotope</a>, <a href="../demo/theme.html#railscasts">railscasts</a></li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.7.0...5.8.0">list of patches</a></li> </ul> <p class="rel">20-09-2015: <a href="http://codemirror.net/codemirror-5.7.zip">Version 5.7</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/vue/index.html">Vue</a>, <a href="../mode/oz/index.html">Oz</a>, <a href="../mode/mscgen/index.html">MscGen</a> (and dialects), <a href="../mode/css/gss.html">Closure Stylesheets</a></li> <li>Implement <a href="http://commonmark.org">CommonMark</a>-style flexible list indent and cross-line code spans in <a href="../mode/markdown/index.html">Markdown</a> mode</li> <li>Add a replace-all button to the <a href="manual.html#addon_search">search addon</a>, and make the persistent search dialog transparent when it obscures the match</li> <li>Handle <code>acync</code>/<code>await</code> and ocal and binary numbers in <a href="../mode/javascript/index.html">JavaScript mode</a></li> <li>Fix various issues with the <a href="../mode/haxe/index.html">Haxe mode</a></li> <li>Make the <a href="manual.html#addon_closebrackets">closebrackets addon</a> select only the wrapped text when wrapping selection in brackets</li> <li>Tokenize properties as properties in the <a href="../mode/coffeescript/index.html">CoffeeScript mode</a></li> <li>The <a href="manual.html#addon_placeholder">placeholder addon</a> now accepts a DOM node as well as a string placeholder</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.6.0...5.7.0">list of patches</a></li> </ul> <p class="rel">20-08-2015: <a href="http://codemirror.net/codemirror-5.6.zip">Version 5.6</a>:</p> <ul class="rel-note"> <li>Fix bug where you could paste into a <code>readOnly</code> editor</li> <li>Show a cursor at the drop location when dragging over the editor</li> <li>The <a href="../mode/rust/index.html">Rust mode</a> was rewritten to handle modern Rust</li> <li>The editor and theme CSS was cleaned up. Some selectors are now less specific than before</li> <li>New theme: <a href="../demo/theme.html#abcdef">abcdef</a></li> <li>Lines longer than <a href="manual.html#option_maxHighlightLength"><code>maxHighlightLength</code></a> are now less likely to mess up indentation</li> <li>New addons: <a href="manual.html#addon_autorefresh"><code>autorefresh</code></a> for refreshing an editor the first time it becomes visible, and <code>html-lint</code> for using <a href="http://htmlhint.com/">HTMLHint</a></li> <li>The <a href="manual.html#addon_search"><code>search</code></a> addon now recognizes <code>\r</code> and <code>\n</code> in pattern and replacement input</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.5.0...5.6.0">list of patches</a></li> </ul> <p class="rel">20-07-2015: <a href="http://codemirror.net/codemirror-5.5.zip">Version 5.5</a>:</p> <ul class="rel-note"> <li>New option: <a href="manual.html#option_lineSeparator"><code>lineSeparator</code></a> (with corresponding <a href="manual.html#lineSeparator">method</a>) <li>New themes: <a href="../demo/theme.html#dracula">dracula</a>, <a href="../demo/theme.html#seti">seti</a>, <a href="../demo/theme.html#yeti">yeti</a>, <a href="../demo/theme.html#material">material</a>, and <a href="../demo/theme.html#icecoder">icecoder</a></li> <li>New modes: <a href="../mode/brainfuck/index.html">Brainfuck</a>, <a href="../mode/vhdl/index.html">VHDL</a>, Squirrel (<a href="../mode/clike/index.html">clike</a> dialect)</li> <li>Define a <code>findPersistent</code> command in the <a href="../demo/search.html">search</a> addon, for a dialog that stays open as you cycle through matches</li> <li>From this release on, the NPM module doesn't include documentation and demos</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.4.0...5.5.0">list of patches</a></li> </ul> <p class="rel">25-06-2015: <a href="http://codemirror.net/codemirror-5.4.zip">Version 5.4</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/twig/index.html">Twig</a>, <a href="../mode/elm/index.html">Elm</a>, <a href="../mode/factor/index.html">Factor</a>, <a href="../mode/swift/index.html">Swift</a></li> <li>Prefer clipboard API (if available) when pasting</li> <li>Refined definition highlighting in <a href="../mode/clike/index.html">clike</a> mode</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.3.0...5.4.0">list of patches</a></li> </ul> <p class="rel">20-05-2015: <a href="http://codemirror.net/codemirror-5.3.zip">Version 5.3</a>:</p> <ul class="rel-note"> <li>Fix several regressions in the <a href="manual.html#addon_show-hint"><code>show-hint</code></a> addon (<code>completeSingle</code> option, <code>"shown"</code> and <code>"close"</code> events)</li> <li>The <a href="../demo/vim.html">vim mode</a> API was <a href="manual.html#vimapi">documented</a></li> <li>New modes: <a href="../mode/asn.1/index.html">ASN.1</a>, <a href="../mode/ttcn/index.html">TTCN</a>, and <a href="../mode/ttcn-cfg/index.html">TTCN-CFG</a></li> <li>The <a href="../mode/clike/index.html">clike</a> mode can now deep-indent <code>switch</code> statements, and roughly recognizes types and defined identifiers</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.2.0...5.3.0">list of patches</a></li> </ul> <p class="rel">20-04-2015: <a href="http://codemirror.net/codemirror-5.2.zip">Version 5.2</a>:</p> <ul class="rel-note"> <li>Fix several race conditions in <a href="manual.html#addon_show-hint"><code>show-hint</code></a>'s asynchronous mode</li> <li>Fix backspace binding in <a href="../demo/sublime.html">Sublime bindings</a></li> <li>Change the way IME is handled in the <code>"textarea"</code> <a href="manual.html#option_inputStyle">input style</a></li> <li>New modes: <a href="../mode/mumps/index.html">MUMPS</a>, <a href="../mode/handlebars/index.html">Handlebars</a></li> <li>Rewritten modes: <a href="../mode/django/index.html">Django</a>, <a href="../mode/z80/index.html">Z80</a></li> <li>New theme: <a href="../demo/theme.html#liquibyte">Liquibyte</a></li> <li>New option: <a href="manual.html#option_lineWiseCopyCut"><code>lineWiseCopyCut</code></a></li> <li>The <a href="../demo/vim.html">Vim mode</a> now supports buffer-local options and the <code>filetype</code> setting</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.1.0...5.2.0">list of patches</a></li> </ul> <p class="rel">23-03-2015: <a href="http://codemirror.net/codemirror-5.1.zip">Version 5.1</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/asciiarmor/index.html">ASCII armor</a> (PGP data), <a href="../mode/troff/index.html">Troff</a>, and <a href="../mode/cmake/index.html">CMake</a>.</li> <li>Remove SmartyMixed mode, rewrite <a href="../mode/smarty/index.html">Smarty</a> mode to supersede it.</li> <li>New commands in the <a href="manual.html#addon_merge">merge addon</a>: <code>goNextDiff</code> and <code>goPrevDiff</code>.</li> <li>The <a href="manual.html#addon_closebrackets">closebrackets addon</a> can now be configured per mode.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/5.0.0...5.1.0">list of patches</a>.</li> </ul> <p class="rel">20-02-2015: <a href="http://codemirror.net/codemirror-5.0.zip">Version 5.0</a>:</p> <ul class="rel-note"> <li>Experimental mobile support (tested on iOS, Android Chrome, stock Android browser)</li> <li>New option <a href="manual.html#option_inputStyle"><code>inputStyle</code></a> to switch between hidden textarea and contenteditable input.</li> <li>The <a href="manual.html#getInputField"><code>getInputField</code></a> method is no longer guaranteed to return a textarea.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.13.0...5.0.0">list of patches</a>.</li> </ul> </section> <section id=v4 class=first> <h2>Version 4.x</h2> <p class="rel">20-02-2015: <a href="http://codemirror.net/codemirror-4.13.zip">Version 4.13</a>:</p> <ul class="rel-note"> <li>Fix the way the <a href="../demo/closetag.html"><code>closetag</code></a> demo handles the slash character.</li> <li>New modes: <a href="../mode/forth/index.html">Forth</a>, <a href="../mode/stylus/index.html">Stylus</a>.</li> <li>Make the <a href="../mode/css/index.html">CSS mode</a> understand some modern CSS extensions.</li> <li>Have the <a href="../mode/clike/index.html">Scala mode</a> handle symbols and triple-quoted strings.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.12.0...4.13.0">list of patches</a>.</li> </ul> <p class="rel">22-01-2015: <a href="http://codemirror.net/codemirror-4.12.zip">Version 4.12</a>:</p> <ul class="rel-note"> <li>The <a href="manual.html#addon_closetag"><code>closetag</code></a> addon now defines a <code>"closeTag"</code> command.</li> <li>Adds a <code>findModeByFileName</code> to the <a href="manual.html#addon_meta">mode metadata</a> addon.</li> <li><a href="../demo/simplemode.html">Simple mode</a> rules can now contain a <code>sol</code> property to only match at the start of a line.</li> <li>New addon: <a href="manual.html#addon_selection-pointer"><code>selection-pointer</code></a> to style the mouse cursor over the selection.</li> <li>Improvements to the <a href="../mode/sass/index.html">Sass mode</a>'s indentation.</li> <li>The <a href="../demo/vim.html">Vim keymap</a>'s search functionality now supports <a href="manual.html#addon_matchesonscrollbar">scrollbar annotation</a>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.11.0...4.12.0">list of patches</a>.</li> </ul> <p class="rel">9-01-2015: <a href="http://codemirror.net/codemirror-4.11.zip">Version 4.11</a>:</p> <p class="rel-note">Unfortunately, 4.10 did not take care of the Firefox scrolling issue entirely. This release adds two more patches to address that.</p> <p class="rel">29-12-2014: <a href="http://codemirror.net/codemirror-4.10.zip">Version 4.10</a>:</p> <p class="rel-note">Emergency single-patch update to 4.9. Fixes Firefox-specific problem where the cursor could end up behind the horizontal scrollbar.</p> <p class="rel">23-12-2014: <a href="http://codemirror.net/codemirror-4.9.zip">Version 4.9</a>:</p> <ul class="rel-note"> <li>Overhauled scroll bar handling. Add pluggable <a href="../demo/simplescrollbars.html">scrollbar implementations</a>.</li> <li>Tweaked behavior for the <a href="manual.html#addon_show-hint">completion addons</a> to not take text after cursor into account.</li> <li>Two new optional features in the <a href="manual.html#addon_merge">merge addon</a>: aligning editors, and folding unchanged text.</li> <li>New modes: <a href="../mode/dart/index.html">Dart</a>, <a href="../mode/ebnf/index.html">EBNF</a>, <a href="../mode/spreadsheet/index.html">spreadsheet</a>, and <a href="../mode/soy/index.html">Soy</a>.</li> <li>New <a href="../demo/panel.html">addon</a> to show persistent panels below/above an editor.</li> <li>New themes: <a href="../demo/theme.html#zenburn">zenburn</a> and <a href="../demo/theme.html#tomorrow-night-bright">tomorrow night bright</a>.</li> <li>Allow ctrl-click to clear existing cursors.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.8.0...4.9.0">list of patches</a>.</li> </ul> <p class="rel">22-11-2014: <a href="http://codemirror.net/codemirror-4.8.zip">Version 4.8</a>:</p> <ul class="rel-note"> <li>Built-in support for <a href="manual.html#normalizeKeyMap">multi-stroke key bindings</a>.</li> <li>New method: <a href="manual.html#getLineTokens"><code>getLineTokens</code></a>.</li> <li>New modes: <a href="../mode/dockerfile/index.html">dockerfile</a>, <a href="../mode/idl/index.html">IDL</a>, <a href="../mode/clike/index.html">Objective C</a> (crude).</li> <li>Support styling of gutter backgrounds, allow <code>"gutter"</code> styles in <a href="manual.html#addLineClass"><code>addLineClass</code></a>.</li> <li>Many improvements to the <a href="../demo/vim.html">Vim mode</a>, rewritten visual mode.</li> <li>Improvements to modes: <a href="../mode/gfm/index.html">gfm</a> (strikethrough), <a href="../mode/sparql/index.html">SPARQL</a> (version 1.1 support), and <a href="../mode/stex/index.html">sTeX</a> (no more runaway math mode). <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.7.0...4.8.0">list of patches</a>.</li> </ul> <p class="rel">20-10-2014: <a href="http://codemirror.net/codemirror-4.7.zip">Version 4.7</a>:</p> <ul class="rel-note"> <li><strong>Incompatible</strong>: The <a href="../demo/lint.html">lint addon</a> now passes the editor's value as first argument to asynchronous lint functions, for consistency. The editor is still passed, as fourth argument.</li> <li>Improved handling of unicode identifiers in modes for languages that support them.</li> <li>More mode improvements: <a href="../mode/coffeescript/index.html">CoffeeScript</a> (indentation), <a href="../mode/verilog/index.html">Verilog</a> (indentation), <a href="../mode/clike/index.html">Scala</a> (indentation, triple-quoted strings), and <a href="../mode/php/index.html">PHP</a> (interpolated variables in heredoc strings).</li> <li>New modes: <a href="../mode/textile/index.html">Textile</a> and <a href="../mode/tornado/index.html">Tornado templates</a>.</li> <li>Experimental new <a href="../demo/simplemode.html">way to define modes</a>.</li> <li>Improvements to the <a href="../demo/vim.html">Vim bindings</a>: Arbitrary insert mode key mappings are now possible, and text objects are supported in visual mode.</li> <li>The mode <a href="../mode/meta.js">meta-information file</a> now includes information about file extensions, and <a href="manual.html#addon_meta">helper functions</a> <code>findModeByMIME</code> and <code>findModeByExtension</code>.</li> <li>New logo!</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.6.0...4.7.0">list of patches</a>.</li> </ul> <p class="rel">19-09-2014: <a href="http://codemirror.net/codemirror-4.6.zip">Version 4.6</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/modelica/index.html">Modelica</a></li> <li>New method: <a href="manual.html#findWordAt"><code>findWordAt</code></a></li> <li>Make it easier to <a href="../demo/markselection.html">use text background styling</a></li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.5.0...4.6.0">list of patches</a>.</li> </ul> <p class="rel">21-08-2014: <a href="http://codemirror.net/codemirror-4.5.zip">Version 4.5</a>:</p> <ul class="rel-note"> <li>Fix several serious bugs with horizontal scrolling</li> <li>New mode: <a href="../mode/slim/index.html">Slim</a></li> <li>New command: <a href="manual.html#command_goLineLeftSmart"><code>goLineLeftSmart</code></a></li> <li>More fixes and extensions for the <a href="../demo/vim.html">Vim</a> visual block mode</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.4.0...4.5.0">list of patches</a>.</li> </ul> <p class="rel">21-07-2014: <a href="http://codemirror.net/codemirror-4.4.zip">Version 4.4</a>:</p> <ul class="rel-note"> <li><strong>Note:</strong> Some events might now fire in slightly different order (<code>"change"</code> is still guaranteed to fire before <code>"cursorActivity"</code>)</li> <li>Nested operations in multiple editors are now synced (complete at same time, reducing DOM reflows)</li> <li>Visual block mode for <a href="../demo/vim.html">vim</a> (&lt;C-v>) is nearly complete</li> <li>New mode: <a href="../mode/kotlin/index.html">Kotlin</a></li> <li>Better multi-selection paste for text copied from multiple CodeMirror selections</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.3.0...4.4.0">list of patches</a>.</li> </ul> <p class="rel">23-06-2014: <a href="http://codemirror.net/codemirror-4.3.zip">Version 4.3</a>:</p> <ul class="rel-note"> <li>Several <a href="../demo/vim.html">vim bindings</a> improvements: search and exCommand history, global flag for <code>:substitute</code>, <code>:global</code> command. <li>Allow hiding the cursor by setting <a href="manual.html#option_cursorBlinkRate"><code>cursorBlinkRate</code></a> to a negative value.</li> <li>Make gutter markers themeable, use this in foldgutter.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.2.0...4.3.0">list of patches</a>.</li> </ul> <p class="rel">19-05-2014: <a href="http://codemirror.net/codemirror-4.2.zip">Version 4.2</a>:</p> <ul class="rel-note"> <li>Fix problem where some modes were broken by the fact that empty tokens were forbidden.</li> <li>Several fixes to context menu handling.</li> <li>On undo, scroll <em>change</em>, not cursor, into view.</li> <li>Rewritten <a href="../mode/jade/index.html">Jade</a> mode.</li> <li>Various improvements to <a href="../mode/shell/index.html">Shell</a> (support for more syntax) and <a href="../mode/python/index.html">Python</a> (better indentation) modes.</li> <li>New mode: <a href="../mode/cypher/index.html">Cypher</a>.</li> <li>New theme: <a href="../demo/theme.html#neo">Neo</a>.</li> <li>Support direct styling options (color, line style, width) in the <a href="manual.html#addon_rulers">rulers</a> addon.</li> <li>Recognize per-editor configuration for the <a href="manual.html#addon_show-hint">show-hint</a> and <a href="manual.html#addon_foldcode">foldcode</a> addons.</li> <li>More intelligent scanning for existing close tags in <a href="manual.html#addon_closetag">closetag</a> addon.</li> <li>In the <a href="../demo/vim.html">Vim bindings</a>: Fix bracket matching, support case conversion in visual mode, visual paste, append action.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.1.0...4.2.0">list of patches</a>.</li> </ul> <p class="rel">22-04-2014: <a href="http://codemirror.net/codemirror-4.1.zip">Version 4.1</a>:</p> <ul class="rel-note"> <li><em>Slightly incompatible</em>: The <a href="manual.html#event_cursorActivity"><code>"cursorActivity"</code></a> event now fires after all other events for the operation (and only for handlers that were actually registered at the time the activity happened).</li> <li>New command: <a href="manual.html#command_insertSoftTab"><code>insertSoftTab</code></a>.</li> <li>New mode: <a href="../mode/django/index.html">Django</a>.</li> <li>Improved modes: <a href="../mode/verilog/index.html">Verilog</a> (rewritten), <a href="../mode/jinja2/index.html">Jinja2</a>, <a href="../mode/haxe/index.html">Haxe</a>, <a href="../mode/php/index.html">PHP</a> (string interpolation highlighted), <a href="../mode/javascript/index.html">JavaScript</a> (indentation of trailing else, template strings), <a href="../mode/livescript/index.html">LiveScript</a> (multi-line strings).</li> <li>Many small issues from the 3.x→4.x transition were found and fixed.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/4.0.3...4.1.0">list of patches</a>.</li> </ul> <p class="rel">20-03-2014: <a href="http://codemirror.net/codemirror-4.0.zip">Version 4.0</a>:</p> <p class="rel-note">This is a new major version of CodeMirror. There are a few <strong>incompatible</strong> changes in the API. Upgrade with care, and read the <a href="upgrade_v4.html">upgrading guide</a>.</p> <ul class="rel-note"> <li>Multiple selections (ctrl-click, alt-drag, <a href="manual.html#setSelections">API</a>).</li> <li>Sublime Text <a href="../demo/sublime.html">bindings</a>.</li> <li><a href="manual.html#modloader">Module loader shims</a> wrapped around all modules.</li> <li>Selection <a href="manual.html#command_undoSelection">undo</a>/<a href="manual.html#command_redoSelection">redo</a>.</li> <li>Improved character measuring (faster, handles wrapped lines more robustly).</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.23.0...4.0.3">list of patches</a>.</li> </ul> </section> <section id=v3> <h2>Version 3.x</h2> <p class="rel">22-04-2014: <a href="http://codemirror.net/codemirror-3.24.zip">Version 3.24</a>:</p> <p class="rel-note">Merges the improvements from 4.1 that could easily be applied to the 3.x code. Also improves the way the editor size is updated when line widgets change.</p> <p class="rel">20-03-2014: <a href="http://codemirror.net/codemirror-3.23.zip">Version 3.23</a>:</p> <ul class="rel-note"> <li>In the <a href="../mode/xml/index.html">XML mode</a>, add <code>brackets</code> style to angle brackets, fix case-sensitivity of tags for HTML.</li> <li>New mode: <a href="../mode/dylan/index.html">Dylan</a>.</li> <li>Many improvements to the <a href="../demo/vim.html">Vim bindings</a>.</li> </ul> <p class="rel">21-02-2014: <a href="http://codemirror.net/codemirror-3.22.zip">Version 3.22</a>:</p> <ul class="rel-note"> <li>Adds the <a href="manual.html#findMarks"><code>findMarks</code></a> method.</li> <li>New addons: <a href="manual.html#addon_rulers">rulers</a>, markdown-fold, yaml-lint.</li> <li>New theme: <a href="../demo/theme.html#mdn-like">mdn-like</a>.</li> <li>New mode: <a href="../mode/solr/index.html">Solr</a>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.21.0...3.22.0">list of patches</a>.</li> </ul> <p class="rel">16-01-2014: <a href="http://codemirror.net/codemirror-3.21.zip">Version 3.21</a>:</p> <ul class="rel-note"> <li>Auto-indenting a block will no longer add trailing whitespace to blank lines.</li> <li>Marking text has a new option <a href="manual.html#markText"><code>clearWhenEmpty</code></a> to control auto-removal.</li> <li>Several bugfixes in the handling of bidirectional text.</li> <li>The <a href="../mode/xml/index.html">XML</a> and <a href="../mode/css/index.html">CSS</a> modes were largely rewritten. <a href="../mode/css/less.html">LESS</a> support was added to the CSS mode.</li> <li>The OCaml mode was moved to an <a href="../mode/mllike/index.html">mllike</a> mode, F# support added.</li> <li>Make it possible to fetch multiple applicable helper values with <a href="manual.html#getHelpers"><code>getHelpers</code></a>, and to register helpers matched on predicates with <a href="manual.html#registerGlobalHelper"><code>registerGlobalHelper</code></a>.</li> <li>New theme <a href="../demo/theme.html#pastel-on-dark">pastel-on-dark</a>.</li> <li>Better ECMAScript 6 support in <a href="../mode/javascript/index.html">JavaScript</a> mode.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.20.0...3.21.0">list of patches</a>.</li> </ul> <p class="rel">21-11-2013: <a href="http://codemirror.net/codemirror-3.20.zip">Version 3.20</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/julia/index.html">Julia</a> and <a href="../mode/pegjs/index.html">PEG.js</a>.</li> <li>Support ECMAScript 6 in the <a href="../mode/javascript/index.html">JavaScript mode</a>.</li> <li>Improved indentation for the <a href="../mode/coffeescript/index.html">CoffeeScript mode</a>.</li> <li>Make non-printable-character representation <a href="manual.html#option_specialChars">configurable</a>.</li> <li>Add ‘notification’ functionality to <a href="manual.html#addon_dialog">dialog</a> addon.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.19.0...3.20.0">list of patches</a>.</li> </ul> <p class="rel">21-10-2013: <a href="http://codemirror.net/codemirror-3.19.zip">Version 3.19</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/eiffel/index.html">Eiffel</a>, <a href="../mode/gherkin/index.html">Gherkin</a>, <a href="../mode/sql/?mime=text/x-mssql">MSSQL dialect</a>.</li> <li>New addons: <a href="manual.html#addon_hardwrap">hardwrap</a>, <a href="manual.html#addon_sql-hint">sql-hint</a>.</li> <li>New theme: <a href="../demo/theme.html#mbo">MBO</a>.</li> <li>Add <a href="manual.html#token_style_line">support</a> for line-level styling from mode tokenizers.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.18.0...3.19.0">list of patches</a>.</li> </ul> <p class="rel">23-09-2013: <a href="http://codemirror.net/codemirror-3.18.zip">Version 3.18</a>:</p> <p class="rel-note">Emergency release to fix a problem in 3.17 where <code>.setOption("lineNumbers", false)</code> would raise an error.</p> <p class="rel">23-09-2013: <a href="http://codemirror.net/codemirror-3.17.zip">Version 3.17</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/fortran/index.html">Fortran</a>, <a href="../mode/octave/index.html">Octave</a> (Matlab), <a href="../mode/toml/index.html">TOML</a>, and <a href="../mode/dtd/index.html">DTD</a>.</li> <li>New addons: <a href="../addon/lint/css-lint.js"><code>css-lint</code></a>, <a href="manual.html#addon_css-hint"><code>css-hint</code></a>.</li> <li>Improve resilience to CSS 'frameworks' that globally mess up <code>box-sizing</code>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.16.0...3.17.0">list of patches</a>.</li> </ul> <p class="rel">21-08-2013: <a href="http://codemirror.net/codemirror-3.16.zip">Version 3.16</a>:</p> <ul class="rel-note"> <li>The whole codebase is now under a single <a href="../LICENSE">license</a> file.</li> <li>The project page was overhauled and redesigned.</li> <li>New themes: <a href="../demo/theme.html#paraiso-dark">Paraiso</a> (<a href="../demo/theme.html#paraiso-light">light</a>), <a href="../demo/theme.html#the-matrix">The Matrix</a>.</li> <li>Improved interaction between themes and <a href="manual.html#addon_active-line">active-line</a>/<a href="manual.html#addon_matchbrackets">matchbrackets</a> addons.</li> <li>New <a href="manual.html#addon_foldcode">folding</a> function <code>CodeMirror.fold.comment</code>.</li> <li>Added <a href="manual.html#addon_fullscreen">fullscreen</a> addon.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.15.0...3.16.0">list of patches</a>.</li> </ul> <p class="rel">29-07-2013: <a href="http://codemirror.net/codemirror-3.15.zip">Version 3.15</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/jade/index.html">Jade</a>, <a href="../mode/nginx/index.html">Nginx</a>.</li> <li>New addons: <a href="../demo/tern.html">Tern</a>, <a href="manual.html#addon_matchtags">matchtags</a>, and <a href="manual.html#addon_foldgutter">foldgutter</a>.</li> <li>Introduced <a href="manual.html#getHelper"><em>helper</em></a> concept (<a href="https://groups.google.com/forum/#!msg/codemirror/cOc0xvUUEUU/nLrX1-qnidgJ">context</a>).</li> <li>New method: <a href="manual.html#getModeAt"><code>getModeAt</code></a>.</li> <li>New themes: base16 <a href="../demo/theme.html#base16-dark">dark</a>/<a href="../demo/theme.html#base16-light">light</a>, 3024 <a href="../demo/theme.html#3024-night">dark</a>/<a href="../demo/theme.html#3024-day">light</a>, <a href="../demo/theme.html#tomorrow-night-eighties">tomorrow-night</a>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.14.0...3.15.0">list of patches</a>.</li> </ul> <p class="rel">20-06-2013: <a href="http://codemirror.net/codemirror-3.14.zip">Version 3.14</a>:</p> <ul class="rel-note"> <li>New addons: <a href="manual.html#addon_trailingspace">trailing space highlight</a>, <a href="manual.html#addon_xml-hint">XML completion</a> (rewritten), and <a href="manual.html#addon_merge">diff merging</a>.</li> <li><a href="manual.html#markText"><code>markText</code></a> and <a href="manual.html#addLineWidget"><code>addLineWidget</code></a> now take a <code>handleMouseEvents</code> option.</li> <li>New methods: <a href="manual.html#lineAtHeight"><code>lineAtHeight</code></a>, <a href="manual.html#getTokenTypeAt"><code>getTokenTypeAt</code></a>.</li> <li>More precise cleanness-tracking using <a href="manual.html#changeGeneration"><code>changeGeneration</code></a> and <a href="manual.html#isClean"><code>isClean</code></a>.</li> <li>Many extensions to <a href="../demo/emacs.html">Emacs</a> mode (prefixes, more navigation units, and more).</li> <li>New events <a href="manual.html#event_keyHandled"><code>"keyHandled"</code></a> and <a href="manual.html#event_inputRead"><code>"inputRead"</code></a>.</li> <li>Various improvements to <a href="../mode/ruby/index.html">Ruby</a>, <a href="../mode/smarty/index.html">Smarty</a>, <a href="../mode/sql/index.html">SQL</a>, and <a href="../demo/vim.html">Vim</a> modes.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/3.13.0...3.14.0">list of patches</a>.</li> </ul> <p class="rel">20-05-2013: <a href="http://codemirror.net/codemirror-3.13.zip">Version 3.13</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/cobol/index.html">COBOL</a> and <a href="../mode/haml/index.html">HAML</a>.</li> <li>New options: <a href="manual.html#option_cursorScrollMargin"><code>cursorScrollMargin</code></a> and <a href="manual.html#option_coverGutterNextToScrollbar"><code>coverGutterNextToScrollbar</code></a>.</li> <li>New addon: <a href="manual.html#addon_comment">commenting</a>.</li> <li>More features added to the <a href="../demo/vim.html">Vim keymap</a>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.12...3.13.0">list of patches</a>.</li> </ul> <p class="rel">19-04-2013: <a href="http://codemirror.net/codemirror-3.12.zip">Version 3.12</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/gas/index.html">GNU assembler</a>.</li> <li>New options: <a href="manual.html#option_maxHighlightLength"><code>maxHighlightLength</code></a> and <a href="manual.html#option_historyEventDelay"><code>historyEventDelay</code></a>.</li> <li>Added <a href="manual.html#mark_addToHistory"><code>addToHistory</code></a> option for <code>markText</code>.</li> <li>Various fixes to JavaScript tokenization and indentation corner cases.</li> <li>Further improvements to the vim mode.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.11...v3.12">list of patches</a>.</li> </ul> <p class="rel">20-03-2013: <a href="http://codemirror.net/codemirror-3.11.zip">Version 3.11</a>:</p> <ul class="rel-note"> <li><strong>Removed code:</strong> <code>collapserange</code>, <code>formatting</code>, and <code>simple-hint</code> addons. <code>plsql</code> and <code>mysql</code> modes (use <a href="../mode/sql/index.html"><code>sql</code></a> mode).</li> <li><strong>Moved code:</strong> the range-finding functions for folding now have <a href="../addon/fold/">their own files</a>.</li> <li><strong>Changed interface:</strong> the <a href="manual.html#addon_continuecomment"><code>continuecomment</code></a> addon now exposes an option, rather than a command.</li> <li>New modes: <a href="../mode/css/scss.html">SCSS</a>, <a href="../mode/tcl/index.html">Tcl</a>, <a href="../mode/livescript/index.html">LiveScript</a>, and <a href="../mode/mirc/index.html">mIRC</a>.</li> <li>New addons: <a href="../demo/placeholder.html"><code>placeholder</code></a>, <a href="../demo/html5complete.html">HTML completion</a>.</li> <li>New methods: <a href="manual.html#hasFocus"><code>hasFocus</code></a>, <a href="manual.html#defaultCharWidth"><code>defaultCharWidth</code></a>.</li> <li>New events: <a href="manual.html#event_beforeCursorEnter"><code>beforeCursorEnter</code></a>, <a href="manual.html#event_renderLine"><code>renderLine</code></a>.</li> <li>Many improvements to the <a href="manual.html#addon_show-hint"><code>show-hint</code></a> completion dialog addon.</li> <li>Tweak behavior of by-word cursor motion.</li> <li>Further improvements to the <a href="../demo/vim.html">vim mode</a>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.1...v3.11">list of patches</a>.</li> </ul> <p class="rel">21-02-2013: <a href="http://codemirror.net/codemirror-3.1.zip">Version 3.1</a>:</p> <ul class="rel-note"> <li><strong>Incompatible:</strong> key handlers may now <em>return</em>, rather than <em>throw</em> <code>CodeMirror.Pass</code> to signal they didn't handle the key.</li> <li>Make documents a <a href="manual.html#api_doc">first-class construct</a>, support split views and subviews.</li> <li>Add a <a href="manual.html#addon_show-hint">new module</a> for showing completion hints. Deprecate <code>simple-hint.js</code>.</li> <li>Extend <a href="../mode/htmlmixed/index.html">htmlmixed mode</a> to allow custom handling of script types.</li> <li>Support an <code>insertLeft</code> option to <a href="manual.html#setBookmark"><code>setBookmark</code></a>.</li> <li>Add an <a href="manual.html#eachLine"><code>eachLine</code></a> method to iterate over a document.</li> <li>New addon modules: <a href="../demo/markselection.html">selection marking</a>, <a href="../demo/lint.html">linting</a>, and <a href="../demo/closebrackets.html">automatic bracket closing</a>.</li> <li>Add <a href="manual.html#event_beforeChange"><code>"beforeChange"</code></a> and <a href="manual.html#event_beforeSelectionChange"><code>"beforeSelectionChange"</code></a> events.</li> <li>Add <a href="manual.html#event_hide"><code>"hide"</code></a> and <a href="manual.html#event_unhide"><code>"unhide"</code></a> events to marked ranges.</li> <li>Fix <a href="manual.html#coordsChar"><code>coordsChar</code></a>'s interpretation of its argument to match the documentation.</li> <li>New modes: <a href="../mode/turtle/index.html">Turtle</a> and <a href="../mode/q/index.html">Q</a>.</li> <li>Further improvements to the <a href="../demo/vim.html">vim mode</a>.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.01...v3.1">list of patches</a>.</li> </ul> <p class="rel">25-01-2013: <a href="http://codemirror.net/codemirror-3.02.zip">Version 3.02</a>:</p> <p class="rel-note">Single-bugfix release. Fixes a problem that prevents CodeMirror instances from being garbage-collected after they become unused.</p> <p class="rel">21-01-2013: <a href="http://codemirror.net/codemirror-3.01.zip">Version 3.01</a>:</p> <ul class="rel-note"> <li>Move all add-ons into an organized directory structure under <a href="../addon/"><code>/addon</code></a>. <strong>You might have to adjust your paths.</strong></li> <li>New modes: <a href="../mode/d/index.html">D</a>, <a href="../mode/sass/index.html">Sass</a>, <a href="../mode/apl/index.html">APL</a>, <a href="../mode/sql/index.html">SQL</a> (configurable), and <a href="../mode/asterisk/index.html">Asterisk</a>.</li> <li>Several bugfixes in right-to-left text support.</li> <li>Add <a href="manual.html#option_rtlMoveVisually"><code>rtlMoveVisually</code></a> option.</li> <li>Improvements to vim keymap.</li> <li>Add built-in (lightweight) <a href="manual.html#addOverlay">overlay mode</a> support.</li> <li>Support <code>showIfHidden</code> option for <a href="manual.html#addLineWidget">line widgets</a>.</li> <li>Add simple <a href="manual.html#addon_python-hint">Python hinter</a>.</li> <li>Bring back the <a href="manual.html#option_fixedGutter"><code>fixedGutter</code></a> option.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.0...v3.01">list of patches</a>.</li> </ul> <p class="rel">10-12-2012: <a href="http://codemirror.net/codemirror-3.0.zip">Version 3.0</a>:</p> <p class="rel-note"><strong>New major version</strong>. Only partially backwards-compatible. See the <a href="upgrade_v3.html">upgrading guide</a> for more information. Changes since release candidate 2:</p> <ul class="rel-note"> <li>Rewritten VIM mode.</li> <li>Fix a few minor scrolling and sizing issues.</li> <li>Work around Safari segfault when dragging.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.0rc2...v3.0">list of patches</a>.</li> </ul> <p class="rel">20-11-2012: <a href="http://codemirror.net/codemirror-3.0rc2.zip">Version 3.0, release candidate 2</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/http/index.html">HTTP</a>.</li> <li>Improved handling of selection anchor position.</li> <li>Improve IE performance on longer lines.</li> <li>Reduce gutter glitches during horiz. scrolling.</li> <li>Add <a href="manual.html#addKeyMap"><code>addKeyMap</code></a> and <a href="manual.html#removeKeyMap"><code>removeKeyMap</code></a> methods.</li> <li>Rewrite <code>formatting</code> and <code>closetag</code> add-ons.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.0rc1...v3.0rc2">list of patches</a>.</li> </ul> <p class="rel">20-11-2012: <a href="http://codemirror.net/codemirror-3.0rc1.zip">Version 3.0, release candidate 1</a>:</p> <ul class="rel-note"> <li>New theme: <a href="../demo/theme.html#solarized%20light">Solarized</a>.</li> <li>Introduce <a href="manual.html#addLineClass"><code>addLineClass</code></a> and <a href="manual.html#removeLineClass"><code>removeLineClass</code></a>, drop <code>setLineClass</code>.</li> <li>Add a <em>lot</em> of new <a href="manual.html#markText">options for marked text</a> (read-only, atomic, collapsed, widget replacement).</li> <li>Remove the old code folding interface in favour of these new ranges.</li> <li>Add <a href="manual.html#isClean"><code>isClean</code></a>/<a href="manual.html#markClean"><code>markClean</code></a> methods.</li> <li>Remove <code>compoundChange</code> method, use better undo-event-combining heuristic.</li> <li>Improve scrolling performance smoothness.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.0beta2...v3.0rc1">list of patches</a>.</li> </ul> <p class="rel">22-10-2012: <a href="http://codemirror.net/codemirror-3.0beta2.zip">Version 3.0, beta 2</a>:</p> <ul class="rel-note"> <li>Fix page-based coordinate computation.</li> <li>Fix firing of <a href="manual.html#event_gutterClick"><code>gutterClick</code></a> event.</li> <li>Add <a href="manual.html#option_cursorHeight"><code>cursorHeight</code></a> option.</li> <li>Fix bi-directional text regression.</li> <li>Add <a href="manual.html#option_viewportMargin"><code>viewportMargin</code></a> option.</li> <li>Directly handle mousewheel events (again, hopefully better).</li> <li>Make vertical cursor movement more robust (through widgets, big line gaps).</li> <li>Add <a href="manual.html#option_flattenSpans"><code>flattenSpans</code></a> option.</li> <li>Many optimizations. Poor responsiveness should be fixed.</li> <li>Initialization in hidden state works again.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v3.0beta1...v3.0beta2">list of patches</a>.</li> </ul> <p class="rel">19-09-2012: <a href="http://codemirror.net/codemirror-3.0beta1.zip">Version 3.0, beta 1</a>:</p> <ul class="rel-note"> <li>Bi-directional text support.</li> <li>More powerful gutter model.</li> <li>Support for arbitrary text/widget height.</li> <li>In-line widgets.</li> <li>Generalized event handling.</li> </ul> </section> <section id=v2> <h2>Version 2.x</h2> <p class="rel">21-01-2013: <a href="http://codemirror.net/codemirror-2.38.zip">Version 2.38</a>:</p> <p class="rel-note">Integrate some bugfixes, enhancements to the vim keymap, and new modes (<a href="../mode/d/index.html">D</a>, <a href="../mode/sass/index.html">Sass</a>, <a href="../mode/apl/index.html">APL</a>) from the v3 branch.</p> <p class="rel">20-12-2012: <a href="http://codemirror.net/codemirror-2.37.zip">Version 2.37</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/sql/index.html">SQL</a> (will replace <a href="../mode/plsql/index.html">plsql</a> and <a href="../mode/mysql/index.html">mysql</a> modes).</li> <li>Further work on the new VIM mode.</li> <li>Fix Cmd/Ctrl keys on recent Operas on OS X.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v2.36...v2.37">list of patches</a>.</li> </ul> <p class="rel">20-11-2012: <a href="http://codemirror.net/codemirror-2.36.zip">Version 2.36</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/z80/index.html">Z80 assembly</a>.</li> <li>New theme: <a href="../demo/theme.html#twilight">Twilight</a>.</li> <li>Add command-line compression helper.</li> <li>Make <a href="manual.html#scrollIntoView"><code>scrollIntoView</code></a> public.</li> <li>Add <a href="manual.html#defaultTextHeight"><code>defaultTextHeight</code></a> method.</li> <li>Various extensions to the vim keymap.</li> <li>Make <a href="../mode/php/index.html">PHP mode</a> build on <a href="../mode/htmlmixed/index.html">mixed HTML mode</a>.</li> <li>Add <a href="manual.html#addon_continuecomment">comment-continuing</a> add-on.</li> <li>Full <a href="../https://github.com/codemirror/CodeMirror/compare/v2.35...v2.36">list of patches</a>.</li> </ul> <p class="rel">22-10-2012: <a href="http://codemirror.net/codemirror-2.35.zip">Version 2.35</a>:</p> <ul class="rel-note"> <li>New (sub) mode: <a href="../mode/javascript/typescript.html">TypeScript</a>.</li> <li>Don't overwrite (insert key) when pasting.</li> <li>Fix several bugs in <a href="manual.html#markText"><code>markText</code></a>/undo interaction.</li> <li>Better indentation of JavaScript code without semicolons.</li> <li>Add <a href="manual.html#defineInitHook"><code>defineInitHook</code></a> function.</li> <li>Full <a href="https://github.com/codemirror/CodeMirror/compare/v2.34...v2.35">list of patches</a>.</li> </ul> <p class="rel">19-09-2012: <a href="http://codemirror.net/codemirror-2.34.zip">Version 2.34</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/commonlisp/index.html">Common Lisp</a>.</li> <li>Fix right-click select-all on most browsers.</li> <li>Change the way highlighting happens:<br>&nbsp; Saves memory and CPU cycles.<br>&nbsp; <code>compareStates</code> is no longer needed.<br>&nbsp; <code>onHighlightComplete</code> no longer works.</li> <li>Integrate mode (Markdown, XQuery, CSS, sTex) tests in central testsuite.</li> <li>Add a <a href="manual.html#version"><code>CodeMirror.version</code></a> property.</li> <li>More robust handling of nested modes in <a href="../demo/formatting.html">formatting</a> and <a href="../demo/closetag.html">closetag</a> plug-ins.</li> <li>Un/redo now preserves <a href="manual.html#markText">marked text</a> and bookmarks.</li> <li><a href="https://github.com/codemirror/CodeMirror/compare/v2.33...v2.34">Full list</a> of patches.</li> </ul> <p class="rel">23-08-2012: <a href="http://codemirror.net/codemirror-2.33.zip">Version 2.33</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/sieve/index.html">Sieve</a>.</li> <li>New <a href="manual.html#getViewport"><code>getViewPort</code></a> and <a href="manual.html#option_onViewportChange"><code>onViewportChange</code></a> API.</li> <li><a href="manual.html#option_cursorBlinkRate">Configurable</a> cursor blink rate.</li> <li>Make binding a key to <code>false</code> disabling handling (again).</li> <li>Show non-printing characters as red dots.</li> <li>More tweaks to the scrolling model.</li> <li>Expanded testsuite. Basic linter added.</li> <li>Remove most uses of <code>innerHTML</code>. Remove <code>CodeMirror.htmlEscape</code>.</li> <li><a href="https://github.com/codemirror/CodeMirror/compare/v2.32...v2.33">Full list</a> of patches.</li> </ul> <p class="rel">23-07-2012: <a href="http://codemirror.net/codemirror-2.32.zip">Version 2.32</a>:</p> <p class="rel-note">Emergency fix for a bug where an editor with line wrapping on IE will break when there is <em>no</em> scrollbar.</p> <p class="rel">20-07-2012: <a href="http://codemirror.net/codemirror-2.31.zip">Version 2.31</a>:</p> <ul class="rel-note"> <li>New modes: <a href="../mode/ocaml/index.html">OCaml</a>, <a href="../mode/haxe/index.html">Haxe</a>, and <a href="../mode/vb/index.html">VB.NET</a>.</li> <li>Several fixes to the new scrolling model.</li> <li>Add a <a href="manual.html#setSize"><code>setSize</code></a> method for programmatic resizing.</li> <li>Add <a href="manual.html#getHistory"><code>getHistory</code></a> and <a href="manual.html#setHistory"><code>setHistory</code></a> methods.</li> <li>Allow custom line separator string in <a href="manual.html#getValue"><code>getValue</code></a> and <a href="manual.html#getRange"><code>getRange</code></a>.</li> <li>Support double- and triple-click drag, double-clicking whitespace.</li> <li>And more... <a href="https://github.com/codemirror/CodeMirror/compare/v2.3...v2.31">(all patches)</a></li> </ul> <p class="rel">22-06-2012: <a href="http://codemirror.net/codemirror-2.3.zip">Version 2.3</a>:</p> <ul class="rel-note"> <li><strong>New scrollbar implementation</strong>. Should flicker less. Changes DOM structure of the editor.</li> <li>New theme: <a href="../demo/theme.html#vibrant-ink">vibrant-ink</a>.</li> <li>Many extensions to the VIM keymap (including text objects).</li> <li>Add <a href="../demo/multiplex.html">mode-multiplexing</a> utility script.</li> <li>Fix bug where right-click paste works in read-only mode.</li> <li>Add a <a href="manual.html#getScrollInfo"><code>getScrollInfo</code></a> method.</li> <li>Lots of other <a href="https://github.com/codemirror/CodeMirror/compare/v2.25...v2.3">fixes</a>.</li> </ul> <p class="rel">23-05-2012: <a href="http://codemirror.net/codemirror-2.25.zip">Version 2.25</a>:</p> <ul class="rel-note"> <li>New mode: <a href="../mode/erlang/index.html">Erlang</a>.</li> <li><strong>Remove xmlpure mode</strong> (use <a href="../mode/xml/index.html">xml.js</a>).</li> <li>Fix line-wrapping in Opera.</li> <li>Fix X Windows middle-click paste in Chrome.</li> <li>Fix bug that broke pasting of huge documents.</li> <li>Fix backspace and tab key repeat in Opera.</li> </ul> <p class="rel">23-04-2012: <a href="http://codemirror.net/codemirror-2.24.zip">Version 2.24</a>:</p> <ul class="rel-note"> <li><strong>Drop support for Internet Explorer 6</strong>.</li> <li>New modes: <a href="../mode/shell/index.html">Shell</a>, <a href="../mode/tiki/index.html">Tiki wiki</a>, <a href="../mode/pig/index.html">Pig Latin</a>.</li> <li>New themes: <a href="../demo/theme.html#ambiance">Ambiance</a>, <a href="../demo/theme.html#blackboard">Blackboard</a>.</li> <li>More control over drag/drop with <a href="manual.html#option_dragDrop"><code>dragDrop</code></a> and <a href="manual.html#option_onDragEvent"><code>onDragEvent</code></a> options.</li> <li>Make HTML mode a bit less pedantic.</li> <li>Add <a href="manual.html#compoundChange"><code>compoundChange</code></a> API method.</li> <li>Several fixes in undo history and line hiding.</li> <li>Remove (broken) support for <code>catchall</code> in key maps, add <code>nofallthrough</code> boolean field instead.</li> </ul> <p class="rel">26-03-2012: <a href="http://codemirror.net/codemirror-2.23.zip">Version 2.23</a>:</p> <ul class="rel-note"> <li>Change <strong>default binding for tab</strong> <a href="javascript:void(document.getElementById('tabbinding').style.display='')">[more]</a> <div style="display: none" id=tabbinding> Starting in 2.23, these bindings are default: <ul><li>Tab: Insert tab character</li> <li>Shift-tab: Reset line indentation to default</li> <li>Ctrl/Cmd-[: Reduce line indentation (old tab behaviour)</li> <li>Ctrl/Cmd-]: Increase line indentation (old shift-tab behaviour)</li> </ul> </div> </li> <li>New modes: <a href="../mode/xquery/index.html">XQuery</a> and <a href="../mode/vbscript/index.html">VBScript</a>.</li> <li>Two new themes: <a href="../mode/less/index.html">lesser-dark</a> and <a href="../mode/xquery/index.html">xq-dark</a>.</li> <li>Differentiate between background and text styles in <a href="manual.html#setLineClass"><code>setLineClass</code></a>.</li> <li>Fix drag-and-drop in IE9+.</li> <li>Extend <a href="manual.html#charCoords"><code>charCoords</code></a> and <a href="manual.html#cursorCoords"><code>cursorCoords</code></a> with a <code>mode</code> argument.</li> <li>Add <a href="manual.html#option_autofocus"><code>autofocus</code></a> option.</li> <li>Add <a href="manual.html#findMarksAt"><code>findMarksAt</code></a> method.</li> </ul> <p class="rel">27-02-2012: <a href="http://codemirror.net/codemirror-2.22.zip">Version 2.22</a>:</p> <ul class="rel-note"> <li>Allow <a href="manual.html#keymaps">key handlers</a> to pass up events, allow binding characters.</li> <li>Add <a href="manual.html#option_autoClearEmptyLines"><code>autoClearEmptyLines</code></a> option.</li> <li>Properly use tab stops when rendering tabs.</li> <li>Make PHP mode more robust.</li> <li>Support indentation blocks in <a href="manual.html#addon_foldcode">code folder</a>.</li> <li>Add a script for <a href="manual.html#addon_match-highlighter">highlighting instances of the selection</a>.</li> <li>New <a href="../mode/properties/index.html">.properties</a> mode.</li> <li>Fix many bugs.</li> </ul> <p class="rel">27-01-2012: <a href="http://codemirror.net/codemirror-2.21.zip">Version 2.21</a>:</p> <ul class="rel-note"> <li>Added <a href="../mode/less/index.html">LESS</a>, <a href="../mode/mysql/index.html">MySQL</a>, <a href="../mode/go/index.html">Go</a>, and <a href="../mode/verilog/index.html">Verilog</a> modes.</li> <li>Add <a href="manual.html#option_smartIndent"><code>smartIndent</code></a> option.</li> <li>Support a cursor in <a href="manual.html#option_readOnly"><code>readOnly</code></a>-mode.</li> <li>Support assigning multiple styles to a token.</li> <li>Use a new approach to drawing the selection.</li> <li>Add <a href="manual.html#scrollTo"><code>scrollTo</code></a> method.</li> <li>Allow undo/redo events to span non-adjacent lines.</li> <li>Lots and lots of bugfixes.</li> </ul> <p class="rel">20-12-2011: <a href="http://codemirror.net/codemirror-2.2.zip">Version 2.2</a>:</p> <ul class="rel-note"> <li>Slightly incompatible API changes. Read <a href="upgrade_v2.2.html">this</a>.</li> <li>New approach to <a href="manual.html#option_extraKeys">binding</a> keys, support for <a href="manual.html#option_keyMap">custom bindings</a>.</li> <li>Support for overwrite (insert).</li> <li><a href="manual.html#option_tabSize">Custom-width</a> and <a href="../demo/visibletabs.html">stylable</a> tabs.</li> <li>Moved more code into <a href="manual.html#addons">add-on scripts</a>.</li> <li>Support for sane vertical cursor movement in wrapped lines.</li> <li>More reliable handling of editing <a href="manual.html#markText">marked text</a>.</li> <li>Add minimal <a href="../demo/emacs.html">emacs</a> and <a href="../demo/vim.html">vim</a> bindings.</li> <li>Rename <code>coordsFromIndex</code> to <a href="manual.html#posFromIndex"><code>posFromIndex</code></a>, add <a href="manual.html#indexFromPos"><code>indexFromPos</code></a> method.</li> </ul> <p class="rel">21-11-2011: <a href="http://codemirror.net/codemirror-2.18.zip">Version 2.18</a>:</p> <p class="rel-note">Fixes <code>TextMarker.clear</code>, which is broken in 2.17.</p> <p class="rel">21-11-2011: <a href="http://codemirror.net/codemirror-2.17.zip">Version 2.17</a>:</p> <ul class="rel-note"> <li>Add support for <a href="manual.html#option_lineWrapping">line wrapping</a> and <a href="manual.html#hideLine">code folding</a>.</li> <li>Add <a href="../mode/gfm/index.html">Github-style Markdown</a> mode.</li> <li>Add <a href="../theme/monokai.css">Monokai</a> and <a href="../theme/rubyblue.css">Rubyblue</a> themes.</li> <li>Add <a href="manual.html#setBookmark"><code>setBookmark</code></a> method.</li> <li>Move some of the demo code into reusable components under <a href="../addon/"><code>lib/util</code></a>.</li> <li>Make screen-coord-finding code faster and more reliable.</li> <li>Fix drag-and-drop in Firefox.</li> <li>Improve support for IME.</li> <li>Speed up content rendering.</li> <li>Fix browser's built-in search in Webkit.</li> <li>Make double- and triple-click work in IE.</li> <li>Various fixes to modes.</li> </ul> <p class="rel">27-10-2011: <a href="http://codemirror.net/codemirror-2.16.zip">Version 2.16</a>:</p> <ul class="rel-note"> <li>Add <a href="../mode/perl/index.html">Perl</a>, <a href="../mode/rust/index.html">Rust</a>, <a href="../mode/tiddlywiki/index.html">TiddlyWiki</a>, and <a href="../mode/groovy/index.html">Groovy</a> modes.</li> <li>Dragging text inside the editor now moves, rather than copies.</li> <li>Add a <a href="manual.html#coordsFromIndex"><code>coordsFromIndex</code></a> method.</li> <li><strong>API change</strong>: <code>setValue</code> now no longer clears history. Use <a href="manual.html#clearHistory"><code>clearHistory</code></a> for that.</li> <li><strong>API change</strong>: <a href="manual.html#markText"><code>markText</code></a> now returns an object with <code>clear</code> and <code>find</code> methods. Marked text is now more robust when edited.</li> <li>Fix editing code with tabs in Internet Explorer.</li> </ul> <p class="rel">26-09-2011: <a href="http://codemirror.net/codemirror-2.15.zip">Version 2.15</a>:</p> <p class="rel-note">Fix bug that snuck into 2.14: Clicking the character that currently has the cursor didn't re-focus the editor.</p> <p class="rel">26-09-2011: <a href="http://codemirror.net/codemirror-2.14.zip">Version 2.14</a>:</p> <ul class="rel-note"> <li>Add <a href="../mode/clojure/index.html">Clojure</a>, <a href="../mode/pascal/index.html">Pascal</a>, <a href="../mode/ntriples/index.html">NTriples</a>, <a href="../mode/jinja2/index.html">Jinja2</a>, and <a href="../mode/markdown/index.html">Markdown</a> modes.</li> <li>Add <a href="../theme/cobalt.css">Cobalt</a> and <a href="../theme/eclipse.css">Eclipse</a> themes.</li> <li>Add a <a href="manual.html#option_fixedGutter"><code>fixedGutter</code></a> option.</li> <li>Fix bug with <code>setValue</code> breaking cursor movement.</li> <li>Make gutter updates much more efficient.</li> <li>Allow dragging of text out of the editor (on modern browsers).</li> </ul> <p class="rel">23-08-2011: <a href="http://codemirror.net/codemirror-2.13.zip">Version 2.13</a>:</p> <ul class="rel-note"> <li>Add <a href="../mode/ruby/index.html">Ruby</a>, <a href="../mode/r/index.html">R</a>, <a href="../mode/coffeescript/index.html">CoffeeScript</a>, and <a href="../mode/velocity/index.html">Velocity</a> modes.</li> <li>Add <a href="manual.html#getGutterElement"><code>getGutterElement</code></a> to API.</li> <li>Several fixes to scrolling and positioning.</li> <li>Add <a href="manual.html#option_smartHome"><code>smartHome</code></a> option.</li> <li>Add an experimental <a href="../mode/xmlpure/index.html">pure XML</a> mode.</li> </ul> <p class="rel">25-07-2011: <a href="http://codemirror.net/codemirror-2.12.zip">Version 2.12</a>:</p> <ul class="rel-note"> <li>Add a <a href="../mode/sparql/index.html">SPARQL</a> mode.</li> <li>Fix bug with cursor jumping around in an unfocused editor in IE.</li> <li>Allow key and mouse events to bubble out of the editor. Ignore widget clicks.</li> <li>Solve cursor flakiness after undo/redo.</li> <li>Fix block-reindent ignoring the last few lines.</li> <li>Fix parsing of multi-line attrs in XML mode.</li> <li>Use <code>innerHTML</code> for HTML-escaping.</li> <li>Some fixes to indentation in C-like mode.</li> <li>Shrink horiz scrollbars when long lines removed.</li> <li>Fix width feedback loop bug that caused the width of an inner DIV to shrink.</li> </ul> <p class="rel">04-07-2011: <a href="http://codemirror.net/codemirror-2.11.zip">Version 2.11</a>:</p> <ul class="rel-note"> <li>Add a <a href="../mode/scheme/index.html">Scheme mode</a>.</li> <li>Add a <code>replace</code> method to search cursors, for cursor-preserving replacements.</li> <li>Make the <a href="../mode/clike/index.html">C-like mode</a> mode more customizable.</li> <li>Update XML mode to spot mismatched tags.</li> <li>Add <code>getStateAfter</code> API and <code>compareState</code> mode API methods for finer-grained mode magic.</li> <li>Add a <code>getScrollerElement</code> API method to manipulate the scrolling DIV.</li> <li>Fix drag-and-drop for Firefox.</li> <li>Add a C# configuration for the <a href="../mode/clike/index.html">C-like mode</a>.</li> <li>Add <a href="../demo/fullscreen.html">full-screen editing</a> and <a href="../demo/changemode.html">mode-changing</a> demos.</li> </ul> <p class="rel">07-06-2011: <a href="http://codemirror.net/codemirror-2.1.zip">Version 2.1</a>:</p> <p class="rel-note">Add a <a href="manual.html#option_theme">theme</a> system (<a href="../demo/theme.html">demo</a>). Note that this is not backwards-compatible—you'll have to update your styles and modes!</p> <p class="rel">07-06-2011: <a href="http://codemirror.net/codemirror-2.02.zip">Version 2.02</a>:</p> <ul class="rel-note"> <li>Add a <a href="../mode/lua/index.html">Lua mode</a>.</li> <li>Fix reverse-searching for a regexp.</li> <li>Empty lines can no longer break highlighting.</li> <li>Rework scrolling model (the outer wrapper no longer does the scrolling).</li> <li>Solve horizontal jittering on long lines.</li> <li>Add <a href="../demo/runmode.html">runmode.js</a>.</li> <li>Immediately re-highlight text when typing.</li> <li>Fix problem with 'sticking' horizontal scrollbar.</li> </ul> <p class="rel">26-05-2011: <a href="http://codemirror.net/codemirror-2.01.zip">Version 2.01</a>:</p> <ul class="rel-note"> <li>Add a <a href="../mode/smalltalk/index.html">Smalltalk mode</a>.</li> <li>Add a <a href="../mode/rst/index.html">reStructuredText mode</a>.</li> <li>Add a <a href="../mode/python/index.html">Python mode</a>.</li> <li>Add a <a href="../mode/plsql/index.html">PL/SQL mode</a>.</li> <li><code>coordsChar</code> now works</li> <li>Fix a problem where <code>onCursorActivity</code> interfered with <code>onChange</code>.</li> <li>Fix a number of scrolling and mouse-click-position glitches.</li> <li>Pass information about the changed lines to <code>onChange</code>.</li> <li>Support cmd-up/down on OS X.</li> <li>Add triple-click line selection.</li> <li>Don't handle shift when changing the selection through the API.</li> <li>Support <code>"nocursor"</code> mode for <code>readOnly</code> option.</li> <li>Add an <code>onHighlightComplete</code> option.</li> <li>Fix the context menu for Firefox.</li> </ul> <p class="rel">28-03-2011: <a href="http://codemirror.net/codemirror-2.0.zip">Version 2.0</a>:</p> <p class="rel-note">CodeMirror 2 is a complete rewrite that's faster, smaller, simpler to use, and less dependent on browser quirks. See <a href="internals.html">this</a> and <a href="http://groups.google.com/group/codemirror/browse_thread/thread/5a8e894024a9f580">this</a> for more information.</p> <p class="rel">22-02-2011: <a href="https://github.com/codemirror/codemirror/tree/beta2">Version 2.0 beta 2</a>:</p> <p class="rel-note">Somewhat more mature API, lots of bugs shaken out.</p> <p class="rel">17-02-2011: <a href="http://codemirror.net/codemirror-0.94.zip">Version 0.94</a>:</p> <ul class="rel-note"> <li><code>tabMode: "spaces"</code> was modified slightly (now indents when something is selected).</li> <li>Fixes a bug that would cause the selection code to break on some IE versions.</li> <li>Disabling spell-check on WebKit browsers now works.</li> </ul> <p class="rel">08-02-2011: <a href="http://codemirror.net/">Version 2.0 beta 1</a>:</p> <p class="rel-note">CodeMirror 2 is a complete rewrite of CodeMirror, no longer depending on an editable frame.</p> <p class="rel">19-01-2011: <a href="http://codemirror.net/codemirror-0.93.zip">Version 0.93</a>:</p> <ul class="rel-note"> <li>Added a <a href="contrib/regex/index.html">Regular Expression</a> parser.</li> <li>Fixes to the PHP parser.</li> <li>Support for regular expression in search/replace.</li> <li>Add <code>save</code> method to instances created with <code>fromTextArea</code>.</li> <li>Add support for MS T-SQL in the SQL parser.</li> <li>Support use of CSS classes for highlighting brackets.</li> <li>Fix yet another hang with line-numbering in hidden editors.</li> </ul> </section> <section id=v1> <h2>Version 0.x</h2> <p class="rel">28-03-2011: <a href="http://codemirror.net/codemirror-1.0.zip">Version 1.0</a>:</p> <ul class="rel-note"> <li>Fix error when debug history overflows.</li> <li>Refine handling of C# verbatim strings.</li> <li>Fix some issues with JavaScript indentation.</li> </ul> <p class="rel">17-12-2010: <a href="http://codemirror.net/codemirror-0.92.zip">Version 0.92</a>:</p> <ul class="rel-note"> <li>Make CodeMirror work in XHTML documents.</li> <li>Fix bug in handling of backslashes in Python strings.</li> <li>The <code>styleNumbers</code> option is now officially supported and documented.</li> <li><code>onLineNumberClick</code> option added.</li> <li>More consistent names <code>onLoad</code> and <code>onCursorActivity</code> callbacks. Old names still work, but are deprecated.</li> <li>Add a <a href="contrib/freemarker/index.html">Freemarker</a> mode.</li> </ul> <p class="rel">11-11-2010: <a href="http://codemirror.net/codemirror-0.91.zip">Version 0.91</a>:</p> <ul class="rel-note"> <li>Adds support for <a href="contrib/java">Java</a>.</li> <li>Small additions to the <a href="contrib/php">PHP</a> and <a href="contrib/sql">SQL</a> parsers.</li> <li>Work around various <a href="https://bugs.webkit.org/show_bug.cgi?id=47806">Webkit</a> <a href="https://bugs.webkit.org/show_bug.cgi?id=23474">issues</a>.</li> <li>Fix <code>toTextArea</code> to update the code in the textarea.</li> <li>Add a <code>noScriptCaching</code> option (hack to ease development).</li> <li>Make sub-modes of <a href="mixedtest.html">HTML mixed</a> mode configurable.</li> </ul> <p class="rel">02-10-2010: <a href="http://codemirror.net/codemirror-0.9.zip">Version 0.9</a>:</p> <ul class="rel-note"> <li>Add support for searching backwards.</li> <li>There are now parsers for <a href="contrib/scheme/index.html">Scheme</a>, <a href="contrib/xquery/index.html">XQuery</a>, and <a href="contrib/ometa/index.html">OmetaJS</a>.</li> <li>Makes <code>height: "dynamic"</code> more robust.</li> <li>Fixes bug where paste did not work on OS X.</li> <li>Add a <code>enterMode</code> and <code>electricChars</code> options to make indentation even more customizable.</li> <li>Add <code>firstLineNumber</code> option.</li> <li>Fix bad handling of <code>@media</code> rules by the CSS parser.</li> <li>Take a new, more robust approach to working around the invisible-last-line bug in WebKit.</li> </ul> <p class="rel">22-07-2010: <a href="http://codemirror.net/codemirror-0.8.zip">Version 0.8</a>:</p> <ul class="rel-note"> <li>Add a <code>cursorCoords</code> method to find the screen coordinates of the cursor.</li> <li>A number of fixes and support for more syntax in the PHP parser.</li> <li>Fix indentation problem with JSON-mode JS parser in Webkit.</li> <li>Add a <a href="compress.html">minification</a> UI.</li> <li>Support a <code>height: dynamic</code> mode, where the editor's height will adjust to the size of its content.</li> <li>Better support for IME input mode.</li> <li>Fix JavaScript parser getting confused when seeing a no-argument function call.</li> <li>Have CSS parser see the difference between selectors and other identifiers.</li> <li>Fix scrolling bug when pasting in a horizontally-scrolled editor.</li> <li>Support <code>toTextArea</code> method in instances created with <code>fromTextArea</code>.</li> <li>Work around new Opera cursor bug that causes the cursor to jump when pressing backspace at the end of a line.</li> </ul> <p class="rel">27-04-2010: <a href="http://codemirror.net/codemirror-0.67.zip">Version 0.67</a>:</p> <p class="rel-note">More consistent page-up/page-down behaviour across browsers. Fix some issues with hidden editors looping forever when line-numbers were enabled. Make PHP parser parse <code>"\\"</code> correctly. Have <code>jumpToLine</code> work on line handles, and add <code>cursorLine</code> function to fetch the line handle where the cursor currently is. Add new <code>setStylesheet</code> function to switch style-sheets in a running editor.</p> <p class="rel">01-03-2010: <a href="http://codemirror.net/codemirror-0.66.zip">Version 0.66</a>:</p> <p class="rel-note">Adds <code>removeLine</code> method to API. Introduces the <a href="contrib/plsql/index.html">PLSQL parser</a>. Marks XML errors by adding (rather than replacing) a CSS class, so that they can be disabled by modifying their style. Fixes several selection bugs, and a number of small glitches.</p> <p class="rel">12-11-2009: <a href="http://codemirror.net/codemirror-0.65.zip">Version 0.65</a>:</p> <p class="rel-note">Add support for having both line-wrapping and line-numbers turned on, make paren-highlighting style customisable (<code>markParen</code> and <code>unmarkParen</code> config options), work around a selection bug that Opera <em>re</em>introduced in version 10.</p> <p class="rel">23-10-2009: <a href="http://codemirror.net/codemirror-0.64.zip">Version 0.64</a>:</p> <p class="rel-note">Solves some issues introduced by the paste-handling changes from the previous release. Adds <code>setSpellcheck</code>, <code>setTextWrapping</code>, <code>setIndentUnit</code>, <code>setUndoDepth</code>, <code>setTabMode</code>, and <code>setLineNumbers</code> to customise a running editor. Introduces an <a href="contrib/sql/index.html">SQL</a> parser. Fixes a few small problems in the <a href="contrib/python/index.html">Python</a> parser. And, as usual, add workarounds for various newly discovered browser incompatibilities.</p> <p class="rel">31-08-2009: <a href="http://codemirror.net/codemirror-0.63.zip">Version 0.63</a>:</p> <p class="rel-note"> Overhaul of paste-handling (less fragile), fixes for several serious IE8 issues (cursor jumping, end-of-document bugs) and a number of small problems.</p> <p class="rel">30-05-2009: <a href="http://codemirror.net/codemirror-0.62.zip">Version 0.62</a>:</p> <p class="rel-note">Introduces <a href="contrib/python/index.html">Python</a> and <a href="contrib/lua/index.html">Lua</a> parsers. Add <code>setParser</code> (on-the-fly mode changing) and <code>clearHistory</code> methods. Make parsing passes time-based instead of lines-based (see the <code>passTime</code> option).</p> </section> </article>
formtools/core
src/global/codemirror/doc/releases.html
HTML
gpl-2.0
105,839
<?php /** * Customize Section Class. * * @package WordPress * @subpackage Customize * @since 3.4.0 */ class WP_Customize_Section { public $manager; public $id; public $priority = 10; public $capability = 'edit_theme_options'; public $theme_supports = ''; public $title = ''; public $description = ''; public $controls; /** * Constructor. * * @since 3.4.0 * * @param WP_Customize_Manager $manager * @param string $id An specific ID of the section. * @param array $args Section arguments. */ function __construct($manager, $id, $args = array()) { $keys = array_keys(get_class_vars(__CLASS__)); foreach ($keys as $key) { if (isset($args[$key])) $this->$key = $args[$key]; } $this->manager = $manager; $this->id = $id; $this->controls = array(); // Users cannot customize the $controls array. return $this; } /** * Check if the theme supports the section and check user capabilities. * * @since 3.4.0 * * @return bool False if theme doesn't support the section or user doesn't have the capability. */ public final function check_capabilities() { if ($this->capability && !call_user_func_array('current_user_can', (array)$this->capability)) return false; if ($this->theme_supports && !call_user_func_array('current_theme_supports', (array)$this->theme_supports)) return false; return true; } /** * Check capabilities and render the section. * * @since 3.4.0 */ public final function maybe_render() { if (!$this->check_capabilities()) return; do_action('customize_render_section', $this); do_action('customize_render_section_' . $this->id); $this->render(); } /** * Render the section. * * @since 3.4.0 */ protected function render() { ?> <li id="accordion-section-<?php echo esc_attr($this->id); ?>" class="control-section accordion-section"> <h3 class="accordion-section-title" tabindex="0"><?php echo esc_html($this->title); ?></h3> <ul class="accordion-section-content"> <?php if (!empty($this->description)) : ?> <li><p class="description"><?php echo $this->description; ?></p></li> <?php endif; ?> <?php foreach ($this->controls as $control) $control->maybe_render(); ?> </ul> </li> <?php } }
sean-yb/ybTheme-test
wp-includes/class-wp-customize-section.php
PHP
gpl-2.0
2,676
<?php /*//////////////////////////// Robin Godart //////////////////////////////*/ // Include require_once('functions/wp-bootstrap.php'); // Menu register_nav_menu('menu_header', 'Menu principal'); // Body Classes function twentyeleven_body_classes( $classes ) { if ( function_exists( 'is_multi_author' ) && ! is_multi_author() ) $classes[] = 'single-author'; if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) ) $classes[] = 'singular'; return $classes; } add_filter( 'body_class', 'twentyeleven_body_classes' ); // ACF if(function_exists("register_options_page")){ register_options_page('Global'); } // LESS.js $path_to_js = get_stylesheet_directory_uri() . '/library/js/'; $path_to_styles = get_stylesheet_directory_uri() . '/library/styles/'; if ( ! is_admin() ) { function load_LESS() { global $path_to_js, $path_to_styles; print "<link rel='stylesheet/less' id='style-less-css' href='" . $path_to_styles . "style.less' type='text/css' media='screen' />\n"; print "<script type='text/javascript' src='" . $path_to_js . "less-1.7.0.min.js'></script>\n\n"; } add_action( 'wp_head', 'load_LESS' ); } // Image à la une if(function_exists('add_theme_support')) { add_theme_support( 'post-thumbnails' ); } //Menu add_theme_support('menu'); register_nav_menu('menu_header','menu_header'); register_nav_menu('menu_footer','menu_footer'); // Login CSS function custom_login_css(){ echo '<link rel="stylesheet" type="text/css" href="' . get_bloginfo('template_directory') . '/library/styles/login.css" />'; } add_action('login_head', 'custom_login_css'); // Tiny Url function getTinyUrl($url) { $tinyurl = file_get_contents("http://tinyurl.com/api-create.php?url=".$url); return $tinyurl; } // Hide AdminBar add_filter('show_admin_bar', '__return_false'); function codex_custom_init() { // liste des créateurs $labels = array( 'name' => 'Liste des créateurs', 'singular_name' => 'Créateur', 'add_new' => 'Ajouter un créateur', 'add_new_item' => 'Ajouter un nouveau créateur', 'edit_item' => 'Editer un créateur', 'new_item' => 'Nouveau créateur', 'all_items' => 'Tous les créateurs', 'view_item' => 'Voir créateur', 'search_items' => 'Chercher un créateur', 'not_found' => 'Aucun créateur trouvé', 'not_found_in_trash' => 'Aucun créateur trouvé dans la corbeille', 'parent_item_colon' => '', 'menu_name' => 'Liste des créateurs' ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'createurs' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt') ); register_post_type( 'createur', $args ); } add_action('init', 'codex_custom_init'); // woo commerce //remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 ); //add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 100 ); /*////////////////////////// FIN Robin Godart ////////////////////////////*/
chabarsabrina/RES
wp-content/themes/robin-godart/functions.php
PHP
gpl-2.0
3,287
#!/bin/sh test_description='Test applying a prefix to refs in the instruction sheet' . ./setup.sh test_expect_success 'setup branches' ' commit_file base base && git branch -M sub/master && git checkout -b sub/branch1 && commit_file base sub/branch1 && git checkout -b sub/branch2 sub/master && commit_file base sub/branch2 && git checkout -b sub/branch3 sub/master && commit_file base sub/branch3 ' write_script .git/EDITOR <<\EOF #!/bin/sh cat >"$1" <<EOM base master merge branch1 merge branch2 EOM EOF test_expect_success 'create integration branch' ' git checkout sub/master && GIT_EDITOR=.git/EDITOR git integration --create --prefix=sub/ --edit pu && git symbolic-ref HEAD >actual && echo refs/heads/pu >expect && test_cmp expect actual ' test_expect_success 'prefix preserved over pause and continue' ' # Continue mode should ignore the configured prefix and use whatever # was given when the command started test_config integration.prefix invalid/ && test_must_fail git integration --rebuild --prefix sub/ && git merge-base --is-ancestor sub/branch1 HEAD && test_must_fail git merge-base --is-ancestor sub/branch2 HEAD && echo resolved >base && git add base && git integration --continue >output && git merge-base --is-ancestor sub/branch2 HEAD && grep branch2 output ' test_expect_success 'status with prefix' ' git integration --status >output && grep "^\\. branch1" output && grep "^\\. branch2" output && git integration --status --prefix=sub/ >output && grep "^\\* sub/branch1" output && grep "^\\* sub/branch2" output && test_config integration.prefix sub/ && git integration --status >actual && test_cmp output actual ' test_expect_success 'add respects prefix' ' test_must_fail git integration --add=branch3 2>output && grep branch3 output && git integration --add=branch3 --prefix=sub/ && git integration --cat >output && ! grep sub/ output ' test_done
johnkeeping/git-integration
t/t1003-prefix.sh
Shell
gpl-2.0
1,917
# -*- coding: utf-8 -*- # =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2006-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program 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 General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # =========================================================================== """ Package represents the collection of resources the user is editing i.e. the "package". """ import datetime import shutil import logging import time import zipfile import uuid import re from xml.dom import minidom from exe.engine.path import Path, TempDirPath, toUnicode from exe.engine.node import Node from exe.engine.genericidevice import GenericIdevice from exe.engine.multichoiceidevice import MultichoiceIdevice from exe.engine.quiztestidevice import QuizTestIdevice from exe.engine.truefalseidevice import TrueFalseIdevice from exe.engine.wikipediaidevice import WikipediaIdevice from exe.engine.casestudyidevice import CasestudyIdevice from exe.engine.casopracticofpdidevice import CasopracticofpdIdevice from exe.engine.citasparapensarfpdidevice import CitasparapensarfpdIdevice from exe.engine.clozefpdidevice import ClozefpdIdevice from exe.engine.clozeidevice import ClozeIdevice from exe.engine.clozelangfpdidevice import ClozelangfpdIdevice from exe.engine.debesconocerfpdidevice import DebesconocerfpdIdevice from exe.engine.destacadofpdidevice import DestacadofpdIdevice from exe.engine.ejercicioresueltofpdidevice import EjercicioresueltofpdIdevice from exe.engine.eleccionmultiplefpdidevice import EleccionmultiplefpdIdevice from exe.engine.freetextfpdidevice import FreeTextfpdIdevice from exe.engine.galleryidevice import GalleryIdevice from exe.engine.imagemagnifieridevice import ImageMagnifierIdevice from exe.engine.listaidevice import ListaIdevice from exe.engine.multiselectidevice import MultiSelectIdevice from exe.engine.orientacionesalumnadofpdidevice import OrientacionesalumnadofpdIdevice from exe.engine.orientacionestutoriafpdidevice import OrientacionestutoriafpdIdevice from exe.engine.parasabermasfpdidevice import ParasabermasfpdIdevice from exe.engine.recomendacionfpdidevice import RecomendacionfpdIdevice from exe.engine.reflectionfpdidevice import ReflectionfpdIdevice from exe.engine.reflectionfpdmodifidevice import ReflectionfpdmodifIdevice from exe.engine.reflectionidevice import ReflectionIdevice from exe.engine.seleccionmultiplefpdidevice import SeleccionmultiplefpdIdevice from exe.engine.verdaderofalsofpdidevice import VerdaderofalsofpdIdevice from exe.engine.persist import Persistable, encodeObject, decodeObjectRaw from exe import globals as G from exe.engine.resource import Resource from twisted.persisted.styles import doUpgrade from twisted.spread.jelly import Jellyable, Unjellyable from exe.engine.beautifulsoup import BeautifulSoup from exe.engine.field import Field, TextAreaField from exe.engine.persistxml import encodeObjectToXML, decodeObjectFromXML from exe.engine.lom import lomsubs from exe.engine.checker import Checker from exe.webui import common log = logging.getLogger(__name__) def clonePrototypeIdevice(title): idevice = None for prototype in G.application.ideviceStore.getIdevices(): if prototype.get_title() == title: log.debug('have prototype of:' + prototype.get_title()) idevice = prototype.clone() idevice.edit = False break return idevice def burstIdevice(idev_type, i, node): # given the iDevice type and the BeautifulSoup fragment i, burst it: idevice = clonePrototypeIdevice(idev_type) if idevice is None: log.warn("unable to clone " + idev_type + " idevice") freetext_idevice = clonePrototypeIdevice('Free Text') if freetext_idevice is None: log.error("unable to clone Free Text for " + idev_type + " idevice") return idevice = freetext_idevice # For idevices such as GalleryImage, where resources are being attached, # the idevice should already be attached to a node before bursting it open: node.addIdevice(idevice) idevice.burstHTML(i) return idevice def loadNodesIdevices(node, s): soup = BeautifulSoup(s) body = soup.find('body') if body: idevices = body.findAll(name='div', attrs={'class' : re.compile('Idevice$') }) if len(idevices) > 0: for i in idevices: # WARNING: none of the idevices yet re-attach their media, # but they do attempt to re-attach images and other links. if i.attrMap['class']=="activityIdevice": idevice = burstIdevice('Activity', i, node) elif i.attrMap['class']=="objectivesIdevice": idevice = burstIdevice('Objectives', i, node) elif i.attrMap['class']=="preknowledgeIdevice": idevice = burstIdevice('Preknowledge', i, node) elif i.attrMap['class']=="readingIdevice": idevice = burstIdevice('Reading Activity', i, node) # the above are all Generic iDevices; # below are all others: elif i.attrMap['class']=="RssIdevice": idevice = burstIdevice('RSS', i, node) elif i.attrMap['class']=="WikipediaIdevice": # WARNING: Wiki problems loading images with accents, etc: idevice = burstIdevice('Wiki Article', i, node) elif i.attrMap['class']=="ReflectionIdevice": idevice = burstIdevice('Reflection', i, node) elif i.attrMap['class']=="GalleryIdevice": # WARNING: Gallery problems with the popup html: idevice = burstIdevice('Image Gallery', i, node) elif i.attrMap['class']=="ImageMagnifierIdevice": # WARNING: Magnifier missing major bursting components: idevice = burstIdevice('Image Magnifier', i, node) elif i.attrMap['class']=="AppletIdevice": # WARNING: Applet missing file bursting components: idevice = burstIdevice('Java Applet', i, node) elif i.attrMap['class']=="ExternalUrlIdevice": idevice = burstIdevice('External Web Site', i, node) elif i.attrMap['class']=="ClozeIdevice": idevice = burstIdevice('Cloze Activity', i, node) elif i.attrMap['class']=="FreeTextIdevice": idevice = burstIdevice('Free Text', i, node) elif i.attrMap['class']=="CasestudyIdevice": idevice = burstIdevice('Case Study', i, node) elif i.attrMap['class']=="MultichoiceIdevice": idevice = burstIdevice('Multi-choice', i, node) elif i.attrMap['class']=="MultiSelectIdevice": idevice = burstIdevice('Multi-select', i, node) elif i.attrMap['class']=="QuizTestIdevice": idevice = burstIdevice('SCORM Quiz', i, node) elif i.attrMap['class']=="TrueFalseIdevice": idevice = burstIdevice('True-False Question', i, node) else: # NOTE: no custom idevices burst yet, # nor any deprecated idevices. Just burst into a FreeText: log.warn("unburstable idevice " + i.attrMap['class'] + "; bursting into Free Text") idevice = burstIdevice('Free Text', i, node) else: # no idevices listed on this page, # just create a free-text for the entire page: log.warn("no idevices found on this node, bursting into Free Text.") idevice = burstIdevice('Free Text', i, node) else: log.warn("unable to read the body of this node.") def test_for_node(html_content): # to see if this html really is an exe-generated node exe_string = u"<!-- Created using eXe: http://exelearning.org -->" if html_content.decode('utf-8').find(exe_string) >= 0: return True else: return False def loadNode(pass_num, resourceDir, zippedFile, node, doc, item, level): # populate this node # 1st pass = merely unzipping all resources such that they are available, # 2nd pass = loading the actual node idevices. titles = item.getElementsByTagName('title') node.setTitle(titles[0].firstChild.data) node_resource = item.attributes['identifierref'].value log.debug('*' * level + ' ' + titles[0].firstChild.data + '->' + item.attributes['identifierref'].value) for resource in doc.getElementsByTagName('resource'): if resource.attributes['identifier'].value == node_resource: for file in resource.childNodes: if file.nodeName == 'file': filename = file.attributes['href'].value is_exe_node_html = False if filename.endswith('.html') \ and filename != "fdl.html" \ and not filename.startswith("galleryPopup"): # fdl.html is the wikipedia license, ignore it # as well as any galleryPopups: is_exe_node_html = \ test_for_node(zippedFile.read(filename)) if is_exe_node_html: if pass_num == 1: # 2nd pass call to actually load the nodes: log.debug('loading idevices from node: ' + filename) loadNodesIdevices(node, zippedFile.read(filename)) elif filename == "fdl.html" or \ filename.startswith("galleryPopup."): # let these be re-created upon bursting. if pass_num == 0: # 1st pass call to unzip the resources: log.debug('ignoring resource file: '+ filename) else: if pass_num == 0: # 1st pass call to unzip the resources: try: zipinfo = zippedFile.getinfo(filename) log.debug('unzipping resource file: ' + resourceDir/filename ) outFile = open(resourceDir/filename, "wb") outFile.write(zippedFile.read(filename)) outFile.flush() outFile.close() except: log.warn('error unzipping resource file: ' + resourceDir/filename ) ########## # WARNING: the resource is now in the resourceDir, # BUT it is NOT YET added into any of the project, # much less to the specific idevices or fields! # Although they WILL be saved out with the project # upon the next Save. ########## break # process this node's children for subitem in item.childNodes: if subitem.nodeName == 'item': # for the first pass, of unzipping only, do not # create any child nodes, just cruise on with this one: next_node = node if pass_num == 1: # if this is actually loading the nodes: next_node = node.createChild() loadNode(pass_num, resourceDir, zippedFile, next_node, doc, subitem, level+1) def loadCC(zippedFile, filename): """ Load an IMS Common Cartridge or Content Package from filename """ package = Package(Path(filename).namebase) xmldoc = minidom.parseString( zippedFile.read('imsmanifest.xml')) organizations_list = xmldoc.getElementsByTagName('organizations') level = 0 # now a two-pass system to first unzip all applicable resources: for pass_num in range(2): for organizations in organizations_list: organization_list = organizations.getElementsByTagName( 'organization') for organization in organization_list: for item in organization.childNodes: if item.nodeName == 'item': loadNode(pass_num, package.resourceDir, zippedFile, package.root, xmldoc, item, level) return package # =========================================================================== class DublinCore(Jellyable, Unjellyable): """ Holds dublin core info """ def __init__(self): self.title = '' self.creator = '' self.subject = '' self.description = '' self.publisher = '' self.contributors = '' self.date = '' self.type = '' self.format = '' self.identifier = str(uuid.uuid4()) self.source = '' self.language = '' self.relation = '' self.coverage = '' self.rights = '' def __setattr__(self, name, value): self.__dict__[name] = toUnicode(value) class Package(Persistable): """ Package represents the collection of resources the user is editing i.e. the "package". """ persistenceVersion = 13 nonpersistant = ['resourceDir', 'filename', 'previewDir'] # Name is used in filenames and urls (saving and navigating) _name = '' tempFile = False # This is set when the package is saved as a temp copy file # Title is rendered in exports _title = '' _author = '' _description = '' _backgroundImg = '' #styledefault=u"INTEF" # This is like a constant defaultLevelNames = [x_(u"Topic"), x_(u"Section"), x_(u"Unit")] def __init__(self, name): """ Initialize """ log.debug(u"init " + repr(name)) self._nextIdeviceId = 0 self._nextNodeId = 0 # For looking up nodes by ids self._nodeIdDict = {} self._levelNames = self.defaultLevelNames[:] self.name = name self._title = u'' self._backgroundImg = u'' self.backgroundImgTile = False # Empty if never saved/loaded self.filename = u'' self.root = Node(self, None, _(u"Home")) self.currentNode = self.root # self.style = u"default" #self.styledefault=u"INTEF" self.style = G.application.config.defaultStyle self._isChanged = False self.previewDir = None self.idevices = [] self.dublinCore = DublinCore() self._lang = G.application.config.locale.split('_')[0] self.setLomDefaults() self.setLomEsDefaults() self.scolinks = False self.scowsinglepage= False self.scowwebsite = False self.exportSource = True self.exportMetadataType = "LOMES" self.license = u'' self.footer = "" self._objectives = u'' self._preknowledge = u'' self._learningResourceType = u'' self._intendedEndUserRoleType = u'' self._intendedEndUserRoleGroup = False self._intendedEndUserRoleTutor = False self._contextPlace = u'' self._contextMode = u'' self.compatibleWithVersion9 = False #for export to Sugar (e.g. OLPC) self.sugaractivityname = "" self.sugarservicename = "" #for export to Ustad Mobile self.mxmlprofilelist = "" self.mxmlheight = "" self.mxmlwidth = "" self.mxmlforcemediaonly = False # Temporary directory to hold resources in self.resourceDir = TempDirPath() self.resources = {} # Checksum-[_Resource(),..] self._docType = G.application.config.docType def setLomDefaults(self): self.lom = lomsubs.lomSub.factory() self.lom.addChilds(self.lomDefaults(self.dublinCore.identifier, 'LOMv1.0')) def setLomEsDefaults(self): self.lomEs = lomsubs.lomSub.factory() self.lomEs.addChilds(self.lomDefaults(self.dublinCore.identifier, 'LOM-ESv1.0', True)) # Property Handlers def set_docType(self,value): self._docType = toUnicode(value) common.setExportDocType(value) def set_name(self, value): self._name = toUnicode(value) def set_title(self, value): if self.dublinCore.title == self._title: self.dublinCore.title = value lang_str = self.lang.encode('utf-8') value_str = value.encode('utf-8') for metadata in [self.lom, self.lomEs]: title = metadata.get_general().get_title() if title: found = False for string in title.get_string(): if string.get_valueOf_() == self._title.encode('utf-8'): found = True if value: string.set_language(lang_str) string.set_valueOf_(value_str) else: title.string.remove(string) if not found: if value: title.add_string(lomsubs.LangStringSub(lang_str, value_str)) else: if value: title = lomsubs.titleSub([lomsubs.LangStringSub(lang_str, value_str)]) metadata.get_general().set_title(title) self._title = toUnicode(value) def set_lang(self, value): if self.dublinCore.language in [self._lang, '']: self.dublinCore.language = value value_str = value.encode('utf-8') for metadata in [self.lom, self.lomEs]: language = metadata.get_general().get_language() if language: for LanguageId in language: if LanguageId.get_valueOf_() == self._lang.encode('utf-8'): LanguageId.set_valueOf_(value_str) else: language = [lomsubs.LanguageIdSub(value_str)] metadata.get_general().set_language(language) metametadata = metadata.get_metaMetadata() if metametadata: language = metametadata.get_language() if language: if language.get_valueOf_() == self._lang.encode('utf-8'): language.set_valueOf_(value_str) else: language = lomsubs.LanguageIdSub(value_str) metametadata.set_language(language) else: language = lomsubs.LanguageIdSub(value_str) metametadata = lomsubs.metaMetadataSub(language=language) metadata.set_metaMetadata(metametadata) educationals = metadata.get_educational() if educationals: for educational in educationals: language = educational.get_language() if language: for LanguageId in language: if LanguageId.get_valueOf_() == self._lang.encode('utf-8'): LanguageId.set_valueOf_(value_str) else: language = lomsubs.LanguageIdSub(value_str) educational = [lomsubs.educationalSub(language=[language])] metadata.set_educational(educational) self._lang = toUnicode(value) if value in G.application.config.locales: __builtins__['c_'] = lambda s: G.application.config.locales[value].ugettext(s) if s else s def set_author(self, value): if self.dublinCore.creator == self._author: self.dublinCore.creator = value value_str = value.encode('utf-8') vcard = 'BEGIN:VCARD VERSION:3.0 FN:%s EMAIL;TYPE=INTERNET: ORG: END:VCARD' for metadata, source in [(self.lom, 'LOMv1.0'), (self.lomEs, 'LOM-ESv1.0')]: src = lomsubs.sourceValueSub() src.set_valueOf_(source) src.set_uniqueElementName('source') val = lomsubs.roleValueSub() val.set_valueOf_('author') val.set_uniqueElementName('value') role = lomsubs.roleSub() role.set_source(src) role.set_value(val) role.set_uniqueElementName('role') entity = lomsubs.entitySub(vcard % value_str) dateTime = lomsubs.DateTimeValueSub() dateTime.set_valueOf_(datetime.datetime.now().strftime('%Y-%m-%d')) dateTime.set_uniqueElementName('dateTime') lang_str = self.lang.encode('utf-8') value_meta_str = c_(u'Metadata creation date').encode('utf-8') dateDescription = lomsubs.LanguageStringSub([lomsubs.LangStringSub(lang_str, value_meta_str)]) date = lomsubs.dateSub(dateTime, dateDescription) lifeCycle = metadata.get_lifeCycle() if lifeCycle: contributes = lifeCycle.get_contribute() found = False for contribute in contributes: entitys = contribute.get_entity() rol = contribute.get_role() if rol: rolval = rol.get_value() if rolval: if rolval.get_valueOf_() == 'author': for ent in entitys: if ent.get_valueOf_() == vcard % self.author.encode('utf-8'): found = True if value: ent.set_valueOf_(vcard % value_str) else: contribute.entity.remove(ent) if not contribute.entity: contributes.remove(contribute) if not found: contribute = lomsubs.contributeSub(role, [entity], date) lifeCycle.add_contribute(contribute) else: if value: contribute = lomsubs.contributeSub(role, [entity], date) lifeCycle = lomsubs.lifeCycleSub(contribute=[contribute]) metadata.set_lifeCycle(lifeCycle) val = lomsubs.roleValueSub() val.set_valueOf_('creator') val.set_uniqueElementName('value') role = lomsubs.roleSub() role.set_source(src) role.set_value(val) role.set_uniqueElementName('role') metaMetadata = metadata.get_metaMetadata() if metaMetadata: contributes = metaMetadata.get_contribute() found = False for contribute in contributes: entitys = contribute.get_entity() rol = contribute.get_role() if rol: rolval = rol.get_value() if rolval: if rolval.get_valueOf_() == 'creator': for ent in entitys: if ent.get_valueOf_() == vcard % self.author.encode('utf-8'): found = True if value: ent.set_valueOf_(vcard % value_str) else: contribute.entity.remove(ent) if not contribute.entity: contributes.remove(contribute) if not found: contribute = lomsubs.contributeMetaSub(role, [entity], date) metaMetadata.add_contribute(contribute) else: if value: contribute = lomsubs.contributeMetaSub(role, [entity], date) metaMetadata.set_contribute([contribute]) self._author = toUnicode(value) def set_description(self, value): if self.dublinCore.description == self._description: self.dublinCore.description = value lang_str = self.lang.encode('utf-8') value_str = value.encode('utf-8') for metadata in [self.lom, self.lomEs]: description = metadata.get_general().get_description() if description: description_found = False for desc in description: for string in desc.get_string(): if string.get_valueOf_() == self._description.encode('utf-8'): description_found = True if value: string.set_language(lang_str) string.set_valueOf_(value_str) else: desc.string.remove(string) description.remove(desc) if not description_found: if value: description = lomsubs.descriptionSub([lomsubs.LangStringSub(lang_str, value_str)]) metadata.get_general().add_description(description) else: if value: description = [lomsubs.descriptionSub([lomsubs.LangStringSub(lang_str, value_str)])] metadata.get_general().set_description(description) self._description = toUnicode(value) def get_backgroundImg(self): """Get the background image for this package""" if self._backgroundImg: return "file://" + self._backgroundImg.path else: return "" def set_backgroundImg(self, value): """Set the background image for this package""" if self._backgroundImg: self._backgroundImg.delete() if value: if value.startswith("file://"): value = value[7:] imgFile = Path(value) self._backgroundImg = Resource(self, Path(imgFile)) else: self._backgroundImg = u'' def get_level1(self): return self.levelName(0) def set_level1(self, value): if value != '': self._levelNames[0] = value else: self._levelNames[0] = self.defaultLevelNames[0] def get_level2(self): return self.levelName(1) def set_level2(self, value): if value != '': self._levelNames[1] = value else: self._levelNames[1] = self.defaultLevelNames[1] def get_level3(self): return self.levelName(2) def set_level3(self, value): if value != '': self._levelNames[2] = value else: self._levelNames[2] = self.defaultLevelNames[2] def set_objectives(self, value): lang_str = self.lang.encode('utf-8') value_str = c_("Objectives").upper() + ": " + value.encode('utf-8') for metadata in [self.lom, self.lomEs]: educationals = metadata.get_educational() description = lomsubs.descriptionSub([lomsubs.LangStringSub(lang_str, value_str)]) if educationals: for educational in educationals: descriptions = educational.get_description() found = False if descriptions: for desc in descriptions: for string in desc.get_string(): if string.get_valueOf_() == c_("Objectives").upper() + ": " + self._objectives.encode('utf-8'): found = True if value: string.set_language(lang_str) string.set_valueOf_(value_str) else: desc.string.remove(string) descriptions.remove(desc) if not found: if value: educational.add_description(description) else: if value: educational = [lomsubs.educationalSub(description=[description])] metadata.set_educational(educational) self._objectives = toUnicode(value) def set_preknowledge(self, value): lang_str = self.lang.encode('utf-8') value_str = c_("Preknowledge").upper() + ": " + value.encode('utf-8') for metadata in [self.lom, self.lomEs]: educationals = metadata.get_educational() description = lomsubs.descriptionSub([lomsubs.LangStringSub(lang_str, value_str)]) if educationals: for educational in educationals: descriptions = educational.get_description() found = False if descriptions: for desc in descriptions: for string in desc.get_string(): if string.get_valueOf_() == c_("Preknowledge").upper() + ": " + self._preknowledge.encode('utf-8'): found = True if value: string.set_language(lang_str) string.set_valueOf_(value_str) else: desc.string.remove(string) descriptions.remove(desc) if not found: if value: educational.add_description(description) else: if value: educational = [lomsubs.educationalSub(description=[description])] metadata.set_educational(educational) self._preknowledge = toUnicode(value) def license_map(self, source, value): '''From document "ANEXO XIII ANÁLISIS DE MAPEABILIDAD LOM/LOM-ES V1.0"''' if source == 'LOM-ESv1.0': return value elif source == 'LOMv1.0': if value == 'not appropriate' or value == 'public domain': return 'no' else: return 'yes' def set_license(self, value): value_str = value.rstrip(' 0123456789.').encode('utf-8') if self.dublinCore.rights == self.license: self.dublinCore.rights = value for metadata, source in [(self.lom, 'LOMv1.0'), (self.lomEs, 'LOM-ESv1.0')]: rights = metadata.get_rights() if not rights: metadata.set_rights(lomsubs.rightsSub()) copyrightAndOtherRestrictions = metadata.get_rights().get_copyrightAndOtherRestrictions() if copyrightAndOtherRestrictions: if copyrightAndOtherRestrictions.get_value().get_valueOf_() == self.license_map(source, self.license.encode('utf-8').rstrip(' 0123456789.')): if value: copyrightAndOtherRestrictions.get_value().set_valueOf_(self.license_map(source, value_str)) else: metadata.get_rights().set_copyrightAndOtherRestrictions(None) else: if value: src = lomsubs.sourceValueSub() src.set_valueOf_(source) src.set_uniqueElementName('source') val = lomsubs.copyrightAndOtherRestrictionsValueSub() val.set_valueOf_(self.license_map(source, value_str)) val.set_uniqueElementName('value') copyrightAndOtherRestrictions = lomsubs.copyrightAndOtherRestrictionsSub() copyrightAndOtherRestrictions.set_source(src) copyrightAndOtherRestrictions.set_value(val) copyrightAndOtherRestrictions.set_uniqueElementName('copyrightAndOtherRestrictions') metadata.get_rights().set_copyrightAndOtherRestrictions(copyrightAndOtherRestrictions) self.license = toUnicode(value) def learningResourceType_map(self, source, value): '''From document "ANEXO XIII ANÁLISIS DE MAPEABILIDAD LOM/LOM-ES V1.0"''' if source == 'LOM-ESv1.0': return value elif source == 'LOMv1.0': lomMap = { "guided reading": "narrative text", "master class": "lecture", "textual-image analysis": "exercise", "discussion activity": "problem statement", "closed exercise or problem": "exercise", "contextualized case problem": "exercise", "open problem": "problem statement", "real or virtual learning environment": "simulation", "didactic game": "exercise", "webquest": "problem statement", "experiment": "experiment", "real project": "simulation", "simulation": "simulation", "questionnaire": "questionnaire", "exam": "exam", "self assessment": "self assessment", "": "" } return lomMap[value] def set_learningResourceType(self, value): value_str = value.encode('utf-8') for metadata, source in [(self.lom, 'LOMv1.0'), (self.lomEs, 'LOM-ESv1.0')]: educationals = metadata.get_educational() src = lomsubs.sourceValueSub() src.set_valueOf_(source) src.set_uniqueElementName('source') val = lomsubs.learningResourceTypeValueSub() val.set_valueOf_(self.learningResourceType_map(source, value_str)) val.set_uniqueElementName('value') learningResourceType = lomsubs.learningResourceTypeSub(self.learningResourceType_map(source, value_str)) learningResourceType.set_source(src) learningResourceType.set_value(val) if educationals: for educational in educationals: learningResourceTypes = educational.get_learningResourceType() found = False if learningResourceTypes: for i in learningResourceTypes: if i.get_value().get_valueOf_() == self.learningResourceType_map(source, self.learningResourceType.encode('utf-8')): found = True index = learningResourceTypes.index(i) if value: educational.insert_learningResourceType(index, learningResourceType) else: learningResourceTypes.pop(index) if not found: educational.add_learningResourceType(learningResourceType) else: educational = [lomsubs.educationalSub(learningResourceType=[learningResourceType])] metadata.set_educational(educational) self._learningResourceType = toUnicode(value) def intendedEndUserRole_map(self, source, value): '''From document "ANEXO XIII ANÁLISIS DE MAPEABILIDAD LOM/LOM-ES V1.0"''' if source == 'LOM-ESv1.0': return value elif source == 'LOMv1.0': if not value or value == 'tutor': return value else: return 'learner' def set_intendedEndUserRoleType(self, value): value_str = value.encode('utf-8') if value: for metadata, source in [(self.lom, 'LOMv1.0'), (self.lomEs, 'LOM-ESv1.0')]: educationals = metadata.get_educational() src = lomsubs.sourceValueSub() src.set_valueOf_(source) src.set_uniqueElementName('source') val = lomsubs.intendedEndUserRoleValueSub() val.set_valueOf_(self.intendedEndUserRole_map(source, value_str)) val.set_uniqueElementName('value') intendedEndUserRole = lomsubs.intendedEndUserRoleSub(self.intendedEndUserRole_map(source, value_str)) intendedEndUserRole.set_source(src) intendedEndUserRole.set_value(val) if educationals: for educational in educationals: intendedEndUserRoles = educational.get_intendedEndUserRole() found = False if intendedEndUserRoles: for i in intendedEndUserRoles: if i.get_value().get_valueOf_() == self.intendedEndUserRole_map(source, self.intendedEndUserRoleType.encode('utf-8')): found = True index = intendedEndUserRoles.index(i) educational.insert_intendedEndUserRole(index, intendedEndUserRole) if not found: educational.add_intendedEndUserRole(intendedEndUserRole) else: educational = [lomsubs.educationalSub(intendedEndUserRole=[intendedEndUserRole])] metadata.set_educational(educational) self._intendedEndUserRoleType = toUnicode(value) def set_intendedEndUserRole(self, value, valueOf): for metadata, source in [(self.lom, 'LOMv1.0'), (self.lomEs, 'LOM-ESv1.0')]: educationals = metadata.get_educational() src = lomsubs.sourceValueSub() src.set_valueOf_(source) src.set_uniqueElementName('source') val = lomsubs.intendedEndUserRoleValueSub() mappedValueOf = self.intendedEndUserRole_map(source, valueOf) val.set_valueOf_(mappedValueOf) val.set_uniqueElementName('value') intendedEndUserRole = lomsubs.intendedEndUserRoleSub(mappedValueOf) intendedEndUserRole.set_source(src) intendedEndUserRole.set_value(val) if educationals: for educational in educationals: intendedEndUserRoles = educational.get_intendedEndUserRole() found = False if intendedEndUserRoles: for i in intendedEndUserRoles: if i.get_value().get_valueOf_() == mappedValueOf: found = True if value: index = intendedEndUserRoles.index(i) educational.insert_intendedEndUserRole(index, intendedEndUserRole) else: if source != 'LOMv1.0' or valueOf != 'group': educational.intendedEndUserRole.remove(i) if not found and value: educational.add_intendedEndUserRole(intendedEndUserRole) else: if value: educational = [lomsubs.educationalSub(intendedEndUserRole=[intendedEndUserRole])] metadata.set_educational(educational) def set_intendedEndUserRoleGroup(self, value): self.set_intendedEndUserRole(value, 'group') self._intendedEndUserRoleGroup = value def set_intendedEndUserRoleTutor(self, value): self.set_intendedEndUserRole(value, 'tutor') self._intendedEndUserRoleTutor = value def context_map(self, source, value): '''From document "ANEXO XIII ANÁLISIS DE MAPEABILIDAD LOM/LOM-ES V1.0"''' if source == 'LOM-ESv1.0': return value elif source == 'LOMv1.0': lomMap = { "classroom": "school", "real environment": "training", "face to face": "other", "blended": "other", "distance": "other", "presencial": "other", "": "" } return lomMap[value] def set_context(self, value, valueOf): value_str = value.encode('utf-8') if value: for metadata, source in [(self.lom, 'LOMv1.0'), (self.lomEs, 'LOM-ESv1.0')]: educationals = metadata.get_educational() src = lomsubs.sourceValueSub() src.set_valueOf_(source) src.set_uniqueElementName('source') val = lomsubs.contextValueSub() val.set_valueOf_(self.context_map(source, value_str)) val.set_uniqueElementName('value') context = lomsubs.contextSub(self.context_map(source, value_str)) context.set_source(src) context.set_value(val) if educationals: for educational in educationals: contexts = educational.get_context() found = False if contexts: for i in contexts: if i.get_value().get_valueOf_() == self.context_map(source, valueOf.encode('utf-8')): found = True index = contexts.index(i) educational.insert_context(index, context) if not found: educational.add_context(context) else: educational = [lomsubs.educationalSub(context=[context])] metadata.set_educational(educational) def set_contextPlace(self, value): self.set_context(value, self._contextPlace) self._contextPlace = toUnicode(value) def set_contextMode(self, value): self.set_context(value, self._contextMode) self._contextMode = toUnicode(value) def set_changed(self, changed): self._isChanged = changed if changed: if hasattr(self, 'previewDir'): if self.previewDir: shutil.rmtree(self.previewDir, True) self.previewDir = None # Properties isChanged = property(lambda self: self._isChanged, set_changed) name = property(lambda self:self._name, set_name) title = property(lambda self:self._title, set_title) lang = property(lambda self: self._lang, set_lang) author = property(lambda self:self._author, set_author) description = property(lambda self:self._description, set_description) newlicense = property(lambda self:self.license, set_license) docType = property(lambda self:self._docType, set_docType) backgroundImg = property(get_backgroundImg, set_backgroundImg) level1 = property(get_level1, set_level1) level2 = property(get_level2, set_level2) level3 = property(get_level3, set_level3) objectives = property(lambda self: self._objectives, set_objectives) preknowledge = property(lambda self: self._preknowledge, set_preknowledge) learningResourceType = property(lambda self: self._learningResourceType, set_learningResourceType) intendedEndUserRoleType = property(lambda self: self._intendedEndUserRoleType, set_intendedEndUserRoleType) intendedEndUserRoleGroup = property(lambda self: self._intendedEndUserRoleGroup, set_intendedEndUserRoleGroup) intendedEndUserRoleTutor = property(lambda self: self._intendedEndUserRoleTutor, set_intendedEndUserRoleTutor) contextPlace = property(lambda self: self._contextPlace, set_contextPlace) contextMode = property(lambda self: self._contextMode, set_contextMode) def findNode(self, nodeId): """ Finds a node from its nodeId (nodeId can be a string or a list/tuple) """ log.debug(u"findNode" + repr(nodeId)) node = self._nodeIdDict.get(nodeId) if node and node.package is self: return node else: return None def levelName(self, level): """ Return the level name """ if level < len(self._levelNames): return _(self._levelNames[level]) else: return _(u"?????") def save(self, filename=None, tempFile=False): """ Save package to disk pass an optional filename """ self.tempFile = tempFile # Get the filename if filename: filename = Path(filename) # If we are being given a new filename... # Change our name to match our new filename name = filename.splitpath()[1] if not tempFile: self.name = name.basename().splitext()[0] elif self.filename: # Otherwise use our last saved/loaded from filename filename = Path(self.filename) else: # If we don't have a last saved/loaded from filename, # raise an exception because, we need to have a new # file passed when a brand new package is saved raise AssertionError(u'No name passed when saving a new package') #JR: Convertimos el nombre del paquete para evitar nombres problematicos import string validPackagenameChars = "-_. %s%s" % (string.ascii_letters, string.digits) self.name = ''.join(c for c in self.name if c in validPackagenameChars).replace(' ','_') #JR: Si por casualidad quedase vacio le damos un nombre por defecto if self.name == "": self.name = "invalidpackagename" # Store our new filename for next file|save, and save the package log.debug(u"Will save %s to: %s" % (self.name, filename)) if tempFile: self.nonpersistant.remove('filename') oldFilename, self.filename = self.filename, unicode(self.filename) try: filename.safeSave(self.doSave, _('SAVE FAILED!\nLast succesful save is %s.')) finally: self.nonpersistant.append('filename') self.filename = oldFilename else: # Update our new filename for future saves self.filename = filename filename.safeSave(self.doSave, _('SAVE FAILED!\nLast succesful save is %s.')) self.isChanged = False self.updateRecentDocuments(filename) def updateRecentDocuments(self, filename): """ Updates the list of recent documents """ # Don't update the list for the generic.data "package" genericData = G.application.config.configDir/'idevices'/'generic.data' if genericData.isfile() or genericData.islink(): if Path(filename).samefile(genericData): return # Save in recentDocuments list recentProjects = G.application.config.recentProjects if filename in recentProjects: # If we're already number one, carry on if recentProjects[0] == filename: return recentProjects.remove(filename) recentProjects.insert(0, filename) del recentProjects[5:] # Delete any older names from the list G.application.config.configParser.write() # Save the settings def doSave(self, fileObj): """ Actually performs the save to 'fileObj'. """ if self.compatibleWithVersion9: self.downgradeToVersion9() zippedFile = zipfile.ZipFile(fileObj, "w", zipfile.ZIP_DEFLATED) try: for resourceFile in self.resourceDir.files(): zippedFile.write(unicode(resourceFile.normpath()), resourceFile.name.encode('utf8'), zipfile.ZIP_DEFLATED) zinfo = zipfile.ZipInfo(filename='content.data', date_time=time.localtime()[0:6]) zinfo.external_attr = 0100644<<16L zinfo.compress_type = zipfile.ZIP_DEFLATED zippedFile.writestr(zinfo, encodeObject(self)) zinfo2 = zipfile.ZipInfo(filename='contentv3.xml', date_time=time.localtime()[0:6]) zinfo2.external_attr = 0100644<<16L zinfo2.compress_type = zipfile.ZIP_DEFLATED zippedFile.writestr(zinfo2, encodeObjectToXML(self)) zippedFile.write(G.application.config.webDir/'templates'/'content.xsd', 'content.xsd', zipfile.ZIP_DEFLATED) finally: zippedFile.close() if self.compatibleWithVersion9: self.upgradeToVersion10() CasestudyIdevice.persistenceVersion = 9 CasopracticofpdIdevice.persistenceVersion = 9 CitasparapensarfpdIdevice.persistenceVersion = 9 ClozefpdIdevice.persistenceVersion = 7 ClozeIdevice.persistenceVersion = 7 ClozelangfpdIdevice.persistenceVersion = 7 DebesconocerfpdIdevice.persistenceVersion = 9 DestacadofpdIdevice.persistenceVersion = 9 EjercicioresueltofpdIdevice.persistenceVersion = 10 EleccionmultiplefpdIdevice.persistenceVersion = 10 TextAreaField.persistenceVersion = 2 FreeTextfpdIdevice.persistenceVersion = 8 GalleryIdevice.persistenceVersion = 8 ImageMagnifierIdevice.persistenceVersion = 4 ListaIdevice.persistenceVersion = 5 MultichoiceIdevice.persistenceVersion = 9 GenericIdevice.persistenceVersion = 11 MultiSelectIdevice.persistenceVersion = 1 OrientacionesalumnadofpdIdevice.persistenceVersion = 9 OrientacionestutoriafpdIdevice.persistenceVersion = 9 ParasabermasfpdIdevice.persistenceVersion = 9 QuizTestIdevice.persistenceVersion = 10 RecomendacionfpdIdevice.persistenceVersion = 9 ReflectionfpdIdevice.persistenceVersion = 9 ReflectionfpdmodifIdevice.persistenceVersion = 9 ReflectionIdevice.persistenceVersion = 8 SeleccionmultiplefpdIdevice.persistenceVersion = 2 TrueFalseIdevice.persistenceVersion = 11 VerdaderofalsofpdIdevice.persistenceVersion = 12 WikipediaIdevice.persistenceVersion = 9 Package.persistenceVersion = 13 def extractNode(self): """ Clones and extracts the currently selected node into a new package. """ newPackage = Package('NoName') # Name will be set once it is saved.. newPackage.title = self.currentNode.title newPackage.style = self.style newPackage.author = self.author newPackage._nextNodeId = self._nextNodeId # Copy the nodes from the original package # and merge into the root of the new package self.currentNode.copyToPackage(newPackage) return newPackage @staticmethod def load(filename, newLoad=True, destinationPackage=None, fromxml=None): """ Load package from disk, returns a package. """ if not zipfile.is_zipfile(filename): return None zippedFile = zipfile.ZipFile(filename, "r") xml = None try: xml = zippedFile.read(u"contentv3.xml") except: pass if not xml: try: # Get the jellied package data toDecode = zippedFile.read(u"content.data") except KeyError: log.info("no content.data, trying Common Cartridge/Content Package") newPackage = loadCC(zippedFile, filename) newPackage.tempFile = False newPackage.isChanged = False newPackage.filename = Path(filename) return newPackage # Need to add a TempDirPath because it is a nonpersistant member resourceDir = TempDirPath() # Extract resource files from package to temporary directory for fn in zippedFile.namelist(): if unicode(fn, 'utf8') not in [u"content.data", u"content.xml", u"contentv2.xml", u"contentv3.xml", u"content.xsd" ]: #JR: Hacemos las comprobaciones necesarias por si hay directorios if ("/" in fn): dir = fn[:fn.index("/")] Dir = Path(resourceDir/dir) if not Dir.exists(): Dir.mkdir() Fn = Path(resourceDir/fn) if not Fn.isdir(): outFile = open(resourceDir/fn, "wb") outFile.write(zippedFile.read(fn)) outFile.flush() outFile.close() try: validxml = False if fromxml: newPackage, validxml = decodeObjectFromXML(fromxml) elif xml: xmlinfo = zippedFile.getinfo(u"contentv3.xml") if u"content.data" not in zippedFile.NameToInfo: newPackage, validxml = decodeObjectFromXML(xml) else: datainfo = zippedFile.getinfo(u"content.data") if xmlinfo.date_time >= datainfo.date_time: newPackage, validxml = decodeObjectFromXML(xml) if not validxml: toDecode = zippedFile.read(u"content.data") newPackage = decodeObjectRaw(toDecode) try: lomdata = zippedFile.read(u'imslrm.xml') if 'LOM-ES' in lomdata: importType = 'lomEs' else: importType = 'lom' setattr(newPackage, importType, lomsubs.parseString(lomdata)) except: pass G.application.afterUpgradeHandlers = [] newPackage.resourceDir = resourceDir G.application.afterUpgradeZombies2Delete = [] if not validxml and (xml or fromxml or "content.xml" in zippedFile.namelist()): for key, res in newPackage.resources.items(): if len(res) < 1: newPackage.resources.pop(key) else: if (hasattr(res[0], 'testForAndDeleteZombieResources')): res[0].testForAndDeleteZombieResources() if newLoad: # provide newPackage to doUpgrade's versionUpgrade() to # correct old corrupt extracted packages by setting the # any corrupt package references to the new package: #JR: Convertimos el nombre del paquete para evitar nombres problematicos import string validPackagenameChars = "-_. %s%s" % (string.ascii_letters, string.digits) newPackage._name = ''.join(c for c in newPackage._name if c in validPackagenameChars).replace(' ','_') #JR: Si por casualidad quedase vacio le damos un nombre por defecto if newPackage._name == "": newPackage._name = "invalidpackagename" log.debug("load() about to doUpgrade newPackage \"" + newPackage._name + "\" " + repr(newPackage) ) if hasattr(newPackage, 'resourceDir'): log.debug("newPackage resourceDir = " + newPackage.resourceDir) else: # even though it was just set above? should not get here: log.error("newPackage resourceDir has NO resourceDir!") doUpgrade(newPackage) # after doUpgrade, compare the largest found field ID: if G.application.maxFieldId >= Field.nextId: Field.nextId = G.application.maxFieldId + 1 if hasattr(newPackage,'_docType'): common.setExportDocType(newPackage.docType) else: newPackage.set_docType(toUnicode('XHTML')) else: # and when merging, automatically set package references to # the destinationPackage, into which this is being merged: log.debug("load() about to merge doUpgrade newPackage \"" + newPackage._name + "\" " + repr(newPackage) + " INTO destinationPackage \"" + destinationPackage._name + "\" " + repr(destinationPackage)) log.debug("using their resourceDirs:") if hasattr(newPackage, 'resourceDir'): log.debug(" newPackage resourceDir = " + newPackage.resourceDir) else: log.error("newPackage has NO resourceDir!") if hasattr(destinationPackage, 'resourceDir'): log.debug(" destinationPackage resourceDir = " + destinationPackage.resourceDir) else: log.error("destinationPackage has NO resourceDir!") doUpgrade(destinationPackage, isMerge=True, preMergePackage=newPackage) # after doUpgrade, compare the largest found field ID: if G.application.maxFieldId >= Field.nextId: Field.nextId = G.application.maxFieldId + 1 except: import traceback traceback.print_exc() raise if newPackage.tempFile: # newPackage.filename was stored as it's original filename newPackage.tempFile = False else: # newPackage.filename is the name that the package was last loaded from # or saved to newPackage.filename = Path(filename) checker = Checker(newPackage) inconsistencies = checker.check() for inconsistency in inconsistencies: inconsistency.fix() # Let idevices and nodes handle any resource upgrading they may need to # Note: Package afterUpgradeHandlers *must* be done after Resources' # and the package should be updated before everything else, # so, prioritize with a 3-pass, 3-level calling setup # in order of: 1) resources, 2) package, 3) anything other objects for handler_priority in range(3): for handler in G.application.afterUpgradeHandlers: if handler_priority == 0 and \ repr(handler.im_class)=="<class 'exe.engine.resource.Resource'>": # level-0 handlers: Resource handler() elif handler_priority == 1 and \ repr(handler.im_class)=="<class 'exe.engine.package.Package'>": # level-1 handlers: Package (requires resources first) if handler.im_self == newPackage: handler() else: log.warn("Extra package object found, " \ + "ignoring its afterUpgradeHandler: " \ + repr(handler)) elif handler_priority == 2 and \ repr(handler.im_class)!="<class 'exe.engine.resource.Resource'>" \ and \ repr(handler.im_class)!="<class 'exe.engine.package.Package'>": # level-2 handlers: all others handler() G.application.afterUpgradeHandlers = [] num_zombies = len(G.application.afterUpgradeZombies2Delete) for i in range(num_zombies-1, -1, -1): zombie = G.application.afterUpgradeZombies2Delete[i] # now, the zombie list can contain nodes OR resources to delete. # if zombie is a node, then also pass in a pruning parameter.. zombie_is_node = False if isinstance(zombie, Node): zombie_is_node = True if zombie_is_node: zombie.delete(pruningZombies=True) else: #JR: Eliminamos el recurso del idevice if hasattr(zombie._idevice, 'userResources'): for i in range(len(zombie._idevice.userResources)-1, -1, -1): if hasattr(zombie._idevice.userResources[i], 'storageName'): if zombie._idevice.userResources[i].storageName == zombie.storageName: aux = zombie._idevice.userResources[i] zombie._idevice.userResources.remove(aux) aux.delete #Eliminamos el recurso de los recursos del sistema #for resource in newPackage.resources.keys(): # if hasattr(newPackage.resources[resource][0], 'storageName'): # if newPackage.resources[resource][0].storageName == zombie.storageName: # del newPackage.resources[resource] #JR: Esto ya no haria falta #zombie.delete() del zombie userResourcesFiles = newPackage.getUserResourcesFiles(newPackage.root) #JR: Borramos recursos que no estan siendo utilizados newPackage.cleanUpResources(userResourcesFiles) G.application.afterUpgradeZombies2Delete = [] newPackage.updateRecentDocuments(newPackage.filename) newPackage.isChanged = False nstyle=Path(G.application.config.stylesDir/newPackage.style) if not nstyle.isdir(): newPackage.style=G.application.config.defaultStyle newPackage.lang = newPackage._lang return newPackage def getUserResourcesFiles(self, node): resourceFiles = set() for idevice in node.idevices: if hasattr(idevice, 'userResources'): for i in range(len(idevice.userResources) - 1, -1, -1): if hasattr(idevice.userResources[i], 'storageName'): resourceFiles.add(idevice.userResources[i].storageName) for child in node.children: resourceFiles = resourceFiles | self.getUserResourcesFiles(child) return resourceFiles def cleanUpResources(self, userResourcesFiles=set()): """ Removes duplicate resource files """ # Delete unused resources. # Only really needed for upgrading to version 0.20, # but upgrading of resources and package happens in no particular order # and must be done after all resources have been upgraded # some earlier .elp files appear to have been corrupted with # two packages loaded, *possibly* from some strange extract/merge # functionality in earlier eXe versions? # Regardless, only the real package will have a resourceDir, # and the other will fail. # For now, then, put in this quick and easy safety check: if not hasattr(self,'resourceDir'): log.warn("cleanUpResources called on a redundant package") return existingFiles = set([fn.basename() for fn in self.resourceDir.files()]) #JR usedFiles = set([]) for reses in self.resources.values(): if hasattr(reses[0], 'storageName'): usedFiles.add(reses[0].storageName) #usedFiles = set([reses[0].storageName for reses in self.resources.values()]) for fn in existingFiles - usedFiles - userResourcesFiles: log.debug('Removing unused resource %s' % fn) (self.resourceDir/fn).remove() def findResourceByName(self, queryName): """ Support for merging, and anywhere else that unique names might be checked before actually comparing against the files (as will be done by the resource class itself in its _addOurselvesToPackage() ) """ foundResource = None queryResources = self.resources for this_checksum in queryResources: for this_resource in queryResources[this_checksum]: if queryName == this_resource.storageName: foundResource = this_resource return foundResource return foundResource def upgradeToVersion1(self): """ Called to upgrade from 0.3 release """ self._nextNodeId = 0 self._nodeIdDict = {} # Also upgrade all the nodes. # This needs to be done here so that draft gets id 0 # If it's done in the nodes, the ids are assigned in reverse order draft = getattr(self, 'draft') draft._id = self._regNewNode(draft) draft._package = self setattr(self, 'editor', Node(self, None, _(u"iDevice Editor"))) # Add a default idevice to the editor idevice = GenericIdevice("", "", "", "", "") editor = getattr(self, 'editor') idevice.parentNode = editor editor.addIdevice(idevice) def superReg(node): """Registers all our nodes because in v0 they were not registered in this way""" node._id = self._regNewNode(node) node._package = self for child in node.children: superReg(child) superReg(self.root) def _regNewNode(self, node): """ Called only by nodes, stores the node in our id lookup dict returns a new unique id """ id_ = unicode(self._nextNodeId) self._nextNodeId += 1 self._nodeIdDict[id_] = node return id_ def getNewIdeviceId(self): """ Returns an iDevice Id which is unique for this package. """ id_ = unicode(self._nextIdeviceId) self._nextIdeviceId += 1 return id_ def upgradeToVersion2(self): """ Called to upgrade from 0.4 release """ getattr(self, 'draft').delete() getattr(self, 'editor').delete() delattr(self, 'draft') delattr(self, 'editor') # Need to renumber nodes because idevice node and draft nodes are gone self._nextNodeId = 0 def renumberNode(node): """ Gives the old node a number """ node._id = self._regNewNode(node) for child in node.children: renumberNode(child) renumberNode(self.root) def upgradeToVersion3(self): """ Also called to upgrade from 0.4 release """ self._nextIdeviceId = 0 def upgradeToVersion4(self): """ Puts properties in their place Also called to upgrade from 0.8 release """ self._name = toUnicode(self.__dict__['name']) self._author = toUnicode(self.__dict__['author']) self._description = toUnicode(self.__dict__['description']) def upgradeToVersion5(self): """ For version 0.11 """ self._levelNames = self.levelNames del self.levelNames def upgradeToVersion6(self): """ For version 0.14 """ self.dublinCore = DublinCore() # Copy some of the package properties to dublin core self.title = self.root.title self.dublinCore.title = self.root.title self.dublinCore.creator = self._author self.dublinCore.description = self._description self.scolinks = False def upgradeToVersion7(self): """ For version 0.15 """ self._backgroundImg = '' self.backgroundImgTile = False def upgradeToVersion8(self): """ For version 0.20, alpha, for nightlies r2469 """ self.license = 'None' self.footer = "" self.idevices = [] def upgradeToVersion9(self): """ For version >= 0.20.4 """ if not hasattr(self, 'resources'): # The hasattr is needed, because sometimes, Resource instances are upgraded # first and they also set this attribute on the package self.resources = {} G.application.afterUpgradeHandlers.append(self.cleanUpResources) def lomDefaults(self, entry, schema, rights=False): defaults = {'general': {'identifier': [{'catalog': c_('My Catalog'), 'entry': entry}], 'aggregationLevel': {'source': schema, 'value': '2'} }, 'metaMetadata': {'metadataSchema': [schema]}, } if rights: defaults['rights'] = {'access': {'accessType': {'source': schema, 'value': 'universal'}, 'description': {'string': [{'valueOf_': c_('Default'), 'language': str(self.lang)}]}}} return defaults oldLicenseMap = {"None": "None", "GNU Free Documentation License": u"license GFDL", "Creative Commons Attribution 3.0 License": u"creative commons: attribution 3.0", "Creative Commons Attribution Share Alike 3.0 License": u"creative commons: attribution - share alike 3.0", "Creative Commons Attribution No Derivatives 3.0 License": u"creative commons: attribution - non derived work 3.0", "Creative Commons Attribution Non-commercial 3.0 License": u"creative commons: attribution - non commercial 3.0", "Creative Commons Attribution Non-commercial Share Alike 3.0 License": u"creative commons: attribution - non commercial - share alike 3.0", "Creative Commons Attribution Non-commercial No Derivatives 3.0 License": u"creative commons: attribution - non derived work - non commercial 3.0", "Creative Commons Attribution 2.5 License": u"creative commons: attribution 2.5", "Creative Commons Attribution-ShareAlike 2.5 License": u"creative commons: attribution - share alike 2.5", "Creative Commons Attribution-NoDerivs 2.5 License": u"creative commons: attribution - non derived work 2.5", "Creative Commons Attribution-NonCommercial 2.5 License": u"creative commons: attribution - non commercial 2.5", "Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License": u"creative commons: attribution - non commercial - share alike 2.5", "Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License": u"creative commons: attribution - non derived work - non commercial 2.5", "Developing Nations 2.0": u"" } def upgradeToVersion10(self): """ For version >= 2.0 """ if not hasattr(self, 'lang'): self._lang = G.application.config.locale.split('_')[0] entry = str(uuid.uuid4()) if not hasattr(self, 'lomEs') or not isinstance(self.lomEs, lomsubs.lomSub): self.lomEs = lomsubs.lomSub.factory() self.lomEs.addChilds(self.lomDefaults(entry, 'LOM-ESv1.0', True)) if not hasattr(self, 'lom') or not isinstance(self.lom, lomsubs.lomSub): self.lom = lomsubs.lomSub.factory() self.lom.addChilds(self.lomDefaults(entry, 'LOMv1.0')) if not hasattr(self, 'scowsinglepage'): self.scowsinglepage = False if not hasattr(self, 'scowwebsite'): self.scowwebsite = False if not hasattr(self, 'exportSource'): self.exportSource = True if not hasattr(self, 'exportMetadataType'): self.exportMetadataType = "LOMES" if not hasattr(self, 'objectives'): self._objectives = u'' if not hasattr(self, 'preknowledge'): self._preknowledge = u'' if not hasattr(self, 'learningResourceType'): self._learningResourceType = u'' if not hasattr(self, 'intendedEndUserRoleType'): self._intendedEndUserRoleType = u'' if not hasattr(self, 'intendedEndUserRoleGroup'): self._intendedEndUserRoleGroup = False if not hasattr(self, 'intendedEndUserRoleTutor'): self._intendedEndUserRoleTutor = False if not hasattr(self, 'contextPlace'): self._contextPlace = u'' if not hasattr(self, 'contextMode'): self._contextMode = u'' if hasattr(self, 'scowsource'): del self.scowsource try: if not self.license in self.oldLicenseMap.values(): self.newlicense = self.oldLicenseMap[self.license] except: self.license = u'' if not hasattr(self, 'mxmlprofilelist'): self.mxmlprofilelist = "" if not hasattr(self, 'mxmlforcemediaonly'): self.mxmlforcemediaonly = False if not hasattr(self, 'mxmlheight'): self.mxmlheight = "" if not hasattr(self, 'mxmlwidth'): self.mxmlwidth = "" if not hasattr(self, 'compatibleWithVersion9'): self.compatibleWithVersion9 = False self.set_title(self._title) self.set_author(self._author) self.set_description(self._description) def upgradeToVersion11(self): pass def upgradeToVersion12(self): #because actually version 11 was exe-next-gen self.upgradeToVersion9() self.upgradeToVersion10() def upgradeToVersion13(self): if not hasattr(self, '_docType'): self._docType = G.application.config.docType def downgradeToVersion9(self): for attr in ['lomEs', 'lom', 'scowsinglepage', 'scowwebsite', 'exportSource', 'exportMetadataType', '_lang', '_objectives', '_preknowledge', '_learningResourceType', '_intendedEndUserRoleType', '_intendedEndUserRoleGroup', '_intendedEndUserRoleTutor', '_contextPlace', '_contextMode', 'scowsource', 'mxmlprofilelist', 'mxmlforcemediaonly', 'mxmlheight', 'mxmlwidth']: if hasattr(self, attr): delattr(self, attr) self.license = u'' CasestudyIdevice.persistenceVersion = 8 CasopracticofpdIdevice.persistenceVersion = 7 CitasparapensarfpdIdevice.persistenceVersion = 7 ClozefpdIdevice.persistenceVersion = 4 ClozeIdevice.persistenceVersion = 4 ClozelangfpdIdevice.persistenceVersion = 4 DebesconocerfpdIdevice.persistenceVersion = 7 DestacadofpdIdevice.persistenceVersion = 7 EjercicioresueltofpdIdevice.persistenceVersion = 8 EleccionmultiplefpdIdevice.persistenceVersion = 7 TextAreaField.persistenceVersion = 1 FreeTextfpdIdevice.persistenceVersion = 7 GalleryIdevice.persistenceVersion = 7 ImageMagnifierIdevice.persistenceVersion = 2 ListaIdevice.persistenceVersion = 4 MultichoiceIdevice.persistenceVersion = 7 GenericIdevice.persistenceVersion = 9 delattr(MultiSelectIdevice, "persistenceVersion") OrientacionesalumnadofpdIdevice.persistenceVersion = 7 OrientacionestutoriafpdIdevice.persistenceVersion = 7 ParasabermasfpdIdevice.persistenceVersion = 7 QuizTestIdevice.persistenceVersion = 8 RecomendacionfpdIdevice.persistenceVersion = 7 ReflectionfpdIdevice.persistenceVersion = 7 ReflectionfpdmodifIdevice.persistenceVersion = 7 ReflectionIdevice.persistenceVersion = 7 delattr(SeleccionmultiplefpdIdevice, "persistenceVersion") TrueFalseIdevice.persistenceVersion = 9 VerdaderofalsofpdIdevice.persistenceVersion = 9 WikipediaIdevice.persistenceVersion = 8 Package.persistenceVersion = 9 def getExportDocType(self): return self._docType def delNotes(self, node): """ Delete all notes """ for idevice in node.idevices: if idevice.klass == 'NotaIdevice': idevice.delete() for child in node.children: self.delNotes(child) # ===========================================================================
RichDijk/eXe
exe/engine/package.py
Python
gpl-2.0
77,805
# # Copyright (c) 2013 Simon Lukasik # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 # along with this software; if not, see # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. # # Make used to build the postgres schema. # # It uses the following tools: # # blend - A tool used to process the .deps files to produce # the main.sql. It will inject the contents of a file # named "start.sql" at the beginning if it exits. # STYLE := postgres DIRS := tables procs triggers data BLEND := ../blend -as $(STYLE) MKFILES := $(shell find . -mindepth 2 -maxdepth 2 -name Makefile) main : $(BLEND) $(DIRS) clean : @rm -f main.sql @$(foreach m,$(MKFILES),$(MAKE) -C $(dir $(m)) $@;) .PHONY: clean
isimluk/bronte
schema/bronte/postgresql/Makefile
Makefile
gpl-2.0
979
<!-- HTML header for doxygen 1.8.8--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- For Mobile Devices --> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta name="generator" content="Doxygen 1.8.11"/> <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <title>SJSU One API: FIL Struct Reference</title> <!--<link href="../../tabs.css" rel="stylesheet" type="text/css"/>--> <script type="text/javascript" src="../../dynsections.js"></script> <link href="../../search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../search/searchdata.js"></script> <script type="text/javascript" src="../../search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="../../doxygen.css" rel="stylesheet" type="text/css" /> <link href="../../customdoxygen.css" rel="stylesheet" type="text/css"/> <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> <script type="text/javascript" src="../../doxy-boot.js"></script> </head> <body> <nav class="navbar navbar-default" role="navigation"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand">SJSU One API </a> </div> </div> </nav> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div class="content" id="content"> <div class="container"> <div class="row"> <div class="col-sm-12 panel " style="padding-bottom: 15px;"> <div style="margin-bottom: 15px;"> <!-- end header part --><!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "../../search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="../../index.html"><span>Main&#160;Page</span></a></li> <li><a href="../../modules.html"><span>Modules</span></a></li> <li><a href="../../namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li> <li><a href="../../files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="../../search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="../../annotated.html"><span>Data&#160;Structures</span></a></li> <li><a href="../../classes.html"><span>Data&#160;Structure&#160;Index</span></a></li> <li><a href="../../inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="../../functions.html"><span>Data&#160;Fields</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-attribs">Data Fields</a> </div> <div class="headertitle"> <div class="title">FIL Struct Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include &lt;<a class="el" href="../../da/db9/ff_8h_source.html">ff.h</a>&gt;</code></p> <div class="dynheader"> Collaboration diagram for FIL:</div> <div class="dyncontent"> <div class="center"><img src="../../d1/dae/structFIL__coll__graph.png" border="0" usemap="#FIL_coll__map" alt="Collaboration graph"/></div> <map name="FIL_coll__map" id="FIL_coll__map"> <area shape="rect" id="node2" href="../../db/d75/structFATFS.html" title="FATFS" alt="" coords="5,5,69,32"/> </map> <center><span class="legend">[<a href="../../graph_legend.html">legend</a>]</span></center></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> Data Fields</h2></td></tr> <tr class="memitem:a42376a6797a06228911c8b836c1e9030"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../db/d75/structFATFS.html">FATFS</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#a42376a6797a06228911c8b836c1e9030">fs</a></td></tr> <tr class="separator:a42376a6797a06228911c8b836c1e9030"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af7cae0063b0045fb7078b560101ba8f2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#a197942eefa7db30960ae396d68339b97">WORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#af7cae0063b0045fb7078b560101ba8f2">id</a></td></tr> <tr class="separator:af7cae0063b0045fb7078b560101ba8f2"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac409508881f5a16f2998ae675072b376"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#ac409508881f5a16f2998ae675072b376">flag</a></td></tr> <tr class="separator:ac409508881f5a16f2998ae675072b376"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aea440945db26de9c4a88065c0c887fda"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#aea440945db26de9c4a88065c0c887fda">err</a></td></tr> <tr class="separator:aea440945db26de9c4a88065c0c887fda"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a75d29cf9257c827d117887b9f924c4a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#a75d29cf9257c827d117887b9f924c4a9">fptr</a></td></tr> <tr class="separator:a75d29cf9257c827d117887b9f924c4a9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa00790d40d7b0081c345fd4f76e22b70"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#aa00790d40d7b0081c345fd4f76e22b70">fsize</a></td></tr> <tr class="separator:aa00790d40d7b0081c345fd4f76e22b70"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad308b74c8d6975c6a9c30d90b4124c40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#ad308b74c8d6975c6a9c30d90b4124c40">sclust</a></td></tr> <tr class="separator:ad308b74c8d6975c6a9c30d90b4124c40"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa41312aba551b9a6d1c9d3c8c7d2734b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#aa41312aba551b9a6d1c9d3c8c7d2734b">clust</a></td></tr> <tr class="separator:aa41312aba551b9a6d1c9d3c8c7d2734b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab3d4165d6fd32ac71a130d835fbf0b4d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#ab3d4165d6fd32ac71a130d835fbf0b4d">dsect</a></td></tr> <tr class="separator:ab3d4165d6fd32ac71a130d835fbf0b4d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab203794f939ad4480e81dfa488770783"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#ab203794f939ad4480e81dfa488770783">dir_sect</a></td></tr> <tr class="separator:ab203794f939ad4480e81dfa488770783"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5af9e9fb312b629220eaf684dd28c4a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#a5af9e9fb312b629220eaf684dd28c4a9">dir_ptr</a></td></tr> <tr class="separator:a5af9e9fb312b629220eaf684dd28c4a9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a7a95fb86588663e48309b5cded7e207b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dab/structFIL.html#a7a95fb86588663e48309b5cded7e207b">buf</a> [<a class="el" href="../../de/d51/ffconf_8h.html#ac271b697378912f17132cb9c7d0de024">_MAX_SS</a>]</td></tr> <tr class="separator:a7a95fb86588663e48309b5cded7e207b"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <h2 class="groupheader">Field Documentation</h2> <a class="anchor" id="a7a95fb86588663e48309b5cded7e207b"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> FIL::buf[<a class="el" href="../../de/d51/ffconf_8h.html#ac271b697378912f17132cb9c7d0de024">_MAX_SS</a>]</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="aa41312aba551b9a6d1c9d3c8c7d2734b"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a> FIL::clust</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="a5af9e9fb312b629220eaf684dd28c4a9"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a>* FIL::dir_ptr</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="ab203794f939ad4480e81dfa488770783"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a> FIL::dir_sect</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="ab3d4165d6fd32ac71a130d835fbf0b4d"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a> FIL::dsect</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="aea440945db26de9c4a88065c0c887fda"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> FIL::err</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="ac409508881f5a16f2998ae675072b376"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#a4ae1dab0fb4b072a66584546209e7d58">BYTE</a> FIL::flag</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="a75d29cf9257c827d117887b9f924c4a9"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a> FIL::fptr</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="a42376a6797a06228911c8b836c1e9030"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../db/d75/structFATFS.html">FATFS</a>* FIL::fs</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="aa00790d40d7b0081c345fd4f76e22b70"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a> FIL::fsize</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="af7cae0063b0045fb7078b560101ba8f2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#a197942eefa7db30960ae396d68339b97">WORD</a> FIL::id</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="ad308b74c8d6975c6a9c30d90b4124c40"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="../../d6/d3d/integer_8h.html#ad342ac907eb044443153a22f964bf0af">DWORD</a> FIL::sclust</td> </tr> </table> </div><div class="memdoc"> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li>/var/www/html/SJSU-DEV-Linux/firmware/default/lib/L4_IO/fat/<a class="el" href="../../da/db9/ff_8h_source.html">ff.h</a></li> </ul> </div><!-- contents --> <!-- HTML footer for doxygen 1.8.8--> <!-- start footer part --> </div> </div> </div> </div> </div> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>
kammce/SJSU-DEV-Linux
docs/api/html/df/dab/structFIL.html
HTML
gpl-2.0
16,270
VERSION=$(shell scripts/version_manager.py . version) NAME=lago TAR_FILE=${NAME}-${VERSION}.tar TARBALL_FILE=${TAR_FILE}.gz SPECFILE=${NAME}.spec # this is needed to use the libs from venv OUTPUT_DIR=${PWD} RPM_DIR=${OUTPUT_DIR}/rpmbuild DIST_DIR=${OUTPUT_DIR}/dist TAR_DIST_LOCATION=${DIST_DIR}/${TAR_FILE} TARBALL_DIST_LOCATION=${DIST_DIR}/${TARBALL_FILE} .PHONY: build rpm srpm ${TARBALL_DIST_LOCATION} check-local dist check ${SPECFILE} docs fullchangelog changelog python-sdist add-extra-files-sdist container changelog: echo Creating RPM compatible ChangeLog \ && ( \ scripts/version_manager.py . changelog \ ) > ChangeLog \ || ( \ echo Failed to generate RPM ChangeLog >&2 \ && exit 1 \ ) fullchangelog: @if test -d ".git"; then \ echo Creating FullChangeLog \ && ( \ echo '# Generated by Makefile. Do not edit.'; echo; \ git log --stat \ ) > FullChangeLog \ || ( \ echo Failed to generate FullChangeLog >&2 \ ); \ else \ echo A git clone is required to generate a FullChangeLog >&2; \ fi ${SPECFILE}: ${SPECFILE}.in changelog sed -e "s/@@VERSION@@/${VERSION}/g" \ ${SPECFILE}.in > $@; \ cat ChangeLog >> $@ build: LAGO_VERSION=${VERSION} python3 setup.py build check: check-local check-local: tox -v -r -e py3 dist: ${TARBALL_DIST_LOCATION} python-sdist: LAGO_VERSION=${VERSION} python3 setup.py sdist --dist-dir ${DIST_DIR} add-extra-files-sdist: changelog fullchangelog gunzip ${TARBALL_DIST_LOCATION} tar rvf ${TAR_DIST_LOCATION} \ FullChangeLog \ ChangeLog gzip ${TAR_DIST_LOCATION} ${TARBALL_DIST_LOCATION}: python-sdist add-extra-files-sdist srpm: dist ${SPECFILE} rpmbuild \ --define "_topdir ${RPM_DIR}" \ --define "_sourcedir ${DIST_DIR}" \ -of \ ${SPECFILE} rpm: dist ${SPECFILE} rpmbuild \ --define "_topdir ${RPM_DIR}" \ --define "_sourcedir ${DIST_DIR}" \ -ba \ ${SPECFILE} clean: python3 setup.py clean rm -rf ${DIST_DIR} rm -rf ${RPM_DIR} rm -rf build "$(REPO_LOCAL_REL_PATH)" rm -f ${SPECFILE} rm -f AUTHORS docs: tox -v -r -e docs container: make -C container RPM_PATH=${RPM_PATH}
lago-project/lago
Makefile
Makefile
gpl-2.0
2,099
//! A singleton abstract class to hold a game state //! Uses the singleton pattern #ifndef GAMESTATE_H #define GAMESTATE_H // Forward declarations namespace GfxModule { class GfxModuleWrapper; } namespace SoundModule { class SoundModuleWrapper; } namespace InputModule { class Input; } namespace GameStateModule { // Forward declare classes class GameStateManager; class GameState { private: //! Singleton pattern. This state cannot be copied GameState(const GameState &AGameState); public: //! Singleton pattern. This state cannot be constructed outside the class hierarchy GameState(void) { // Intentionally left blank } //! Virtual destructor. Does nothing virtual ~GameState(void) { // Intentionally left blank } //! Virtual. Initialise the state when the state is pushed on top the stack virtual void PushInitialise( GfxModule::GfxModuleWrapper* AGfxModule, SoundModule::SoundModuleWrapper* ASoundModule ) { // Intentionally left blank } //! Virtual. Cleanup up the state when it is pushed then further into the stack virtual void PushCleanup( GfxModule::GfxModuleWrapper* AGfxModule, SoundModule::SoundModuleWrapper* ASoundModule ) { // Intentionally left blank } //! Virtual. When the state is popped up to the top of the stack virtual void PopInitialise( GfxModule::GfxModuleWrapper* AGfxModule, SoundModule::SoundModuleWrapper* ASoundModule ) { // Intentionally left blank } //! Virtual. When the state is popped off the stack virtual void PopCleanup( GfxModule::GfxModuleWrapper* AGfxModule, SoundModule::SoundModuleWrapper* ASoundModule ) { // Intentionally left blank } //! Virtual. Gets called once per frame when it is on top of the stack virtual void Update( GfxModule::GfxModuleWrapper* AGfxModule, SoundModule::SoundModuleWrapper* ASoundModule, InputModule::Input* AInputModule, GameStateModule::GameStateManager* AGameStateManager ) { // Intentionally left blank } }; } #endif // GAMESTATE_H /* History ======= 2006-06-23: Created the file and class */
blchinezu/EZX-Projects
Games/Dance2X/Source/StateModule/GameState.h
C
gpl-2.0
2,638
#include <Python.h> //#define dbg(...) fprintf (stderr, __VA_ARGS__) #define dbg(...) extern PyTypeObject pylcmeventlog_type; extern PyTypeObject pylcm_type; extern PyTypeObject pylcm_subscription_type; /* module initialization */ static PyMethodDef lcmmod_methods[] = { { NULL, NULL } /* sentinel */ }; PyDoc_STRVAR (lcmmod_doc, "LCM python extension modules"); PyMODINIT_FUNC init_lcm (void) { PyObject *m; pylcmeventlog_type.ob_type = &PyType_Type; pylcm_type.ob_type = &PyType_Type; pylcm_subscription_type.ob_type = &PyType_Type; m = Py_InitModule3 ("_lcm", lcmmod_methods, lcmmod_doc); Py_INCREF (&pylcmeventlog_type); if (PyModule_AddObject (m, "EventLog", (PyObject *)&pylcmeventlog_type) != 0) { return; } Py_INCREF (&pylcm_type); if (PyModule_AddObject (m, "LCM", (PyObject *)&pylcm_type) != 0) { return; } Py_INCREF (&pylcm_subscription_type); if (PyModule_AddObject (m, "LCMSubscription", (PyObject *)&pylcm_subscription_type) != 0) { return; } }
peddie/conftron
upstream/lcm-python/module.c
C
gpl-2.0
1,087
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>WifiDog: wdctl.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.1 --> <div class="tabs"> <ul> <li><a href="main.html"><span>Main&nbsp;Page</span></a></li> <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> </ul></div> <h1>wdctl.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/********************************************************************\</span> <a name="l00002"></a>00002 <span class="comment"> * This program is free software; you can redistribute it and/or *</span> <a name="l00003"></a>00003 <span class="comment"> * modify it under the terms of the GNU General Public License as *</span> <a name="l00004"></a>00004 <span class="comment"> * published by the Free Software Foundation; either version 2 of *</span> <a name="l00005"></a>00005 <span class="comment"> * the License, or (at your option) any later version. *</span> <a name="l00006"></a>00006 <span class="comment"> * *</span> <a name="l00007"></a>00007 <span class="comment"> * This program is distributed in the hope that it will be useful, *</span> <a name="l00008"></a>00008 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of *</span> <a name="l00009"></a>00009 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *</span> <a name="l00010"></a>00010 <span class="comment"> * GNU General Public License for more details. *</span> <a name="l00011"></a>00011 <span class="comment"> * *</span> <a name="l00012"></a>00012 <span class="comment"> * You should have received a copy of the GNU General Public License*</span> <a name="l00013"></a>00013 <span class="comment"> * along with this program; if not, contact: *</span> <a name="l00014"></a>00014 <span class="comment"> * *</span> <a name="l00015"></a>00015 <span class="comment"> * Free Software Foundation Voice: +1-617-542-5942 *</span> <a name="l00016"></a>00016 <span class="comment"> * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *</span> <a name="l00017"></a>00017 <span class="comment"> * Boston, MA 02111-1307, USA gnu@gnu.org *</span> <a name="l00018"></a>00018 <span class="comment"> * *</span> <a name="l00019"></a>00019 <span class="comment">\********************************************************************/</span> <a name="l00020"></a>00020 <a name="l00021"></a>00021 <span class="comment">/* $Id: wdctl.h 901 2006-01-17 18:58:13Z mina $ */</span> <a name="l00027"></a>00027 <span class="preprocessor">#ifndef _WDCTL_H_</span> <a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define _WDCTL_H_</span> <a name="l00029"></a>00029 <span class="preprocessor"></span> <a name="l00030"></a>00030 <span class="preprocessor">#define DEFAULT_SOCK "/tmp/wdctl.sock"</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 <span class="preprocessor">#define WDCTL_UNDEF 0</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define WDCTL_STATUS 1</span> <a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define WDCTL_STOP 2</span> <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define WDCTL_KILL 3</span> <a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define WDCTL_RESTART 4</span> <a name="l00037"></a>00037 <span class="preprocessor"></span> <a name="l00038"></a>00038 <span class="keyword">typedef</span> <span class="keyword">struct </span>{ <a name="l00039"></a><a class="code" href="structs__config.html#d331abd0de5c051099d862891f454e7a">00039</a> <span class="keywordtype">char</span> *socket; <a name="l00040"></a>00040 <span class="keywordtype">int</span> command; <a name="l00041"></a><a class="code" href="structs__config.html#0d3b219bafe97bb489549dcdd334b074">00041</a> <span class="keywordtype">char</span> *param; <a name="l00042"></a>00042 } <a class="code" href="structs__config.html">s_config</a>; <a name="l00043"></a>00043 <span class="preprocessor">#endif</span> </pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Jun 24 00:29:52 2007 for WifiDog by&nbsp; <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> </body> </html>
sxpert/wifidog-ffw
doc/html/wifidog-1_81_83__rc1_2src_2wdctl_8h-source.html
HTML
gpl-2.0
5,232
<?php /* * This file is part of Respect/Validation. * * (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net> * * For the full copyright and license information, please view the "LICENSE.md" * file that was distributed with this source code. */ namespace Respect\Validation\Rules\SubdivisionCode; use Respect\Validation\Rules\AbstractSearcher; /** * Validator for Zimbabwe subdivision code. * * ISO 3166-1 alpha-2: ZW * * @link https://salsa.debian.org/iso-codes-team/iso-codes */ class ZwSubdivisionCode extends AbstractSearcher { public $haystack = [ 'BU', // Bulawayo 'HA', // Harare 'MA', // Manicaland 'MC', // Mashonaland Central 'ME', // Mashonaland East 'MI', // Midlands 'MN', // Matabeleland North 'MS', // Matabeleland South 'MV', // Masvingo 'MW', // Mashonaland West ]; public $compareIdentical = true; }
PaymentHighway/woocommerce-gateway-paymenthighway
includes/vendor/respect/validation/library/Rules/SubdivisionCode/ZwSubdivisionCode.php
PHP
gpl-2.0
928
<?php /** * File contains just the checkoutFlow class * * @package classes * @copyright Copyright 2003-2012 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: class.base.php 14535 2009-10-07 22:16:19Z wilt $ */ /** * checkoutFlow class * * This class is used to set actions/end points for checkout flow based on abitrary requirements * * @package classes */ class checkoutFlow extends base { }
zcwilt/zc-v1-series
includes/classes/class.checkoutFlow.php
PHP
gpl-2.0
479
/* This file is part of the dbusmenu-qt library Copyright 2009 Canonical Author: Aurelien Gateau <aurelien.gateau@canonical.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License (LGPL) as published by the Free Software Foundation; either version 2 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "dbusmenuimporter.h" // Qt #include <QCoreApplication> #include <QDBusConnection> #include <QDBusInterface> #include <QDBusReply> #include <QDBusVariant> #include <QFont> #include <QMenu> #include <QPointer> #include <QTime> #include <QTimer> #include <QToolButton> #include <QWidgetAction> #include <QSet> #include <QDebug> // Local #include "dbusmenutypes_p.h" #include "dbusmenushortcut_p.h" #include "utils_p.h" // Generated #include "dbusmenu_interface.h" //#define BENCHMARK #ifdef BENCHMARK #include <QTime> static QTime sChrono; #endif #define DMRETURN_IF_FAIL(cond) if (!(cond)) { \ qWarning() << "Condition failed: " #cond; \ return; \ } static const char *DBUSMENU_PROPERTY_ID = "_dbusmenu_id"; static const char *DBUSMENU_PROPERTY_ICON_NAME = "_dbusmenu_icon_name"; static const char *DBUSMENU_PROPERTY_ICON_DATA_HASH = "_dbusmenu_icon_data_hash"; static QAction *createKdeTitle(QAction *action, QWidget *parent) { QToolButton *titleWidget = new QToolButton(0); QFont font = titleWidget->font(); font.setBold(true); titleWidget->setFont(font); titleWidget->setIcon(action->icon()); titleWidget->setText(action->text()); titleWidget->setDown(true); titleWidget->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QWidgetAction *titleAction = new QWidgetAction(parent); titleAction->setDefaultWidget(titleWidget); return titleAction; } class DBusMenuImporterPrivate { public: DBusMenuImporter *q; DBusMenuInterface *m_interface; QMenu *m_menu; using ActionForId = QMap<int, QAction* >; ActionForId m_actionForId; QTimer *m_pendingLayoutUpdateTimer; QSet<int> m_idsRefreshedByAboutToShow; QSet<int> m_pendingLayoutUpdates; QDBusPendingCallWatcher *refresh(int id) { auto call = m_interface->GetLayout(id, 1, QStringList()); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, q); watcher->setProperty(DBUSMENU_PROPERTY_ID, id); QObject::connect(watcher, &QDBusPendingCallWatcher::finished, q, &DBusMenuImporter::slotGetLayoutFinished); return watcher; } QMenu *createMenu(QWidget *parent) { QMenu *menu = q->createMenu(parent); return menu; } /** * Init all the immutable action properties here * TODO: Document immutable properties? * * Note: we remove properties we handle from the map (using QMap::take() * instead of QMap::value()) to avoid warnings about these properties in * updateAction() */ QAction *createAction(int id, const QVariantMap &_map, QWidget *parent) { QVariantMap map = _map; QAction *action = new QAction(parent); action->setProperty(DBUSMENU_PROPERTY_ID, id); QString type = map.take(QStringLiteral("type")).toString(); if (type == QLatin1String("separator")) { action->setSeparator(true); } if (map.take(QStringLiteral("children-display")).toString() == QLatin1String("submenu")) { QMenu *menu = createMenu(parent); action->setMenu(menu); } QString toggleType = map.take(QStringLiteral("toggle-type")).toString(); if (!toggleType.isEmpty()) { action->setCheckable(true); if (toggleType == QLatin1String("radio")) { QActionGroup *group = new QActionGroup(action); group->addAction(action); } } bool isKdeTitle = map.take(QStringLiteral("x-kde-title")).toBool(); updateAction(action, map, map.keys()); if (isKdeTitle) { action = createKdeTitle(action, parent); } return action; } /** * Update mutable properties of an action. A property may be listed in * requestedProperties but not in map, this means we should use the default value * for this property. * * @param action the action to update * @param map holds the property values * @param requestedProperties which properties has been requested */ void updateAction(QAction *action, const QVariantMap &map, const QStringList &requestedProperties) { Q_FOREACH(const QString &key, requestedProperties) { updateActionProperty(action, key, map.value(key)); } } void updateActionProperty(QAction *action, const QString &key, const QVariant &value) { if (key == QLatin1String("label")) { updateActionLabel(action, value); } else if (key == QLatin1String("enabled")) { updateActionEnabled(action, value); } else if (key == QLatin1String("toggle-state")) { updateActionChecked(action, value); } else if (key == QLatin1String("icon-name")) { updateActionIconByName(action, value); } else if (key == QLatin1String("icon-data")) { updateActionIconByData(action, value); } else if (key == QLatin1String("visible")) { updateActionVisible(action, value); } else if (key == QLatin1String("shortcut")) { updateActionShortcut(action, value); } else { qWarning() << "Unhandled property update" << key; } } void updateActionLabel(QAction *action, const QVariant &value) { QString text = swapMnemonicChar(value.toString(), '_', '&'); action->setText(text); } void updateActionEnabled(QAction *action, const QVariant &value) { action->setEnabled(value.isValid() ? value.toBool(): true); } void updateActionChecked(QAction *action, const QVariant &value) { if (action->isCheckable() && value.isValid()) { action->setChecked(value.toInt() == 1); } } void updateActionIconByName(QAction *action, const QVariant &value) { const QString iconName = value.toString(); const QString previous = action->property(DBUSMENU_PROPERTY_ICON_NAME).toString(); if (previous == iconName) { return; } action->setProperty(DBUSMENU_PROPERTY_ICON_NAME, iconName); if (iconName.isEmpty()) { action->setIcon(QIcon()); return; } action->setIcon(q->iconForName(iconName)); } void updateActionIconByData(QAction *action, const QVariant &value) { const QByteArray data = value.toByteArray(); uint dataHash = qHash(data); uint previousDataHash = action->property(DBUSMENU_PROPERTY_ICON_DATA_HASH).toUInt(); if (previousDataHash == dataHash) { return; } action->setProperty(DBUSMENU_PROPERTY_ICON_DATA_HASH, dataHash); QPixmap pix; if (!pix.loadFromData(data)) { qWarning() << "Failed to decode icon-data property for action" << action->text(); action->setIcon(QIcon()); return; } action->setIcon(QIcon(pix)); } void updateActionVisible(QAction *action, const QVariant &value) { action->setVisible(value.isValid() ? value.toBool() : true); } void updateActionShortcut(QAction *action, const QVariant &value) { QDBusArgument arg = value.value<QDBusArgument>(); DBusMenuShortcut dmShortcut; arg >> dmShortcut; QKeySequence keySequence = dmShortcut.toKeySequence(); action->setShortcut(keySequence); } QMenu *menuForId(int id) const { if (id == 0) { return q->menu(); } QAction *action = m_actionForId.value(id); if (!action) { return 0; } return action->menu(); } void slotItemsPropertiesUpdated(const DBusMenuItemList &updatedList, const DBusMenuItemKeysList &removedList); void sendEvent(int id, const QString &eventId) { m_interface->Event(id, eventId, QDBusVariant(QString()), 0u); } }; DBusMenuImporter::DBusMenuImporter(const QString &service, const QString &path, QObject *parent) : QObject(parent) , d(new DBusMenuImporterPrivate) { DBusMenuTypes_register(); d->q = this; d->m_interface = new DBusMenuInterface(service, path, QDBusConnection::sessionBus(), this); d->m_menu = 0; d->m_pendingLayoutUpdateTimer = new QTimer(this); d->m_pendingLayoutUpdateTimer->setSingleShot(true); connect(d->m_pendingLayoutUpdateTimer, &QTimer::timeout, this, &DBusMenuImporter::processPendingLayoutUpdates); connect(d->m_interface, &DBusMenuInterface::LayoutUpdated, this, &DBusMenuImporter::slotLayoutUpdated); connect(d->m_interface, &DBusMenuInterface::ItemActivationRequested, this, &DBusMenuImporter::slotItemActivationRequested); connect(d->m_interface, &DBusMenuInterface::ItemsPropertiesUpdated, this, [this](const DBusMenuItemList &updatedList, const DBusMenuItemKeysList &removedList) { d->slotItemsPropertiesUpdated(updatedList, removedList); }); d->refresh(0); } DBusMenuImporter::~DBusMenuImporter() { // Do not use "delete d->m_menu": even if we are being deleted we should // leave enough time for the menu to finish what it was doing, for example // if it was being displayed. d->m_menu->deleteLater(); delete d; } void DBusMenuImporter::slotLayoutUpdated(uint revision, int parentId) { Q_UNUSED(revision) if (d->m_idsRefreshedByAboutToShow.remove(parentId)) { return; } d->m_pendingLayoutUpdates << parentId; if (!d->m_pendingLayoutUpdateTimer->isActive()) { d->m_pendingLayoutUpdateTimer->start(); } } void DBusMenuImporter::processPendingLayoutUpdates() { QSet<int> ids = d->m_pendingLayoutUpdates; d->m_pendingLayoutUpdates.clear(); Q_FOREACH(int id, ids) { d->refresh(id); } } QMenu *DBusMenuImporter::menu() const { if (!d->m_menu) { d->m_menu = d->createMenu(0); } return d->m_menu; } void DBusMenuImporterPrivate::slotItemsPropertiesUpdated(const DBusMenuItemList &updatedList, const DBusMenuItemKeysList &removedList) { Q_FOREACH(const DBusMenuItem &item, updatedList) { QAction *action = m_actionForId.value(item.id); if (!action) { // We don't know this action. It probably is in a menu we haven't fetched yet. continue; } QVariantMap::ConstIterator it = item.properties.constBegin(), end = item.properties.constEnd(); for(; it != end; ++it) { updateActionProperty(action, it.key(), it.value()); } } Q_FOREACH(const DBusMenuItemKeys &item, removedList) { QAction *action = m_actionForId.value(item.id); if (!action) { // We don't know this action. It probably is in a menu we haven't fetched yet. continue; } Q_FOREACH(const QString &key, item.properties) { updateActionProperty(action, key, QVariant()); } } } void DBusMenuImporter::slotItemActivationRequested(int id, uint /*timestamp*/) { QAction *action = d->m_actionForId.value(id); DMRETURN_IF_FAIL(action); actionActivationRequested(action); } void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher) { int parentId = watcher->property(DBUSMENU_PROPERTY_ID).toInt(); watcher->deleteLater(); QMenu *menu = d->menuForId(parentId); QDBusPendingReply<uint, DBusMenuLayoutItem> reply = *watcher; if (!reply.isValid()) { qWarning() << reply.error().message(); if (menu) { emit menuUpdated(menu); } return; } #ifdef BENCHMARK DMDEBUG << "- items received:" << sChrono.elapsed() << "ms"; #endif DBusMenuLayoutItem rootItem = reply.argumentAt<1>(); if (!menu) { qWarning() << "No menu for id" << parentId; return; } //remove outdated actions QSet<int> newDBusMenuItemIds; newDBusMenuItemIds.reserve(rootItem.children.count()); for (const DBusMenuLayoutItem &item: rootItem.children) { newDBusMenuItemIds << item.id; } for (QAction *action: menu->actions()) { int id = action->property(DBUSMENU_PROPERTY_ID).toInt(); if (! newDBusMenuItemIds.contains(id)) { action->deleteLater(); d->m_actionForId.remove(id); } } //insert or update new actions into our menu for (const DBusMenuLayoutItem &dbusMenuItem: rootItem.children) { DBusMenuImporterPrivate::ActionForId::Iterator it = d->m_actionForId.find(dbusMenuItem.id); QAction *action = nullptr; if (it == d->m_actionForId.end()) { int id = dbusMenuItem.id; action = d->createAction(id, dbusMenuItem.properties, menu); d->m_actionForId.insert(id, action); connect(action, &QObject::destroyed, this, [this, id]() { d->m_actionForId.remove(id); }); connect(action, &QAction::triggered, this, [action, id, this]() { sendClickedEvent(id); }); if (action->menu()) { auto menu = action->menu(); connect(menu, &QMenu::aboutToShow, this, [menu, this]() { updateMenu(menu); }); } menu->addAction(action); } else { action = *it; QStringList filteredKeys = dbusMenuItem.properties.keys(); filteredKeys.removeOne("type"); filteredKeys.removeOne("toggle-type"); filteredKeys.removeOne("children-display"); d->updateAction(*it, dbusMenuItem.properties, filteredKeys); } } emit menuUpdated(menu); } void DBusMenuImporter::sendClickedEvent(int id) { d->sendEvent(id, QStringLiteral("clicked")); } void DBusMenuImporter::updateMenu() { updateMenu(DBusMenuImporter::menu()); } void DBusMenuImporter::updateMenu(QMenu * menu) { Q_ASSERT(menu); QAction *action = menu->menuAction(); Q_ASSERT(action); int id = action->property(DBUSMENU_PROPERTY_ID).toInt(); auto call = d->m_interface->AboutToShow(id); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this); watcher->setProperty(DBUSMENU_PROPERTY_ID, id); connect(watcher, &QDBusPendingCallWatcher::finished, this, &DBusMenuImporter::slotAboutToShowDBusCallFinished); } void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher *watcher) { int id = watcher->property(DBUSMENU_PROPERTY_ID).toInt(); watcher->deleteLater(); QMenu *menu = d->menuForId(id); if (!menu) { return; } QDBusPendingReply<bool> reply = *watcher; if (reply.isError()) { qWarning() << "Call to AboutToShow() failed:" << reply.error().message(); menuUpdated(menu); return; } //Note, this isn't used by Qt's QPT - but we get a LayoutChanged emitted before //this returns, which equates to the same thing bool needRefresh = reply.argumentAt<0>(); if (needRefresh || menu->actions().isEmpty()) { d->m_idsRefreshedByAboutToShow << id; d->refresh(id); } else if (menu) { menuUpdated(menu); } } void DBusMenuImporter::slotMenuAboutToHide() { QMenu *menu = qobject_cast<QMenu*>(sender()); Q_ASSERT(menu); QAction *action = menu->menuAction(); Q_ASSERT(action); int id = action->property(DBUSMENU_PROPERTY_ID).toInt(); d->sendEvent(id, QStringLiteral("closed")); } void DBusMenuImporter::slotMenuAboutToShow() { QMenu *menu = qobject_cast<QMenu*>(sender()); Q_ASSERT(menu); QAction *action = menu->menuAction(); Q_ASSERT(action); int id = action->property(DBUSMENU_PROPERTY_ID).toInt(); d->sendEvent(id, QStringLiteral("opened")); } QMenu *DBusMenuImporter::createMenu(QWidget *parent) { return new QMenu(parent); } QIcon DBusMenuImporter::iconForName(const QString &/*name*/) { return QIcon(); } #include "moc_dbusmenuimporter.cpp"
kotelnik/plasma-applet-active-window-control
plugin/libdbusmenuqt/dbusmenuimporter.cpp
C++
gpl-2.0
16,939
/**************************************************************************** ** Meta object code from reading C++ file 'SignalColor.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../../Source Files/SignalType/SignalColor.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'SignalColor.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.5.1. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE struct qt_meta_stringdata_SignalColor_t { QByteArrayData data[18]; char stringdata0[115]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_SignalColor_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_SignalColor_t qt_meta_stringdata_SignalColor = { { QT_MOC_LITERAL(0, 0, 11), // "SignalColor" QT_MOC_LITERAL(1, 12, 12), // "colorChanged" QT_MOC_LITERAL(2, 25, 0), // "" QT_MOC_LITERAL(3, 26, 8), // "RChanged" QT_MOC_LITERAL(4, 35, 1), // "r" QT_MOC_LITERAL(5, 37, 8), // "GChanged" QT_MOC_LITERAL(6, 46, 1), // "g" QT_MOC_LITERAL(7, 48, 8), // "BChanged" QT_MOC_LITERAL(8, 57, 1), // "b" QT_MOC_LITERAL(9, 59, 8), // "AChanged" QT_MOC_LITERAL(10, 68, 1), // "a" QT_MOC_LITERAL(11, 70, 8), // "setColor" QT_MOC_LITERAL(12, 79, 9), // "sf::Color" QT_MOC_LITERAL(13, 89, 5), // "color" QT_MOC_LITERAL(14, 95, 4), // "setR" QT_MOC_LITERAL(15, 100, 4), // "setG" QT_MOC_LITERAL(16, 105, 4), // "setB" QT_MOC_LITERAL(17, 110, 4) // "setA" }, "SignalColor\0colorChanged\0\0RChanged\0r\0" "GChanged\0g\0BChanged\0b\0AChanged\0a\0" "setColor\0sf::Color\0color\0setR\0setG\0" "setB\0setA" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_SignalColor[] = { // content: 7, // revision 0, // classname 0, 0, // classinfo 11, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 5, // signalCount // signals: name, argc, parameters, tag, flags 1, 0, 69, 2, 0x06 /* Public */, 3, 1, 70, 2, 0x06 /* Public */, 5, 1, 73, 2, 0x06 /* Public */, 7, 1, 76, 2, 0x06 /* Public */, 9, 1, 79, 2, 0x06 /* Public */, // slots: name, argc, parameters, tag, flags 11, 1, 82, 2, 0x0a /* Public */, 11, 4, 85, 2, 0x0a /* Public */, 14, 1, 94, 2, 0x0a /* Public */, 15, 1, 97, 2, 0x0a /* Public */, 16, 1, 100, 2, 0x0a /* Public */, 17, 1, 103, 2, 0x0a /* Public */, // signals: parameters QMetaType::Void, QMetaType::Void, QMetaType::Int, 4, QMetaType::Void, QMetaType::Int, 6, QMetaType::Void, QMetaType::Int, 8, QMetaType::Void, QMetaType::Int, 10, // slots: parameters QMetaType::Void, 0x80000000 | 12, 13, QMetaType::Void, QMetaType::Int, QMetaType::Int, QMetaType::Int, QMetaType::Int, 4, 6, 8, 10, QMetaType::Void, QMetaType::Int, 4, QMetaType::Void, QMetaType::Int, 6, QMetaType::Void, QMetaType::Int, 8, QMetaType::Void, QMetaType::Int, 10, 0 // eod }; void SignalColor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { SignalColor *_t = static_cast<SignalColor *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->colorChanged(); break; case 1: _t->RChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: _t->GChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: _t->BChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 4: _t->AChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 5: _t->setColor((*reinterpret_cast< const sf::Color(*)>(_a[1]))); break; case 6: _t->setColor((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3])),(*reinterpret_cast< int(*)>(_a[4]))); break; case 7: _t->setR((*reinterpret_cast< int(*)>(_a[1]))); break; case 8: _t->setG((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: _t->setB((*reinterpret_cast< int(*)>(_a[1]))); break; case 10: _t->setA((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } } else if (_c == QMetaObject::IndexOfMethod) { int *result = reinterpret_cast<int *>(_a[0]); void **func = reinterpret_cast<void **>(_a[1]); { typedef void (SignalColor::*_t)() const; if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&SignalColor::colorChanged)) { *result = 0; } } { typedef void (SignalColor::*_t)(int ) const; if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&SignalColor::RChanged)) { *result = 1; } } { typedef void (SignalColor::*_t)(int ) const; if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&SignalColor::GChanged)) { *result = 2; } } { typedef void (SignalColor::*_t)(int ) const; if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&SignalColor::BChanged)) { *result = 3; } } { typedef void (SignalColor::*_t)(int ) const; if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&SignalColor::AChanged)) { *result = 4; } } } } const QMetaObject SignalColor::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_SignalColor.data, qt_meta_data_SignalColor, qt_static_metacall, Q_NULLPTR, Q_NULLPTR} }; const QMetaObject *SignalColor::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *SignalColor::qt_metacast(const char *_clname) { if (!_clname) return Q_NULLPTR; if (!strcmp(_clname, qt_meta_stringdata_SignalColor.stringdata0)) return static_cast<void*>(const_cast< SignalColor*>(this)); return QObject::qt_metacast(_clname); } int SignalColor::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 11) qt_static_metacall(this, _c, _id, _a); _id -= 11; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 11) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 11; } return _id; } // SIGNAL 0 void SignalColor::colorChanged()const { QMetaObject::activate(const_cast< SignalColor *>(this), &staticMetaObject, 0, Q_NULLPTR); } // SIGNAL 1 void SignalColor::RChanged(int _t1)const { void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(const_cast< SignalColor *>(this), &staticMetaObject, 1, _a); } // SIGNAL 2 void SignalColor::GChanged(int _t1)const { void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(const_cast< SignalColor *>(this), &staticMetaObject, 2, _a); } // SIGNAL 3 void SignalColor::BChanged(int _t1)const { void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(const_cast< SignalColor *>(this), &staticMetaObject, 3, _a); } // SIGNAL 4 void SignalColor::AChanged(int _t1)const { void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(const_cast< SignalColor *>(this), &staticMetaObject, 4, _a); } QT_END_MOC_NAMESPACE
FlorianPO/SpriteEditor
SQT/GeneratedFiles/Release/moc_SignalColor.cpp
C++
gpl-2.0
8,228
<div> <h1>Добавление организации</h1> <p>{{ message}}</p> <form role="form" name="myForm"> <div class="form-group" ng-class="{error: myForm.name.$invalid}"> <label>Название:</label> <div> <input name="name" ng-model="org.name" type="text" class="form-control" placeholder="Название организации" required/> <span ng-show="myForm.name.$dirty && myForm.name.$invalid" class="help-inline">Название обязательно</span> </div> </div> <div class="form-group" ng-class="{error: myForm.url.$invalid}"> <label>URL:</label> <div> <input name="url" ng-model="org.url" type="text" class="form-control" placeholder="URL адрес" required/> <span ng-show="myForm.url.$dirty && myForm.url.$invalid" class="help-inline">URL обязательно</span> </div> </div> <div class="form-group" ng-class="{error: myForm.login.$invalid}"> <label>Логин:</label> <div> <input name="login" ng-model="org.login" type="text" class="form-control" placeholder="Логин" required/> <span ng-show="myForm.login.$dirty && myForm.login.$invalid" class="help-inline">Логин обязателен</span> </div> </div> <div class="form-group" ng-class="{error: myForm.password.$invalid}"> <label>Пароль:</label> <div> <input name="password" ng-model="org.password" type="text" class="form-control" placeholder="Пароль" required/> <span ng-show="myForm.password.$dirty && myForm.password.$invalid" class="help-inline">Пароль обязателен</span> </div> </div> <div class="form-group" ng-class="{error: myForm.dogovor.$invalid}"> <label>Номер договора:</label> <div> <input name="dogovor" ng-model="org.dogovor" type="text" class="form-control" placeholder="Номер договора" required/> <span ng-show="myForm.dogovor.$dirty && myForm.dogovor.$invalid" class="help-inline">Номер договора обязателен</span> </div> </div> <div class="form-group" ng-class="{error: myForm.info.$invalid}"> <label>Описание:</label> <div> <input name="info" ng-model="org.info" type="text" class="form-control" placeholder="Описание" required/> <span ng-show="myForm.info.$dirty && myForm.info.$invalid" class="help-inline">Описание</span> </div> </div> <a href="#/org/index" class="btn btn-default">Cancel</a> <button ng-click="createOrg(org);" ng-disabled="myForm.$invalid" type="submit" class="btn btn-default">Submit </button> </form> </div>
GT-Volk/DomainList
client/views/org/create.html
HTML
gpl-2.0
3,045
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>AdminLTE | Dashboard</title> <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <!-- Ionicons --> <link href="//code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" rel="stylesheet" type="text/css" /> <!-- Theme style --> <link href="../../css/AdminLTE.css" rel="stylesheet" type="text/css" /> <!-- demo style --> <style type="text/css"> /* FROM HTTP://WWW.GETBOOTSTRAP.COM * Glyphicons * * Special styles for displaying the icons and their classes in the docs. */ .bs-glyphicons { padding-left: 0; padding-bottom: 1px; margin-bottom: 20px; list-style: none; overflow: hidden; } .bs-glyphicons li { float: left; width: 25%; height: 115px; padding: 10px; margin: 0 -1px -1px 0; font-size: 12px; line-height: 1.4; text-align: center; border: 1px solid #ddd; } .bs-glyphicons .glyphicon { margin-top: 5px; margin-bottom: 10px; font-size: 24px; } .bs-glyphicons .glyphicon-class { display: block; text-align: center; word-wrap: break-word; /* Help out IE10+ with class names */ } .bs-glyphicons li:hover { background-color: rgba(86,61,124,.1); } @media (min-width: 768px) { .bs-glyphicons li { width: 12.5%; } } </style> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> </head> <body class="skin-blue"> <!-- header logo: style can be found in header.less --> <header class="header"> <a href="../../index.html" class="logo"> <!-- Add the class icon to your logo image or logo icon to add the margining --> AdminLTE </a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top" role="navigation"> <!-- Sidebar toggle button--> <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a> <div class="navbar-right"> <ul class="nav navbar-nav"> <!-- Messages: style can be found in dropdown.less--> <li class="dropdown messages-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-envelope"></i> <span class="label label-success">4</span> </a> <ul class="dropdown-menu"> <li class="header">You have 4 messages</li> <li> <!-- inner menu: contains the actual data --> <ul class="menu"> <li><!-- start message --> <a href="#"> <div class="pull-left"> <img src="../../img/bf_skinner.jpg" class="img-circle" alt="User Image"/> </div> <h4> Support Team <small><i class="fa fa-clock-o"></i> 5 mins</small> </h4> <p>Why not buy a new awesome theme?</p> </a> </li><!-- end message --> <li> <a href="#"> <div class="pull-left"> <img src="../../img/avatar2.png" class="img-circle" alt="user image"/> </div> <h4> AdminLTE Design Team <small><i class="fa fa-clock-o"></i> 2 hours</small> </h4> <p>Why not buy a new awesome theme?</p> </a> </li> <li> <a href="#"> <div class="pull-left"> <img src="../../img/avatar.png" class="img-circle" alt="user image"/> </div> <h4> Developers <small><i class="fa fa-clock-o"></i> Today</small> </h4> <p>Why not buy a new awesome theme?</p> </a> </li> <li> <a href="#"> <div class="pull-left"> <img src="../../img/avatar2.png" class="img-circle" alt="user image"/> </div> <h4> Sales Department <small><i class="fa fa-clock-o"></i> Yesterday</small> </h4> <p>Why not buy a new awesome theme?</p> </a> </li> <li> <a href="#"> <div class="pull-left"> <img src="../../img/avatar.png" class="img-circle" alt="user image"/> </div> <h4> Reviewers <small><i class="fa fa-clock-o"></i> 2 days</small> </h4> <p>Why not buy a new awesome theme?</p> </a> </li> </ul> </li> <li class="footer"><a href="#">See All Messages</a></li> </ul> </li> <!-- Notifications: style can be found in dropdown.less --> <li class="dropdown notifications-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-warning"></i> <span class="label label-warning">10</span> </a> <ul class="dropdown-menu"> <li class="header">You have 10 notifications</li> <li> <!-- inner menu: contains the actual data --> <ul class="menu"> <li> <a href="#"> <i class="ion ion-ios7-people info"></i> 5 new members joined today </a> </li> <li> <a href="#"> <i class="fa fa-warning danger"></i> Very long description here that may not fit into the page and may cause design problems </a> </li> <li> <a href="#"> <i class="fa fa-users warning"></i> 5 new members joined </a> </li> <li> <a href="#"> <i class="ion ion-ios7-cart success"></i> 25 sales made </a> </li> <li> <a href="#"> <i class="ion ion-ios7-person danger"></i> You changed your username </a> </li> </ul> </li> <li class="footer"><a href="#">View all</a></li> </ul> </li> <!-- Tasks: style can be found in dropdown.less --> <li class="dropdown tasks-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-tasks"></i> <span class="label label-danger">9</span> </a> <ul class="dropdown-menu"> <li class="header">You have 9 tasks</li> <li> <!-- inner menu: contains the actual data --> <ul class="menu"> <li><!-- Task item --> <a href="#"> <h3> Design some buttons <small class="pull-right">20%</small> </h3> <div class="progress xs"> <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"> <span class="sr-only">20% Complete</span> </div> </div> </a> </li><!-- end task item --> <li><!-- Task item --> <a href="#"> <h3> Create a nice theme <small class="pull-right">40%</small> </h3> <div class="progress xs"> <div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"> <span class="sr-only">40% Complete</span> </div> </div> </a> </li><!-- end task item --> <li><!-- Task item --> <a href="#"> <h3> Some task I need to do <small class="pull-right">60%</small> </h3> <div class="progress xs"> <div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"> <span class="sr-only">60% Complete</span> </div> </div> </a> </li><!-- end task item --> <li><!-- Task item --> <a href="#"> <h3> Make beautiful transitions <small class="pull-right">80%</small> </h3> <div class="progress xs"> <div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"> <span class="sr-only">80% Complete</span> </div> </div> </a> </li><!-- end task item --> </ul> </li> <li class="footer"> <a href="#">View all tasks</a> </li> </ul> </li> <!-- User Account: style can be found in dropdown.less --> <li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="glyphicon glyphicon-user"></i> <span>BF Skinner <i class="caret"></i></span> </a> <ul class="dropdown-menu"> <!-- User image --> <li class="user-header bg-light-blue"> <img src="../../img/bf_skinner.jpg" class="img-circle" alt="User Image" /> <p> BF Skinner - Web Developer <small>Member since Nov. 2012</small> </p> </li> <!-- Menu Body --> <li class="user-body"> <div class="col-xs-4 text-center"> <a href="#">Followers</a> </div> <div class="col-xs-4 text-center"> <a href="#">Sales</a> </div> <div class="col-xs-4 text-center"> <a href="#">Friends</a> </div> </li> <!-- Menu Footer--> <li class="user-footer"> <div class="pull-left"> <a href="#" class="btn btn-default btn-flat">Profile</a> </div> <div class="pull-right"> <a href="#" class="btn btn-default btn-flat">Sign out</a> </div> </li> </ul> </li> </ul> </div> </nav> </header> <div class="wrapper row-offcanvas row-offcanvas-left"> <!-- Left side column. contains the logo and sidebar --> <aside class="left-side sidebar-offcanvas"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <!-- Sidebar user panel --> <div class="user-panel"> <div class="pull-left image"> <img src="../../img/bf_skinner.jpg" class="img-circle" alt="User Image" /> </div> <div class="pull-left info"> <p>Hello, Jane</p> <a href="#"><i class="fa fa-circle text-success"></i> Online</a> </div> </div> <!-- search form --> <form action="#" method="get" class="sidebar-form"> <div class="input-group"> <input type="text" name="q" class="form-control" placeholder="Search..."/> <span class="input-group-btn"> <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button> </span> </div> </form> <!-- /.search form --> <!-- sidebar menu: : style can be found in sidebar.less --> <ul class="sidebar-menu"> <li> <a href="../../index.html"> <i class="fa fa-dashboard"></i> <span>Dashboard</span> </a> </li> <li> <a href="../widgets.html"> <i class="fa fa-th"></i> <span>Widgets</span> <small class="badge pull-right bg-green">new</small> </a> </li> <li class="treeview"> <a href="#"> <i class="fa fa-bar-chart-o"></i> <span>Charts</span> <i class="fa fa-angle-left pull-right"></i> </a> <ul class="treeview-menu"> <li><a href="../charts/morris.html"><i class="fa fa-angle-double-right"></i> Morris</a></li> <li><a href="../charts/flot.html"><i class="fa fa-angle-double-right"></i> Flot</a></li> <li><a href="../charts/inline.html"><i class="fa fa-angle-double-right"></i> Inline charts</a></li> </ul> </li> <li class="treeview active"> <a href="#"> <i class="fa fa-laptop"></i> <span>UI Elements</span> <i class="fa fa-angle-left pull-right"></i> </a> <ul class="treeview-menu"> <li><a href="general.html"><i class="fa fa-angle-double-right"></i> General</a></li> <li class="active"><a href="icons.html"><i class="fa fa-angle-double-right"></i> Icons</a></li> <li><a href="buttons.html"><i class="fa fa-angle-double-right"></i> Buttons</a></li> <li><a href="sliders.html"><i class="fa fa-angle-double-right"></i> Sliders</a></li> <li><a href="timeline.html"><i class="fa fa-angle-double-right"></i> Timeline</a></li> </ul> </li> <li class="treeview"> <a href="#"> <i class="fa fa-edit"></i> <span>Forms</span> <i class="fa fa-angle-left pull-right"></i> </a> <ul class="treeview-menu"> <li><a href="../forms/general.html"><i class="fa fa-angle-double-right"></i> General Elements</a></li> <li><a href="../forms/advanced.html"><i class="fa fa-angle-double-right"></i> Advanced Elements</a></li> <li><a href="../forms/editors.html"><i class="fa fa-angle-double-right"></i> Editors</a></li> </ul> </li> <li class="treeview"> <a href="#"> <i class="fa fa-table"></i> <span>Tables</span> <i class="fa fa-angle-left pull-right"></i> </a> <ul class="treeview-menu"> <li><a href="../tables/simple.html"><i class="fa fa-angle-double-right"></i> Simple tables</a></li> <li><a href="../tables/data.html"><i class="fa fa-angle-double-right"></i> Data tables</a></li> </ul> </li> <li> <a href="../calendar.html"> <i class="fa fa-calendar"></i> <span>Calendar</span> <small class="badge pull-right bg-red">3</small> </a> </li> <li> <a href="../mailbox.html"> <i class="fa fa-envelope"></i> <span>Mailbox</span> <small class="badge pull-right bg-yellow">12</small> </a> </li> <li class="treeview"> <a href="#"> <i class="fa fa-folder"></i> <span>Examples</span> <i class="fa fa-angle-left pull-right"></i> </a> <ul class="treeview-menu"> <li><a href="../examples/invoice.html"><i class="fa fa-angle-double-right"></i> Invoice</a></li> <li><a href="../examples/login.html"><i class="fa fa-angle-double-right"></i> Login</a></li> <li><a href="../examples/register.html"><i class="fa fa-angle-double-right"></i> Register</a></li> <li><a href="../examples/lockscreen.html"><i class="fa fa-angle-double-right"></i> Lockscreen</a></li> <li><a href="../examples/404.html"><i class="fa fa-angle-double-right"></i> 404 Error</a></li> <li><a href="../examples/500.html"><i class="fa fa-angle-double-right"></i> 500 Error</a></li> <li><a href="../examples/blank.html"><i class="fa fa-angle-double-right"></i> Blank Page</a></li> </ul> </li> </ul> </section> <!-- /.sidebar --> </aside> <!-- Right side column. Contains the navbar and content of the page --> <aside class="right-side"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> Icons <small>a set of beautiful icons</small> </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li><a href="#">UI</a></li> <li class="active">Icons</li> </ol> </section> <!-- Main content --> <section class="content"> <div class='row'> <div class='col-xs-12'> <div class="nav-tabs-custom"> <ul class="nav nav-tabs"> <li class="active"><a href="#fa-icons" data-toggle="tab">Font Awesome</a></li> <li><a href="#glyphicons" data-toggle="tab">Glyphicons</a></li> </ul> <div class="tab-content"> <!-- Font Awesome icons --> <div class="tab-pane active" id="fa-icons" > <section id="new"> <h4 class="page-header">11 New Icons in 4.0</h4> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rub"></i> fa-rub</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-ruble"></i> fa-ruble <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rouble"></i> fa-rouble <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pagelines"></i> fa-pagelines</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-stack-exchange"></i> fa-stack-exchange</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-o-right"></i> fa-arrow-circle-o-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-o-left"></i> fa-arrow-circle-o-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-left"></i> fa-caret-square-o-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-left"></i> fa-toggle-left <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dot-circle-o"></i> fa-dot-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-wheelchair"></i> fa-wheelchair</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-vimeo-square"></i> fa-vimeo-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-try"></i> fa-try</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-turkish-lira"></i> fa-turkish-lira <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus-square-o"></i> fa-plus-square-o</div> </div> </section> <section id="web-application"> <h4 class="page-header">Web Application Icons</h4> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-adjust"></i> fa-adjust</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-anchor"></i> fa-anchor</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-archive"></i> fa-archive</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows"></i> fa-arrows</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows-h"></i> fa-arrows-h</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows-v"></i> fa-arrows-v</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-asterisk"></i> fa-asterisk</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-ban"></i> fa-ban</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bar-chart-o"></i> fa-bar-chart-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-barcode"></i> fa-barcode</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bars"></i> fa-bars</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-beer"></i> fa-beer</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bell"></i> fa-bell</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bell-o"></i> fa-bell-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bolt"></i> fa-bolt</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-book"></i> fa-book</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bookmark"></i> fa-bookmark</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bookmark-o"></i> fa-bookmark-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-briefcase"></i> fa-briefcase</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bug"></i> fa-bug</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-building-o"></i> fa-building-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bullhorn"></i> fa-bullhorn</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bullseye"></i> fa-bullseye</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-calendar"></i> fa-calendar</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-calendar-o"></i> fa-calendar-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-camera"></i> fa-camera</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-camera-retro"></i> fa-camera-retro</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-down"></i> fa-caret-square-o-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-left"></i> fa-caret-square-o-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-right"></i> fa-caret-square-o-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-up"></i> fa-caret-square-o-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-certificate"></i> fa-certificate</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-check"></i> fa-check</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-check-circle"></i> fa-check-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-check-circle-o"></i> fa-check-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-check-square"></i> fa-check-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-check-square-o"></i> fa-check-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-circle"></i> fa-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-circle-o"></i> fa-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-clock-o"></i> fa-clock-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cloud"></i> fa-cloud</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cloud-download"></i> fa-cloud-download</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cloud-upload"></i> fa-cloud-upload</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-code"></i> fa-code</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-code-fork"></i> fa-code-fork</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-coffee"></i> fa-coffee</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cog"></i> fa-cog</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cogs"></i> fa-cogs</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-comment"></i> fa-comment</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-comment-o"></i> fa-comment-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-comments"></i> fa-comments</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-comments-o"></i> fa-comments-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-compass"></i> fa-compass</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-credit-card"></i> fa-credit-card</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-crop"></i> fa-crop</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-crosshairs"></i> fa-crosshairs</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cutlery"></i> fa-cutlery</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dashboard"></i> fa-dashboard <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-desktop"></i> fa-desktop</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dot-circle-o"></i> fa-dot-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-download"></i> fa-download</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-edit"></i> fa-edit <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-ellipsis-h"></i> fa-ellipsis-h</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-ellipsis-v"></i> fa-ellipsis-v</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-envelope"></i> fa-envelope</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-envelope-o"></i> fa-envelope-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-eraser"></i> fa-eraser</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-exchange"></i> fa-exchange</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-exclamation"></i> fa-exclamation</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-exclamation-circle"></i> fa-exclamation-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-exclamation-triangle"></i> fa-exclamation-triangle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-external-link"></i> fa-external-link</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-external-link-square"></i> fa-external-link-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-eye"></i> fa-eye</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-eye-slash"></i> fa-eye-slash</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-female"></i> fa-female</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-fighter-jet"></i> fa-fighter-jet</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-film"></i> fa-film</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-filter"></i> fa-filter</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-fire"></i> fa-fire</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-fire-extinguisher"></i> fa-fire-extinguisher</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-flag"></i> fa-flag</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-flag-checkered"></i> fa-flag-checkered</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-flag-o"></i> fa-flag-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-flash"></i> fa-flash <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-flask"></i> fa-flask</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-folder"></i> fa-folder</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-folder-o"></i> fa-folder-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-folder-open"></i> fa-folder-open</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-folder-open-o"></i> fa-folder-open-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-frown-o"></i> fa-frown-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-gamepad"></i> fa-gamepad</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-gavel"></i> fa-gavel</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-gear"></i> fa-gear <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-gears"></i> fa-gears <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-gift"></i> fa-gift</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-glass"></i> fa-glass</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-globe"></i> fa-globe</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-group"></i> fa-group <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-hdd-o"></i> fa-hdd-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-headphones"></i> fa-headphones</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-heart"></i> fa-heart</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-heart-o"></i> fa-heart-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-home"></i> fa-home</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-inbox"></i> fa-inbox</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-info"></i> fa-info</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-info-circle"></i> fa-info-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-key"></i> fa-key</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-keyboard-o"></i> fa-keyboard-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-laptop"></i> fa-laptop</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-leaf"></i> fa-leaf</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-legal"></i> fa-legal <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-lemon-o"></i> fa-lemon-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-level-down"></i> fa-level-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-level-up"></i> fa-level-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-lightbulb-o"></i> fa-lightbulb-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-location-arrow"></i> fa-location-arrow</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-lock"></i> fa-lock</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-magic"></i> fa-magic</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-magnet"></i> fa-magnet</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-mail-forward"></i> fa-mail-forward <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-mail-reply"></i> fa-mail-reply <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-mail-reply-all"></i> fa-mail-reply-all</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-male"></i> fa-male</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-map-marker"></i> fa-map-marker</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-meh-o"></i> fa-meh-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-microphone"></i> fa-microphone</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-microphone-slash"></i> fa-microphone-slash</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-minus"></i> fa-minus</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-minus-circle"></i> fa-minus-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-minus-square"></i> fa-minus-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-minus-square-o"></i> fa-minus-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-mobile"></i> fa-mobile</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-mobile-phone"></i> fa-mobile-phone <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-money"></i> fa-money</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-moon-o"></i> fa-moon-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-music"></i> fa-music</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pencil"></i> fa-pencil</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pencil-square"></i> fa-pencil-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pencil-square-o"></i> fa-pencil-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-phone"></i> fa-phone</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-phone-square"></i> fa-phone-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-picture-o"></i> fa-picture-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plane"></i> fa-plane</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus"></i> fa-plus</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus-circle"></i> fa-plus-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus-square"></i> fa-plus-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus-square-o"></i> fa-plus-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-power-off"></i> fa-power-off</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-print"></i> fa-print</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-puzzle-piece"></i> fa-puzzle-piece</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-qrcode"></i> fa-qrcode</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-question"></i> fa-question</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-question-circle"></i> fa-question-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-quote-left"></i> fa-quote-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-quote-right"></i> fa-quote-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-random"></i> fa-random</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-refresh"></i> fa-refresh</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-reply"></i> fa-reply</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-reply-all"></i> fa-reply-all</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-retweet"></i> fa-retweet</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-road"></i> fa-road</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rocket"></i> fa-rocket</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rss"></i> fa-rss</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rss-square"></i> fa-rss-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-search"></i> fa-search</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-search-minus"></i> fa-search-minus</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-search-plus"></i> fa-search-plus</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-share"></i> fa-share</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-share-square"></i> fa-share-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-share-square-o"></i> fa-share-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-shield"></i> fa-shield</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-shopping-cart"></i> fa-shopping-cart</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sign-in"></i> fa-sign-in</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sign-out"></i> fa-sign-out</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-signal"></i> fa-signal</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sitemap"></i> fa-sitemap</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-smile-o"></i> fa-smile-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort"></i> fa-sort</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-alpha-asc"></i> fa-sort-alpha-asc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-alpha-desc"></i> fa-sort-alpha-desc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-amount-asc"></i> fa-sort-amount-asc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-amount-desc"></i> fa-sort-amount-desc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-asc"></i> fa-sort-asc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-desc"></i> fa-sort-desc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-down"></i> fa-sort-down <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-numeric-asc"></i> fa-sort-numeric-asc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-numeric-desc"></i> fa-sort-numeric-desc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sort-up"></i> fa-sort-up <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-spinner"></i> fa-spinner</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-square"></i> fa-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-square-o"></i> fa-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-star"></i> fa-star</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-star-half"></i> fa-star-half</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-star-half-empty"></i> fa-star-half-empty <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-star-half-full"></i> fa-star-half-full <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-star-half-o"></i> fa-star-half-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-star-o"></i> fa-star-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-subscript"></i> fa-subscript</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-suitcase"></i> fa-suitcase</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-sun-o"></i> fa-sun-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-superscript"></i> fa-superscript</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tablet"></i> fa-tablet</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tachometer"></i> fa-tachometer</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tag"></i> fa-tag</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tags"></i> fa-tags</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tasks"></i> fa-tasks</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-terminal"></i> fa-terminal</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-thumb-tack"></i> fa-thumb-tack</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-thumbs-down"></i> fa-thumbs-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-thumbs-o-down"></i> fa-thumbs-o-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-thumbs-o-up"></i> fa-thumbs-o-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-thumbs-up"></i> fa-thumbs-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-ticket"></i> fa-ticket</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-times"></i> fa-times</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-times-circle"></i> fa-times-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-times-circle-o"></i> fa-times-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tint"></i> fa-tint</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-down"></i> fa-toggle-down <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-left"></i> fa-toggle-left <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-right"></i> fa-toggle-right <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-up"></i> fa-toggle-up <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-trash-o"></i> fa-trash-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-trophy"></i> fa-trophy</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-truck"></i> fa-truck</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-umbrella"></i> fa-umbrella</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-unlock"></i> fa-unlock</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-unlock-alt"></i> fa-unlock-alt</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-unsorted"></i> fa-unsorted <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-upload"></i> fa-upload</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-user"></i> fa-user</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-users"></i> fa-users</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-video-camera"></i> fa-video-camera</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-volume-down"></i> fa-volume-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-volume-off"></i> fa-volume-off</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-volume-up"></i> fa-volume-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-warning"></i> fa-warning <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-wheelchair"></i> fa-wheelchair</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-wrench"></i> fa-wrench</div> </div> </section> <section id="form-control"> <h4 class="page-header">Form Control Icons</h4> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-check-square"></i> fa-check-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-check-square-o"></i> fa-check-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-circle"></i> fa-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-circle-o"></i> fa-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dot-circle-o"></i> fa-dot-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-minus-square"></i> fa-minus-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-minus-square-o"></i> fa-minus-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus-square"></i> fa-plus-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus-square-o"></i> fa-plus-square-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-square"></i> fa-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-square-o"></i> fa-square-o</div> </div> </section> <section id="currency"> <h4 class="page-header">Currency Icons</h4> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bitcoin"></i> fa-bitcoin <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-btc"></i> fa-btc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cny"></i> fa-cny <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dollar"></i> fa-dollar <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-eur"></i> fa-eur</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-euro"></i> fa-euro <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-gbp"></i> fa-gbp</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-inr"></i> fa-inr</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-jpy"></i> fa-jpy</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-krw"></i> fa-krw</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-money"></i> fa-money</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rmb"></i> fa-rmb <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rouble"></i> fa-rouble <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rub"></i> fa-rub</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-ruble"></i> fa-ruble <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rupee"></i> fa-rupee <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-try"></i> fa-try</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-turkish-lira"></i> fa-turkish-lira <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-usd"></i> fa-usd</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-won"></i> fa-won <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-yen"></i> fa-yen <span class="text-muted">(alias)</span></div> </div> </section> <section id="text-editor"> <h4 class="page-header">Text Editor Icons</h4> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-align-center"></i> fa-align-center</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-align-justify"></i> fa-align-justify</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-align-left"></i> fa-align-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-align-right"></i> fa-align-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bold"></i> fa-bold</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chain"></i> fa-chain <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chain-broken"></i> fa-chain-broken</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-clipboard"></i> fa-clipboard</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-columns"></i> fa-columns</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-copy"></i> fa-copy <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-cut"></i> fa-cut <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dedent"></i> fa-dedent <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-eraser"></i> fa-eraser</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-file"></i> fa-file</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-file-o"></i> fa-file-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-file-text"></i> fa-file-text</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-file-text-o"></i> fa-file-text-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-files-o"></i> fa-files-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-floppy-o"></i> fa-floppy-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-font"></i> fa-font</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-indent"></i> fa-indent</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-italic"></i> fa-italic</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-link"></i> fa-link</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-list"></i> fa-list</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-list-alt"></i> fa-list-alt</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-list-ol"></i> fa-list-ol</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-list-ul"></i> fa-list-ul</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-outdent"></i> fa-outdent</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-paperclip"></i> fa-paperclip</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-paste"></i> fa-paste <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-repeat"></i> fa-repeat</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rotate-left"></i> fa-rotate-left <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-rotate-right"></i> fa-rotate-right <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-save"></i> fa-save <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-scissors"></i> fa-scissors</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-strikethrough"></i> fa-strikethrough</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-table"></i> fa-table</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-text-height"></i> fa-text-height</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-text-width"></i> fa-text-width</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-th"></i> fa-th</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-th-large"></i> fa-th-large</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-th-list"></i> fa-th-list</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-underline"></i> fa-underline</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-undo"></i> fa-undo</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-unlink"></i> fa-unlink <span class="text-muted">(alias)</span></div> </div> </section> <section id="directional"> <h4 class="page-header">Directional Icons</h4> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-double-down"></i> fa-angle-double-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-double-left"></i> fa-angle-double-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-double-right"></i> fa-angle-double-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-double-up"></i> fa-angle-double-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-down"></i> fa-angle-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-left"></i> fa-angle-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-right"></i> fa-angle-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-angle-up"></i> fa-angle-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-down"></i> fa-arrow-circle-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-left"></i> fa-arrow-circle-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-o-down"></i> fa-arrow-circle-o-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-o-left"></i> fa-arrow-circle-o-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-o-right"></i> fa-arrow-circle-o-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-o-up"></i> fa-arrow-circle-o-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-right"></i> fa-arrow-circle-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-circle-up"></i> fa-arrow-circle-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-down"></i> fa-arrow-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-left"></i> fa-arrow-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-right"></i> fa-arrow-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrow-up"></i> fa-arrow-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows"></i> fa-arrows</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows-alt"></i> fa-arrows-alt</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows-h"></i> fa-arrows-h</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows-v"></i> fa-arrows-v</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-down"></i> fa-caret-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-left"></i> fa-caret-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-right"></i> fa-caret-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-down"></i> fa-caret-square-o-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-left"></i> fa-caret-square-o-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-right"></i> fa-caret-square-o-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-square-o-up"></i> fa-caret-square-o-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-caret-up"></i> fa-caret-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-circle-down"></i> fa-chevron-circle-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-circle-left"></i> fa-chevron-circle-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-circle-right"></i> fa-chevron-circle-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-circle-up"></i> fa-chevron-circle-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-down"></i> fa-chevron-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-left"></i> fa-chevron-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-right"></i> fa-chevron-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-chevron-up"></i> fa-chevron-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-hand-o-down"></i> fa-hand-o-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-hand-o-left"></i> fa-hand-o-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-hand-o-right"></i> fa-hand-o-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-hand-o-up"></i> fa-hand-o-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-long-arrow-down"></i> fa-long-arrow-down</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-long-arrow-left"></i> fa-long-arrow-left</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-long-arrow-right"></i> fa-long-arrow-right</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-long-arrow-up"></i> fa-long-arrow-up</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-down"></i> fa-toggle-down <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-left"></i> fa-toggle-left <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-right"></i> fa-toggle-right <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-toggle-up"></i> fa-toggle-up <span class="text-muted">(alias)</span></div> </div> </section> <section id="video-player"> <h4 class="page-header">Video Player Icons</h4> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-arrows-alt"></i> fa-arrows-alt</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-backward"></i> fa-backward</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-compress"></i> fa-compress</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-eject"></i> fa-eject</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-expand"></i> fa-expand</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-fast-backward"></i> fa-fast-backward</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-fast-forward"></i> fa-fast-forward</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-forward"></i> fa-forward</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pause"></i> fa-pause</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-play"></i> fa-play</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-play-circle"></i> fa-play-circle</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-play-circle-o"></i> fa-play-circle-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-step-backward"></i> fa-step-backward</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-step-forward"></i> fa-step-forward</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-stop"></i> fa-stop</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-youtube-play"></i> fa-youtube-play</div> </div> </section> <section id="brand"> <h4 class="page-header">Brand Icons</h4> <div class="alert alert-info"> <ul class="margin-bottom-none padding-left-lg"> <li>All brand icons are trademarks of their respective owners.</li> <li>The use of these trademarks does not indicate endorsement of the trademark holder by Font Awesome, nor vice versa.</li> </ul> </div> <div class="row fontawesome-icon-list"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-adn"></i> fa-adn</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-android"></i> fa-android</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-apple"></i> fa-apple</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bitbucket"></i> fa-bitbucket</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bitbucket-square"></i> fa-bitbucket-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-bitcoin"></i> fa-bitcoin <span class="text-muted">(alias)</span></div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-btc"></i> fa-btc</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-css3"></i> fa-css3</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dribbble"></i> fa-dribbble</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-dropbox"></i> fa-dropbox</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-facebook"></i> fa-facebook</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-facebook-square"></i> fa-facebook-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-flickr"></i> fa-flickr</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-foursquare"></i> fa-foursquare</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-github"></i> fa-github</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-github-alt"></i> fa-github-alt</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-github-square"></i> fa-github-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-gittip"></i> fa-gittip</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-google-plus"></i> fa-google-plus</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-google-plus-square"></i> fa-google-plus-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-html5"></i> fa-html5</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-instagram"></i> fa-instagram</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-linkedin"></i> fa-linkedin</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-linkedin-square"></i> fa-linkedin-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-linux"></i> fa-linux</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-maxcdn"></i> fa-maxcdn</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pagelines"></i> fa-pagelines</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pinterest"></i> fa-pinterest</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-pinterest-square"></i> fa-pinterest-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-renren"></i> fa-renren</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-skype"></i> fa-skype</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-stack-exchange"></i> fa-stack-exchange</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-stack-overflow"></i> fa-stack-overflow</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-trello"></i> fa-trello</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tumblr"></i> fa-tumblr</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-tumblr-square"></i> fa-tumblr-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-twitter"></i> fa-twitter</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-twitter-square"></i> fa-twitter-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-vimeo-square"></i> fa-vimeo-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-vk"></i> fa-vk</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-weibo"></i> fa-weibo</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-windows"></i> fa-windows</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-xing"></i> fa-xing</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-xing-square"></i> fa-xing-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-youtube"></i> fa-youtube</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-youtube-play"></i> fa-youtube-play</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-youtube-square"></i> fa-youtube-square</div> </div> </section> <section id="medical"> <h4 class="page-header">Medical Icons</h4> <div class="row"> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-ambulance"></i> fa-ambulance</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-h-square"></i> fa-h-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-hospital-o"></i> fa-hospital-o</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-medkit"></i> fa-medkit</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-plus-square"></i> fa-plus-square</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-stethoscope"></i> fa-stethoscope</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-user-md"></i> fa-user-md</div> <div class="col-md-3 col-sm-4"><i class="fa fa-fw fa-wheelchair"></i> fa-wheelchair</div> </div> </section> </div><!-- /#fa-icons --> <!-- glyphicons--> <div class="tab-pane" id="glyphicons"> <ul class="bs-glyphicons"> <li> <span class="glyphicon glyphicon-adjust"></span> <span class="glyphicon-class">glyphicon glyphicon-adjust</span> </li> <li> <span class="glyphicon glyphicon-align-center"></span> <span class="glyphicon-class">glyphicon glyphicon-align-center</span> </li> <li> <span class="glyphicon glyphicon-align-justify"></span> <span class="glyphicon-class">glyphicon glyphicon-align-justify</span> </li> <li> <span class="glyphicon glyphicon-align-left"></span> <span class="glyphicon-class">glyphicon glyphicon-align-left</span> </li> <li> <span class="glyphicon glyphicon-align-right"></span> <span class="glyphicon-class">glyphicon glyphicon-align-right</span> </li> <li> <span class="glyphicon glyphicon-arrow-down"></span> <span class="glyphicon-class">glyphicon glyphicon-arrow-down</span> </li> <li> <span class="glyphicon glyphicon-arrow-left"></span> <span class="glyphicon-class">glyphicon glyphicon-arrow-left</span> </li> <li> <span class="glyphicon glyphicon-arrow-right"></span> <span class="glyphicon-class">glyphicon glyphicon-arrow-right</span> </li> <li> <span class="glyphicon glyphicon-arrow-up"></span> <span class="glyphicon-class">glyphicon glyphicon-arrow-up</span> </li> <li> <span class="glyphicon glyphicon-asterisk"></span> <span class="glyphicon-class">glyphicon glyphicon-asterisk</span> </li> <li> <span class="glyphicon glyphicon-backward"></span> <span class="glyphicon-class">glyphicon glyphicon-backward</span> </li> <li> <span class="glyphicon glyphicon-ban-circle"></span> <span class="glyphicon-class">glyphicon glyphicon-ban-circle</span> </li> <li> <span class="glyphicon glyphicon-barcode"></span> <span class="glyphicon-class">glyphicon glyphicon-barcode</span> </li> <li> <span class="glyphicon glyphicon-bell"></span> <span class="glyphicon-class">glyphicon glyphicon-bell</span> </li> <li> <span class="glyphicon glyphicon-bold"></span> <span class="glyphicon-class">glyphicon glyphicon-bold</span> </li> <li> <span class="glyphicon glyphicon-book"></span> <span class="glyphicon-class">glyphicon glyphicon-book</span> </li> <li> <span class="glyphicon glyphicon-bookmark"></span> <span class="glyphicon-class">glyphicon glyphicon-bookmark</span> </li> <li> <span class="glyphicon glyphicon-briefcase"></span> <span class="glyphicon-class">glyphicon glyphicon-briefcase</span> </li> <li> <span class="glyphicon glyphicon-bullhorn"></span> <span class="glyphicon-class">glyphicon glyphicon-bullhorn</span> </li> <li> <span class="glyphicon glyphicon-calendar"></span> <span class="glyphicon-class">glyphicon glyphicon-calendar</span> </li> <li> <span class="glyphicon glyphicon-camera"></span> <span class="glyphicon-class">glyphicon glyphicon-camera</span> </li> <li> <span class="glyphicon glyphicon-certificate"></span> <span class="glyphicon-class">glyphicon glyphicon-certificate</span> </li> <li> <span class="glyphicon glyphicon-check"></span> <span class="glyphicon-class">glyphicon glyphicon-check</span> </li> <li> <span class="glyphicon glyphicon-chevron-down"></span> <span class="glyphicon-class">glyphicon glyphicon-chevron-down</span> </li> <li> <span class="glyphicon glyphicon-chevron-left"></span> <span class="glyphicon-class">glyphicon glyphicon-chevron-left</span> </li> <li> <span class="glyphicon glyphicon-chevron-right"></span> <span class="glyphicon-class">glyphicon glyphicon-chevron-right</span> </li> <li> <span class="glyphicon glyphicon-chevron-up"></span> <span class="glyphicon-class">glyphicon glyphicon-chevron-up</span> </li> <li> <span class="glyphicon glyphicon-circle-arrow-down"></span> <span class="glyphicon-class">glyphicon glyphicon-circle-arrow-down</span> </li> <li> <span class="glyphicon glyphicon-circle-arrow-left"></span> <span class="glyphicon-class">glyphicon glyphicon-circle-arrow-left</span> </li> <li> <span class="glyphicon glyphicon-circle-arrow-right"></span> <span class="glyphicon-class">glyphicon glyphicon-circle-arrow-right</span> </li> <li> <span class="glyphicon glyphicon-circle-arrow-up"></span> <span class="glyphicon-class">glyphicon glyphicon-circle-arrow-up</span> </li> <li> <span class="glyphicon glyphicon-cloud"></span> <span class="glyphicon-class">glyphicon glyphicon-cloud</span> </li> <li> <span class="glyphicon glyphicon-cloud-download"></span> <span class="glyphicon-class">glyphicon glyphicon-cloud-download</span> </li> <li> <span class="glyphicon glyphicon-cloud-upload"></span> <span class="glyphicon-class">glyphicon glyphicon-cloud-upload</span> </li> <li> <span class="glyphicon glyphicon-cog"></span> <span class="glyphicon-class">glyphicon glyphicon-cog</span> </li> <li> <span class="glyphicon glyphicon-collapse-down"></span> <span class="glyphicon-class">glyphicon glyphicon-collapse-down</span> </li> <li> <span class="glyphicon glyphicon-collapse-up"></span> <span class="glyphicon-class">glyphicon glyphicon-collapse-up</span> </li> <li> <span class="glyphicon glyphicon-comment"></span> <span class="glyphicon-class">glyphicon glyphicon-comment</span> </li> <li> <span class="glyphicon glyphicon-compressed"></span> <span class="glyphicon-class">glyphicon glyphicon-compressed</span> </li> <li> <span class="glyphicon glyphicon-copyright-mark"></span> <span class="glyphicon-class">glyphicon glyphicon-copyright-mark</span> </li> <li> <span class="glyphicon glyphicon-credit-card"></span> <span class="glyphicon-class">glyphicon glyphicon-credit-card</span> </li> <li> <span class="glyphicon glyphicon-cutlery"></span> <span class="glyphicon-class">glyphicon glyphicon-cutlery</span> </li> <li> <span class="glyphicon glyphicon-dashboard"></span> <span class="glyphicon-class">glyphicon glyphicon-dashboard</span> </li> <li> <span class="glyphicon glyphicon-download"></span> <span class="glyphicon-class">glyphicon glyphicon-download</span> </li> <li> <span class="glyphicon glyphicon-download-alt"></span> <span class="glyphicon-class">glyphicon glyphicon-download-alt</span> </li> <li> <span class="glyphicon glyphicon-earphone"></span> <span class="glyphicon-class">glyphicon glyphicon-earphone</span> </li> <li> <span class="glyphicon glyphicon-edit"></span> <span class="glyphicon-class">glyphicon glyphicon-edit</span> </li> <li> <span class="glyphicon glyphicon-eject"></span> <span class="glyphicon-class">glyphicon glyphicon-eject</span> </li> <li> <span class="glyphicon glyphicon-envelope"></span> <span class="glyphicon-class">glyphicon glyphicon-envelope</span> </li> <li> <span class="glyphicon glyphicon-euro"></span> <span class="glyphicon-class">glyphicon glyphicon-euro</span> </li> <li> <span class="glyphicon glyphicon-exclamation-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-exclamation-sign</span> </li> <li> <span class="glyphicon glyphicon-expand"></span> <span class="glyphicon-class">glyphicon glyphicon-expand</span> </li> <li> <span class="glyphicon glyphicon-export"></span> <span class="glyphicon-class">glyphicon glyphicon-export</span> </li> <li> <span class="glyphicon glyphicon-eye-close"></span> <span class="glyphicon-class">glyphicon glyphicon-eye-close</span> </li> <li> <span class="glyphicon glyphicon-eye-open"></span> <span class="glyphicon-class">glyphicon glyphicon-eye-open</span> </li> <li> <span class="glyphicon glyphicon-facetime-video"></span> <span class="glyphicon-class">glyphicon glyphicon-facetime-video</span> </li> <li> <span class="glyphicon glyphicon-fast-backward"></span> <span class="glyphicon-class">glyphicon glyphicon-fast-backward</span> </li> <li> <span class="glyphicon glyphicon-fast-forward"></span> <span class="glyphicon-class">glyphicon glyphicon-fast-forward</span> </li> <li> <span class="glyphicon glyphicon-file"></span> <span class="glyphicon-class">glyphicon glyphicon-file</span> </li> <li> <span class="glyphicon glyphicon-film"></span> <span class="glyphicon-class">glyphicon glyphicon-film</span> </li> <li> <span class="glyphicon glyphicon-filter"></span> <span class="glyphicon-class">glyphicon glyphicon-filter</span> </li> <li> <span class="glyphicon glyphicon-fire"></span> <span class="glyphicon-class">glyphicon glyphicon-fire</span> </li> <li> <span class="glyphicon glyphicon-flag"></span> <span class="glyphicon-class">glyphicon glyphicon-flag</span> </li> <li> <span class="glyphicon glyphicon-flash"></span> <span class="glyphicon-class">glyphicon glyphicon-flash</span> </li> <li> <span class="glyphicon glyphicon-floppy-disk"></span> <span class="glyphicon-class">glyphicon glyphicon-floppy-disk</span> </li> <li> <span class="glyphicon glyphicon-floppy-open"></span> <span class="glyphicon-class">glyphicon glyphicon-floppy-open</span> </li> <li> <span class="glyphicon glyphicon-floppy-remove"></span> <span class="glyphicon-class">glyphicon glyphicon-floppy-remove</span> </li> <li> <span class="glyphicon glyphicon-floppy-save"></span> <span class="glyphicon-class">glyphicon glyphicon-floppy-save</span> </li> <li> <span class="glyphicon glyphicon-floppy-saved"></span> <span class="glyphicon-class">glyphicon glyphicon-floppy-saved</span> </li> <li> <span class="glyphicon glyphicon-folder-close"></span> <span class="glyphicon-class">glyphicon glyphicon-folder-close</span> </li> <li> <span class="glyphicon glyphicon-folder-open"></span> <span class="glyphicon-class">glyphicon glyphicon-folder-open</span> </li> <li> <span class="glyphicon glyphicon-font"></span> <span class="glyphicon-class">glyphicon glyphicon-font</span> </li> <li> <span class="glyphicon glyphicon-forward"></span> <span class="glyphicon-class">glyphicon glyphicon-forward</span> </li> <li> <span class="glyphicon glyphicon-fullscreen"></span> <span class="glyphicon-class">glyphicon glyphicon-fullscreen</span> </li> <li> <span class="glyphicon glyphicon-gbp"></span> <span class="glyphicon-class">glyphicon glyphicon-gbp</span> </li> <li> <span class="glyphicon glyphicon-gift"></span> <span class="glyphicon-class">glyphicon glyphicon-gift</span> </li> <li> <span class="glyphicon glyphicon-glass"></span> <span class="glyphicon-class">glyphicon glyphicon-glass</span> </li> <li> <span class="glyphicon glyphicon-globe"></span> <span class="glyphicon-class">glyphicon glyphicon-globe</span> </li> <li> <span class="glyphicon glyphicon-hand-down"></span> <span class="glyphicon-class">glyphicon glyphicon-hand-down</span> </li> <li> <span class="glyphicon glyphicon-hand-left"></span> <span class="glyphicon-class">glyphicon glyphicon-hand-left</span> </li> <li> <span class="glyphicon glyphicon-hand-right"></span> <span class="glyphicon-class">glyphicon glyphicon-hand-right</span> </li> <li> <span class="glyphicon glyphicon-hand-up"></span> <span class="glyphicon-class">glyphicon glyphicon-hand-up</span> </li> <li> <span class="glyphicon glyphicon-hd-video"></span> <span class="glyphicon-class">glyphicon glyphicon-hd-video</span> </li> <li> <span class="glyphicon glyphicon-hdd"></span> <span class="glyphicon-class">glyphicon glyphicon-hdd</span> </li> <li> <span class="glyphicon glyphicon-header"></span> <span class="glyphicon-class">glyphicon glyphicon-header</span> </li> <li> <span class="glyphicon glyphicon-headphones"></span> <span class="glyphicon-class">glyphicon glyphicon-headphones</span> </li> <li> <span class="glyphicon glyphicon-heart"></span> <span class="glyphicon-class">glyphicon glyphicon-heart</span> </li> <li> <span class="glyphicon glyphicon-heart-empty"></span> <span class="glyphicon-class">glyphicon glyphicon-heart-empty</span> </li> <li> <span class="glyphicon glyphicon-home"></span> <span class="glyphicon-class">glyphicon glyphicon-home</span> </li> <li> <span class="glyphicon glyphicon-import"></span> <span class="glyphicon-class">glyphicon glyphicon-import</span> </li> <li> <span class="glyphicon glyphicon-inbox"></span> <span class="glyphicon-class">glyphicon glyphicon-inbox</span> </li> <li> <span class="glyphicon glyphicon-indent-left"></span> <span class="glyphicon-class">glyphicon glyphicon-indent-left</span> </li> <li> <span class="glyphicon glyphicon-indent-right"></span> <span class="glyphicon-class">glyphicon glyphicon-indent-right</span> </li> <li> <span class="glyphicon glyphicon-info-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-info-sign</span> </li> <li> <span class="glyphicon glyphicon-italic"></span> <span class="glyphicon-class">glyphicon glyphicon-italic</span> </li> <li> <span class="glyphicon glyphicon-leaf"></span> <span class="glyphicon-class">glyphicon glyphicon-leaf</span> </li> <li> <span class="glyphicon glyphicon-link"></span> <span class="glyphicon-class">glyphicon glyphicon-link</span> </li> <li> <span class="glyphicon glyphicon-list"></span> <span class="glyphicon-class">glyphicon glyphicon-list</span> </li> <li> <span class="glyphicon glyphicon-list-alt"></span> <span class="glyphicon-class">glyphicon glyphicon-list-alt</span> </li> <li> <span class="glyphicon glyphicon-lock"></span> <span class="glyphicon-class">glyphicon glyphicon-lock</span> </li> <li> <span class="glyphicon glyphicon-log-in"></span> <span class="glyphicon-class">glyphicon glyphicon-log-in</span> </li> <li> <span class="glyphicon glyphicon-log-out"></span> <span class="glyphicon-class">glyphicon glyphicon-log-out</span> </li> <li> <span class="glyphicon glyphicon-magnet"></span> <span class="glyphicon-class">glyphicon glyphicon-magnet</span> </li> <li> <span class="glyphicon glyphicon-map-marker"></span> <span class="glyphicon-class">glyphicon glyphicon-map-marker</span> </li> <li> <span class="glyphicon glyphicon-minus"></span> <span class="glyphicon-class">glyphicon glyphicon-minus</span> </li> <li> <span class="glyphicon glyphicon-minus-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-minus-sign</span> </li> <li> <span class="glyphicon glyphicon-move"></span> <span class="glyphicon-class">glyphicon glyphicon-move</span> </li> <li> <span class="glyphicon glyphicon-music"></span> <span class="glyphicon-class">glyphicon glyphicon-music</span> </li> <li> <span class="glyphicon glyphicon-new-window"></span> <span class="glyphicon-class">glyphicon glyphicon-new-window</span> </li> <li> <span class="glyphicon glyphicon-off"></span> <span class="glyphicon-class">glyphicon glyphicon-off</span> </li> <li> <span class="glyphicon glyphicon-ok"></span> <span class="glyphicon-class">glyphicon glyphicon-ok</span> </li> <li> <span class="glyphicon glyphicon-ok-circle"></span> <span class="glyphicon-class">glyphicon glyphicon-ok-circle</span> </li> <li> <span class="glyphicon glyphicon-ok-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-ok-sign</span> </li> <li> <span class="glyphicon glyphicon-open"></span> <span class="glyphicon-class">glyphicon glyphicon-open</span> </li> <li> <span class="glyphicon glyphicon-paperclip"></span> <span class="glyphicon-class">glyphicon glyphicon-paperclip</span> </li> <li> <span class="glyphicon glyphicon-pause"></span> <span class="glyphicon-class">glyphicon glyphicon-pause</span> </li> <li> <span class="glyphicon glyphicon-pencil"></span> <span class="glyphicon-class">glyphicon glyphicon-pencil</span> </li> <li> <span class="glyphicon glyphicon-phone"></span> <span class="glyphicon-class">glyphicon glyphicon-phone</span> </li> <li> <span class="glyphicon glyphicon-phone-alt"></span> <span class="glyphicon-class">glyphicon glyphicon-phone-alt</span> </li> <li> <span class="glyphicon glyphicon-picture"></span> <span class="glyphicon-class">glyphicon glyphicon-picture</span> </li> <li> <span class="glyphicon glyphicon-plane"></span> <span class="glyphicon-class">glyphicon glyphicon-plane</span> </li> <li> <span class="glyphicon glyphicon-play"></span> <span class="glyphicon-class">glyphicon glyphicon-play</span> </li> <li> <span class="glyphicon glyphicon-play-circle"></span> <span class="glyphicon-class">glyphicon glyphicon-play-circle</span> </li> <li> <span class="glyphicon glyphicon-plus"></span> <span class="glyphicon-class">glyphicon glyphicon-plus</span> </li> <li> <span class="glyphicon glyphicon-plus-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-plus-sign</span> </li> <li> <span class="glyphicon glyphicon-print"></span> <span class="glyphicon-class">glyphicon glyphicon-print</span> </li> <li> <span class="glyphicon glyphicon-pushpin"></span> <span class="glyphicon-class">glyphicon glyphicon-pushpin</span> </li> <li> <span class="glyphicon glyphicon-qrcode"></span> <span class="glyphicon-class">glyphicon glyphicon-qrcode</span> </li> <li> <span class="glyphicon glyphicon-question-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-question-sign</span> </li> <li> <span class="glyphicon glyphicon-random"></span> <span class="glyphicon-class">glyphicon glyphicon-random</span> </li> <li> <span class="glyphicon glyphicon-record"></span> <span class="glyphicon-class">glyphicon glyphicon-record</span> </li> <li> <span class="glyphicon glyphicon-refresh"></span> <span class="glyphicon-class">glyphicon glyphicon-refresh</span> </li> <li> <span class="glyphicon glyphicon-registration-mark"></span> <span class="glyphicon-class">glyphicon glyphicon-registration-mark</span> </li> <li> <span class="glyphicon glyphicon-remove"></span> <span class="glyphicon-class">glyphicon glyphicon-remove</span> </li> <li> <span class="glyphicon glyphicon-remove-circle"></span> <span class="glyphicon-class">glyphicon glyphicon-remove-circle</span> </li> <li> <span class="glyphicon glyphicon-remove-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-remove-sign</span> </li> <li> <span class="glyphicon glyphicon-repeat"></span> <span class="glyphicon-class">glyphicon glyphicon-repeat</span> </li> <li> <span class="glyphicon glyphicon-resize-full"></span> <span class="glyphicon-class">glyphicon glyphicon-resize-full</span> </li> <li> <span class="glyphicon glyphicon-resize-horizontal"></span> <span class="glyphicon-class">glyphicon glyphicon-resize-horizontal</span> </li> <li> <span class="glyphicon glyphicon-resize-small"></span> <span class="glyphicon-class">glyphicon glyphicon-resize-small</span> </li> <li> <span class="glyphicon glyphicon-resize-vertical"></span> <span class="glyphicon-class">glyphicon glyphicon-resize-vertical</span> </li> <li> <span class="glyphicon glyphicon-retweet"></span> <span class="glyphicon-class">glyphicon glyphicon-retweet</span> </li> <li> <span class="glyphicon glyphicon-road"></span> <span class="glyphicon-class">glyphicon glyphicon-road</span> </li> <li> <span class="glyphicon glyphicon-save"></span> <span class="glyphicon-class">glyphicon glyphicon-save</span> </li> <li> <span class="glyphicon glyphicon-saved"></span> <span class="glyphicon-class">glyphicon glyphicon-saved</span> </li> <li> <span class="glyphicon glyphicon-screenshot"></span> <span class="glyphicon-class">glyphicon glyphicon-screenshot</span> </li> <li> <span class="glyphicon glyphicon-sd-video"></span> <span class="glyphicon-class">glyphicon glyphicon-sd-video</span> </li> <li> <span class="glyphicon glyphicon-search"></span> <span class="glyphicon-class">glyphicon glyphicon-search</span> </li> <li> <span class="glyphicon glyphicon-send"></span> <span class="glyphicon-class">glyphicon glyphicon-send</span> </li> <li> <span class="glyphicon glyphicon-share"></span> <span class="glyphicon-class">glyphicon glyphicon-share</span> </li> <li> <span class="glyphicon glyphicon-share-alt"></span> <span class="glyphicon-class">glyphicon glyphicon-share-alt</span> </li> <li> <span class="glyphicon glyphicon-shopping-cart"></span> <span class="glyphicon-class">glyphicon glyphicon-shopping-cart</span> </li> <li> <span class="glyphicon glyphicon-signal"></span> <span class="glyphicon-class">glyphicon glyphicon-signal</span> </li> <li> <span class="glyphicon glyphicon-sort"></span> <span class="glyphicon-class">glyphicon glyphicon-sort</span> </li> <li> <span class="glyphicon glyphicon-sort-by-alphabet"></span> <span class="glyphicon-class">glyphicon glyphicon-sort-by-alphabet</span> </li> <li> <span class="glyphicon glyphicon-sort-by-alphabet-alt"></span> <span class="glyphicon-class">glyphicon glyphicon-sort-by-alphabet-alt</span> </li> <li> <span class="glyphicon glyphicon-sort-by-attributes"></span> <span class="glyphicon-class">glyphicon glyphicon-sort-by-attributes</span> </li> <li> <span class="glyphicon glyphicon-sort-by-attributes-alt"></span> <span class="glyphicon-class">glyphicon glyphicon-sort-by-attributes-alt</span> </li> <li> <span class="glyphicon glyphicon-sort-by-order"></span> <span class="glyphicon-class">glyphicon glyphicon-sort-by-order</span> </li> <li> <span class="glyphicon glyphicon-sort-by-order-alt"></span> <span class="glyphicon-class">glyphicon glyphicon-sort-by-order-alt</span> </li> <li> <span class="glyphicon glyphicon-sound-5-1"></span> <span class="glyphicon-class">glyphicon glyphicon-sound-5-1</span> </li> <li> <span class="glyphicon glyphicon-sound-6-1"></span> <span class="glyphicon-class">glyphicon glyphicon-sound-6-1</span> </li> <li> <span class="glyphicon glyphicon-sound-7-1"></span> <span class="glyphicon-class">glyphicon glyphicon-sound-7-1</span> </li> <li> <span class="glyphicon glyphicon-sound-dolby"></span> <span class="glyphicon-class">glyphicon glyphicon-sound-dolby</span> </li> <li> <span class="glyphicon glyphicon-sound-stereo"></span> <span class="glyphicon-class">glyphicon glyphicon-sound-stereo</span> </li> <li> <span class="glyphicon glyphicon-star"></span> <span class="glyphicon-class">glyphicon glyphicon-star</span> </li> <li> <span class="glyphicon glyphicon-star-empty"></span> <span class="glyphicon-class">glyphicon glyphicon-star-empty</span> </li> <li> <span class="glyphicon glyphicon-stats"></span> <span class="glyphicon-class">glyphicon glyphicon-stats</span> </li> <li> <span class="glyphicon glyphicon-step-backward"></span> <span class="glyphicon-class">glyphicon glyphicon-step-backward</span> </li> <li> <span class="glyphicon glyphicon-step-forward"></span> <span class="glyphicon-class">glyphicon glyphicon-step-forward</span> </li> <li> <span class="glyphicon glyphicon-stop"></span> <span class="glyphicon-class">glyphicon glyphicon-stop</span> </li> <li> <span class="glyphicon glyphicon-subtitles"></span> <span class="glyphicon-class">glyphicon glyphicon-subtitles</span> </li> <li> <span class="glyphicon glyphicon-tag"></span> <span class="glyphicon-class">glyphicon glyphicon-tag</span> </li> <li> <span class="glyphicon glyphicon-tags"></span> <span class="glyphicon-class">glyphicon glyphicon-tags</span> </li> <li> <span class="glyphicon glyphicon-tasks"></span> <span class="glyphicon-class">glyphicon glyphicon-tasks</span> </li> <li> <span class="glyphicon glyphicon-text-height"></span> <span class="glyphicon-class">glyphicon glyphicon-text-height</span> </li> <li> <span class="glyphicon glyphicon-text-width"></span> <span class="glyphicon-class">glyphicon glyphicon-text-width</span> </li> <li> <span class="glyphicon glyphicon-th"></span> <span class="glyphicon-class">glyphicon glyphicon-th</span> </li> <li> <span class="glyphicon glyphicon-th-large"></span> <span class="glyphicon-class">glyphicon glyphicon-th-large</span> </li> <li> <span class="glyphicon glyphicon-th-list"></span> <span class="glyphicon-class">glyphicon glyphicon-th-list</span> </li> <li> <span class="glyphicon glyphicon-thumbs-down"></span> <span class="glyphicon-class">glyphicon glyphicon-thumbs-down</span> </li> <li> <span class="glyphicon glyphicon-thumbs-up"></span> <span class="glyphicon-class">glyphicon glyphicon-thumbs-up</span> </li> <li> <span class="glyphicon glyphicon-time"></span> <span class="glyphicon-class">glyphicon glyphicon-time</span> </li> <li> <span class="glyphicon glyphicon-tint"></span> <span class="glyphicon-class">glyphicon glyphicon-tint</span> </li> <li> <span class="glyphicon glyphicon-tower"></span> <span class="glyphicon-class">glyphicon glyphicon-tower</span> </li> <li> <span class="glyphicon glyphicon-transfer"></span> <span class="glyphicon-class">glyphicon glyphicon-transfer</span> </li> <li> <span class="glyphicon glyphicon-trash"></span> <span class="glyphicon-class">glyphicon glyphicon-trash</span> </li> <li> <span class="glyphicon glyphicon-tree-conifer"></span> <span class="glyphicon-class">glyphicon glyphicon-tree-conifer</span> </li> <li> <span class="glyphicon glyphicon-tree-deciduous"></span> <span class="glyphicon-class">glyphicon glyphicon-tree-deciduous</span> </li> <li> <span class="glyphicon glyphicon-unchecked"></span> <span class="glyphicon-class">glyphicon glyphicon-unchecked</span> </li> <li> <span class="glyphicon glyphicon-upload"></span> <span class="glyphicon-class">glyphicon glyphicon-upload</span> </li> <li> <span class="glyphicon glyphicon-usd"></span> <span class="glyphicon-class">glyphicon glyphicon-usd</span> </li> <li> <span class="glyphicon glyphicon-user"></span> <span class="glyphicon-class">glyphicon glyphicon-user</span> </li> <li> <span class="glyphicon glyphicon-volume-down"></span> <span class="glyphicon-class">glyphicon glyphicon-volume-down</span> </li> <li> <span class="glyphicon glyphicon-volume-off"></span> <span class="glyphicon-class">glyphicon glyphicon-volume-off</span> </li> <li> <span class="glyphicon glyphicon-volume-up"></span> <span class="glyphicon-class">glyphicon glyphicon-volume-up</span> </li> <li> <span class="glyphicon glyphicon-warning-sign"></span> <span class="glyphicon-class">glyphicon glyphicon-warning-sign</span> </li> <li> <span class="glyphicon glyphicon-wrench"></span> <span class="glyphicon-class">glyphicon glyphicon-wrench</span> </li> <li> <span class="glyphicon glyphicon-zoom-in"></span> <span class="glyphicon-class">glyphicon glyphicon-zoom-in</span> </li> <li> <span class="glyphicon glyphicon-zoom-out"></span> <span class="glyphicon-class">glyphicon glyphicon-zoom-out</span> </li> </ul> </div><!-- /#ion-icons --> </div><!-- /.tab-content --> </div><!-- /.nav-tabs-custom --> </div><!-- /.col --> </div><!-- /.row --> </section><!-- /.content --> </aside><!-- /.right-side --> </div><!-- ./wrapper --> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js" type="text/javascript"></script> <!-- AdminLTE App --> <script src="../../js/AdminLTE/app.js" type="text/javascript"></script> <!-- AdminLTE for demo purposes --> <script src="../../js/AdminLTE/demo.js" type="text/javascript"></script> </body> </html>
PIELab/behaviorSim_web
demo_pages/UI/icons.html
HTML
gpl-2.0
158,612
#include<stdio.h> #include<conio.h> typedef struct node { int info; struct node *next; }node_type; void insert(node_type**,node_type**); void del(node_type **); void display(node_type *); void main() { node_type *left=NULL,*right=NULL; int ch; do { printf("\n menu"); printf("\n 1 for insert \n 2 for delete \n 3 for display \n 4 for exit"); printf("\n enter the choice."); scanf("%d",&ch); switch(ch) { case 1: insert(&left,&right); break; case 2: if(left!=NULL) del(&left); else printf("\n Linked list is empty"); break; case 3: if(left==NULL) printf("\n linked list is empty"); else display(left); break; case 4: break; default : printf("\n invalid choice"); } }while(ch!=4); } void insert(node_type **l,node_type **r) { node_type *p=(node_type*)malloc(sizeof(node_type)); if(p!=NULL) { printf("\n enter the information "); scanf("%d",&p->info); if(*l==NULL) { *l=*r=p; } else { (*r)->next=p; *r=p; } (*r)->next=NULL; } else printf("\n node cannot be created"); } void del(node_type **f) { printf("\n the node deleted : %d",(*f)->info); *f=(*f)->next; } void display(node_type *f) { printf("\n elements : "); do { printf("\n %d",f->info); f=f->next; }while(f!=NULL); }
raturi1995/program5geu
insert linklist.c
C
gpl-2.0
1,730
Nonagon.Geo =========== The geographical utility.
Nonagon-x/Nonagon.Geo
README.md
Markdown
gpl-2.0
51
package com.peterson.programs.fortunestowergame; import com.peterson.programs.fortunestower.Board; import com.peterson.programs.fortunestower.Board2D; import com.peterson.programs.fortunestower.Deck; import com.peterson.programs.fortunestower.TestDeck; import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.file.Files; /** * Main GUI class for the game of Fortune's Tower. * This will display a frame that will allow the user * to play game of Fortunes Tower. * @author Peterson, Ryan * Created 7/26/2014 */ public class GameFrame extends JFrame { /* Logic Objects */ private GamePanel panel; private Board board; private Deck deck; private GameBoard map; /* Display Objects */ private JPanel sidePanel; private JTextField[] fields; private JPanel buttonPanel; private JButton drawButton; private JButton cashOutButton; private JButton reset; private Container cp; private ActionListener draw; private int rowPtr; private int numCards; private long playerPoints; private JLabel pointLabel; /* Constants for the background and foreground colors */ private static final Color BACKGROUND = new Color(12, 128, 37); private static final Color FOREGROUND = new Color(83, 128, 38); /* Coefficients that determine the size of the Cards based off of the percentage of these with getToolkit().getScreenSize().getWidth() and getToolkit().getScreenSize().getHeight(). They allow the cards to grow and shrink based on the computer monitor this program runs on. */ private static final int WIDTH_COEFF = 25; private static final int HEIGHT_COEFF = 10; /* The font that the buttons and text fields will have */ private static final Font FONTZ = new Font("Font", Font.BOLD, 15); /** * Creates the window to play the game of Fortunes Tower. * This will do the necessary steps to construct the frame and add action listeners * for the user to draw cards, cash out, and reset the board * @param numberCards the number of cards to play with. Use the constants from the Deck class * for the standard sizes. */ public GameFrame(final int numberCards) { super("Fortunes Tower"); playerPoints = 0; pointLabel = new JLabel("Points: " + playerPoints); deck = new GameDeck(numberCards); panel = new GamePanel(); board = new Board2D(deck); fields = new JTextField[8]; for (int i = 0; i < fields.length; i++) { fields[i] = new JTextField(); fields[i].setEditable(false); fields[i].setColumns(5); fields[i].setFont(FONTZ); fields[i].setHorizontalAlignment(SwingConstants.RIGHT); } fields[0].setText("Points"); fields[0].setBackground(Color.DARK_GRAY); fields[0].setForeground(Color.WHITE); fields[0].setEnabled(false); numCards = numberCards; rowPtr = 1; create(); } /* Constructs the initial state of the GUI. */ private void create() { cp = getContentPane(); cp.setLayout(new BorderLayout()); cp.setBackground(BACKGROUND); panel.setBackground(BACKGROUND); panel.setBackgroundColor(FOREGROUND); cp.add(panel, BorderLayout.CENTER); sidePanel = new JPanel(); sidePanel.setLayout(new GridLayout(8, 1, 100, 100)); cp.add(sidePanel, BorderLayout.WEST); sidePanel.setBackground(BACKGROUND); for (JTextField f : fields) sidePanel.add(f); buttonPanel = new JPanel(); buttonPanel.setBackground(BACKGROUND); cp.add(buttonPanel, BorderLayout.SOUTH); drawButton = new JButton("Deal Next Row"); drawButton.setFont(FONTZ); draw = new DealListener(); drawButton.addActionListener(draw); buttonPanel.add(drawButton); cashOutButton = new JButton("Cash Out"); cashOutButton.setFont(FONTZ); cashOutButton.addActionListener(new CashOutListener()); buttonPanel.add(cashOutButton); reset = new JButton("Reset"); reset.setFont(FONTZ); reset.addActionListener(new ResetListener()); buttonPanel.add(reset); buttonPanel.add(pointLabel); pointLabel.setFont(FONTZ); pointLabel.setForeground(Color.BLUE); JMenuBar bar = new JMenuBar(); setJMenuBar(bar); JMenu m = new JMenu("Info"); JMenuItem i = new JMenuItem("Rules"); i.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JOptionPane.showMessageDialog(null, RulesLoader.getRules(), "Rules", JOptionPane.INFORMATION_MESSAGE); } }); m.add(i); bar.add(m); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setVisible(true); /* Set the width to fill the screen from left to right, but set the height to be 50 less than the screen size */ int width = (int) getToolkit().getScreenSize().getWidth(); int height = (int) (getToolkit().getScreenSize().getHeight() - 50); setSize(width, height); postInit(); } /* Post GUI initialzation to display the first two rows of the Board. */ private void postInit() { double pWidth = getToolkit().getScreenSize().getWidth(); double pHeight = getToolkit().getScreenSize().getHeight(); map = new GameBoard(board, (int) pWidth / WIDTH_COEFF, (int) pHeight / HEIGHT_COEFF); panel.addRow(map.mapRow(0)); panel.addRow(map.mapRow(1)); fields[1].setText(board.lastRowValue() + ""); } /* Loads and displays the rules of the game. */ private static class RulesLoader { private static final String FILE = "rules.txt"; /* Gets the rules of the game */ public static String getRules() { try { StringBuilder b = new StringBuilder(); BufferedReader reader = new BufferedReader(new InputStreamReader(GameFrame.class.getResourceAsStream(FILE))); String line; while ((line = reader.readLine()) != null) { b.append(line).append(System.getProperty("line.separator")); } reader.close(); return b.toString(); } catch (Exception e) { /* This should never happen; if it does, come beat me with a rubber chicken */ throw new RuntimeException(e); } } } /* Game Logic class to run the game of Fortunes Tower. This action listener will draw a row of cards, display them, and if a Misfortune occurs, try to correct it if one hasn't happened yet. */ private class DealListener implements ActionListener { private boolean trySave; public DealListener() { trySave = false; } @Override public void actionPerformed(ActionEvent e) { /* See the file "fortunes tower algorithm" for the details of this algorithm. */ if (!board.isComplete()) { board.nextRow(); rowPtr++; panel.addRow(map.mapRow(rowPtr)); fields[rowPtr].setText("" + board.lastRowValue()); if (board.misFortune()) { if (!trySave) { StringBuilder b = new StringBuilder("A Misfortune has Occurred!\n"); b.append("A save will now be attempted"); trySave = true; JOptionPane.showMessageDialog(null, b.toString(), "Misfortune", JOptionPane.INFORMATION_MESSAGE); board.trySave(); panel.flipGate(); panel.removeLastRow(); panel.addRow(map.mapRow(rowPtr)); fields[rowPtr].setText("" + board.lastRowValue()); //panel.repaint(); if (board.misFortune()) { JOptionPane.showMessageDialog(null, "Misfortune. Game Over"); //test.setEnabled(false); drawButton.setEnabled(false); cashOutButton.setEnabled(false); } } else { JOptionPane.showMessageDialog(null, "Misfortune. Game Over", "Misfortune", JOptionPane.INFORMATION_MESSAGE); //test.setEnabled(false); drawButton.setEnabled(false); cashOutButton.setEnabled(false); } } if (board.isComplete() && !board.misFortune()) { if (board.hitJackpot()) { int total = board.jackpotValue(); JOptionPane.showMessageDialog(null, "Jackpot!\n" + total); playerPoints += total; } else { int total = board.rowValue(7); JOptionPane.showMessageDialog(null, "Winner\n" + total); playerPoints += total; } //test.setEnabled(false); pointLabel.setText("Points: " + playerPoints); drawButton.setEnabled(false); cashOutButton.setEnabled(false); } } } } /* Allows the player to cash out. The player wins the current row's point value, and the game is continued, displaying the remainder of the rows, but does not check for a misfortune */ private class CashOutListener implements ActionListener { @Override public void actionPerformed(ActionEvent e) { if (drawButton.isEnabled()) { int total = board.rowValue(rowPtr); JOptionPane.showMessageDialog(null, "Cashed out and won:\n" + total); cashOutButton.setEnabled(false); drawButton.setEnabled(false); playerPoints += total; pointLabel.setText("Points: " + playerPoints); if (!board.isComplete()) JOptionPane.showMessageDialog(null, "The game will now continue and show the results\n", "What if?", JOptionPane.PLAIN_MESSAGE); while (!board.isComplete()) { board.nextRow(); rowPtr++; panel.addRow(map.mapRow(rowPtr)); fields[rowPtr].setText("" + board.lastRowValue()); } } } } /* * Resets the game to the initial state. * Each game object is recreated and set to their initial states * and the frame is reset to display the first two rows. */ private class ResetListener implements ActionListener { @Override public void actionPerformed(ActionEvent e) { cp.remove(panel); deck = new TestDeck(numCards); panel = new GamePanel(); board = new Board2D(deck); for (int i = 1; i < fields.length; i++) fields[i].setText(""); rowPtr = 1; cp.add(panel, BorderLayout.CENTER); panel.setBackgroundColor(FOREGROUND); panel.setBackground(FOREGROUND); drawButton.setEnabled(true); drawButton.removeActionListener(draw); draw = new DealListener(); drawButton.addActionListener(draw); cashOutButton.setEnabled(true); postInit(); } } }
sadjava/Fortunes-Tower
src/com/peterson/programs/fortunestowergame/GameFrame.java
Java
gpl-2.0
12,819
/************************************************************************* * Clus - Software for Predictive Clustering * * Copyright (C) 2010 * * Katholieke Universiteit Leuven, Leuven, Belgium * * Jozef Stefan Institute, Ljubljana, Slovenia * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * This program 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 General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * * * * Contact information: <http://www.cs.kuleuven.be/~dtai/clus/>. * *************************************************************************/ /* * Created on March 8, 2010 */ package clus.algo.rules; /** Information about rule normalization. Is used in rule optimization and linear term normalization. * @author Timo Aho */ public class RuleNormalization { /** Class variable. Means of descriptive attributes */ static private double[] C_descMeans = null; /** Class variable. Standard deviation values of descriptive attributes */ static private double[] C_descStdDevs = null; /** Class variable. Means of target attributes */ static private double[] C_targMeans = null; /** Class variable. Standard deviation values of target attributes */ static private double[] C_targStdDevs = null; /** Initializes the statistical information about the data. Index 0 includes means, index 1 std dev * for both the parameters. * @param descMeanAndStdDev Mean and std dev for descriptive attributes. * @param targMeanAndStdDev Mean and std dev for target attributes. */ public static void initialize(double[][] descMeanAndStdDev, double[][] targMeanAndStdDev) { C_descStdDevs = descMeanAndStdDev[1]; C_descMeans = descMeanAndStdDev[0]; C_targStdDevs = targMeanAndStdDev[1]; C_targMeans = targMeanAndStdDev[0]; } public static double getDescMean(int iDescriptiveAttr) { return C_descMeans[iDescriptiveAttr]; } public static double getTargMean(int iTargetAttr) { return C_targMeans[iTargetAttr]; } public static double getDescStdDev(int iDescriptiveAttr) { return C_descStdDevs[iDescriptiveAttr]; } public static double getTargStdDev(int iTargetAttr) { return C_targStdDevs[iTargetAttr]; } }
active-learning/active-learning-scala
src/main/java/clus/algo/rules/RuleNormalization.java
Java
gpl-2.0
3,176
/****************************************************************************** * Notes: * The types of log messages available are: * CRITICAL_MSG - Message is ALWAYS displayed. Msg needs some action taken * WARNING_MSG - A recoverable problem, may indicate problems * INFO_MSG - Tracks connections, requests, etc... * DEBUG_MSG - very low-level, developer, verbose messages * ******************************************************************************/ #ifndef LOG_H #define LOG_H #include <time.h> #include <errno.h> #define CRITICAL_MSG 1 // Bit 1 of log level 0000 0001 #define WARNING_MSG 2 // Bit 2 of log level 0000 0010 #define INFO_MSG 4 // Bit 3 of log level 0000 0100 #define DEBUG_MSG 8 // Bit 4 of log level 0000 1000 /* subsystems */ #define SUBSYS_NONE 0 #define SUBSYS_SHARED 1 #define SUBSYS_TPOOL 2 #define SUBSYS_LIB 3 #define SUBSYS_LIBCAS 4 #define SUBSYS_CMGR 5 #define SUBSYS_META 6 #define SUBSYS_DATA 7 #define SUBSYS_CLIENT 8 #define MAX_SUBSYS 9 extern int g_nLogLevel; /******************************************************************************* * MACRO : LOG * Parameters : fpLog - File pointer to use to print message * nLogType - The type of log messages (see notes above for this file) * format - same as format to printf * Returns : void *------------------------------------------------------------------------------- * Notes: *******************************************************************************/ #define LOG(fpLog, nLogType, nSubSys, format...) \ { \ /* Should log this message. Check against the current logging level */ \ if(nLogType & g_nLogLevel) \ { \ struct tm stCurTime; \ time_t debug_print_time = 0; \ char cLogType = 0; \ \ /* Get the current time */ \ time(&debug_print_time); \ localtime_r(&debug_print_time, &stCurTime); \ \ /* Add the appropriate Message Type Initial */ \ switch(nLogType) \ { \ case CRITICAL_MSG: cLogType = 'C'; break; \ case WARNING_MSG : cLogType = 'W'; break; \ case INFO_MSG : cLogType = 'I'; break; \ case DEBUG_MSG : cLogType = 'D'; break; \ } \ /* Add the __FILE__, __LINE__ macros if appropriate */ \ switch(nLogType) \ { \ case INFO_MSG : /* let this fall through to DEBUG_MSG */ \ case CRITICAL_MSG: /* let this fall through to DEBUG_MSG */ \ case WARNING_MSG : /* let this fall through to DEBUG_MSG */ \ case DEBUG_MSG : { \ fprintf(fpLog, "(%s,%d) ", __FILE__, __LINE__);\ break; \ } \ } \ fprintf(fpLog, "[%c %02d/%02d %02d:%02d] ", \ cLogType, \ stCurTime.tm_mon+1, \ stCurTime.tm_mday, \ stCurTime.tm_hour, \ stCurTime.tm_min); \ do_print_message(nSubSys, fpLog); \ fprintf(fpLog, format); \ \ /* Check to see if the last character is a new line, add one if not */ \ if(!contains_newline(format)) \ { \ fprintf(fpLog, "\n"); \ } \ \ /* Try and push log to file */ \ fflush(fpLog); \ } \ } /******************************************************************************* * Macro : PERROR * Parameters : pszErrorMsg - User defined message * Returns : void *------------------------------------------------------------------------------- * Notes: Prints the user defined error message, along with the specific value * listed in errno and the system message for the errno number *******************************************************************************/ #ifndef PERROR #define PERROR(nSubSys, pszErrorMsg) \ { \ /* Save a local copy of the errno, in case other errors override value */ \ int nLocalErrno = errno; \ \ LOG(stderr, CRITICAL_MSG, nSubSys, "%s\n\terrno : [%d]\n\terrno msg : [%s]", \ pszErrorMsg, \ nLocalErrno, \ strerror(nLocalErrno)); \ } #endif void do_print_message(int, FILE*); /******************************************************************************* * Function : set_log_level * Parameters : nLogLevel - The log level to set * Returns : void *------------------------------------------------------------------------------- * Notes: Sets the current logging level *******************************************************************************/ void set_log_level(int nLogLevel); /******************************************************************************* * Function : contains_newline * Parameters : szMessage - NULL TERMINATED string * ... - Needed because log function is a MACRO * Returns : NO_NEW_LINE (0) - Last string character is NOT a new line * NEW_LINE_FOUND (1) - Last string character IS a new line *------------------------------------------------------------------------------- * Notes: szMessage MUST BE NULL TERMINATED. This function does NOT check for * a new line character in any spot except the last character of string *******************************************************************************/ int contains_newline(char * szMessage, ...); /******************************************************************************* * Function : load_log_level * Parameters : * Returns : void *------------------------------------------------------------------------------- * Notes: * This function will read a configuration file for the property "log_level". * The config file should have properties listed in the following format: * property1=value1 * property2=value2 *******************************************************************************/ void load_log_level(char * pszConfigFile); #endif
mnv104/capfs
shared/log.h
C
gpl-2.0
8,322
using System; using System.Reflection; using System.Resources; using System.Runtime.InteropServices; using System.Security; [assembly: AssemblyTitle("DC.Data.SqlDependencies")] [assembly: AssemblyDescription("DotCastle™ Data Sql Dependency Framework")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("DotCastle™")] [assembly: AssemblyProduct("DotCastle™ Common Framework")] [assembly: AssemblyCopyright("Copyright © 2013 - 2016, DotCastle™ TechnoSolutions Private Limited, INDIA. All rights reserved.")] [assembly: AssemblyTrademark("DotCastle™ is a trademark of DotCastle™ TechnoSolutions Private Limited, INDIA")] [assembly: AssemblyCulture("")] [assembly: NeutralResourcesLanguage("en", UltimateResourceFallbackLocation.MainAssembly)] [assembly: CLSCompliant(true)] [assembly: ComVisible(false)] [assembly: AssemblyVersion("1.0.0.1")] [assembly: AssemblyFileVersion("1.0.0.1")] [assembly: Guid("4D08061D-8636-424B-BF15-F18E1391727D")] [assembly: AllowPartiallyTrustedCallers] [assembly: SecurityRules(SecurityRuleSet.Level1)]
dotcastle/sql-dependency-provider
SqlDependencies/DC.Data.SqlDependencies/Properties/AssemblyInfo.cs
C#
gpl-2.0
1,065
var searchData= [ ['handle',['HANDLE',['../wglew_8h.html#aa1efb7b85228601549d183556de19dfc',1,'wglew.h']]], ['hdc',['HDC',['../wglew_8h.html#a7b84f5391331438359747d138a86ffe3',1,'wglew.h']]], ['hglrc',['HGLRC',['../wglew_8h.html#a79abb55a8f5ce093fad0358132a376e4',1,'wglew.h']]], ['hpbufferarb',['HPBUFFERARB',['../wglew_8h.html#a90ca6f3efc25075502afda6d38df143b',1,'wglew.h']]], ['hpbufferext',['HPBUFFEREXT',['../wglew_8h.html#a9a3e24dd9ba635197a508013c122d1d1',1,'wglew.h']]] ];
Acagamics/Acagamic-Toolkit
doc/html/search/functions_68.js
JavaScript
gpl-2.0
492
<?php if(!function_exists('libero_mikado_accordions_typography_styles')){ function libero_mikado_accordions_typography_styles(){ $selector = '.mkd-accordion-holder .mkd-title-holder'; $styles = array(); $font_family = libero_mikado_options()->getOptionValue('accordions_font_family'); if(libero_mikado_is_font_option_valid($font_family)){ $styles['font-family'] = libero_mikado_get_font_option_val($font_family); } $text_transform = libero_mikado_options()->getOptionValue('accordions_text_transform'); if(!empty($text_transform)) { $styles['text-transform'] = $text_transform; } $font_style = libero_mikado_options()->getOptionValue('accordions_font_style'); if(!empty($font_style)) { $styles['font-style'] = $font_style; } $letter_spacing = libero_mikado_options()->getOptionValue('accordions_letter_spacing'); if($letter_spacing !== '') { $styles['letter-spacing'] = libero_mikado_filter_px($letter_spacing).'px'; } $font_weight = libero_mikado_options()->getOptionValue('accordions_font_weight'); if(!empty($font_weight)) { $styles['font-weight'] = $font_weight; } echo libero_mikado_dynamic_css($selector, $styles); } add_action('libero_mikado_style_dynamic', 'libero_mikado_accordions_typography_styles'); } if(!function_exists('libero_mikado_accordions_general_color_styles')){ function libero_mikado_accordions_general_color_styles(){ $selector1 = '.mkd-accordion-holder'; $styles1 = array(); if(libero_mikado_options()->getOptionValue('accordions_background_color')) { $styles1['background-color'] = libero_mikado_options()->getOptionValue('accordions_background_color'); } echo libero_mikado_dynamic_css($selector1, $styles1); $selector2 = '.mkd-accordion-holder, .mkd-accordion-holder .mkd-title-holder, .mkd-accordion-holder .ui-accordion-content-active'; $styles2 = array(); if(libero_mikado_options()->getOptionValue('accordions_border_color')) { $styles2['border-color'] = libero_mikado_options()->getOptionValue('accordions_border_color'); } echo libero_mikado_dynamic_css($selector2, $styles2); } add_action('libero_mikado_style_dynamic', 'libero_mikado_accordions_general_color_styles'); } if(!function_exists('libero_mikado_accordions_inital_title_color_styles')){ function libero_mikado_accordions_inital_title_color_styles(){ $selector = '.mkd-accordion-holder.mkd-initial .mkd-title-holder'; $styles = array(); if(libero_mikado_options()->getOptionValue('accordions_title_color')) { $styles['color'] = libero_mikado_options()->getOptionValue('accordions_title_color'); } echo libero_mikado_dynamic_css($selector, $styles); } add_action('libero_mikado_style_dynamic', 'libero_mikado_accordions_inital_title_color_styles'); } if(!function_exists('libero_mikado_accordions_active_title_color_styles')){ function libero_mikado_accordions_active_title_color_styles(){ $selector = array( '.mkd-accordion-holder.mkd-initial .mkd-title-holder.ui-state-active', '.mkd-accordion-holder.mkd-initial .mkd-title-holder.ui-state-hover' ); $styles = array(); if(libero_mikado_options()->getOptionValue('accordions_title_color_active')) { $styles['color'] = libero_mikado_options()->getOptionValue('accordions_title_color_active'); } echo libero_mikado_dynamic_css($selector, $styles); } add_action('libero_mikado_style_dynamic', 'libero_mikado_accordions_active_title_color_styles'); } if(!function_exists('libero_mikado_accordions_inital_icon_color_styles')){ function libero_mikado_accordions_inital_icon_color_styles(){ $selector = '.mkd-accordion-holder.mkd-initial .mkd-title-holder .mkd-accordion-mark'; $styles = array(); if(libero_mikado_options()->getOptionValue('accordions_icon_color')) { $styles['color'] = libero_mikado_options()->getOptionValue('accordions_icon_color'); } echo libero_mikado_dynamic_css($selector, $styles); } add_action('libero_mikado_style_dynamic', 'libero_mikado_accordions_inital_icon_color_styles'); } if(!function_exists('libero_mikado_accordions_active_icon_color_styles')){ function libero_mikado_accordions_active_icon_color_styles(){ $selector = array( '.mkd-accordion-holder.mkd-initial .mkd-title-holder.ui-state-active .mkd-accordion-mark', '.mkd-accordion-holder.mkd-initial .mkd-title-holder.ui-state-hover .mkd-accordion-mark' ); $styles = array(); if(libero_mikado_options()->getOptionValue('accordions_icon_color_active')) { $styles['color'] = libero_mikado_options()->getOptionValue('accordions_icon_color_active'); } echo libero_mikado_dynamic_css($selector, $styles); } add_action('libero_mikado_style_dynamic', 'libero_mikado_accordions_active_icon_color_styles'); }
peerapat-pongnipakorn/somphoblaws
wp-content/themes/libero/framework/modules/shortcodes/accordions/custom-styles/custom-styles.php
PHP
gpl-2.0
4,969
/** * OWASP Benchmark Project v1.1 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>. * * The Benchmark is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Foundation, version 2. * * The Benchmark 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 General Public License for more details * * @author Nick Sanidas <a href="https://www.aspectsecurity.com">Aspect Security</a> * @created 2015 */ package org.owasp.benchmark.testcode; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/BenchmarkTest20262") public class BenchmarkTest20262 extends HttpServlet { private static final long serialVersionUID = 1L; @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String param = request.getQueryString(); String bar = doSomething(param); try { int randNumber = java.security.SecureRandom.getInstance("SHA1PRNG").nextInt(99); } catch (java.security.NoSuchAlgorithmException e) { System.out.println("Problem executing SecureRandom.nextInt(int) - TestCase"); throw new ServletException(e); } response.getWriter().println("Weak Randomness Test java.security.SecureRandom.nextInt(int) executed"); } // end doPost private static String doSomething(String param) throws ServletException, IOException { String bar; // Simple ? condition that assigns constant to bar on true condition int i = 106; bar = (7*18) + i > 200 ? "This_should_always_happen" : param; return bar; } }
iammyr/Benchmark
src/main/java/org/owasp/benchmark/testcode/BenchmarkTest20262.java
Java
gpl-2.0
2,271
/* * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code 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 General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, * CA 95054 USA or visit www.sun.com if you need additional information or * have any questions. * */ // DFA.CPP - Method definitions for outputting the matcher DFA from ADLC #include "adlc.hpp" //---------------------------Switches for debugging output--------------------- static bool debug_output = false; static bool debug_output1 = false; // top level chain rules //---------------------------Access to internals of class State---------------- static const char *sLeft = "_kids[0]"; static const char *sRight = "_kids[1]"; //---------------------------DFA productions----------------------------------- static const char *dfa_production = "DFA_PRODUCTION"; static const char *dfa_production_set_valid = "DFA_PRODUCTION__SET_VALID"; //---------------------------Production State---------------------------------- static const char *knownInvalid = "knownInvalid"; // The result does NOT have a rule defined static const char *knownValid = "knownValid"; // The result must be produced by a rule static const char *unknownValid = "unknownValid"; // Unknown (probably due to a child or predicate constraint) static const char *noConstraint = "noConstraint"; // No constraints seen so far static const char *hasConstraint = "hasConstraint"; // Within the first constraint //------------------------------Production------------------------------------ // Track the status of productions for a particular result class Production { public: const char *_result; const char *_constraint; const char *_valid; Expr *_cost_lb; // Cost lower bound for this production Expr *_cost_ub; // Cost upper bound for this production public: Production(const char *result, const char *constraint, const char *valid); ~Production() {}; void initialize(); // reset to be an empty container const char *valid() const { return _valid; } Expr *cost_lb() const { return (Expr *)_cost_lb; } Expr *cost_ub() const { return (Expr *)_cost_ub; } void print(); }; //------------------------------ProductionState-------------------------------- // Track the status of all production rule results // Reset for each root opcode (e.g., Op_RegI, Op_AddI, ...) class ProductionState { private: Dict _production; // map result of production, char*, to information or NULL const char *_constraint; public: // cmpstr does string comparisions. hashstr computes a key. ProductionState(Arena *arena) : _production(cmpstr, hashstr, arena) { initialize(); }; ~ProductionState() { }; void initialize(); // reset local and dictionary state const char *constraint(); void set_constraint(const char *constraint); // currently working inside of constraints const char *valid(const char *result); // unknownValid, or status for this production void set_valid(const char *result); // if not constrained, set status to knownValid Expr *cost_lb(const char *result); Expr *cost_ub(const char *result); void set_cost_bounds(const char *result, const Expr *cost, bool has_state_check, bool has_cost_check); // Return the Production associated with the result, // or create a new Production and insert it into the dictionary. Production *getProduction(const char *result); void print(); private: // Disable public use of constructor, copy-ctor, ... ProductionState( ) : _production(cmpstr, hashstr, Form::arena) { assert( false, "NotImplemented"); }; ProductionState( const ProductionState & ) : _production(cmpstr, hashstr, Form::arena) { assert( false, "NotImplemented"); }; // Deep-copy }; //---------------------------Helper Functions---------------------------------- // cost_check template: // 1) if (STATE__NOT_YET_VALID(EBXREGI) || _cost[EBXREGI] > c) { // 2) DFA_PRODUCTION__SET_VALID(EBXREGI, cmovI_memu_rule, c) // 3) } // static void cost_check(FILE *fp, const char *spaces, const char *arrayIdx, const Expr *cost, const char *rule, ProductionState &status) { bool state_check = false; // true if this production needs to check validity bool cost_check = false; // true if this production needs to check cost bool cost_is_above_upper_bound = false; // true if this production is unnecessary due to high cost bool cost_is_below_lower_bound = false; // true if this production replaces a higher cost production // Get information about this production const Expr *previous_ub = status.cost_ub(arrayIdx); if( !previous_ub->is_unknown() ) { if( previous_ub->less_than_or_equal(cost) ) { cost_is_above_upper_bound = true; if( debug_output ) { fprintf(fp, "// Previous rule with lower cost than: %s === %s_rule costs %s\n", arrayIdx, rule, cost->as_string()); } } } const Expr *previous_lb = status.cost_lb(arrayIdx); if( !previous_lb->is_unknown() ) { if( cost->less_than_or_equal(previous_lb) ) { cost_is_below_lower_bound = true; if( debug_output ) { fprintf(fp, "// Previous rule with higher cost\n"); } } } // line 1) // Check for validity and compare to other match costs const char *validity_check = status.valid(arrayIdx); if( validity_check == unknownValid ) { fprintf(fp, "%sif (STATE__NOT_YET_VALID(%s) || _cost[%s] > %s) {\n", spaces, arrayIdx, arrayIdx, cost->as_string()); state_check = true; cost_check = true; } else if( validity_check == knownInvalid ) { if( debug_output ) { fprintf(fp, "%s// %s KNOWN_INVALID \n", spaces, arrayIdx); } } else if( validity_check == knownValid ) { if( cost_is_above_upper_bound ) { // production cost is known to be too high. return; } else if( cost_is_below_lower_bound ) { // production will unconditionally overwrite a previous production that had higher cost } else { fprintf(fp, "%sif ( /* %s KNOWN_VALID || */ _cost[%s] > %s) {\n", spaces, arrayIdx, arrayIdx, cost->as_string()); cost_check = true; } } // line 2) // no need to set State vector if our state is knownValid const char *production = (validity_check == knownValid) ? dfa_production : dfa_production_set_valid; fprintf(fp, "%s %s(%s, %s_rule, %s)", spaces, production, arrayIdx, rule, cost->as_string() ); if( validity_check == knownValid ) { if( cost_is_below_lower_bound ) { fprintf(fp, "\t // overwrites higher cost rule"); } } fprintf(fp, "\n"); // line 3) if( cost_check || state_check ) { fprintf(fp, "%s}\n", spaces); } status.set_cost_bounds(arrayIdx, cost, state_check, cost_check); // Update ProductionState if( validity_check != knownValid ) { // set State vector if not previously known status.set_valid(arrayIdx); } } //---------------------------child_test---------------------------------------- // Example: // STATE__VALID_CHILD(_kids[0], FOO) && STATE__VALID_CHILD(_kids[1], BAR) // Macro equivalent to: _kids[0]->valid(FOO) && _kids[1]->valid(BAR) // static void child_test(FILE *fp, MatchList &mList) { if( mList._lchild ) // If left child, check it fprintf(fp, "STATE__VALID_CHILD(_kids[0], %s)", ArchDesc::getMachOperEnum(mList._lchild)); if( mList._lchild && mList._rchild ) // If both, add the "&&" fprintf(fp, " && " ); if( mList._rchild ) // If right child, check it fprintf(fp, "STATE__VALID_CHILD(_kids[1], %s)", ArchDesc::getMachOperEnum(mList._rchild)); } //---------------------------calc_cost----------------------------------------- // Example: // unsigned int c = _kids[0]->_cost[FOO] + _kids[1]->_cost[BAR] + 5; // Expr *ArchDesc::calc_cost(FILE *fp, const char *spaces, MatchList &mList, ProductionState &status) { fprintf(fp, "%sunsigned int c = ", spaces); Expr *c = new Expr("0"); if (mList._lchild ) { // If left child, add it in sprintf(Expr::buffer(), "_kids[0]->_cost[%s]", ArchDesc::getMachOperEnum(mList._lchild)); c->add(Expr::buffer()); } if (mList._rchild) { // If right child, add it in sprintf(Expr::buffer(), "_kids[1]->_cost[%s]", ArchDesc::getMachOperEnum(mList._rchild)); c->add(Expr::buffer()); } // Add in cost of this rule const char *mList_cost = mList.get_cost(); c->add(mList_cost, *this); fprintf(fp, "%s;\n", c->as_string()); c->set_external_name("c"); return c; } //---------------------------gen_match----------------------------------------- void ArchDesc::gen_match(FILE *fp, MatchList &mList, ProductionState &status, Dict &operands_chained_from) { const char *spaces4 = " "; const char *spaces6 = " "; fprintf(fp, "%s", spaces4); // Only generate child tests if this is not a leaf node bool has_child_constraints = mList._lchild || mList._rchild; const char *predicate_test = mList.get_pred(); if( has_child_constraints || predicate_test ) { // Open the child-and-predicate-test braces fprintf(fp, "if( "); status.set_constraint(hasConstraint); child_test(fp, mList); // Only generate predicate test if one exists for this match if( predicate_test ) { if( has_child_constraints ) { fprintf(fp," &&\n"); } fprintf(fp, "%s %s", spaces6, predicate_test); } // End of outer tests fprintf(fp," ) "); } else { // No child or predicate test needed status.set_constraint(noConstraint); } // End of outer tests fprintf(fp,"{\n"); // Calculate cost of this match const Expr *cost = calc_cost(fp, spaces6, mList, status); // Check against other match costs, and update cost & rule vectors cost_check(fp, spaces6, ArchDesc::getMachOperEnum(mList._resultStr), cost, mList._opcode, status); // If this is a member of an operand class, update the class cost & rule expand_opclass( fp, spaces6, cost, mList._resultStr, status); // Check if this rule should be used to generate the chains as well. const char *rule = /* set rule to "Invalid" for internal operands */ strcmp(mList._opcode,mList._resultStr) ? mList._opcode : "Invalid"; // If this rule produces an operand which has associated chain rules, // update the operands with the chain rule + this rule cost & this rule. chain_rule(fp, spaces6, mList._resultStr, cost, rule, operands_chained_from, status); // Close the child-and-predicate-test braces fprintf(fp, " }\n"); } //---------------------------expand_opclass------------------------------------ // Chain from one result_type to all other members of its operand class void ArchDesc::expand_opclass(FILE *fp, const char *indent, const Expr *cost, const char *result_type, ProductionState &status) { const Form *form = _globalNames[result_type]; OperandForm *op = form ? form->is_operand() : NULL; if( op && op->_classes.count() > 0 ) { if( debug_output ) { fprintf(fp, "// expand operand classes for operand: %s \n", (char *)op->_ident ); } // %%%%% Explanation // Iterate through all operand classes which include this operand op->_classes.reset(); const char *oclass; // Expr *cCost = new Expr(cost); while( (oclass = op->_classes.iter()) != NULL ) // Check against other match costs, and update cost & rule vectors cost_check(fp, indent, ArchDesc::getMachOperEnum(oclass), cost, result_type, status); } } //---------------------------chain_rule---------------------------------------- // Starting at 'operand', check if we know how to automatically generate other results void ArchDesc::chain_rule(FILE *fp, const char *indent, const char *operand, const Expr *icost, const char *irule, Dict &operands_chained_from, ProductionState &status) { // Check if we have already generated chains from this starting point if( operands_chained_from[operand] != NULL ) { return; } else { operands_chained_from.Insert( operand, operand); } if( debug_output ) { fprintf(fp, "// chain rules starting from: %s and %s \n", (char *)operand, (char *)irule); } // %%%%% Explanation ChainList *lst = (ChainList *)_chainRules[operand]; if (lst) { // printf("\nChain from <%s> at cost #%s\n",operand, icost ? icost : "_"); const char *result, *cost, *rule; for(lst->reset(); (lst->iter(result,cost,rule)) == true; ) { // Do not generate operands that are already available if( operands_chained_from[result] != NULL ) { continue; } else { // Compute the cost for previous match + chain_rule_cost // total_cost = icost + cost; Expr *total_cost = icost->clone(); // icost + cost total_cost->add(cost, *this); // Check for transitive chain rules Form *form = (Form *)_globalNames[rule]; if ( ! form->is_instruction()) { // printf(" result=%s cost=%s rule=%s\n", result, total_cost, rule); // Check against other match costs, and update cost & rule vectors const char *reduce_rule = strcmp(irule,"Invalid") ? irule : rule; cost_check(fp, indent, ArchDesc::getMachOperEnum(result), total_cost, reduce_rule, status); chain_rule(fp, indent, result, total_cost, irule, operands_chained_from, status); } else { // printf(" result=%s cost=%s rule=%s\n", result, total_cost, rule); // Check against other match costs, and update cost & rule vectors cost_check(fp, indent, ArchDesc::getMachOperEnum(result), total_cost, rule, status); chain_rule(fp, indent, result, total_cost, rule, operands_chained_from, status); } // If this is a member of an operand class, update class cost & rule expand_opclass( fp, indent, total_cost, result, status ); } } } } //---------------------------prune_matchlist----------------------------------- // Check for duplicate entries in a matchlist, and prune out the higher cost // entry. void ArchDesc::prune_matchlist(Dict &minimize, MatchList &mlist) { } //---------------------------buildDFA------------------------------------------ // DFA is a large switch with case statements for each ideal opcode encountered // in any match rule in the ad file. Each case has a series of if's to handle // the match or fail decisions. The matches test the cost function of that // rule, and prune any cases which are higher cost for the same reduction. // In order to generate the DFA we walk the table of ideal opcode/MatchList // pairs generated by the ADLC front end to build the contents of the case // statements (a series of if statements). void ArchDesc::buildDFA(FILE* fp) { int i; // Remember operands that are the starting points for chain rules. // Prevent cycles by checking if we have already generated chain. Dict operands_chained_from(cmpstr, hashstr, Form::arena); // Hash inputs to match rules so that final DFA contains only one entry for // each match pattern which is the low cost entry. Dict minimize(cmpstr, hashstr, Form::arena); // Track status of dfa for each resulting production // reset for each ideal root. ProductionState status(Form::arena); // Output the start of the DFA method into the output file fprintf(fp, "\n"); fprintf(fp, "//------------------------- Source -----------------------------------------\n"); // Do not put random source code into the DFA. // If there are constants which need sharing, put them in "source_hpp" forms. // _source.output(fp); fprintf(fp, "\n"); fprintf(fp, "//------------------------- Attributes -------------------------------------\n"); _attributes.output(fp); fprintf(fp, "\n"); fprintf(fp, "//------------------------- Macros -----------------------------------------\n"); // #define DFA_PRODUCTION(result, rule, cost)\ // _cost[ (result) ] = cost; _rule[ (result) ] = rule; fprintf(fp, "#define %s(result, rule, cost)\\\n", dfa_production); fprintf(fp, " _cost[ (result) ] = cost; _rule[ (result) ] = rule;\n"); fprintf(fp, "\n"); // #define DFA_PRODUCTION__SET_VALID(result, rule, cost)\ // DFA_PRODUCTION( (result), (rule), (cost) ); STATE__SET_VALID( (result) ); fprintf(fp, "#define %s(result, rule, cost)\\\n", dfa_production_set_valid); fprintf(fp, " %s( (result), (rule), (cost) ); STATE__SET_VALID( (result) );\n", dfa_production); fprintf(fp, "\n"); fprintf(fp, "//------------------------- DFA --------------------------------------------\n"); fprintf(fp, "// DFA is a large switch with case statements for each ideal opcode encountered\n" "// in any match rule in the ad file. Each case has a series of if's to handle\n" "// the match or fail decisions. The matches test the cost function of that\n" "// rule, and prune any cases which are higher cost for the same reduction.\n" "// In order to generate the DFA we walk the table of ideal opcode/MatchList\n" "// pairs generated by the ADLC front end to build the contents of the case\n" "// statements (a series of if statements).\n" ); fprintf(fp, "\n"); fprintf(fp, "\n"); if (_dfa_small) { // Now build the individual routines just like the switch entries in large version // Iterate over the table of MatchLists, start at first valid opcode of 1 for (i = 1; i < _last_opcode; i++) { if (_mlistab[i] == NULL) continue; // Generate the routine header statement for this opcode fprintf(fp, "void State::_sub_Op_%s(const Node *n){\n", NodeClassNames[i]); // Generate body. Shared for both inline and out-of-line version gen_dfa_state_body(fp, minimize, status, operands_chained_from, i); // End of routine fprintf(fp, "}\n"); } } fprintf(fp, "bool State::DFA"); fprintf(fp, "(int opcode, const Node *n) {\n"); fprintf(fp, " switch(opcode) {\n"); // Iterate over the table of MatchLists, start at first valid opcode of 1 for (i = 1; i < _last_opcode; i++) { if (_mlistab[i] == NULL) continue; // Generate the case statement for this opcode if (_dfa_small) { fprintf(fp, " case Op_%s: { _sub_Op_%s(n);\n", NodeClassNames[i], NodeClassNames[i]); } else { fprintf(fp, " case Op_%s: {\n", NodeClassNames[i]); // Walk the list, compacting it gen_dfa_state_body(fp, minimize, status, operands_chained_from, i); } // Print the "break" fprintf(fp, " break;\n"); fprintf(fp, " }\n"); } // Generate the default case for switch(opcode) fprintf(fp, " \n"); fprintf(fp, " default:\n"); fprintf(fp, " tty->print(\"Default case invoked for: \\n\");\n"); fprintf(fp, " tty->print(\" opcode = %cd, \\\"%cs\\\"\\n\", opcode, NodeClassNames[opcode]);\n", '%', '%'); fprintf(fp, " return false;\n"); fprintf(fp, " }\n"); // Return status, indicating a successful match. fprintf(fp, " return true;\n"); // Generate the closing brace for method Matcher::DFA fprintf(fp, "}\n"); Expr::check_buffers(); } class dfa_shared_preds { enum { count = 4 }; static bool _found[count]; static const char* _type [count]; static const char* _var [count]; static const char* _pred [count]; static void check_index(int index) { assert( 0 <= index && index < count, "Invalid index"); } // Confirm that this is a separate sub-expression. // Only need to catch common cases like " ... && shared ..." // and avoid hazardous ones like "...->shared" static bool valid_loc(char *pred, char *shared) { // start of predicate is valid if( shared == pred ) return true; // Check previous character and recurse if needed char *prev = shared - 1; char c = *prev; switch( c ) { case ' ': case '\n': return dfa_shared_preds::valid_loc(pred, prev); case '!': case '(': case '<': case '=': return true; case '"': // such as: #line 10 "myfile.ad"\n mypredicate return true; case '|': if( prev != pred && *(prev-1) == '|' ) return true; case '&': if( prev != pred && *(prev-1) == '&' ) return true; default: return false; } return false; } public: static bool found(int index){ check_index(index); return _found[index]; } static void set_found(int index, bool val) { check_index(index); _found[index] = val; } static void reset_found() { for( int i = 0; i < count; ++i ) { _found[i] = false; } }; static const char* type(int index) { check_index(index); return _type[index]; } static const char* var (int index) { check_index(index); return _var [index]; } static const char* pred(int index) { check_index(index); return _pred[index]; } // Check each predicate in the MatchList for common sub-expressions static void cse_matchlist(MatchList *matchList) { for( MatchList *mList = matchList; mList != NULL; mList = mList->get_next() ) { Predicate* predicate = mList->get_pred_obj(); char* pred = mList->get_pred(); if( pred != NULL ) { for(int index = 0; index < count; ++index ) { const char *shared_pred = dfa_shared_preds::pred(index); const char *shared_pred_var = dfa_shared_preds::var(index); bool result = dfa_shared_preds::cse_predicate(predicate, shared_pred, shared_pred_var); if( result ) dfa_shared_preds::set_found(index, true); } } } } // If the Predicate contains a common sub-expression, replace the Predicate's // string with one that uses the variable name. static bool cse_predicate(Predicate* predicate, const char *shared_pred, const char *shared_pred_var) { bool result = false; char *pred = predicate->_pred; if( pred != NULL ) { char *new_pred = pred; for( char *shared_pred_loc = strstr(new_pred, shared_pred); shared_pred_loc != NULL && dfa_shared_preds::valid_loc(new_pred,shared_pred_loc); shared_pred_loc = strstr(new_pred, shared_pred) ) { // Do not modify the original predicate string, it is shared if( new_pred == pred ) { new_pred = strdup(pred); shared_pred_loc = strstr(new_pred, shared_pred); } // Replace shared_pred with variable name strncpy(shared_pred_loc, shared_pred_var, strlen(shared_pred_var)); } // Install new predicate if( new_pred != pred ) { predicate->_pred = new_pred; result = true; } } return result; } // Output the hoisted common sub-expression if we found it in predicates static void generate_cse(FILE *fp) { for(int j = 0; j < count; ++j ) { if( dfa_shared_preds::found(j) ) { const char *shared_pred_type = dfa_shared_preds::type(j); const char *shared_pred_var = dfa_shared_preds::var(j); const char *shared_pred = dfa_shared_preds::pred(j); fprintf(fp, " %s %s = %s;\n", shared_pred_type, shared_pred_var, shared_pred); } } } }; // shared predicates, _var and _pred entry should be the same length bool dfa_shared_preds::_found[dfa_shared_preds::count] = { false, false, false, false }; const char* dfa_shared_preds::_type[dfa_shared_preds::count] = { "int", "jlong", "intptr_t", "bool" }; const char* dfa_shared_preds::_var [dfa_shared_preds::count] = { "_n_get_int__", "_n_get_long__", "_n_get_intptr_t__", "Compile__current____select_24_bit_instr__" }; const char* dfa_shared_preds::_pred[dfa_shared_preds::count] = { "n->get_int()", "n->get_long()", "n->get_intptr_t()", "Compile::current()->select_24_bit_instr()" }; void ArchDesc::gen_dfa_state_body(FILE* fp, Dict &minimize, ProductionState &status, Dict &operands_chained_from, int i) { // Start the body of each Op_XXX sub-dfa with a clean state. status.initialize(); // Walk the list, compacting it MatchList* mList = _mlistab[i]; do { // Hash each entry using inputs as key and pointer as data. // If there is already an entry, keep the one with lower cost, and // remove the other one from the list. prune_matchlist(minimize, *mList); // Iterate mList = mList->get_next(); } while(mList != NULL); // Hoist previously specified common sub-expressions out of predicates dfa_shared_preds::reset_found(); dfa_shared_preds::cse_matchlist(_mlistab[i]); dfa_shared_preds::generate_cse(fp); mList = _mlistab[i]; // Walk the list again, generating code do { // Each match can generate its own chains operands_chained_from.Clear(); gen_match(fp, *mList, status, operands_chained_from); mList = mList->get_next(); } while(mList != NULL); // Fill in any chain rules which add instructions // These can generate their own chains as well. operands_chained_from.Clear(); // if( debug_output1 ) { fprintf(fp, "// top level chain rules for: %s \n", (char *)NodeClassNames[i]); } // %%%%% Explanation const Expr *zeroCost = new Expr("0"); chain_rule(fp, " ", (char *)NodeClassNames[i], zeroCost, "Invalid", operands_chained_from, status); } //------------------------------Expr------------------------------------------ Expr *Expr::_unknown_expr = NULL; char Expr::string_buffer[STRING_BUFFER_LENGTH]; char Expr::external_buffer[STRING_BUFFER_LENGTH]; bool Expr::_init_buffers = Expr::init_buffers(); Expr::Expr() { _external_name = NULL; _expr = "Invalid_Expr"; _min_value = Expr::Max; _max_value = Expr::Zero; } Expr::Expr(const char *cost) { _external_name = NULL; int intval = 0; if( cost == NULL ) { _expr = "0"; _min_value = Expr::Zero; _max_value = Expr::Zero; } else if( ADLParser::is_int_token(cost, intval) ) { _expr = cost; _min_value = intval; _max_value = intval; } else { assert( strcmp(cost,"0") != 0, "Recognize string zero as an int"); _expr = cost; _min_value = Expr::Zero; _max_value = Expr::Max; } } Expr::Expr(const char *name, const char *expression, int min_value, int max_value) { _external_name = name; _expr = expression ? expression : name; _min_value = min_value; _max_value = max_value; assert(_min_value >= 0 && _min_value <= Expr::Max, "value out of range"); assert(_max_value >= 0 && _max_value <= Expr::Max, "value out of range"); } Expr *Expr::clone() const { Expr *cost = new Expr(); cost->_external_name = _external_name; cost->_expr = _expr; cost->_min_value = _min_value; cost->_max_value = _max_value; return cost; } void Expr::add(const Expr *c) { // Do not update fields until all computation is complete const char *external = compute_external(this, c); const char *expr = compute_expr(this, c); int min_value = compute_min (this, c); int max_value = compute_max (this, c); _external_name = external; _expr = expr; _min_value = min_value; _max_value = max_value; } void Expr::add(const char *c) { Expr *cost = new Expr(c); add(cost); } void Expr::add(const char *c, ArchDesc &AD) { const Expr *e = AD.globalDefs()[c]; if( e != NULL ) { // use the value of 'c' defined in <arch>.ad add(e); } else { Expr *cost = new Expr(c); add(cost); } } const char *Expr::compute_external(const Expr *c1, const Expr *c2) { const char * result = NULL; // Preserve use of external name which has a zero value if( c1->_external_name != NULL ) { sprintf( string_buffer, "%s", c1->as_string()); if( !c2->is_zero() ) { strcat( string_buffer, "+"); strcat( string_buffer, c2->as_string()); } result = strdup(string_buffer); } else if( c2->_external_name != NULL ) { if( !c1->is_zero() ) { sprintf( string_buffer, "%s", c1->as_string()); strcat( string_buffer, " + "); } else { string_buffer[0] = '\0'; } strcat( string_buffer, c2->_external_name ); result = strdup(string_buffer); } return result; } const char *Expr::compute_expr(const Expr *c1, const Expr *c2) { if( !c1->is_zero() ) { sprintf( string_buffer, "%s", c1->_expr); if( !c2->is_zero() ) { strcat( string_buffer, "+"); strcat( string_buffer, c2->_expr); } } else if( !c2->is_zero() ) { sprintf( string_buffer, "%s", c2->_expr); } else { sprintf( string_buffer, "0"); } char *cost = strdup(string_buffer); return cost; } int Expr::compute_min(const Expr *c1, const Expr *c2) { int result = c1->_min_value + c2->_min_value; assert( result >= 0, "Invalid cost computation"); return result; } int Expr::compute_max(const Expr *c1, const Expr *c2) { int result = c1->_max_value + c2->_max_value; if( result < 0 ) { // check for overflow result = Expr::Max; } return result; } void Expr::print() const { if( _external_name != NULL ) { printf(" %s == (%s) === [%d, %d]\n", _external_name, _expr, _min_value, _max_value); } else { printf(" %s === [%d, %d]\n", _expr, _min_value, _max_value); } } void Expr::print_define(FILE *fp) const { assert( _external_name != NULL, "definition does not have a name"); assert( _min_value == _max_value, "Expect user definitions to have constant value"); fprintf(fp, "#define %s (%s) \n", _external_name, _expr); fprintf(fp, "// value == %d \n", _min_value); } void Expr::print_assert(FILE *fp) const { assert( _external_name != NULL, "definition does not have a name"); assert( _min_value == _max_value, "Expect user definitions to have constant value"); fprintf(fp, " assert( %s == %d, \"Expect (%s) to equal %d\");\n", _external_name, _min_value, _expr, _min_value); } Expr *Expr::get_unknown() { if( Expr::_unknown_expr == NULL ) { Expr::_unknown_expr = new Expr(); } return Expr::_unknown_expr; } bool Expr::init_buffers() { // Fill buffers with 0 for( int i = 0; i < STRING_BUFFER_LENGTH; ++i ) { external_buffer[i] = '\0'; string_buffer[i] = '\0'; } return true; } bool Expr::check_buffers() { // returns 'true' if buffer use may have overflowed bool ok = true; for( int i = STRING_BUFFER_LENGTH - 100; i < STRING_BUFFER_LENGTH; ++i) { if( external_buffer[i] != '\0' || string_buffer[i] != '\0' ) { ok = false; assert( false, "Expr:: Buffer overflow"); } } return ok; } //------------------------------ExprDict--------------------------------------- // Constructor ExprDict::ExprDict( CmpKey cmp, Hash hash, Arena *arena ) : _expr(cmp, hash, arena), _defines() { } ExprDict::~ExprDict() { } // Return # of name-Expr pairs in dict int ExprDict::Size(void) const { return _expr.Size(); } // define inserts the given key-value pair into the dictionary, // and records the name in order for later output, ... const Expr *ExprDict::define(const char *name, Expr *expr) { const Expr *old_expr = (*this)[name]; assert(old_expr == NULL, "Implementation does not support redefinition"); _expr.Insert(name, expr); _defines.addName(name); return old_expr; } // Insert inserts the given key-value pair into the dictionary. The prior // value of the key is returned; NULL if the key was not previously defined. const Expr *ExprDict::Insert(const char *name, Expr *expr) { return (Expr*)_expr.Insert((void*)name, (void*)expr); } // Finds the value of a given key; or NULL if not found. // The dictionary is NOT changed. const Expr *ExprDict::operator [](const char *name) const { return (Expr*)_expr[name]; } void ExprDict::print_defines(FILE *fp) { fprintf(fp, "\n"); const char *name = NULL; for( _defines.reset(); (name = _defines.iter()) != NULL; ) { const Expr *expr = (const Expr*)_expr[name]; assert( expr != NULL, "name in ExprDict without matching Expr in dictionary"); expr->print_define(fp); } } void ExprDict::print_asserts(FILE *fp) { fprintf(fp, "\n"); fprintf(fp, " // Following assertions generated from definition section\n"); const char *name = NULL; for( _defines.reset(); (name = _defines.iter()) != NULL; ) { const Expr *expr = (const Expr*)_expr[name]; assert( expr != NULL, "name in ExprDict without matching Expr in dictionary"); expr->print_assert(fp); } } // Print out the dictionary contents as key-value pairs static void dumpekey(const void* key) { fprintf(stdout, "%s", (char*) key); } static void dumpexpr(const void* expr) { fflush(stdout); ((Expr*)expr)->print(); } void ExprDict::dump() { _expr.print(dumpekey, dumpexpr); } //------------------------------ExprDict::private------------------------------ // Disable public use of constructor, copy-ctor, operator =, operator == ExprDict::ExprDict( ) : _expr(cmpkey,hashkey), _defines() { assert( false, "NotImplemented"); } ExprDict::ExprDict( const ExprDict & ) : _expr(cmpkey,hashkey), _defines() { assert( false, "NotImplemented"); } ExprDict &ExprDict::operator =( const ExprDict &rhs) { assert( false, "NotImplemented"); _expr = rhs._expr; return *this; } // == compares two dictionaries; they must have the same keys (their keys // must match using CmpKey) and they must have the same values (pointer // comparison). If so 1 is returned, if not 0 is returned. bool ExprDict::operator ==(const ExprDict &d) const { assert( false, "NotImplemented"); return false; } //------------------------------Production------------------------------------- Production::Production(const char *result, const char *constraint, const char *valid) { initialize(); _result = result; _constraint = constraint; _valid = valid; } void Production::initialize() { _result = NULL; _constraint = NULL; _valid = knownInvalid; _cost_lb = Expr::get_unknown(); _cost_ub = Expr::get_unknown(); } void Production::print() { printf("%s", (_result == NULL ? "NULL" : _result ) ); printf("%s", (_constraint == NULL ? "NULL" : _constraint ) ); printf("%s", (_valid == NULL ? "NULL" : _valid ) ); _cost_lb->print(); _cost_ub->print(); } //------------------------------ProductionState-------------------------------- void ProductionState::initialize() { _constraint = noConstraint; // reset each Production currently in the dictionary DictI iter( &_production ); const void *x, *y = NULL; for( ; iter.test(); ++iter) { x = iter._key; y = iter._value; Production *p = (Production*)y; if( p != NULL ) { p->initialize(); } } } Production *ProductionState::getProduction(const char *result) { Production *p = (Production *)_production[result]; if( p == NULL ) { p = new Production(result, _constraint, knownInvalid); _production.Insert(result, p); } return p; } void ProductionState::set_constraint(const char *constraint) { _constraint = constraint; } const char *ProductionState::valid(const char *result) { return getProduction(result)->valid(); } void ProductionState::set_valid(const char *result) { Production *p = getProduction(result); // Update valid as allowed by current constraints if( _constraint == noConstraint ) { p->_valid = knownValid; } else { if( p->_valid != knownValid ) { p->_valid = unknownValid; } } } Expr *ProductionState::cost_lb(const char *result) { return getProduction(result)->cost_lb(); } Expr *ProductionState::cost_ub(const char *result) { return getProduction(result)->cost_ub(); } void ProductionState::set_cost_bounds(const char *result, const Expr *cost, bool has_state_check, bool has_cost_check) { Production *p = getProduction(result); if( p->_valid == knownInvalid ) { // Our cost bounds are not unknown, just not defined. p->_cost_lb = cost->clone(); p->_cost_ub = cost->clone(); } else if (has_state_check || _constraint != noConstraint) { // The production is protected by a condition, so // the cost bounds may expand. // _cost_lb = min(cost, _cost_lb) if( cost->less_than_or_equal(p->_cost_lb) ) { p->_cost_lb = cost->clone(); } // _cost_ub = max(cost, _cost_ub) if( p->_cost_ub->less_than_or_equal(cost) ) { p->_cost_ub = cost->clone(); } } else if (has_cost_check) { // The production has no condition check, but does // have a cost check that could reduce the upper // and/or lower bound. // _cost_lb = min(cost, _cost_lb) if( cost->less_than_or_equal(p->_cost_lb) ) { p->_cost_lb = cost->clone(); } // _cost_ub = min(cost, _cost_ub) if( cost->less_than_or_equal(p->_cost_ub) ) { p->_cost_ub = cost->clone(); } } else { // The costs are unconditionally set. p->_cost_lb = cost->clone(); p->_cost_ub = cost->clone(); } } // Print out the dictionary contents as key-value pairs static void print_key (const void* key) { fprintf(stdout, "%s", (char*) key); } static void print_production(const void* production) { fflush(stdout); ((Production*)production)->print(); } void ProductionState::print() { _production.print(print_key, print_production); }
TheTypoMaster/Scaper
openjdk/hotspot/src/share/vm/adlc/dfa.cpp
C++
gpl-2.0
37,891
#if(0) FTANGLE v1.53, created with UNIX on "Thursday, September 21, 1995 at 15:06." COMMAND LINE: "web/ftangle web/y_type -A -# --F -= 1.53/web/y_type.h" RUN TIME: "Saturday, September 23, 1995 at 16:17." WEB FILE: "web/y_type.web" CHANGE FILE: (none) #endif void HUGE*alloc PROTO((CONST outer_char abbrev[],BUF_SIZE HUGE*pnunits, size_t nsize,int dn)); SRTN free_mem0 PROTO((void HUGE*p,CONST outer_char why[],BUF_SIZE nunits, size_t nsize)); void HUGE*get_mem0 PROTO((CONST outer_char why[],BUF_SIZE nunits, size_t nsize));
OS2World/APP-WORDPROC-FWEB
web/y_type.h
C
gpl-2.0
544
/* Copyright (c) 2012-2013 Montel Laurent <montel@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef OperaImportData_H #define OperaImportData_H #include "abstractimporter.h" class ImportWizard; class OperaImportData : public AbstractImporter { public: explicit OperaImportData(ImportWizard *parent); ~OperaImportData(); TypeSupportedOptions supportedOption(); bool foundMailer() const; bool importMails(); bool importAddressBook(); bool importSettings(); QString name() const; }; #endif /* OperaImportData_H */
kolab-groupware/kdepim
importwizard/opera/operaimportdata.h
C
gpl-2.0
1,169
/* * song_editor.h - declaration of class songEditor, a window where you can * setup your songs * * Copyright (c) 2004-2011 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program 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 * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program (see COPYING); if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * */ #ifndef _SONG_EDITOR_H #define _SONG_EDITOR_H #include "track_container_view.h" class QLabel; class QScrollBar; class comboBox; class song; class timeLine; class toolButton; class positionLine : public QWidget { public: positionLine( QWidget * _parent ); private: virtual void paintEvent( QPaintEvent * _pe ); } ; class songEditor : public trackContainerView { Q_OBJECT public: songEditor( song * _song, songEditor * & _engine_ptr ); virtual ~songEditor(); public slots: void scrolled( int _new_pos ); void play(); void record(); void recordAccompany(); void stop(); private slots: void updateScrollBar( int ); void updatePosition( const midiTime & _t ); void zoomingChanged(); void adjustUiAfterProjectLoad(); private: virtual void keyPressEvent( QKeyEvent * _ke ); virtual void wheelEvent( QWheelEvent * _we ); virtual bool allowRubberband() const; song * m_s; QScrollBar * m_leftRightScroll; QWidget * m_toolBar; toolButton * m_playButton; toolButton * m_recordButton; toolButton * m_recordAccompanyButton; toolButton * m_stopButton; timeLine * m_timeLine; toolButton * m_addBBTrackButton; toolButton * m_addSampleTrackButton; toolButton * m_addAutomationTrackButton; toolButton * m_drawModeButton; toolButton * m_editModeButton; comboBox * m_zoomingComboBox; positionLine * m_positionLine; bool m_scrollBack; } ; #endif
fronin/lmms
include/song_editor.h
C
gpl-2.0
2,413
/******************************************************************************* * Copyright (c) 2011 University of Bayreuth - BayCEER. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v2.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * University of Bayreuth - BayCEER - initial API and implementation ******************************************************************************/ package de.unibayreuth.bayeos.goat.tree; import java.awt.Insets; import java.awt.Point; import java.awt.Rectangle; import javax.swing.ToolTipManager; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; import org.apache.log4j.Logger; public class JObjektTree extends javax.swing.JTree { protected final static Logger logger = Logger.getLogger("JObjektTree.class"); private final static Insets autoscrollInsets = new Insets(20, 20, 20, 20); // insets public JObjektTree(TreeModel treeModel) { super(treeModel); setBorder(null); getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); // ensure that the tree view displays tool tips ToolTipManager.sharedInstance().registerComponent(this); } public void expandPathTo(TreePath path){ logger.debug("expandPathTo:" + path.toString()); expandPath(path); setSelectionPath(path); scrollPathToVisible(path); } // drag and drop scrolling public void autoscroll(Point cursorLocation) { Insets insets = getAutoscrollInsets(); Rectangle outer = getVisibleRect(); Rectangle inner = new Rectangle(outer.x+insets.left, outer.y+insets.top, outer.width-(insets.left+insets.right), outer.height-(insets.top+insets.bottom)); if (!inner.contains(cursorLocation)) { Rectangle scrollRect = new Rectangle(cursorLocation.x-insets.left, cursorLocation.y-insets.top, insets.left+insets.right, insets.top+insets.bottom); scrollRectToVisible(scrollRect); } } public Insets getAutoscrollInsets() { return (autoscrollInsets); } public void refreshCurrentNode() { TreePath path = getSelectionPath(); if (path != null) { logger.debug(path.toString()); DefaultObjektNode node = (DefaultObjektNode)getLastSelectedPathComponent(); node.unloadChildren(); ((DefaultTreeModel)getModel()).nodeStructureChanged(node); } } public void refreshRoot(){ TreeModel m = this.treeModel; DefaultObjektNode root = (DefaultObjektNode)getModel().getRoot(); root.unloadChildren(); ((DefaultTreeModel)getModel()).nodeStructureChanged(root); } public ObjektNode getLastSelectedUserObjekt() { DefaultObjektNode node = (DefaultObjektNode)getLastSelectedPathComponent(); if (node == null) return null; return (ObjektNode)node.getUserObject(); } /** * Returns the TreeNode instance that is selected in the tree. * If nothing is selected, null is returned. */ public DefaultMutableTreeNode getLastSelectedNode() { TreePath selPath = getSelectionPath(); if(selPath != null) return (DefaultMutableTreeNode)selPath.getLastPathComponent(); return null; } }
BayCEER/goat
src/main/java/de/unibayreuth/bayeos/goat/tree/JObjektTree.java
Java
gpl-2.0
3,637
// This file is part of Chaotic Rage (c) 2010 Josh Heidenreich // // kate: tab-width 4; indent-width 4; space-indent off; word-wrap off; #include <string> #include <confuse.h> #include "../game_engine.h" #include "../render_opengl/render_opengl.h" #include "../render_opengl/render_opengl_settings.h" #include "../render/render_debug.h" #include "../render/render_null.h" #include "../render/render_ascii.h" #include "../audio/audio_sdlmixer.h" #include "../audio/audio_null.h" #include "../mod/mod_manager.h" #include "../fx/effects_manager.h" #include "../physics/physics_bullet.h" #include "clientconfig.h" #include "cmdline.h" using namespace std; static cfg_opt_t config_opts[] = { CFG_INT((char*) "gl-msaa", 1, CFGF_NONE), CFG_INT((char*) "gl-tex-filter", 4, CFGF_NONE), CFG_BOOL((char*) "fullscreen", cfg_false, CFGF_NONE), CFG_INT((char*) "width", 1280, CFGF_NONE), CFG_INT((char*) "height", 800, CFGF_NONE), CFG_STR((char*) "lang", 0, CFGF_NONE), // Deprecated; only in place to not break existing confings CFG_INT((char*) "render", 0, CFGF_NONE), CFG_END() }; /** * Load the config * Then save again straight away, to fill the file with defaults **/ ClientConfig::ClientConfig() { this->gl = NULL; this->fullscreen = false; this->width = 0; this->height = 0; this->load(); } /** * Loads the client config **/ void ClientConfig::load() { cfg_t *cfg; string filename = getUserDataDir().append("client.conf"); // Parse config cfg = cfg_init(config_opts, CFGF_NONE); int result = cfg_parse(cfg, filename.c_str()); if (result == CFG_PARSE_ERROR) { reportFatalError("Unable to parse client config file"); cfg_free(cfg); return; } // OpenGL this->gl = new RenderOpenGLSettings(); this->gl->msaa = cfg_getint(cfg, "gl-msaa"); this->gl->tex_filter = cfg_getint(cfg, "gl-tex-filter"); // Screen res this->fullscreen = cfg_getbool(cfg, "fullscreen"); this->width = cfg_getint(cfg, "width"); this->height = cfg_getint(cfg, "height"); // Language char* tmp = cfg_getstr(cfg, "lang"); if (tmp != NULL) { this->lang = std::string(tmp); } else { this->lang = "en"; } cfg_free(cfg); } /** * Save the config **/ void ClientConfig::save() { string filename = getUserDataDir().append("client.conf"); FILE * fp = fopen(filename.c_str(), "w"); if (fp == NULL) { return; } // TODO: Save config _properly_ // Okay so the correct way is the libConfuse cfg_print function // but it wasn't working, and I'm getting too tired to keep trying fprintf(fp, "# Config file for CR\n"); fprintf(fp, "gl-msaa = %i\n", this->gl->msaa); fprintf(fp, "gl-tex-filter = %i\n", this->gl->tex_filter); fprintf(fp, "fullscreen = %s\n", (this->fullscreen ? "true" : "false")); fprintf(fp, "width = %i\n", this->width); fprintf(fp, "height = %i\n", this->height); fprintf(fp, "lang = %s\n", this->lang.c_str()); fclose(fp); } /** * Init rendering engine based on config options **/ void ClientConfig::initRender(GameState *st) { if (GEng()->cmdline->render_class == "debug") { GEng()->render = new RenderDebug(st); } else if (GEng()->cmdline->render_class == "null") { GEng()->render = new RenderNull(st); } else if (GEng()->cmdline->render_class == "ascii") { GEng()->render = new RenderAscii(st); } else { GEng()->render = new RenderOpenGL(st, this->gl); } // Determine if fullscreen or not bool fs = false; if (GEng()->cmdline->resolution[0] == 0) { fs = this->fullscreen; } else if (GEng()->cmdline->resolution[0] == 2) { fs = true; } // Set size if (GEng()->cmdline->resolution[1] != 0 && GEng()->cmdline->resolution[2] != 2) { GEng()->render->setScreenSize(GEng()->cmdline->resolution[1], GEng()->cmdline->resolution[2], fs); } else { GEng()->render->setScreenSize(this->width, this->height, fs); } } /** * Init audio engine based on config options **/ void ClientConfig::initAudio(GameState *st) { if (GEng()->cmdline->audio_class == "null") { GEng()->audio = new AudioNull(st); } else { GEng()->audio = new AudioSDLMixer(st); } } /** * Init physics engine based on config options **/ void ClientConfig::initPhysics(GameState *st) { new PhysicsBullet(st); } /** * Init mods engine based on config options **/ void ClientConfig::initMods(GameState *st) { GEng()->mm = new ModManager(); }
TheJosh/chaotic-rage
src/util/clientconfig.cpp
C++
gpl-2.0
4,295
<?php /* ----------------------------------------------------------------------------------------- $Id: flat.php 899 2005-04-29 02:40:57Z hhgag $ XT-Commerce - community made shopping http://www.xt-commerce.com Copyright (c) 2003 XT-Commerce ----------------------------------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(flat.php,v 1.6 2003/02/16); www.oscommerce.com (c) 2003 nextcommerce (flat.php,v 1.4 2003/08/13); www.nextcommerce.org Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ define('MODULE_SHIPPING_FLAT_TEXT_TITLE', 'Flat Rate'); define('MODULE_SHIPPING_FLAT_TEXT_DESCRIPTION', 'Flat Rate'); define('MODULE_SHIPPING_FLAT_TEXT_WAY', 'Best Way'); define('MODULE_SHIPPING_FLAT_STATUS_TITLE', 'Enable Flat Shipping'); define('MODULE_SHIPPING_FLAT_STATUS_DESC', 'Do you want to offer flat rate shipping?'); define('MODULE_SHIPPING_FLAT_ALLOWED_TITLE', 'Allowed Zones'); define('MODULE_SHIPPING_FLAT_ALLOWED_DESC', 'Please enter the zones <b>separately</b> which should be allowed to use this modul (e. g. AT,DE (leave empty if you want to allow all zones)'); define('MODULE_SHIPPING_FLAT_COST_TITLE', 'Shipping Cost'); define('MODULE_SHIPPING_FLAT_COST_DESC', 'The shipping cost for all orders using this shipping method.'); define('MODULE_SHIPPING_FLAT_TAX_CLASS_TITLE', 'Tax Class'); define('MODULE_SHIPPING_FLAT_TAX_CLASS_DESC', 'Use the following tax class on the shipping fee.'); define('MODULE_SHIPPING_FLAT_ZONE_TITLE', 'Shipping Zone'); define('MODULE_SHIPPING_FLAT_ZONE_DESC', 'If a zone is selected, only enable this shipping method for that zone.'); define('MODULE_SHIPPING_FLAT_SORT_ORDER_TITLE', 'Sort Order'); define('MODULE_SHIPPING_FLAT_SORT_ORDER_DESC', 'Sort order of display.'); ?>
kiang/xtcmodified
lang/english/modules/shipping/flat.php
PHP
gpl-2.0
1,951
/* * Copyright 2007-2013 by Silicon Laboratories * * $Id: proslic_api_config.h 4882 2015-04-17 23:13:52Z nizajerk $ * * * Author(s): * laj * * Distributed by: * Silicon Laboratories, Inc * * This file contains proprietary information. * No dissemination allowed without prior written permission from * Silicon Laboratories, Inc. * * */ #ifndef PROSLIC_API_CFG #define PROSLIC_API_CFG /** @defgroup PROSLIC_CFG ProSLIC Configuration Options * @{ */ /** @defgroup PROSLIC_DRIVER_SEL ProSLIC Driver Selection * Define device driver to be compliled * @{ */ #define SI321X /**< Define to support Si321X chipset family in the build */ #undef SI321X #define SI322X /**< Define to support Si322x chipset family in the build */ #undef SI322X #define SI3217X /**< Define to support Si3217x chipset family in the build */ #undef SI3217X #define SI3218X /**< Define to support Si3218x chipset family in the build */ #undef SI3218X #define SI3226X /**< Define to support Si3226x chipset family in the build */ #undef SI3226X #define SI3228X /**< Define to support Si3228x chipset family in the build */ #undef SI3228X #define SI324X /**< Define to support Si324x chipset family in the build */ #undef SI324X /** @} PROSLIC_DRIVER_SEL*/ /** @defgroup CODE_OPTS Code feature options * Select which options NOT to build - just uncomment out the undef to disable feature. * @{ */ #define DISABLE_VERIFY_PATCH /**< Disable patch load verification */ #undef DISABLE_VERIFY_PATCH #define DISABLE_DTMF_SETUP /**< Disable the DTMF API */ /*#undef DISABLE_DTMF_SETUP */ #define DISABLE_FSK_SETUP /**< DIsable the FSK setup API */ #undef DISABLE_FSK_SETUP #define DISABLE_TONE_SETUP /**< Disable Tone setup API */ #undef DISABLE_TONE_SETUP #define DISABLE_RING_SETUP /**< Disable Ring setup API */ #undef DISABLE_RING_SETUP #define DISABLE_DCFEED_SETUP /**< Disable DC FEED setup API */ #undef DISABLE_DCFEED_SETUP #define DISABLE_GPIO_SETUP /**< Disable GPIO setup API */ #undef DISABLE_GPIO_SETUP #define DISABLE_PCM_SETUP /**< Disable PCM setup API */ #undef DISABLE_PCM_SETUP #define ENABLE_DEBUG /**< Enable debug messages - function entry, etc. */ #undef ENABLE_DEBUG #define DISABLE_CI_SETUP /**< Disable CI Setup */ #undef DISABLE_CI_SETUP #define DISABLE_ZSYNTH_SETUP /**< Disable Zsyth/impedance setup */ #undef DISABLE_ZSYNTH_SETUP #define DISABLE_MALLOC /**< Don't use MALLOC/FREE, instead assume user will statically allocate */ #undef DISABLE_MALLOC #define DISABLE_HPF_WIDEBAND /**< Disable RX and TX HPF when in WIDEBAND mode */ #undef DISABLE_HPF_WIDEBAND #define PROSLIC_OPTIMIZE_INTERRUPTS /**< Enable optimization for interrupts for dual channel devices. This optimization assumes channel number is on even boundaries - that is 0,2,4, are the first channel for each dual channel devices. */ /**@} */ #define SIVOICE_NEON_MWI_SUPPORT /**< Enable NEON Message Waiting Indicator support */ #undef SIVOICE_NEON_MWI_SUPPORT #define GCI_MODE /**< Set if GCI vs. SPI/PCM mode is to be used */ #undef GCI_MODE #define ENABLE_HIRES_GAIN /**< Set for zsynth preset gains in dB*10 rather than dB */ #undef ENABLE_HIRES_GAIN #define PRINT_TO_STRING 0 /**< Set this to 1 if printing to a string buffer vs. console - you may change/remove this*/ /** @defgroup MULTI_BOM Multiple Device/BOM Option Support * Assign patch structure names to macros used in device drivers * @{ */ #define SIVOICE_MULTI_BOM_SUPPORT /**< Enable Multiple General Configuration Support */ #undef SIVOICE_MULTI_BOM_SUPPORT #ifdef SIVOICE_MULTI_BOM_SUPPORT #define SI3226_PATCH_C_QCUK si3226PatchRevCQcuk /**< Si3226 RevC Quasi-Cuk DCDC Converter Patch */ #define SI3226_PATCH_C_FLBK si3226PatchRevCFlbk /**< Si3226 RevC Flyback DCDC Converter Patch */ #define SI3226_PATCH_D_QCUK si3226PatchRevDQcuk /**< Si3226 RevD Quasi-Cuk DCDC Converter Patch */ #define SI3226_PATCH_D_FLBK si3226PatchRevDFlbk /**< Si3226 RevD Flyback DCDC Converter Patch */ #define SI3226_PATCH_E_FLBK si3226PatchRevEFlbk /**< Si3226 RevE Flyback DCDC Converter Patch */ #define SI3217X_PATCH_B_FLBK si3217xPatchRevBFlbk /**< Si3217x B Flyback DCDC Converter patch */ #define SI3217X_PATCH_B_BKBT si3217xPatchRevBBkbt /**< Si3217x B Buck-boost DCDC Converter patch */ #define SI3217X_PATCH_B_PBB si3217xPatchRevBBkbt /**< Si3217x B PMOS Buck-boost DCDC Converter patch */ #define SI3217X_PATCH_C_FLBK si3217xPatchRevCFlbk /**< Si3217x C Flyback DCDC Converter patch */ #define SI3217X_PATCH_C_BKBT si3217xPatchRevCFlbk /**< Si3217x C Buck-boost DCDC Converter patch */ #define SI3217X_PATCH_C_PBB si3217xPatchRevCFlbk /**< Si3217x C PMOS Buck-boost DCDC Converter patch */ #define SI3217X_PATCH_C_LCQCUK si3217xPatchRevCFlbk /**< Si3217x C Quasi-CUK DCDC Converter patch */ #define SI3218X_PATCH_A si3218xPatchRevALCQC /**< Si3218x LCQC 5W DCDC Converter patch */ #define SI3226X_PATCH_C_FLBK si3226xPatchRevCFlbk /**< Si3226x RevC Flyback DCDC Converter Patch */ #define SI3226X_PATCH_C_CUK si3226xPatchRevCFlbk /**< Si3226x RevC Full CUK DCDC Converter Patch */ #define SI3226X_PATCH_C_QCUK si3226xPatchRevCFlbk /**< Si3226x RevC Quasi-CUK DCDC Converter Patch */ #define SI3226X_PATCH_C_LCQCUK si3226xPatchRevCFlbk /**< Si3226x RevC Low-cost QCUK DCDC Converter Patch */ #define SI3226X_PATCH_C_TSS si3226xPatchRevCTss /**< Si3226x RevC TSS DCDC Converter Patch */ #define SI3226X_PATCH_C_TSS_ISO si3226xPatchRevCTssIso /**< Si3226x RevC TSS (isolated) DCDC Converter Patch */ #define SI3226X_PATCH_C_PBB si3226xPatchRevCFlbk /**< Si3226x PMOS Buck-boost DCDC Converter patch */ #define SI3226x_PATCH_C_FIXRL SI3226X_PATCH_C_TSS #define SI3226X_PATCH_C_QSS si3226xPatchRevCTss /**< Si3226x RevC QSS DCDC Converter Patch */ #define SI3226X_PATCH_C_BB si3226xPatchRevCFlbk /**< Si3226x BJT Buck-boost DCDC Converter patch */ #define SI3228X_PATCH_A si3228xPatchRevALCQC /**< Si3228x LCQC 5W DCDC Converter patch */ #endif /* Default patch names for backwards compatibility */ #define SI3226_PATCH_C_DEFAULT RevCPatch #define SI3226_PATCH_D_DEFAULT RevDPatch #define SI3226_PATCH_E_DEFAULT RevEPatch #define SI3217X_PATCH_B_DEFAULT RevBPatch #define SI3217X_PATCH_C_DEFAULT RevCPatch #define SI3218X_PATCH_A_DEFAULT RevAPatch #define SI3226X_PATCH_C_DEFAULT RevCPatch #define SI3228X_PATCH_A_DEFAULT RevAPatch /** @} MULTI_BOM */ #include "stdio.h" #if (PRINT_TO_STRING) extern char outputBuffer[]; #define LOGPRINT(...) sprintf(&(outputBuffer[strlen(outputBuffer)]),__VA_ARGS__) #else #define LOGPRINT printf #endif /** @defgroup PSTN_CFG PSTN Detection Options * @{ */ #define PSTN_DET_ENABLE /**< Define to include Differential PSTN detection code */ #undef PSTN_DET_ENABLE #define PSTN_DET_OPEN_FEMF_SETTLE 1500 /**< OPEN foreign voltage measurement settle time */ #define PSTN_DET_DIFF_SAMPLES 4 /**< Number of I/V samples averaged [1 to 16] */ #define PSTN_DET_MIN_ILOOP 700 /**< Minimum acceptable loop current */ #define PSTN_DET_MAX_FEMF 10000 /**< Maximum OPEN state foreign voltage */ #define PSTN_DET_POLL_RATE 10 /**< Rate of re-entrant code in ms */ #define PSTN_DET_DIFF_IV1_SETTLE 1000 /**< Settle time before first I/V measurment in ms */ #define PSTN_DET_DIFF_IV2_SETTLE 1000 /**< Settle time before first I/V measurment in ms */ /** @} PSTN_CFG */ /** @defgroup SI321X_TONE Tone Generation Options * @{ */ #define SI3210_TONE #undef SI3210_TONE #define SI3215_TONE /* #undef SI3215_TONE */ /** @} SI321X_TONE */ #define SIVOICE_CFG_NEWTYPES_ONLY 1 /**< Set if not supporting Legacy types */ /**@} */ #endif
snailwft/openwrt-mt7628
package/utils/telpo_lte_good/src/custom/proslic_api_config.h
C
gpl-2.0
8,295
<img class="for_info_only" title="mirror" src="{{MEDIA}}mirror.png" alt="mirror" style="width: 300px;float: left; margin-top: 10px; "/> <p> Folytassuk a szavak tanulmányozását! Adott két karakterlánc, amelyek veszővel elválasztott szavakat tartalmaznak. Próbálja meghatározni, hogy mi a közös ezekben a karakterláncokban! A szavak egyik karakterláncban sem ismétlődnek. </p> <p> Az Ön függvényének meg kell határoznia azokat a szavakat, amelyek minkét karakterláncban megtalálhatók. Az eredménynek is egy karakterláncnak kell lennie, amely vesszőkkel elválasztott szavakból áll és <strong>ábécérendbe</strong> van rendezve. </p> <p> <strong>Megjegyzés: </strong> Könnyen meg lehet oldani ezt a feladatot a következő függvények segítségével: {% if "python 2" in interpreter|lower %} <a href="http://docs.python.org/2/library/stdtypes.html#str.split">str.split</a>, <a href="http://docs.python.org/2/library/stdtypes.html#str.join">str.join</a> és <a href="http://docs.python.org/2/library/functions.html#sorted">sorted</a>. Továbbá tanulmányozza át a halmaz <a href="http://docs.python.org/2/library/stdtypes.html#set">set</a> adattípust. {% else %} <a href="http://docs.python.org/3/library/stdtypes.html#str.split">str.split</a>, <a href="http://docs.python.org/3/library/stdtypes.html#str.join">str.join</a> és <a href="http://docs.python.org/3/library/functions.html#sorted">sorted</a> adattípust. Továbbá tanulmányozza át a halmaz <a href="http://docs.python.org/3/library/stdtypes.html#set">set</a>. {% endif %} </p> <p> <strong>Bemeneti adatok: </strong> két argumentum szövegként (str). </p> <p> <strong>Kimeneti adatok: </strong> mindkét karakterláncban megtalálható szavak felsorolása szövegként (str). </p> <div class="for_info_only"> <p> <strong>Példák:</strong> </p> <pre class="brush: python"> checkio("hello,world", "hello,earth") == "hello" checkio("one,two,three", "four,five,six") == "" checkio("one,two,three", "four,five,one,two,six,three") == "one,three,two" </pre> </div> <p class="for_info_only"> <strong>Alkalmazása: </strong> Ennek a feladatnak a segítségével gyakorolni lehet a halmaz és szöveges adattípusok használatát. Ezek a készségek hasznosak lesznek a nyelvi elemzés során. </p> <p> <strong>Előfeltételek: </strong><br> Mindkét megadott karakterlánc nem tartalmazhat 10 szónál többet.<br> Minden egyes szó vesszővel van elválasztva a másiktól.<br> Minden szó csak kisbetűs latin betűkből áll. </p> <div class="facts for_info_only"> <p> A CheckiO világában Ön új szigeteket fedezhet fel, feladatokat oldhat meg, és a megoldásokért szerzett pontokat újabb sziketek felfedésére használhatja fel. Több mint 100 feladat megoldása vár még Önre! </p> </div>
Empire-of-Code-Puzzles/checkio-empire-common-words
_old/translations/hu/info/task_description.html
HTML
gpl-2.0
3,012
# -*- coding: utf-8 -*- #This is generated code - do not edit encoding = 'utf-8' dict = { '&About...': '&\xd8\xb9\xd9\x86...', '&Delete Window': '&\xd8\xa7\xd8\xad\xd8\xb0\xd9\x81 \xd8\xa7\xd9\x84\xd9\x86\xd8\xa7\xd9\x81\xd8\xb0\xd8\xa9', '&Describe Action': '&\xd8\xa3\xd9\x88\xd8\xb5\xd9\x81 \xd8\xa7\xd9\x84\xd8\xb9\xd9\x85\xd9\x84\xd9\x8a\xd8\xa9', '&Execute Action': '&\xd9\x86\xd9\x81\xd8\xb0 \xd8\xa7\xd9\x84\xd8\xb9\xd9\x85\xd9\x84\xd9\x8a\xd8\xa9', '&Folding': '&\xd8\xa7\xd9\x84\xd8\xb7\xd9\x8a', '&Help': '&\xd9\x85\xd8\xb3\xd8\xa7\xd8\xb9\xd8\xaf\xd8\xa9', '&Line Numbers': '&\xd8\xb9\xd8\xaf\xd8\xaf \xd8\xa7\xd9\x84\xd8\xb3\xd8\xb7\xd9\x88\xd8\xb1', '&New Window': '&\xd9\x86\xd8\xa7\xd9\x81\xd8\xb0\xd8\xa9 \xd8\xac\xd8\xaf\xd9\x8a\xd8\xaf\xd8\xa9', '&Preferences...': '&\xd8\xa7\xd9\x84\xd8\xaa\xd9\x81\xd8\xb6\xd9\x8a\xd9\x84\xd8\xa7\xd8\xaa...', '&Revert': '&\xd8\xa5\xd8\xb3\xd8\xaa\xd8\xb1\xd8\xac\xd8\xb9', '&Save...': '&\xd8\xad\xd9\x81\xd8\xb8...', '&Show Toolbars': '&\xd8\xb9\xd8\xb1\xd8\xb6 \xd8\xb4\xd8\xb1\xd9\x8a\xd8\xb7 \xd8\xa7\xd9\x84\xd8\xa3\xd8\xaf\xd9\x88\xd8\xa7\xd8\xa9', '&Word Count': '&\xd8\xb9\xd8\xaf \xd8\xa7\xd9\x84\xd9\x83\xd9\x84\xd9\x85\xd8\xa7\xd8\xaa', 'About this program': '\xd8\xad\xd9\x88\xd9\x92\xd9\x84 \xd9\x87\xd8\xb0\xd8\xa7 \xd8\xa7\xd9\x84\xd8\xa8\xd8\xb1\xd9\x86\xd8\xa7\xd9\x85\xd8\xac', 'Actions': '\xd8\xa5\xd8\xac\xd8\xb1\xd8\xa7\xd8\xa1\xd8\xa7\xd8\xaa', 'Attributes': '\xd8\xa7\xd9\x84\xd8\xb5\xd9\x91\xd9\x81\xd8\xa7\xd8\xaa', 'Background': '\xd8\xa7\xd9\x84\xd8\xae\xd9\x84\xd9\x81\xd9\x8a\xd9\x91\xd8\xa9', 'Cancel': '\xd8\xa5\xd9\x84\xd8\xba\xd8\xa7\xef\xba\x80', 'Case': '\xd8\xa7\xd9\x84\xd8\xad\xd8\xa7\xd9\x84\xd8\xa9', 'Clear Playlist': '\xd9\x85\xd8\xb3\xd8\xad \xd9\x82\xd8\xa7\xd8\xa6\xd9\x85\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xaa\xd8\xb4\xd8\xba\xd9\x8a\xd9\x84', 'Close Tab': '\xd8\xa3\xd8\xba\xd9\x84\xd9\x82 \xd8\xa7\xd9\x84\xd9\x84\xd8\xb3\xd8\xa7\xd9\x86', 'Close the current tab': '\xd8\xa3\xd8\xba\xd9\x84\xd9\x82 \xd8\xa7\xd9\x84\xd9\x84\xd8\xb3\xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xad\xd8\xa7\xd9\x84\xd9\x8a', 'Color': '\xd8\xa7\xd9\x84\xd9\x84\xd9\x88\xd9\x86', 'Contrast': '\xd8\xa7\xd9\x84\xd8\xaa\xd8\xa8\xd8\xa7\xd9\x8a\xd9\x86', 'Copy': '\xd9\x86\xd8\xb3\xd8\xae', 'Cut': '\xd9\x82\xd8\xb5', 'Debug': '\xd8\xaa\xd9\x86\xd9\x82\xd9\x8a\xd8\xad', 'Documents': '\xd8\xa7\xd9\x84\xd9\x85\xd8\xb3\xd8\xaa\xd9\x86\xd8\xaf\xd8\xa7\xd8\xaa', 'E&xit': '&\xd8\xae\xd8\xb1\xd9\x88\xd8\xac', }
robmcmullen/peppy
peppy/i18n/ar.py
Python
gpl-2.0
2,474
/* * Show Q * Copyright (c) 2007-2008 Errol van-de-l'Isle * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ #include <sstream> #include "app.h" #include "editcue.h" #include "utils.h" #include "main.h" EditCueFade::EditCueFade(Gtk::Notebook *p) { refXML_fade = Gtk::Builder::create_from_file(showq_ui+"editfade.ui"); refXML_faders = Gtk::Builder::create_from_file(showq_ui+"efaders.ui"); Gtk::Widget *fade_tab; Gtk::Widget *level_tab; refXML_fade->get_widget("edit_fade_vbox", fade_tab); refXML_faders->get_widget("edit_faders_vbox", level_tab); p->append_page(*fade_tab, "Fade"); p->append_page(*level_tab, "Levels"); for (int i = 0; i < 8; ++i) { std::ostringstream s1, s3; s1 << "ed_wave_f" << (i + 1); s3 << "ed_wave_" << (i + 1); Fader * vs; Gtk::ToggleButton * tb; refXML_faders->get_widget_derived(s1.str().c_str(), vs); refXML_faders->get_widget(s3.str().c_str(), tb); tb->signal_toggled().connect( sigc::bind<int>(sigc::mem_fun(*this, &EditCueFade::wave_on_toggle), i)); m_wave_faders.push_back(vs); m_wave_but.push_back(tb); vs->set_sensitive(false); } refXML_fade->get_widget("ed_fade_time", m_fade_time); refXML_fade->get_widget("ed_fade_defaultcomplete", m_fade_defaultcomplete); refXML_fade->get_widget("ed_fade_stopcomplete", m_fade_stopcomplete); refXML_fade->get_widget("ed_fade_pausecomplete", m_fade_pausecomplete); } EditCueFade::~EditCueFade() { } void EditCueFade::get(boost::shared_ptr<Cue> & p) { boost::shared_ptr<FadeStop_Cue> q = boost::dynamic_pointer_cast<FadeStop_Cue>(p); std::vector<Fader *>::const_iterator i = m_wave_faders.begin(); std::vector<Gtk::ToggleButton *>::const_iterator j = m_wave_but.begin(); for ( ; i != m_wave_faders.end(); ++i, ++j) { q->tvol.push_back((*i)->get_gain()); q->on.push_back((*j)->get_active()); } q->stop_on_complete = m_fade_stopcomplete->get_active(); q->pause_on_complete = m_fade_pausecomplete->get_active(); q->fade_time = m_fade_time->get_value(); } void EditCueFade::set(boost::shared_ptr<Cue> & p) { boost::shared_ptr<FadeStop_Cue> q = boost::dynamic_pointer_cast<FadeStop_Cue>(p); std::vector<Fader *>::const_iterator i = m_wave_faders.begin(); std::vector<float>::const_iterator j = q->tvol.begin(); std::vector<Gtk::ToggleButton *>::const_iterator k = m_wave_but.begin(); std::vector<bool>::const_iterator l = q->on.begin(); for ( ; i != m_wave_faders.end() && j != q->tvol.end(); ++i, ++j, ++k, ++l) { (*i)->set_gain(*j); (*k)->set_active(*l); } m_fade_defaultcomplete->set_active(); m_fade_pausecomplete->set_active(q->pause_on_complete); m_fade_stopcomplete->set_active(q->stop_on_complete); m_fade_time->set_value(q->fade_time); } void EditCueFade::wave_on_toggle(int fader) { bool state = m_wave_but[fader]->get_active(); m_wave_faders[fader]->set_sensitive(state); }
BackupTheBerlios/showq
src/editfade.cc
C++
gpl-2.0
3,664
<div id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?>"> <div class="node-inner"> <indexAreaStart><!-- 索引内容 开始 --></indexAreaStart> <?php if (!$page): ?> <h2<?php print $title_attributes; ?>><a href="<?php print $node_url; ?>"><?php print $title;?></a></h2> <?php endif; ?> <?php print $user_picture; ?> <!-- <?php if ($display_submitted): ?> <span class="submitted"><?php print $date; ?> — <?php print $name; ?></span> <?php endif; ?> --> <div class="content"> <?php // We hide the comments and links now so that we can render them later. hide($content['comments']); hide($content['links']); //print render($content); $title = $node->title; //新闻标题 $publish_date= date ('Y-m-d',$node->created); //发布日期 if(isset( $node->body['zh-hans'])) $body = $node->body['zh-hans'][0]['value']; //内容 if(isset($node-> field_training_attach['zh-hans'])); $resources=$node->field_training_attach; ?> <!-- 文章内容 开始 --> <div class="video"> <h1><?php print $title?></h1> <div class="mov"> <?php print render($content['body']);?> <?php print render($content['field_training_attach']);?> <?php print render($content['field_training_video']);?> </div> </div> <!-- 文章内容 结束--> </div> <indexAreaEnd><!-- 索引内容 结束 --></indexAreaEnd> <?php if (!empty($content['links']['terms'])): ?> <div class="terms"><?php print render($content['links']['terms']); ?></div> <?php endif;?> <?php if (!empty($content['links'])): ?> <div class="links"><?php print render($content['links']); ?></div> <?php endif; ?> </div> <!-- /node-inner --> </div> <!-- /node--> <?php print render($content['comments']); ?>
404pnf/d7sites
sites/chinese.fltrp.com/themes/custom/chinese/templates/my.overwrite/node--training.tpl.php
PHP
gpl-2.0
5,875
/* A Bison parser, made by GNU Bison 2.7. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.7" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Copy the first part of user declarations. */ /* * $Id: harbouryy.c 9925 2013-02-11 19:24:52Z zsaulius $ */ /* * Harbour Project source code: * Compiler YACC rules and actions * * Copyright 1999 Antonio Linares <alinares@fivetech.com> * www - http://www.harbour-project.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit * their web site at http://www.gnu.org/). * */ /* TODO list * 1) Change the pcode generated by ::cVar from Self:cVar to QSELF():cVar * The major problem to solve is how to support QSELF() inside a codeblock. */ #include "hbcomp.h" #include "hbexemem.h" /* Compile using: bison -d -v harbour.y */ /* to pacify some warnings in BCC */ #if ( defined( __BORLANDC__ ) || defined( _MSC_VER ) ) && !defined( __STDC__ ) # define __STDC__ #endif #if defined( __POCC__ ) #pragma warn(push) #pragma warn(disable:2154) #elif defined( _MSC_VER ) #pragma warning(disable:4702) // unreachable code #elif defined( __BORLANDC__ ) #pragma warn -aus #pragma warn -ccc #pragma warn -rch #endif #undef alloca #define alloca malloc #ifdef FORCE_MEM_STD #undef hb_xgrab #define hb_xgrab malloc #undef hb_xrealloc #define hb_xrealloc realloc #undef hb_xfree #define hb_xfree free #else #undef malloc #define malloc hb_xgrab #undef realloc #define realloc hb_xrealloc #undef free #define free hb_xfree #endif /* NOTE: these symbols are used internally in bison.simple */ #undef YYFREE #define YYFREE free #undef YYMALLOC #define YYMALLOC malloc extern FILE *yyin; /* currently yacc parsed file */ extern char *yytext; #ifdef __cplusplus typedef struct yy_buffer_state *YY_BUFFER_STATE; extern YY_BUFFER_STATE yy_create_buffer( FILE *, int ); /* yacc functions to manage multiple files */ extern void yy_switch_to_buffer( YY_BUFFER_STATE ); /* yacc functions to manage multiple files */ extern void yy_delete_buffer( YY_BUFFER_STATE ); /* yacc functions to manage multiple files */ #else extern void * yy_create_buffer( FILE *, int ); /* yacc functions to manage multiple files */ extern void yy_switch_to_buffer( void * ); /* yacc functions to manage multiple files */ extern void yy_delete_buffer( void * ); /* yacc functions to manage multiple files */ #endif /* lex & yacc related prototypes */ extern int yyparse( void ); /* main yacc parsing function */ extern void yyerror( char * ); /* parsing error management function */ extern int yylex( void ); /* main lex token function, called by yyparse() */ #ifdef __cplusplus extern "C" int yywrap( void ); #else extern int yywrap( void ); /* manages the EOF of current processed file */ #endif static void hb_compLoopStart( BOOL ); static long hb_compLoopCount( void ); static void hb_compLoopEnd( void ); static void hb_compLoopLoop( void ); static void hb_compLoopExit( void ); static void hb_compLoopHere( void ); static void * hb_compElseIfGen( void * pFirstElseIf, HB_SIZE ulOffset ); /* generates a support structure for elseifs pcode fixups */ static void hb_compElseIfFix( void * pIfElseIfs ); /* implements the ElseIfs pcode fixups */ static void hb_compRTVariableAdd( HB_EXPR_PTR, BOOL ); static void hb_compRTVariableGen( char * ); static void hb_compVariableDim( char *, HB_EXPR_PTR ); #ifdef HARBOUR_YYDEBUG #define YYDEBUG 1 /* Parser debug information support */ #endif typedef struct __ELSEIF { HB_SIZE ulOffset; struct __ELSEIF * pNext; struct __ELSEIF * pPrevGroup; } _ELSEIF, * PELSEIF; /* support structure for else if pcode fixups */ typedef struct _LOOPEXIT { HB_SIZE ulOffset; BOOL fCanLoop; int iLine; USHORT wSeqCounter; USHORT wWithObjCounter; USHORT wFinallyCounter; struct _LOOPEXIT * pLoopList; struct _LOOPEXIT * pExitList; struct _LOOPEXIT * pNext; } LOOPEXIT, * PTR_LOOPEXIT; /* support structure for EXIT and LOOP statements */ typedef struct HB_RTVAR_ { HB_EXPR_PTR pVar; BOOL bPopValue; struct HB_RTVAR_ *pNext; struct HB_RTVAR_ *pPrev; } HB_RTVAR, *HB_RTVAR_PTR; /* support structure for PUBLIC and PRIVATE statements */ USHORT hb_comp_wSeqCounter = 0; USHORT hb_comp_wForCounter = 0; USHORT hb_comp_wIfCounter = 0; USHORT hb_comp_wWhileCounter = 0; USHORT hb_comp_wCaseCounter = 0; USHORT hb_comp_wWithObjCounter = 0; USHORT hb_comp_wFinallyCounter = 0; HB_SIZE hb_comp_alLastSwitchPos[ HB_MAX_SWITCHES ]; USHORT hb_comp_wSwitchCounter = 0; char * hb_comp_buffer; /* yacc input buffer */ static HB_RTVAR_PTR hb_comp_rtvars = NULL; static PTR_LOOPEXIT hb_comp_pLoops = NULL; static PELSEIF hb_comp_pElseIfs = NULL; static BOOL bTrancuateBaseArray = FALSE; static HB_EXPR_PTR pGetArgList, pBaseArrayName = NULL, pGetVarArray, pGetFunction; static BOOL s_bBlockMacro = FALSE, s_bBlockDeclared = FALSE; static HB_EXPR_PTR pBlockSimple; static int s_iLastControlLine = 0, s_iControlLevel = 0; extern char * hb_comp_SLX_LastBlock( BOOL bReset ); extern HB_COMP_IDS hb_compExpr_IDs; char * hb_comp_szAnnounce = NULL; /* ANNOUNCEd procedure */ BOOL hb_comp_bVarParams = FALSE; typedef struct _LOCALPARAM { char *szName; char cType; struct _LOCALPARAM *pNext; } LOCALPARAM, *PLOCALPARAM; PLOCALPARAM hb_comp_LocalParams = NULL; typedef struct _BLOCKSLIST { HB_EXPR_PTR pBlock; struct _BLOCKSLIST *pOuter; } BLOCKSLIST, *PBLOCKSLIST; PBLOCKSLIST hb_comp_BlocksList = NULL; static void hb_compYYError( char cPrefix, int iError, const char * szError1, const char * szError2 ); static void hb_compDebugStart( void ) { }; # ifndef YY_NULL # if defined __cplusplus && 201103L <= __cplusplus # define YY_NULL nullptr # else # define YY_NULL 0 # endif # endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* In a future release of Bison, this section will be replaced by #include "harboury.h". */ #ifndef YY_YY_HARBOURY_H_INCLUDED # define YY_YY_HARBOURY_H_INCLUDED /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { FUNCTION = 258, PROCEDURE = 259, IDENTIFIER = 260, RETURN = 261, NIL = 262, NUM_DOUBLE = 263, INASSIGN = 264, NUM_INTEGER = 265, NUM_LONG = 266, LOCAL = 267, STATIC = 268, GLOBAL = 269, EXTERNGLOBAL = 270, IIF = 271, IF = 272, ELSE = 273, ELSEIF = 274, END = 275, ENDIF = 276, LITERAL = 277, TRUEVALUE = 278, FALSEVALUE = 279, NULLVALUE = 280, ANNOUNCE = 281, DYNAMIC = 282, EXTERN = 283, INIT = 284, EXIT = 285, AND = 286, OR = 287, NOT = 288, PUBLIC = 289, EQ = 290, NE1 = 291, NE2 = 292, INC = 293, DEC = 294, ALIASOP = 295, DOCASE = 296, CASE = 297, OTHERWISE = 298, ENDCASE = 299, ENDDO = 300, MEMVAR = 301, WHILE = 302, LOOP = 303, FOR = 304, NEXT = 305, TO = 306, STEP = 307, LE = 308, GE = 309, FIELD = 310, IN = 311, PARAMETERS = 312, H12AM = 313, H12PM = 314, PLUSEQ = 315, MINUSEQ = 316, MULTEQ = 317, DIVEQ = 318, POWER = 319, EXPEQ = 320, MODEQ = 321, PRIVATE = 322, BEGINSEQ = 323, BREAK = 324, RECOVER = 325, RECOVERUSING = 326, DO = 327, WITH = 328, SELF = 329, LINE = 330, MACROVAR = 331, MACROTEXT = 332, AS_ARRAY = 333, AS_BLOCK = 334, AS_CHARACTER = 335, AS_CLASS = 336, AS_DATE = 337, AS_LOGICAL = 338, AS_NUMERIC = 339, AS_OBJECT = 340, AS_ENUM = 341, AS_VARIANT = 342, DECLARE = 343, OPTIONAL = 344, DECLARE_CLASS = 345, DECLARE_MEMBER = 346, AS_ARRAY_ARRAY = 347, AS_BLOCK_ARRAY = 348, AS_CHARACTER_ARRAY = 349, AS_CLASS_ARRAY = 350, AS_DATE_ARRAY = 351, AS_LOGICAL_ARRAY = 352, AS_NUMERIC_ARRAY = 353, AS_OBJECT_ARRAY = 354, AS_ENUM_ARRAY = 355, PROCREQ = 356, GET = 357, WITHOBJ = 358, FOREACH = 359, EPSILON = 360, ENUM = 361, TRY = 362, CATCH = 363, SWITCH = 364, DEFAULT = 365, ENDSWITCH = 366, CRITICAL = 367, CRITICAL_STATIC = 368, CBMARKER = 369, BITAND = 370, BITOR = 371, BITXOR = 372, BITSHIFTR = 373, BITSHIFTL = 374, FINALLY = 375, HASHOP = 376, UTILITY = 377, DIVERT = 378, OF = 379, FLAGS = 380, NAMESPACE = 381, RUNTIME_NAMESPACE = 382, OPTIONAL_NAMESPACE = 383, EXTERNAL_NAMESPACE = 384, EXTERNAL_NAMESPACE_MEMBER = 385, IMPLEMENTS_NAMESPACE = 386, DEFINE_NAMESPACE = 387, DEFINE_NAMESPACEMEMBER = 388, USING_NAMESPACE = 389, WITH_NAMESPACE = 390, POST = 391, MATCH = 392, LIKE = 393, UNARY = 394, PRE = 395 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { char * string; /* to hold a string returned by lex */ int iNumber; /* to hold a temporary integer number */ HB_LONG lNumber; /* to hold a temporary long number */ HB_EXPR_PTR asExpr; void * pVoid; /* to hold any memory structure we may need */ struct { int iNumber; /* to hold a number returned by lex */ char * szValue; } valInteger; struct { HB_LONG lNumber; /* to hold a long number returned by lex */ char * szValue; } valLong; struct { double dNumber; /* to hold a double number returned by lex */ /* NOTE: Intentionally using "unsigned char" instead of "BYTE" */ UCHAR bWidth; /* to hold the width of the value */ UCHAR bDec; /* to hold the number of decimal points in the value */ char * szValue; } valDouble; struct { char * string; int length; BOOL dealloc; } valChar; } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ #endif /* !YY_YY_HARBOURY_H_INCLUDED */ /* Copy the second part of user declarations. */ #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(E) ((void) (E)) #else # define YYUSE(E) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(N) (N) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 9764 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 163 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 281 /* YYNRULES -- Number of rules. */ #define YYNRULES 904 /* YYNRULES -- Number of states. */ #define YYNSTATES 1579 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 395 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 152, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 140, 147, 150, 2, 156, 155, 145, 143, 154, 144, 160, 146, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 159, 153, 138, 137, 139, 2, 151, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 162, 2, 161, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 157, 2, 158, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 141, 142, 148, 149 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint16 yyprhs[] = { 0, 0, 3, 4, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 88, 95, 100, 102, 106, 107, 108, 117, 118, 119, 128, 129, 131, 133, 136, 138, 140, 142, 144, 145, 148, 149, 154, 158, 159, 161, 163, 165, 167, 169, 171, 173, 176, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 202, 205, 208, 213, 214, 217, 218, 222, 225, 228, 231, 234, 237, 240, 243, 246, 249, 252, 255, 258, 261, 264, 267, 268, 273, 274, 278, 279, 283, 286, 287, 292, 293, 294, 300, 301, 302, 308, 312, 316, 317, 322, 323, 327, 328, 333, 338, 345, 346, 349, 350, 353, 355, 357, 359, 361, 363, 369, 375, 376, 378, 380, 382, 384, 386, 388, 391, 393, 396, 400, 405, 407, 410, 414, 419, 421, 423, 425, 427, 430, 433, 436, 438, 441, 443, 446, 449, 451, 453, 456, 458, 461, 470, 473, 487, 499, 514, 527, 542, 555, 564, 571, 581, 589, 599, 607, 610, 614, 618, 620, 624, 630, 633, 636, 639, 642, 644, 647, 649, 651, 653, 656, 659, 662, 665, 669, 672, 675, 678, 681, 684, 687, 690, 693, 696, 699, 702, 705, 708, 711, 713, 715, 717, 720, 723, 726, 729, 732, 735, 738, 741, 744, 747, 750, 753, 756, 759, 762, 765, 768, 771, 774, 777, 780, 783, 786, 789, 792, 795, 798, 801, 804, 807, 810, 813, 816, 819, 822, 825, 828, 831, 834, 837, 840, 843, 846, 849, 852, 855, 859, 864, 870, 875, 880, 882, 884, 886, 890, 892, 895, 897, 901, 903, 906, 912, 915, 917, 919, 921, 925, 929, 933, 937, 941, 945, 949, 953, 957, 961, 965, 969, 973, 977, 981, 985, 989, 993, 997, 1001, 1005, 1009, 1013, 1016, 1019, 1024, 1029, 1032, 1034, 1036, 1038, 1040, 1042, 1044, 1046, 1048, 1050, 1051, 1055, 1057, 1059, 1061, 1063, 1065, 1067, 1069, 1071, 1072, 1076, 1078, 1079, 1083, 1085, 1086, 1090, 1092, 1093, 1097, 1099, 1100, 1104, 1106, 1108, 1110, 1112, 1114, 1116, 1118, 1120, 1122, 1124, 1126, 1128, 1129, 1133, 1134, 1138, 1139, 1141, 1143, 1145, 1147, 1149, 1151, 1153, 1155, 1157, 1159, 1161, 1164, 1167, 1170, 1173, 1176, 1179, 1182, 1185, 1188, 1191, 1194, 1197, 1200, 1203, 1206, 1209, 1212, 1215, 1218, 1221, 1224, 1227, 1230, 1233, 1236, 1239, 1242, 1245, 1249, 1253, 1257, 1261, 1265, 1269, 1273, 1277, 1281, 1285, 1289, 1293, 1297, 1301, 1305, 1309, 1313, 1317, 1321, 1325, 1329, 1333, 1337, 1341, 1345, 1349, 1353, 1357, 1361, 1365, 1369, 1373, 1377, 1381, 1385, 1389, 1393, 1397, 1401, 1405, 1409, 1413, 1417, 1421, 1425, 1429, 1433, 1437, 1441, 1445, 1449, 1453, 1457, 1461, 1465, 1469, 1473, 1477, 1481, 1485, 1489, 1493, 1497, 1501, 1505, 1509, 1513, 1517, 1521, 1525, 1529, 1533, 1537, 1541, 1545, 1549, 1553, 1557, 1561, 1565, 1569, 1573, 1577, 1581, 1585, 1589, 1593, 1597, 1601, 1605, 1609, 1613, 1617, 1621, 1625, 1629, 1633, 1637, 1641, 1645, 1649, 1653, 1657, 1661, 1665, 1669, 1673, 1677, 1681, 1685, 1689, 1693, 1697, 1701, 1705, 1709, 1713, 1717, 1721, 1725, 1729, 1733, 1737, 1741, 1745, 1749, 1753, 1757, 1761, 1765, 1769, 1773, 1777, 1781, 1785, 1789, 1793, 1797, 1801, 1805, 1809, 1813, 1817, 1821, 1825, 1829, 1833, 1837, 1841, 1845, 1849, 1853, 1857, 1861, 1865, 1869, 1873, 1877, 1881, 1885, 1889, 1893, 1897, 1901, 1905, 1909, 1913, 1917, 1921, 1925, 1929, 1933, 1937, 1941, 1945, 1949, 1953, 1957, 1961, 1965, 1969, 1973, 1977, 1981, 1983, 1985, 1987, 1989, 1991, 1993, 1997, 2001, 2005, 2009, 2013, 2017, 2021, 2025, 2029, 2033, 2037, 2041, 2045, 2049, 2053, 2057, 2061, 2065, 2069, 2073, 2077, 2081, 2085, 2089, 2092, 2095, 2099, 2104, 2106, 2107, 2108, 2109, 2110, 2111, 2129, 2131, 2135, 2136, 2139, 2140, 2148, 2150, 2151, 2160, 2161, 2163, 2165, 2169, 2172, 2173, 2178, 2181, 2184, 2187, 2190, 2193, 2195, 2197, 2199, 2201, 2204, 2207, 2211, 2215, 2219, 2223, 2226, 2227, 2232, 2233, 2238, 2239, 2244, 2245, 2250, 2252, 2256, 2258, 2262, 2264, 2267, 2272, 2275, 2279, 2280, 2284, 2285, 2286, 2293, 2296, 2300, 2303, 2306, 2310, 2315, 2316, 2321, 2324, 2329, 2333, 2334, 2339, 2342, 2347, 2348, 2357, 2358, 2364, 2368, 2372, 2373, 2381, 2383, 2387, 2389, 2392, 2394, 2397, 2398, 2405, 2406, 2410, 2411, 2413, 2415, 2419, 2422, 2426, 2432, 2437, 2443, 2451, 2455, 2460, 2467, 2473, 2480, 2489, 2490, 2496, 2498, 2502, 2504, 2506, 2508, 2510, 2512, 2514, 2516, 2518, 2521, 2525, 2529, 2534, 2535, 2537, 2538, 2539, 2546, 2547, 2552, 2553, 2554, 2561, 2562, 2563, 2571, 2573, 2575, 2579, 2583, 2586, 2591, 2593, 2595, 2596, 2600, 2602, 2605, 2606, 2607, 2614, 2615, 2616, 2624, 2625, 2626, 2632, 2633, 2639, 2643, 2648, 2650, 2652, 2654, 2655, 2661, 2662, 2664, 2666, 2668, 2671, 2674, 2675, 2676, 2683, 2684, 2685, 2693, 2695, 2698, 2700, 2703, 2707, 2711, 2715, 2719, 2723, 2725, 2726, 2730, 2731, 2732, 2740, 2742, 2744, 2746, 2747, 2748, 2749, 2762, 2764, 2766, 2767, 2770, 2773, 2777, 2780, 2784, 2785, 2786, 2787, 2797, 2798, 2805, 2806, 2807, 2808, 2817, 2818, 2822, 2826, 2828, 2831, 2832, 2833, 2834, 2835, 2846, 2847, 2851, 2853, 2854, 2858, 2861, 2863, 2865, 2867, 2869, 2872, 2877, 2881, 2883, 2886, 2888, 2891, 2895, 2897, 2900, 2906, 2913, 2915, 2917, 2918, 2926, 2928, 2929, 2937, 2941, 2945, 2947, 2949, 2951, 2953, 2954, 2962, 2964, 2966, 2968, 2970, 2973, 2976, 2979, 2982, 2986, 2990, 2992, 2996, 2998 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { 164, 0, -1, -1, 165, 166, -1, -1, 443, -1, 313, -1, 327, -1, 330, -1, 333, -1, 346, -1, 170, -1, 183, -1, 167, -1, 168, -1, 433, -1, 435, -1, 437, -1, 441, -1, 430, -1, 166, 443, -1, 166, 313, -1, 166, 327, -1, 166, 330, -1, 166, 333, -1, 166, 346, -1, 166, 170, -1, 166, 183, -1, 166, 167, -1, 166, 168, -1, 166, 433, -1, 166, 435, -1, 166, 437, -1, 166, 441, -1, 166, 430, -1, 75, 10, 22, 443, -1, 75, 10, 22, 151, 22, 443, -1, 101, 169, 155, 443, -1, 22, -1, 22, 143, 22, -1, -1, -1, 175, 3, 205, 171, 176, 182, 172, 443, -1, -1, -1, 175, 4, 205, 173, 176, 182, 174, 443, -1, -1, 13, -1, 122, -1, 122, 13, -1, 29, -1, 30, -1, 112, -1, 113, -1, -1, 156, 155, -1, -1, 156, 177, 181, 155, -1, 156, 105, 155, -1, -1, 179, -1, 84, -1, 80, -1, 82, -1, 83, -1, 79, -1, 85, -1, 81, 205, -1, 86, 205, -1, 87, -1, 180, -1, 78, -1, 98, -1, 94, -1, 96, -1, 97, -1, 92, -1, 93, -1, 99, -1, 95, 205, -1, 100, 205, -1, 205, 178, -1, 181, 154, 205, 178, -1, -1, 131, 205, -1, -1, 349, 184, 197, -1, 408, 197, -1, 242, 197, -1, 238, 197, -1, 252, 197, -1, 253, 197, -1, 229, 197, -1, 232, 197, -1, 306, 197, -1, 269, 197, -1, 268, 197, -1, 279, 197, -1, 272, 197, -1, 271, 197, -1, 427, 197, -1, 69, 197, -1, -1, 69, 185, 262, 443, -1, -1, 30, 186, 197, -1, -1, 48, 187, 197, -1, 6, 197, -1, -1, 6, 188, 262, 443, -1, -1, -1, 34, 189, 319, 190, 443, -1, -1, -1, 67, 191, 319, 192, 443, -1, 28, 203, 443, -1, 27, 204, 443, -1, -1, 26, 205, 193, 443, -1, -1, 1, 194, 443, -1, -1, 57, 195, 332, 443, -1, 123, 262, 196, 197, -1, 123, 262, 124, 262, 196, 197, -1, -1, 125, 262, -1, -1, 198, 443, -1, 443, -1, 167, -1, 183, -1, 333, -1, 200, -1, 201, 3, 205, 176, 443, -1, 201, 4, 205, 176, 443, -1, -1, 13, -1, 29, -1, 30, -1, 112, -1, 113, -1, 199, -1, 202, 199, -1, 205, -1, 241, 205, -1, 203, 154, 205, -1, 203, 154, 241, 205, -1, 205, -1, 241, 205, -1, 204, 154, 205, -1, 204, 154, 241, 205, -1, 5, -1, 8, -1, 10, -1, 11, -1, 10, 40, -1, 11, 40, -1, 8, 40, -1, 7, -1, 208, 40, -1, 22, -1, 210, 40, -1, 294, 40, -1, 23, -1, 24, -1, 213, 40, -1, 74, -1, 215, 40, -1, 157, 64, 206, 146, 206, 146, 206, 158, -1, 217, 40, -1, 157, 64, 206, 146, 206, 146, 206, 206, 159, 206, 159, 206, 158, -1, 157, 64, 206, 146, 206, 146, 206, 206, 159, 206, 158, -1, 157, 64, 206, 146, 206, 146, 206, 206, 159, 206, 159, 206, 58, 158, -1, 157, 64, 206, 146, 206, 146, 206, 206, 159, 206, 58, 158, -1, 157, 64, 206, 146, 206, 146, 206, 206, 159, 206, 159, 206, 59, 158, -1, 157, 64, 206, 146, 206, 146, 206, 206, 159, 206, 59, 158, -1, 157, 64, 206, 159, 206, 159, 206, 158, -1, 157, 64, 206, 159, 206, 158, -1, 157, 64, 206, 159, 206, 159, 206, 58, 158, -1, 157, 64, 206, 159, 206, 58, 158, -1, 157, 64, 206, 159, 206, 159, 206, 59, 158, -1, 157, 64, 206, 159, 206, 59, 158, -1, 219, 40, -1, 157, 243, 158, -1, 157, 223, 158, -1, 121, -1, 262, 121, 265, -1, 223, 154, 262, 121, 265, -1, 221, 40, -1, 221, 283, -1, 210, 283, -1, 225, 40, -1, 205, -1, 205, 40, -1, 76, -1, 230, -1, 77, -1, 229, 40, -1, 150, 306, -1, 232, 40, -1, 55, 40, -1, 55, 40, 234, -1, 234, 228, -1, 234, 207, -1, 234, 307, -1, 234, 231, -1, 234, 233, -1, 234, 209, -1, 234, 211, -1, 234, 214, -1, 234, 218, -1, 234, 220, -1, 234, 212, -1, 234, 216, -1, 234, 224, -1, 234, 226, -1, 205, -1, 229, -1, 232, -1, 207, 236, -1, 231, 236, -1, 233, 236, -1, 307, 236, -1, 209, 236, -1, 211, 236, -1, 214, 236, -1, 218, 236, -1, 220, 236, -1, 212, 236, -1, 216, 236, -1, 224, 236, -1, 226, 236, -1, 240, 236, -1, 247, 236, -1, 251, 236, -1, 254, 236, -1, 228, 236, -1, 234, 236, -1, 235, 236, -1, 207, 306, -1, 228, 306, -1, 231, 306, -1, 233, 306, -1, 307, 306, -1, 234, 306, -1, 208, 283, -1, 294, 283, -1, 213, 283, -1, 217, 283, -1, 219, 283, -1, 215, 283, -1, 227, 283, -1, 237, 283, -1, 238, 283, -1, 229, 283, -1, 232, 283, -1, 249, 283, -1, 252, 283, -1, 250, 283, -1, 253, 283, -1, 242, 283, -1, 306, 283, -1, 222, 283, -1, 239, 40, -1, 432, 160, -1, 241, 205, 160, -1, 205, 156, 243, 155, -1, 241, 205, 156, 243, 155, -1, 229, 156, 243, 155, -1, 232, 156, 243, 155, -1, 286, -1, 312, -1, 244, -1, 243, 154, 244, -1, 265, -1, 151, 262, -1, 246, -1, 245, 154, 246, -1, 265, -1, 151, 205, -1, 151, 205, 156, 245, 155, -1, 242, 40, -1, 205, -1, 229, -1, 232, -1, 206, 159, 248, -1, 208, 159, 248, -1, 210, 159, 248, -1, 294, 159, 248, -1, 213, 159, 248, -1, 217, 159, 248, -1, 219, 159, 248, -1, 215, 159, 248, -1, 221, 159, 248, -1, 222, 159, 248, -1, 225, 159, 248, -1, 227, 159, 248, -1, 237, 159, 248, -1, 238, 159, 248, -1, 229, 159, 248, -1, 232, 159, 248, -1, 242, 159, 248, -1, 306, 159, 248, -1, 239, 159, 248, -1, 252, 159, 248, -1, 249, 159, 248, -1, 253, 159, 248, -1, 250, 159, 248, -1, 159, 248, -1, 249, 40, -1, 249, 156, 243, 155, -1, 250, 156, 243, 155, -1, 252, 40, -1, 206, -1, 208, -1, 210, -1, 294, -1, 297, -1, 213, -1, 217, -1, 219, -1, 215, -1, -1, 215, 256, 179, -1, 221, -1, 222, -1, 225, -1, 237, -1, 229, -1, 232, -1, 239, -1, 242, -1, -1, 242, 257, 179, -1, 249, -1, -1, 249, 258, 179, -1, 252, -1, -1, 252, 259, 179, -1, 250, -1, -1, 250, 260, 179, -1, 253, -1, -1, 253, 261, 179, -1, 238, -1, 271, -1, 279, -1, 268, -1, 269, -1, 270, -1, 280, -1, 281, -1, 282, -1, 227, -1, 255, -1, 306, -1, -1, 227, 263, 179, -1, -1, 306, 264, 179, -1, -1, 262, -1, 205, -1, 237, -1, 229, -1, 232, -1, 249, -1, 250, -1, 239, -1, 306, -1, 38, -1, 39, -1, 206, 267, -1, 208, 267, -1, 210, 267, -1, 294, 267, -1, 213, 267, -1, 217, 267, -1, 219, 267, -1, 215, 267, -1, 221, 267, -1, 222, 267, -1, 225, 267, -1, 227, 267, -1, 229, 267, -1, 232, 267, -1, 237, 267, -1, 238, 267, -1, 239, 267, -1, 306, 267, -1, 242, 267, -1, 249, 267, -1, 252, 267, -1, 250, 267, -1, 253, 267, -1, 38, 262, -1, 39, 262, -1, 33, 262, -1, 144, 262, -1, 143, 262, -1, 206, 9, 262, -1, 208, 9, 262, -1, 210, 9, 262, -1, 294, 9, 262, -1, 213, 9, 262, -1, 217, 9, 262, -1, 219, 9, 262, -1, 215, 9, 262, -1, 221, 9, 262, -1, 222, 9, 262, -1, 225, 9, 262, -1, 227, 9, 262, -1, 229, 9, 262, -1, 232, 9, 262, -1, 237, 9, 262, -1, 238, 9, 262, -1, 239, 9, 262, -1, 306, 9, 262, -1, 242, 9, 262, -1, 249, 9, 262, -1, 250, 9, 262, -1, 252, 9, 262, -1, 253, 9, 262, -1, 206, 137, 262, -1, 208, 137, 262, -1, 210, 137, 262, -1, 294, 137, 262, -1, 213, 137, 262, -1, 217, 137, 262, -1, 219, 137, 262, -1, 215, 137, 262, -1, 221, 137, 262, -1, 222, 137, 262, -1, 225, 137, 262, -1, 227, 137, 262, -1, 229, 137, 262, -1, 232, 137, 262, -1, 237, 137, 262, -1, 238, 137, 262, -1, 239, 137, 262, -1, 306, 137, 262, -1, 242, 137, 262, -1, 249, 137, 262, -1, 250, 137, 262, -1, 252, 137, 262, -1, 253, 137, 262, -1, 206, 60, 262, -1, 208, 60, 262, -1, 210, 60, 262, -1, 294, 60, 262, -1, 213, 60, 262, -1, 217, 60, 262, -1, 219, 60, 262, -1, 215, 60, 262, -1, 221, 60, 262, -1, 222, 60, 262, -1, 225, 60, 262, -1, 227, 60, 262, -1, 229, 60, 262, -1, 232, 60, 262, -1, 237, 60, 262, -1, 238, 60, 262, -1, 239, 60, 262, -1, 306, 60, 262, -1, 242, 60, 262, -1, 249, 60, 262, -1, 250, 60, 262, -1, 252, 60, 262, -1, 253, 60, 262, -1, 206, 61, 262, -1, 208, 61, 262, -1, 210, 61, 262, -1, 294, 61, 262, -1, 213, 61, 262, -1, 217, 61, 262, -1, 219, 61, 262, -1, 215, 61, 262, -1, 221, 61, 262, -1, 222, 61, 262, -1, 225, 61, 262, -1, 227, 61, 262, -1, 229, 61, 262, -1, 232, 61, 262, -1, 237, 61, 262, -1, 238, 61, 262, -1, 239, 61, 262, -1, 306, 61, 262, -1, 242, 61, 262, -1, 249, 61, 262, -1, 250, 61, 262, -1, 252, 61, 262, -1, 253, 61, 262, -1, 206, 62, 262, -1, 208, 62, 262, -1, 210, 62, 262, -1, 294, 62, 262, -1, 213, 62, 262, -1, 217, 62, 262, -1, 219, 62, 262, -1, 215, 62, 262, -1, 221, 62, 262, -1, 222, 62, 262, -1, 225, 62, 262, -1, 227, 62, 262, -1, 229, 62, 262, -1, 232, 62, 262, -1, 237, 62, 262, -1, 238, 62, 262, -1, 239, 62, 262, -1, 306, 62, 262, -1, 242, 62, 262, -1, 249, 62, 262, -1, 250, 62, 262, -1, 252, 62, 262, -1, 253, 62, 262, -1, 206, 63, 262, -1, 208, 63, 262, -1, 210, 63, 262, -1, 294, 63, 262, -1, 213, 63, 262, -1, 217, 63, 262, -1, 219, 63, 262, -1, 215, 63, 262, -1, 221, 63, 262, -1, 222, 63, 262, -1, 225, 63, 262, -1, 227, 63, 262, -1, 229, 63, 262, -1, 232, 63, 262, -1, 237, 63, 262, -1, 238, 63, 262, -1, 239, 63, 262, -1, 306, 63, 262, -1, 242, 63, 262, -1, 249, 63, 262, -1, 250, 63, 262, -1, 252, 63, 262, -1, 253, 63, 262, -1, 206, 66, 262, -1, 208, 66, 262, -1, 210, 66, 262, -1, 294, 66, 262, -1, 213, 66, 262, -1, 217, 66, 262, -1, 219, 66, 262, -1, 215, 66, 262, -1, 221, 66, 262, -1, 222, 66, 262, -1, 225, 66, 262, -1, 227, 66, 262, -1, 229, 66, 262, -1, 232, 66, 262, -1, 237, 66, 262, -1, 238, 66, 262, -1, 239, 66, 262, -1, 306, 66, 262, -1, 242, 66, 262, -1, 249, 66, 262, -1, 250, 66, 262, -1, 252, 66, 262, -1, 253, 66, 262, -1, 206, 65, 262, -1, 208, 65, 262, -1, 210, 65, 262, -1, 294, 65, 262, -1, 213, 65, 262, -1, 217, 65, 262, -1, 219, 65, 262, -1, 215, 65, 262, -1, 221, 65, 262, -1, 222, 65, 262, -1, 225, 65, 262, -1, 227, 65, 262, -1, 229, 65, 262, -1, 232, 65, 262, -1, 237, 65, 262, -1, 238, 65, 262, -1, 239, 65, 262, -1, 306, 65, 262, -1, 242, 65, 262, -1, 249, 65, 262, -1, 250, 65, 262, -1, 252, 65, 262, -1, 253, 65, 262, -1, 273, -1, 274, -1, 275, -1, 276, -1, 277, -1, 278, -1, 262, 143, 262, -1, 262, 144, 262, -1, 262, 145, 262, -1, 262, 146, 262, -1, 262, 147, 262, -1, 262, 64, 262, -1, 262, 115, 262, -1, 262, 116, 262, -1, 262, 117, 262, -1, 262, 118, 262, -1, 262, 119, 262, -1, 262, 31, 262, -1, 262, 32, 262, -1, 262, 35, 262, -1, 262, 138, 262, -1, 262, 139, 262, -1, 262, 53, 262, -1, 262, 54, 262, -1, 262, 36, 262, -1, 262, 37, 262, -1, 262, 140, 262, -1, 262, 137, 262, -1, 262, 142, 262, -1, 262, 141, 262, -1, 284, 161, -1, 162, 262, -1, 284, 154, 262, -1, 284, 161, 162, 262, -1, 102, -1, -1, -1, -1, -1, -1, 285, 266, 154, 287, 265, 288, 154, 265, 289, 154, 265, 290, 154, 265, 291, 293, 155, -1, 244, -1, 292, 154, 244, -1, -1, 154, 292, -1, -1, 157, 114, 295, 296, 114, 300, 158, -1, 301, -1, -1, 138, 116, 298, 299, 116, 443, 166, 139, -1, -1, 181, -1, 262, -1, 300, 154, 262, -1, 205, 178, -1, -1, 301, 154, 205, 178, -1, 301, 154, -1, 308, 155, -1, 309, 155, -1, 310, 155, -1, 311, 155, -1, 302, -1, 303, -1, 304, -1, 305, -1, 306, 40, -1, 156, 244, -1, 308, 154, 244, -1, 309, 154, 244, -1, 310, 154, 244, -1, 311, 154, 244, -1, 16, 304, -1, -1, 12, 314, 318, 443, -1, -1, 13, 315, 318, 443, -1, -1, 14, 316, 318, 443, -1, -1, 15, 317, 318, 443, -1, 321, -1, 318, 154, 321, -1, 320, -1, 319, 154, 320, -1, 321, -1, 229, 178, -1, 229, 178, 9, 262, -1, 229, 325, -1, 229, 325, 180, -1, -1, 205, 178, 322, -1, -1, -1, 205, 178, 323, 9, 324, 262, -1, 205, 325, -1, 205, 325, 180, -1, 326, 161, -1, 162, 262, -1, 326, 154, 262, -1, 326, 161, 162, 262, -1, -1, 55, 328, 329, 443, -1, 205, 178, -1, 329, 154, 205, 178, -1, 329, 56, 205, -1, -1, 46, 331, 332, 443, -1, 205, 178, -1, 332, 154, 205, 178, -1, -1, 88, 205, 156, 334, 343, 155, 178, 443, -1, -1, 88, 205, 335, 338, 443, -1, 90, 205, 443, -1, 91, 339, 443, -1, -1, 91, 157, 178, 336, 337, 158, 443, -1, 341, -1, 337, 154, 341, -1, 339, -1, 338, 339, -1, 341, -1, 338, 341, -1, -1, 205, 156, 340, 343, 155, 178, -1, -1, 205, 342, 178, -1, -1, 344, -1, 345, -1, 344, 154, 345, -1, 205, 178, -1, 151, 205, 178, -1, 151, 205, 156, 245, 155, -1, 344, 154, 205, 178, -1, 344, 154, 151, 205, 178, -1, 344, 154, 151, 205, 156, 245, 155, -1, 89, 205, 178, -1, 89, 151, 205, 178, -1, 89, 151, 205, 156, 245, 155, -1, 345, 154, 89, 205, 178, -1, 345, 154, 89, 151, 205, 178, -1, 345, 154, 89, 151, 205, 156, 245, 155, -1, -1, 106, 205, 347, 9, 348, -1, 205, -1, 348, 154, 205, -1, 350, -1, 363, -1, 377, -1, 392, -1, 397, -1, 404, -1, 410, -1, 417, -1, 352, 362, -1, 352, 355, 362, -1, 352, 357, 362, -1, 352, 357, 355, 362, -1, -1, 202, -1, -1, -1, 17, 262, 353, 443, 354, 351, -1, -1, 18, 443, 356, 351, -1, -1, -1, 19, 358, 262, 443, 359, 351, -1, -1, -1, 357, 19, 360, 262, 443, 361, 351, -1, 21, -1, 20, -1, 367, 368, 364, -1, 367, 373, 364, -1, 367, 364, -1, 367, 368, 373, 364, -1, 44, -1, 20, -1, -1, 41, 366, 443, -1, 365, -1, 365, 202, -1, -1, -1, 42, 369, 262, 443, 370, 351, -1, -1, -1, 368, 42, 371, 262, 443, 372, 351, -1, -1, -1, 43, 374, 443, 375, 351, -1, -1, 373, 43, 376, 443, 351, -1, 380, 384, 378, -1, 380, 384, 390, 378, -1, 379, -1, 111, -1, 20, -1, -1, 109, 262, 381, 443, 382, -1, -1, 383, -1, 443, -1, 167, -1, 383, 443, -1, 383, 167, -1, -1, -1, 42, 385, 389, 443, 386, 351, -1, -1, -1, 384, 42, 387, 389, 443, 388, 351, -1, 10, -1, 144, 10, -1, 11, -1, 144, 11, -1, 389, 143, 389, -1, 389, 144, 389, -1, 389, 116, 389, -1, 389, 115, 389, -1, 156, 389, 155, -1, 22, -1, -1, 110, 391, 351, -1, -1, -1, 395, 262, 443, 393, 351, 394, 396, -1, 47, -1, 20, -1, 45, -1, -1, -1, -1, 49, 266, 401, 262, 398, 51, 262, 402, 399, 443, 400, 403, -1, 137, -1, 9, -1, -1, 52, 262, -1, 351, 50, -1, 351, 50, 205, -1, 351, 20, -1, 351, 20, 205, -1, -1, -1, -1, 104, 205, 405, 56, 262, 406, 443, 407, 403, -1, -1, 103, 262, 443, 409, 351, 20, -1, -1, -1, -1, 68, 411, 443, 351, 412, 414, 413, 20, -1, -1, 415, 443, 351, -1, 416, 443, 351, -1, 70, -1, 71, 205, -1, -1, -1, -1, -1, 107, 418, 443, 351, 419, 424, 420, 422, 421, 20, -1, -1, 423, 443, 351, -1, 120, -1, -1, 425, 443, 351, -1, 108, 205, -1, 108, -1, 205, -1, 229, -1, 232, -1, 72, 426, -1, 72, 426, 73, 428, -1, 47, 73, 428, -1, 154, -1, 154, 429, -1, 429, -1, 428, 154, -1, 428, 154, 429, -1, 205, -1, 151, 205, -1, 151, 205, 156, 245, 155, -1, 151, 241, 205, 156, 245, 155, -1, 255, -1, 306, -1, -1, 135, 432, 443, 431, 166, 20, 443, -1, 205, -1, -1, 436, 205, 443, 434, 166, 20, 443, -1, 129, 205, 443, -1, 130, 205, 443, -1, 126, -1, 127, -1, 128, -1, 131, -1, -1, 132, 205, 443, 438, 439, 20, 443, -1, 443, -1, 167, -1, 437, -1, 440, -1, 439, 443, -1, 439, 167, -1, 439, 437, -1, 439, 440, -1, 133, 205, 443, -1, 134, 442, 443, -1, 205, -1, 442, 154, 205, -1, 152, -1, 153, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 367, 367, 367, 368, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 403, 404, 407, 410, 418, 436, 442, 435, 479, 485, 478, 523, 524, 525, 526, 527, 528, 529, 530, 533, 534, 535, 535, 536, 539, 540, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 567, 575, 588, 589, 617, 617, 618, 619, 620, 621, 622, 623, 628, 633, 634, 635, 636, 637, 638, 639, 640, 642, 642, 646, 646, 647, 647, 648, 662, 662, 686, 688, 686, 689, 691, 689, 693, 694, 696, 695, 717, 717, 718, 718, 729, 735, 744, 745, 748, 748, 751, 752, 753, 754, 755, 758, 759, 762, 763, 764, 765, 766, 767, 770, 771, 774, 775, 776, 777, 780, 781, 782, 783, 786, 791, 792, 793, 796, 797, 798, 808, 811, 816, 837, 842, 847, 848, 851, 856, 859, 864, 872, 875, 889, 902, 916, 929, 943, 956, 967, 977, 988, 998, 1009, 1021, 1027, 1030, 1033, 1034, 1035, 1038, 1043, 1044, 1047, 1052, 1081, 1086, 1099, 1105, 1212, 1217, 1220, 1227, 1228, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1249, 1250, 1251, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1282, 1283, 1284, 1285, 1286, 1287, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1312, 1316, 1317, 1335, 1336, 1337, 1338, 1339, 1340, 1343, 1344, 1347, 1348, 1413, 1414, 1417, 1418, 1419, 1422, 1427, 1428, 1429, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1457, 1469, 1475, 1478, 1487, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1513, 1514, 1515, 1515, 1516, 1517, 1517, 1518, 1519, 1519, 1520, 1521, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 1530, 1533, 1534, 1535, 1536, 1536, 1537, 1537, 1540, 1541, 1544, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1557, 1558, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1590, 1591, 1594, 1595, 1596, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1803, 1804, 1805, 1806, 1807, 1808, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1824, 1825, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1841, 1847, 1848, 1849, 1852, 1856, 1969, 2034, 2039, 2044, 1855, 2090, 2091, 2094, 2095, 2100, 2098, 2166, 2190, 2190, 2198, 2199, 2215, 2216, 2223, 2224, 2228, 2229, 2239, 2242, 2245, 2248, 2251, 2252, 2253, 2254, 2257, 2260, 2263, 2266, 2269, 2270, 2273, 2276, 2276, 2277, 2277, 2278, 2278, 2279, 2279, 2282, 2283, 2286, 2287, 2295, 2296, 2298, 2302, 2309, 2318, 2318, 2344, 2347, 2344, 2384, 2385, 2391, 2394, 2395, 2396, 2400, 2400, 2403, 2404, 2405, 2408, 2408, 2411, 2412, 2415, 2415, 2439, 2439, 2440, 2441, 2442, 2442, 2445, 2446, 2449, 2450, 2451, 2452, 2455, 2455, 2477, 2477, 2532, 2533, 2534, 2535, 2538, 2539, 2540, 2541, 2542, 2543, 2546, 2547, 2548, 2549, 2550, 2551, 2554, 2554, 2557, 2558, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2571, 2572, 2573, 2574, 2577, 2578, 2581, 2590, 2581, 2597, 2597, 2601, 2602, 2601, 2611, 2612, 2611, 2622, 2623, 2626, 2630, 2634, 2637, 2643, 2649, 2657, 2657, 2670, 2671, 2679, 2680, 2679, 2691, 2692, 2691, 2704, 2705, 2704, 2712, 2712, 2716, 2725, 2736, 2787, 2788, 2791, 2791, 2806, 2807, 2810, 2811, 2812, 2813, 2816, 2817, 2816, 2836, 2837, 2836, 2862, 2863, 2864, 2865, 2866, 2871, 2876, 2881, 2886, 2887, 2901, 2900, 2963, 2976, 2962, 2992, 3005, 3006, 3010, 3017, 3029, 3009, 3111, 3112, 3115, 3116, 3119, 3123, 3127, 3131, 3138, 3146, 3154, 3137, 3174, 3173, 3190, 3202, 3210, 3190, 3234, 3235, 3236, 3239, 3250, 3263, 3271, 3280, 3288, 3262, 3338, 3339, 3342, 3351, 3352, 3355, 3365, 3383, 3384, 3385, 3388, 3392, 3394, 3398, 3399, 3400, 3401, 3402, 3405, 3416, 3417, 3418, 3419, 3420, 3424, 3423, 3477, 3481, 3480, 3508, 3525, 3547, 3548, 3549, 3550, 3554, 3553, 3564, 3565, 3566, 3567, 3568, 3570, 3572, 3574, 3578, 3585, 3595, 3612, 3632, 3633 }; #endif #if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "FUNCTION", "PROCEDURE", "IDENTIFIER", "RETURN", "NIL", "NUM_DOUBLE", "INASSIGN", "NUM_INTEGER", "NUM_LONG", "LOCAL", "STATIC", "GLOBAL", "EXTERNGLOBAL", "IIF", "IF", "ELSE", "ELSEIF", "END", "ENDIF", "LITERAL", "TRUEVALUE", "FALSEVALUE", "NULLVALUE", "ANNOUNCE", "DYNAMIC", "EXTERN", "INIT", "EXIT", "AND", "OR", "NOT", "PUBLIC", "EQ", "NE1", "NE2", "INC", "DEC", "ALIASOP", "DOCASE", "CASE", "OTHERWISE", "ENDCASE", "ENDDO", "MEMVAR", "WHILE", "LOOP", "FOR", "NEXT", "TO", "STEP", "LE", "GE", "FIELD", "IN", "PARAMETERS", "H12AM", "H12PM", "PLUSEQ", "MINUSEQ", "MULTEQ", "DIVEQ", "POWER", "EXPEQ", "MODEQ", "PRIVATE", "BEGINSEQ", "BREAK", "RECOVER", "RECOVERUSING", "DO", "WITH", "SELF", "LINE", "MACROVAR", "MACROTEXT", "AS_ARRAY", "AS_BLOCK", "AS_CHARACTER", "AS_CLASS", "AS_DATE", "AS_LOGICAL", "AS_NUMERIC", "AS_OBJECT", "AS_ENUM", "AS_VARIANT", "DECLARE", "OPTIONAL", "DECLARE_CLASS", "DECLARE_MEMBER", "AS_ARRAY_ARRAY", "AS_BLOCK_ARRAY", "AS_CHARACTER_ARRAY", "AS_CLASS_ARRAY", "AS_DATE_ARRAY", "AS_LOGICAL_ARRAY", "AS_NUMERIC_ARRAY", "AS_OBJECT_ARRAY", "AS_ENUM_ARRAY", "PROCREQ", "GET", "WITHOBJ", "FOREACH", "EPSILON", "ENUM", "TRY", "CATCH", "SWITCH", "DEFAULT", "ENDSWITCH", "CRITICAL", "CRITICAL_STATIC", "CBMARKER", "BITAND", "BITOR", "BITXOR", "BITSHIFTR", "BITSHIFTL", "FINALLY", "HASHOP", "UTILITY", "DIVERT", "OF", "FLAGS", "NAMESPACE", "RUNTIME_NAMESPACE", "OPTIONAL_NAMESPACE", "EXTERNAL_NAMESPACE", "EXTERNAL_NAMESPACE_MEMBER", "IMPLEMENTS_NAMESPACE", "DEFINE_NAMESPACE", "DEFINE_NAMESPACEMEMBER", "USING_NAMESPACE", "WITH_NAMESPACE", "POST", "'='", "'<'", "'>'", "'$'", "MATCH", "LIKE", "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", "PRE", "'&'", "'@'", "'\\n'", "';'", "','", "')'", "'('", "'{'", "'}'", "':'", "'.'", "']'", "'['", "$accept", "Main", "$@1", "Source", "Line", "ProcReq", "CompTimeStr", "Function", "$@2", "$@3", "$@4", "$@5", "FunScope", "Params", "$@6", "AsType", "StrongType", "AsArray", "ParamList", "ImplementsNamespace", "Statement", "$@7", "$@8", "$@9", "$@10", "$@11", "$@12", "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "DivertFlags", "CrlfStmnt", "$@19", "LineStat", "ControlError", "FunScope2", "Statements", "ExtList", "DynList", "IdentName", "NumValue", "NumAlias", "NilValue", "NilAlias", "LiteralValue", "LiteralAlias", "CodeBlockAlias", "Logical", "LogicalAlias", "SelfValue", "SelfAlias", "Date", "DateAlias", "DateTime", "DateTimeAlias", "Array", "Hash", "HashList", "ArrayAlias", "ArrayAt", "ArrayAtAlias", "Variable", "VarAlias", "MacroVar", "MacroText", "MacroVarAlias", "MacroExpr", "MacroExprAlias", "FieldAlias", "FieldVarAlias", "AliasId", "AliasVar", "AliasExpr", "VariableAt", "VariableAtAlias", "NamespacePath", "FunCall", "ArgList", "Argument", "DummyArgList", "DummyArgument", "FunCallAlias", "SendId", "ObjectData", "WithData", "ObjectDataAlias", "ObjectMethod", "WithMethod", "ObjectMethodAlias", "SimpleExpression", "$@20", "$@21", "$@22", "$@23", "$@24", "$@25", "Expression", "$@26", "$@27", "EmptyExpression", "LValue", "PostOp", "ExprPostOp", "ExprPreOp", "ExprUnary", "ExprAssign", "ExprEqual", "ExprPlusEq", "ExprMinusEq", "ExprMultEq", "ExprDivEq", "ExprModEq", "ExprExpEq", "ExprOperEq", "ExprMath", "ExprBool", "ExprRelation", "ArrayIndex", "IndexList", "_Get_", "Get", "$@28", "$@29", "$@30", "$@31", "$@32", "GetArgList", "GetAExt", "CodeBlock", "@33", "BlockParams", "CodeBlock2", "$@34", "ExtBlockParams", "BlockExpList", "BlockVarList", "PareExpList1", "PareExpList2", "PareExpList3", "PareExpListN", "PareExpList", "PareExpListAlias", "ExpList1", "ExpList2", "ExpList3", "ExpList", "IIFInline", "VarDefs", "$@35", "$@36", "$@37", "$@38", "VarList", "ExtVarList", "ExtVarDef", "VarDef", "$@39", "@40", "$@41", "DimList", "DimIndex", "FieldsDef", "$@42", "FieldList", "MemvarDef", "$@43", "MemvarList", "Declaration", "$@44", "$@45", "$@46", "DecDataList", "ClassInfo", "DecMethod", "$@47", "DecData", "$@48", "DecList", "FormalList", "OptList", "EnumDef", "$@49", "EnumMembers", "ExecFlow", "IfEndif", "EmptyStats", "IfBegin", "$@50", "@51", "IfElse", "$@52", "IfElseIf", "$@53", "@54", "$@55", "@56", "EndIf", "DoCase", "EndCase", "DoCaseStart", "$@57", "DoCaseBegin", "Cases", "$@58", "@59", "$@60", "@61", "Otherwise", "$@62", "$@63", "$@64", "Switch", "EndSwitch", "EndSwitchID", "SwitchBegin", "$@65", "WhiteSpace", "EmptyLines", "SwitchCases", "$@66", "@67", "$@68", "@69", "Constant", "Default", "$@70", "DoWhile", "@71", "$@72", "WhileBegin", "EndWhile", "ForNext", "@73", "@74", "@75", "ForAssign", "StepExpr", "ForStatements", "ForEach", "$@76", "@77", "@78", "WithObject", "$@79", "BeginSeq", "@80", "@81", "$@82", "RecoverSeq", "RecoverEmpty", "RecoverUsing", "Try", "@83", "@84", "$@85", "$@86", "FinallyTry", "Finally", "Catch", "CatchError", "DoName", "DoProc", "DoArgList", "DoArgument", "WithNamespace", "$@87", "NamespaceName", "Namespace", "$@88", "ExtNamespace", "NamespaceType", "NamespaceDefinition", "$@89", "NamespaceDefinitions", "NamespaceMemberDefinition", "NamespaceUsing", "UsedPath", "Crlf", YY_NULL }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 61, 60, 62, 36, 392, 393, 43, 45, 42, 47, 37, 394, 395, 38, 64, 10, 59, 44, 41, 40, 123, 125, 58, 46, 93, 91 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { 0, 163, 165, 164, 164, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 166, 167, 167, 168, 169, 169, 171, 172, 170, 173, 174, 170, 175, 175, 175, 175, 175, 175, 175, 175, 176, 176, 177, 176, 176, 178, 178, 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 182, 182, 184, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, 185, 183, 186, 183, 187, 183, 183, 188, 183, 189, 190, 183, 191, 192, 183, 183, 183, 193, 183, 194, 183, 195, 183, 183, 183, 196, 196, 198, 197, 199, 199, 199, 199, 199, 200, 200, 201, 201, 201, 201, 201, 201, 202, 202, 203, 203, 203, 203, 204, 204, 204, 204, 205, 206, 206, 206, 207, 207, 207, 208, 209, 210, 211, 212, 213, 213, 214, 215, 216, 217, 218, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, 220, 221, 222, 223, 223, 223, 224, 225, 225, 226, 227, 228, 229, 229, 230, 231, 232, 233, 234, 234, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 238, 238, 238, 238, 238, 238, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 240, 241, 241, 242, 242, 242, 242, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 246, 247, 248, 248, 248, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 249, 250, 251, 252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 256, 255, 255, 255, 255, 255, 255, 255, 255, 255, 257, 255, 255, 258, 255, 255, 259, 255, 255, 260, 255, 255, 261, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 262, 262, 262, 263, 262, 264, 262, 265, 265, 266, 266, 266, 266, 266, 266, 266, 266, 267, 267, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 269, 269, 270, 270, 270, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 275, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 279, 279, 279, 279, 279, 279, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 281, 281, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 283, 284, 284, 284, 285, 287, 288, 289, 290, 291, 286, 292, 292, 293, 293, 295, 294, 296, 298, 297, 299, 299, 300, 300, 301, 301, 301, 301, 302, 303, 304, 305, 306, 306, 306, 306, 307, 308, 309, 310, 311, 311, 312, 314, 313, 315, 313, 316, 313, 317, 313, 318, 318, 319, 319, 320, 320, 320, 320, 320, 322, 321, 323, 324, 321, 321, 321, 325, 326, 326, 326, 328, 327, 329, 329, 329, 331, 330, 332, 332, 334, 333, 335, 333, 333, 333, 336, 333, 337, 337, 338, 338, 338, 338, 340, 339, 342, 341, 343, 343, 343, 343, 344, 344, 344, 344, 344, 344, 345, 345, 345, 345, 345, 345, 347, 346, 348, 348, 349, 349, 349, 349, 349, 349, 349, 349, 350, 350, 350, 350, 351, 351, 353, 354, 352, 356, 355, 358, 359, 357, 360, 361, 357, 362, 362, 363, 363, 363, 363, 364, 364, 366, 365, 367, 367, 369, 370, 368, 371, 372, 368, 374, 375, 373, 376, 373, 377, 377, 378, 379, 379, 381, 380, 382, 382, 383, 383, 383, 383, 385, 386, 384, 387, 388, 384, 389, 389, 389, 389, 389, 389, 389, 389, 389, 389, 391, 390, 393, 394, 392, 395, 396, 396, 398, 399, 400, 397, 401, 401, 402, 402, 403, 403, 403, 403, 405, 406, 407, 404, 409, 408, 411, 412, 413, 410, 414, 414, 414, 415, 416, 418, 419, 420, 421, 417, 422, 422, 423, 424, 424, 425, 425, 426, 426, 426, 427, 427, 427, 428, 428, 428, 428, 428, 429, 429, 429, 429, 429, 429, 431, 430, 432, 434, 433, 435, 435, 436, 436, 436, 436, 438, 437, 439, 439, 439, 439, 439, 439, 439, 439, 440, 441, 442, 442, 443, 443 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 6, 4, 1, 3, 0, 0, 8, 0, 0, 8, 0, 1, 1, 2, 1, 1, 1, 1, 0, 2, 0, 4, 3, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 4, 0, 2, 0, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 4, 0, 3, 0, 3, 2, 0, 4, 0, 0, 5, 0, 0, 5, 3, 3, 0, 4, 0, 3, 0, 4, 4, 6, 0, 2, 0, 2, 1, 1, 1, 1, 1, 5, 5, 0, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 8, 2, 13, 11, 14, 12, 14, 12, 8, 6, 9, 7, 9, 7, 2, 3, 3, 1, 3, 5, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 4, 4, 1, 1, 1, 3, 1, 2, 1, 3, 1, 2, 5, 2, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 4, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 1, 0, 3, 1, 0, 3, 1, 0, 3, 1, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 3, 0, 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 4, 1, 0, 0, 0, 0, 0, 17, 1, 3, 0, 2, 0, 7, 1, 0, 8, 0, 1, 1, 3, 2, 0, 4, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 2, 0, 4, 0, 4, 0, 4, 0, 4, 1, 3, 1, 3, 1, 2, 4, 2, 3, 0, 3, 0, 0, 6, 2, 3, 2, 2, 3, 4, 0, 4, 2, 4, 3, 0, 4, 2, 4, 0, 8, 0, 5, 3, 3, 0, 7, 1, 3, 1, 2, 1, 2, 0, 6, 0, 3, 0, 1, 1, 3, 2, 3, 5, 4, 5, 7, 3, 4, 6, 5, 6, 8, 0, 5, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4, 0, 1, 0, 0, 6, 0, 4, 0, 0, 6, 0, 0, 7, 1, 1, 3, 3, 2, 4, 1, 1, 0, 3, 1, 2, 0, 0, 6, 0, 0, 7, 0, 0, 5, 0, 5, 3, 4, 1, 1, 1, 0, 5, 0, 1, 1, 1, 2, 2, 0, 0, 6, 0, 0, 7, 1, 2, 1, 2, 3, 3, 3, 3, 3, 1, 0, 3, 0, 0, 7, 1, 1, 1, 0, 0, 0, 12, 1, 1, 0, 2, 2, 3, 2, 3, 0, 0, 0, 9, 0, 6, 0, 0, 0, 8, 0, 3, 3, 1, 2, 0, 0, 0, 0, 10, 0, 3, 1, 0, 3, 2, 1, 1, 1, 1, 2, 4, 3, 1, 2, 1, 2, 3, 1, 2, 5, 6, 1, 1, 0, 7, 1, 0, 7, 3, 3, 1, 1, 1, 1, 0, 7, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 1, 3, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint16 yydefact[] = { 2, 0, 0, 1, 121, 154, 109, 161, 155, 156, 157, 662, 47, 666, 668, 0, 0, 163, 166, 167, 0, 0, 0, 50, 51, 111, 0, 0, 770, 695, 819, 106, 0, 690, 123, 114, 840, 102, 0, 169, 0, 197, 199, 0, 0, 0, 0, 623, 0, 0, 0, 849, 0, 52, 53, 48, 0, 885, 886, 887, 0, 0, 888, 0, 0, 0, 0, 903, 904, 365, 365, 0, 0, 13, 14, 11, 0, 12, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129, 198, 0, 129, 0, 0, 0, 0, 129, 0, 0, 0, 129, 0, 0, 0, 0, 129, 129, 0, 129, 129, 129, 129, 589, 590, 591, 592, 593, 594, 129, 0, 273, 0, 651, 652, 653, 654, 129, 0, 0, 0, 0, 0, 274, 6, 7, 8, 9, 10, 85, 737, 0, 738, 0, 0, 739, 0, 740, 0, 741, 742, 129, 743, 744, 129, 19, 0, 15, 16, 0, 17, 18, 5, 0, 0, 108, 0, 160, 158, 159, 0, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 316, 317, 318, 321, 324, 322, 323, 327, 328, 329, 358, 331, 332, 330, 349, 333, 334, 337, 343, 340, 346, 359, 751, 352, 353, 354, 350, 351, 355, 356, 357, 319, 320, 360, 119, 0, 150, 0, 0, 146, 0, 129, 0, 400, 401, 0, 0, 0, 129, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 370, 368, 0, 373, 0, 371, 372, 0, 0, 0, 0, 374, 203, 0, 0, 0, 0, 0, 101, 861, 862, 863, 864, 0, 701, 0, 59, 0, 0, 38, 0, 0, 834, 733, 0, 790, 49, 127, 0, 0, 0, 901, 0, 880, 0, 201, 0, 656, 366, 277, 0, 634, 188, 0, 0, 275, 366, 285, 286, 287, 311, 28, 29, 26, 27, 21, 22, 23, 24, 25, 34, 30, 31, 32, 33, 20, 0, 0, 196, 365, 0, 375, 376, 0, 0, 0, 0, 0, 0, 0, 0, 377, 219, 220, 221, 222, 242, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 378, 248, 0, 226, 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 379, 193, 227, 231, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 381, 250, 228, 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 384, 253, 232, 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 382, 251, 229, 0, 185, 0, 0, 0, 0, 0, 0, 0, 0, 383, 252, 230, 0, 191, 0, 0, 0, 0, 0, 0, 0, 0, 385, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 265, 233, 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, 387, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 388, 254, 239, 243, 0, 200, 0, 0, 0, 0, 0, 0, 0, 365, 0, 92, 389, 257, 223, 244, 0, 202, 0, 0, 0, 0, 0, 0, 0, 365, 0, 93, 390, 258, 224, 245, 0, 0, 0, 365, 219, 206, 0, 210, 0, 211, 215, 0, 212, 0, 216, 0, 213, 0, 214, 0, 217, 0, 218, 205, 220, 208, 221, 209, 240, 0, 247, 207, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 391, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 392, 256, 0, 266, 0, 0, 0, 0, 0, 0, 0, 0, 393, 235, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0, 0, 88, 395, 263, 236, 0, 312, 0, 0, 0, 0, 0, 0, 0, 365, 0, 396, 259, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 398, 261, 237, 0, 315, 0, 0, 0, 0, 0, 0, 0, 0, 90, 397, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 399, 262, 238, 96, 95, 99, 98, 97, 0, 0, 165, 0, 0, 0, 0, 0, 0, 0, 0, 380, 249, 0, 655, 0, 0, 0, 0, 0, 0, 0, 0, 94, 394, 264, 225, 246, 365, 647, 365, 648, 365, 649, 365, 650, 129, 0, 756, 763, 762, 0, 0, 745, 139, 140, 104, 142, 143, 132, 133, 144, 135, 0, 0, 134, 131, 769, 774, 780, 768, 766, 0, 0, 798, 0, 0, 87, 100, 267, 0, 122, 0, 130, 59, 0, 670, 0, 0, 0, 402, 637, 404, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 151, 0, 117, 147, 105, 59, 112, 672, 674, 771, 59, 0, 0, 867, 195, 359, 0, 360, 866, 869, 107, 827, 826, 0, 204, 59, 0, 0, 115, 0, 0, 0, 0, 699, 0, 703, 71, 65, 62, 0, 63, 64, 61, 66, 0, 69, 76, 77, 73, 0, 74, 75, 72, 78, 0, 705, 60, 70, 713, 704, 0, 0, 838, 0, 0, 0, 0, 0, 0, 129, 883, 884, 889, 0, 900, 878, 278, 155, 156, 157, 0, 644, 0, 187, 365, 186, 365, 40, 43, 0, 405, 451, 474, 497, 520, 566, 543, 428, 288, 406, 452, 475, 498, 521, 567, 544, 429, 289, 620, 0, 619, 407, 453, 476, 499, 522, 568, 545, 430, 290, 409, 455, 478, 501, 524, 570, 547, 432, 292, 412, 458, 481, 504, 527, 573, 550, 435, 295, 410, 456, 479, 502, 525, 571, 548, 433, 293, 411, 457, 480, 503, 526, 572, 549, 434, 294, 413, 459, 482, 505, 528, 574, 551, 436, 296, 414, 460, 483, 506, 529, 575, 552, 437, 297, 415, 461, 484, 507, 530, 576, 553, 438, 298, 416, 462, 485, 508, 531, 577, 554, 439, 299, 417, 463, 486, 509, 532, 578, 555, 440, 0, 302, 418, 464, 487, 510, 533, 579, 556, 441, 0, 303, 419, 465, 488, 511, 534, 580, 557, 442, 300, 420, 466, 489, 512, 535, 581, 558, 443, 301, 421, 467, 490, 513, 536, 582, 559, 444, 306, 365, 268, 423, 469, 492, 515, 538, 584, 561, 446, 304, 424, 470, 493, 516, 539, 585, 562, 447, 0, 308, 425, 471, 494, 517, 540, 586, 563, 448, 0, 310, 426, 472, 495, 518, 541, 587, 564, 449, 307, 427, 473, 496, 519, 542, 588, 565, 450, 309, 624, 408, 454, 477, 500, 523, 569, 546, 431, 291, 422, 468, 491, 514, 537, 583, 560, 445, 305, 657, 658, 659, 660, 86, 754, 0, 746, 759, 0, 747, 0, 0, 145, 0, 0, 777, 764, 0, 783, 765, 0, 789, 801, 814, 788, 785, 787, 0, 816, 881, 110, 0, 679, 684, 0, 0, 663, 665, 667, 669, 639, 326, 362, 336, 339, 345, 342, 348, 606, 607, 608, 613, 614, 611, 612, 600, 601, 602, 603, 604, 605, 616, 609, 610, 615, 618, 617, 595, 596, 597, 598, 599, 752, 364, 120, 152, 0, 148, 0, 675, 677, 0, 0, 697, 0, 696, 873, 0, 868, 870, 822, 692, 0, 0, 691, 124, 0, 0, 841, 103, 865, 0, 35, 717, 715, 0, 709, 711, 67, 68, 79, 80, 0, 717, 39, 37, 0, 0, 0, 850, 792, 127, 128, 125, 0, 902, 0, 0, 0, 59, 0, 636, 0, 276, 189, 54, 54, 269, 621, 0, 271, 272, 0, 313, 314, 365, 0, 0, 0, 748, 54, 54, 0, 781, 0, 767, 0, 804, 806, 813, 0, 0, 0, 0, 0, 786, 0, 0, 687, 680, 0, 685, 0, 686, 671, 640, 59, 0, 0, 153, 149, 0, 678, 673, 113, 59, 365, 0, 871, 0, 694, 59, 116, 844, 0, 0, 0, 59, 0, 718, 719, 59, 710, 712, 702, 715, 0, 707, 0, 0, 835, 735, 734, 857, 795, 791, 793, 794, 129, 0, 892, 893, 0, 894, 891, 0, 0, 0, 643, 0, 646, 365, 56, 83, 83, 622, 270, 625, 755, 757, 0, 0, 0, 775, 0, 0, 0, 805, 807, 0, 0, 0, 0, 0, 799, 0, 815, 817, 0, 682, 688, 0, 0, 81, 0, 753, 676, 698, 0, 0, 279, 281, 365, 0, 693, 847, 0, 842, 0, 0, 36, 0, 59, 59, 721, 59, 0, 0, 716, 0, 0, 59, 839, 0, 0, 860, 851, 0, 797, 796, 126, 0, 0, 896, 897, 898, 895, 0, 0, 0, 0, 180, 0, 641, 0, 59, 190, 0, 55, 0, 0, 41, 44, 0, 0, 760, 136, 137, 0, 782, 778, 784, 812, 811, 810, 808, 809, 0, 802, 0, 0, 0, 689, 59, 0, 282, 365, 874, 0, 828, 848, 0, 0, 0, 59, 727, 365, 722, 0, 0, 59, 720, 0, 708, 706, 714, 836, 736, 859, 854, 0, 899, 890, 879, 0, 182, 184, 0, 0, 635, 645, 58, 0, 84, 0, 0, 365, 758, 0, 776, 0, 800, 0, 820, 821, 818, 882, 683, 82, 0, 365, 280, 875, 0, 823, 843, 845, 846, 365, 728, 0, 700, 59, 724, 0, 59, 0, 856, 852, 0, 858, 171, 0, 0, 0, 179, 642, 57, 42, 45, 626, 761, 779, 803, 638, 0, 829, 0, 0, 723, 365, 725, 59, 730, 0, 837, 0, 0, 0, 181, 183, 0, 283, 824, 729, 0, 365, 731, 832, 830, 853, 855, 0, 365, 0, 726, 0, 833, 831, 0, 0, 174, 0, 627, 825, 732, 176, 178, 0, 0, 0, 0, 173, 365, 175, 177, 628, 632, 365, 0, 630, 633, 629, 365, 631 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 2, 72, 705, 74, 287, 75, 1219, 1468, 1220, 1469, 76, 1317, 1403, 831, 832, 833, 1259, 1405, 706, 692, 274, 236, 243, 176, 237, 1166, 272, 1180, 773, 175, 271, 845, 177, 178, 707, 708, 709, 1181, 233, 230, 78, 195, 80, 196, 82, 197, 84, 85, 198, 87, 199, 89, 200, 91, 201, 93, 202, 203, 310, 96, 204, 98, 205, 100, 206, 102, 103, 207, 105, 106, 107, 352, 208, 209, 210, 111, 112, 211, 311, 312, 1353, 1354, 114, 317, 212, 213, 117, 214, 215, 120, 216, 740, 742, 743, 745, 744, 746, 305, 741, 772, 306, 266, 680, 218, 219, 220, 221, 124, 125, 126, 127, 128, 129, 130, 222, 223, 224, 225, 380, 367, 132, 133, 1229, 1407, 1535, 1563, 1571, 1575, 1573, 226, 857, 1214, 227, 1124, 1261, 1398, 1215, 135, 136, 137, 138, 228, 140, 141, 142, 143, 144, 145, 146, 182, 183, 184, 185, 731, 782, 783, 732, 1253, 1254, 1425, 1117, 1118, 147, 270, 802, 148, 241, 787, 711, 1187, 810, 1196, 1290, 1189, 285, 1197, 1191, 1285, 1282, 1283, 1284, 150, 840, 1296, 151, 152, 1528, 153, 771, 1262, 697, 1230, 698, 1089, 1408, 1232, 1472, 699, 154, 717, 155, 240, 156, 718, 1097, 1412, 1238, 1474, 719, 1098, 1328, 1240, 157, 1109, 1110, 158, 842, 1299, 1300, 721, 1104, 1421, 1247, 1476, 1246, 1111, 1248, 159, 1250, 1423, 160, 1479, 161, 1273, 1521, 1548, 799, 1488, 1529, 162, 839, 1377, 1500, 163, 1200, 164, 273, 1277, 1435, 1361, 1362, 1363, 165, 291, 1297, 1453, 1530, 1502, 1503, 1380, 1381, 279, 166, 794, 795, 167, 1210, 168, 169, 1251, 170, 171, 172, 1208, 1306, 1307, 173, 299, 712 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -1341 static const yytype_int16 yypact[] = { 63, 81, 7122, -1341, -1341, -1341, 263, -1341, 87, 117, 155, -1341, 131, -1341, -1341, 41, 9130, -1341, -1341, -1341, 212, 212, 212, -1341, 270, -1341, 9130, 9130, -1341, -1341, 153, -1341, 724, 188, -1341, -1341, -1341, 263, 74, -1341, 292, -1341, -1341, 212, 212, 6, 313, -1341, 9130, 212, 212, -1341, 9130, -1341, -1341, 333, 9130, -1341, -1341, -1341, 212, 212, -1341, 212, 212, 212, 41, -1341, -1341, 3324, 2946, 74, 5474, -1341, -1341, -1341, 481, -1341, 75, 1093, 55, 277, 74, 1161, 74, 74, 2008, 74, 2421, 74, 2429, 74, 2533, 74, 2727, 1902, 74, 1784, 74, 2017, 55, 866, -1341, 55, 974, 55, 42, 74, 2260, 3003, 2516, 74, 212, 2787, 74, 1592, 1792, 74, 2867, 3434, 74, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 724, -1341, 2993, -1341, -1341, -1341, -1341, 3111, 55, 336, 346, 372, 424, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 457, -1341, 5204, 386, -1341, 310, -1341, 9130, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 218, -1341, -1341, 212, -1341, -1341, -1341, 429, 9130, -1341, 429, -1341, -1341, -1341, 212, 212, 212, 212, -1341, 200, 244, 227, 9130, 188, 289, 9130, 9130, 265, 483, 594, 795, 5355, 1445, 1626, 3152, 985, 2777, 5681, 3159, 3425, 3662, 3672, 2796, 5844, 4435, 2662, 9216, 9358, -1341, 9492, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 3592, -1341, 9266, -1341, 257, 258, 212, 291, 258, 212, -1341, 279, -1341, -1341, 429, 212, 4829, -1341, 0, 267, 44, 51, 71, 89, 100, 101, 137, -64, 11, -17, 53, 121, 119, 138, 22, 139, 162, 126, 147, 241, 49, 151, 161, 380, 212, 212, 279, 429, 9130, -1341, -1341, -1341, -1341, 378, 437, 307, 429, 4341, 309, 429, 330, 343, 4000, -1341, -1341, 429, 9492, -1341, 4232, 429, 429, 429, -1341, 341, -1341, 429, -1341, 9130, -1341, 9492, -1341, 478, -1341, -1341, -99, -33, -1341, 5976, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 212, 212, -1341, 3324, 9130, -1341, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, 9130, -1341, -1341, -81, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 3324, 74, -1341, -1341, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 3324, 74, -1341, -1341, -1341, -1341, -1341, 87, 117, 155, 4647, 475, -1341, 490, -1341, 21, -1341, -1341, 507, -1341, 561, -1341, 570, -1341, 579, -1341, 27, -1341, 581, -1341, -1341, 595, -1341, 607, -1341, -1341, 613, 618, -1341, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, 134, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 3324, 74, -1341, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 3324, 74, -1341, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 396, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, 9130, -1341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 74, -1341, -1341, -1341, -1341, -1341, 3324, -1341, 3324, -1341, 3324, -1341, 3324, -1341, -1341, 429, -1341, -1341, -1341, 565, 537, -1341, -1341, -1341, 589, -1341, -1341, -1341, -1341, -1341, -1341, 591, 7281, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 411, 194, -1341, 302, 4000, -1341, -1341, -1341, 429, -1341, 4000, -1341, 3835, 357, -1341, 357, 357, 357, 9561, -1341, -1341, -1341, 4341, 4341, 4341, 4341, 4341, 4341, 4341, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 9130, 429, 4341, 429, 212, -1341, 415, 212, -1341, 415, -1341, 3835, 512, -1341, -1341, -1341, 4341, 412, 212, 5647, 296, 420, 9492, 6436, 516, -1341, -1341, -1341, -1341, 9130, -1341, 4341, 217, 412, 512, 7852, 4000, 4829, 387, -1341, 212, -1341, -1341, -1341, -1341, 212, -1341, -1341, -1341, -1341, 212, -1341, -1341, -1341, -1341, 212, -1341, -1341, -1341, -1341, 212, -1341, -1341, -1341, -1341, -1341, 654, 429, -1341, 628, 677, 7990, 429, 9130, 9130, -1341, -1341, -1341, -1341, 212, -1341, -1341, 9492, -1341, -1341, -1341, 23, 212, 9130, -1341, 3324, -1341, 9130, -1341, -1341, 445, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9130, 529, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 452, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 454, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 3324, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 459, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 472, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, 9492, 9492, 9492, 9492, 9492, 9492, 9492, 9492, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 9130, -1341, -1341, 565, -1341, 212, 212, -1341, 9130, 429, -1341, -1341, 194, -1341, -1341, 102, -1341, -1341, -1341, -1341, -1341, -1341, 26, -1341, -1341, -1341, 9130, 688, 770, -57, 212, -1341, -1341, -1341, -1341, 212, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 9504, 9492, 4185, 4185, 4185, 3622, 3622, 637, 9617, 9561, 4625, 361, 361, 4185, 3622, 3622, 3622, 3622, 3622, 373, 373, 228, 228, 228, -1341, -1341, -1341, 258, 212, 258, 212, 694, 770, 279, 429, -1341, 212, -1341, 152, 212, -1341, 5647, 9492, -1341, 212, 212, -1341, -1341, 429, 5011, -1341, -1341, 516, 670, -1341, 37, 309, 19, -1341, -1341, -1341, -1341, -1341, -1341, 212, 37, -1341, -1341, 8975, 9130, 212, -1341, -4, 4677, 9492, -1341, 308, -1341, 7122, 478, 478, 4341, 592, 551, 5991, -1341, -1341, 553, 553, -1341, 9492, 9130, -1341, -1341, 474, -1341, -1341, 9130, 8285, 4000, 9130, -1341, 553, 553, 4000, -1341, 9130, -1341, 429, -1341, -1341, -1341, 630, 102, 409, 102, 8423, -1341, 8561, 7122, 9492, -1341, 698, -1341, 9130, 548, -1341, 557, 4341, 596, 7438, 415, 415, 9130, -1341, -1341, -1341, 4341, 9084, 185, -1341, 665, -1341, 4341, -1341, 573, 429, 24, 212, 4341, 564, 568, 569, 4341, -1341, -1341, -1341, -1341, 193, -1341, 571, 700, 9492, -1341, 574, 616, -1341, -1341, -4, -1341, -1341, 212, -1341, -1341, 14, -1341, -1341, 6615, 587, 96, -1341, 9130, 212, 9130, -77, 606, 606, 9492, -1341, -1341, -1341, -1341, 4000, 429, 429, -1341, 8128, 4000, 8128, -1341, -1341, 242, 102, 102, 102, 102, -1341, 409, -1341, -1341, 6772, -1341, 9492, 9130, 212, -1341, 429, -1341, 9492, -1341, 212, 496, -1341, -1341, 9084, 9130, -1341, -1341, 212, -1341, 429, 429, -1341, 212, 4341, 5060, -1341, 4341, 39, 636, -1341, 212, 429, 4341, -1341, 429, 212, 212, -1341, 429, -1341, -1341, -1341, 429, 429, -1341, -1341, -1341, -1341, 429, 478, 583, 584, -1341, 478, 9492, 214, 4341, -1341, 572, -1341, 212, 212, -1341, -1341, 585, 7438, -1341, -1341, -1341, 7576, -1341, -1341, -1341, -1341, -10, 245, 519, 519, 7714, -1341, 199, 429, 9130, 9492, 4341, 7122, 588, 9084, -1341, 510, 6800, -1341, 723, 8975, 8975, 5093, -1341, 9084, -1341, 429, 212, 4341, 569, 43, -1341, -1341, -1341, -1341, -1341, -1341, 629, 8699, -1341, -1341, -1341, 46, -1341, -1341, 18, 9130, -1341, -1341, -1341, 520, -1341, 429, 429, 9130, -1341, 7438, -1341, 7576, -1341, 7714, -1341, -1341, -1341, -1341, 9492, -1341, 6948, 9084, -1341, -1341, 9130, -1341, -1341, -1341, -1341, 9084, -1341, 524, -1341, 6246, -1341, 212, 4341, 8837, -1341, -1341, 429, -1341, -1341, 593, 602, 604, -1341, 9492, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 528, 9492, 429, 535, -1341, 9084, -1341, 7327, -1341, 52, -1341, 731, 8975, 478, -1341, -1341, 600, -1341, -1341, -1341, 541, 9084, -1341, 212, 212, -1341, -1341, 106, 9130, 8837, -1341, 545, -1341, -1341, 605, 610, -1341, 478, -1341, -1341, -1341, -1341, -1341, 274, 611, 614, 615, -1341, 9130, -1341, -1341, -1341, 617, 3324, 609, -1341, 620, -1341, 3324, -1341 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { -1341, -1341, -1341, -1183, 10, -62, -1341, -54, -1341, -1341, -1341, -1341, -1341, -872, -1341, -608, -209, -1078, -628, -542, 35, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -428, 148, -1341, -707, -1341, -1341, 623, -1341, -1341, 4516, -2, 678, 332, 679, 470, 680, 681, 566, 682, 683, 684, 779, 687, 876, 689, 972, 1298, -1341, 690, 1085, 691, 1467, 693, 3, -1341, 699, 136, 701, 514, -1341, 2154, 1710, 1795, 1978, -1341, -8, 2103, -313, -68, -1340, -636, -1341, 2, 2208, 2364, -1341, 2469, 2648, -1341, -238, -1341, -1341, -1341, -1341, -1341, -1341, 5808, -1341, -1341, -853, 674, 9380, 2761, 2863, -1341, 2978, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 3134, -1341, -1341, -1341, 857, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 1202, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 794, -1341, 287, 704, 797, 798, 802, -1341, -1341, -51, -1341, -1341, -1341, -1341, 405, 549, -345, -229, -1341, -1341, -1341, 47, -1341, -50, -1341, -1341, -47, -1341, 552, 67, -1341, -1341, -1341, -1341, -1341, -793, -1341, -1151, -1341, -375, -1341, -546, -46, -1341, -1341, -1341, -1341, -512, -1341, -1341, -1341, 127, -1341, -1341, -1341, -1341, -1341, -1341, -691, -1341, -699, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 109, -1341, -1341, -1341, -1341, -282, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -868, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -717, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, -1341, 25, -774, -41, -1341, 772, -40, -1341, -39, -1341, -70, -1341, -1341, -465, -36, -1341, 4657 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -881 static const yytype_int16 yytable[] = { 79, 304, 330, 1096, 791, 101, 1090, 1093, 784, 1218, 319, 5, 73, 232, 235, 1172, 1432, 1190, 320, 1100, 1103, 322, 323, 865, 5, 324, 326, 1309, 1401, 5, 245, 327, 328, 329, 1386, 256, 331, 77, 1287, 1255, 335, 277, 5, 784, 5, 1291, 1105, 5, 5, 7, 516, 460, 517, 518, 853, 858, 854, 855, 797, 859, 5, 370, 573, -4, 17, 18, 19, 436, 1342, 149, 79, 40, 1542, 885, 315, 101, 1507, 1508, 1402, 5, 886, 3, 318, 350, 355, 350, 1266, 350, 350, 40, 350, 370, 350, 485, 350, 455, 350, 1256, 364, 350, 1494, 350, 1543, 350, 1257, 1334, 350, 321, 350, 540, 350, 384, 1241, 1242, 350, 335, 39, 350, 41, 42, 350, 860, 1116, 350, 1243, 861, 1279, 179, 1279, 397, 245, 41, 42, 1336, 1337, 256, -664, 1108, 104, 325, 410, 423, 479, 350, 1519, 364, 63, 1303, 67, 68, 41, 42, 1522, 79, 1393, 1394, 336, 180, 101, -195, -880, 501, -195, 283, 1553, 1554, 67, 68, 257, 1211, 468, 67, 68, 1163, 278, 1365, 1509, 436, 1167, 586, 976, 581, 1212, 364, 1539, 275, 798, 626, 1280, 364, 1443, 658, 66, 1175, 1498, 181, 986, 69, 69, 519, 1550, 670, 600, 363, 1505, 66, 364, 316, 104, 493, 378, 69, 494, 364, 713, 364, 351, 5, 351, 1477, 351, 351, 1447, 351, 66, 351, 242, 351, 269, 351, 392, 336, 351, 364, 351, -880, 351, 1102, 716, 351, 781, 351, 542, 351, 1478, 1483, 1244, 351, 405, 495, 351, 364, 511, 351, 1395, 1396, 351, 569, 1245, 418, 431, 595, 364, 364, 1555, 1556, 635, 647, 257, 651, 652, 653, 654, 1176, 337, 781, 351, 509, 557, 655, 510, 364, 620, 364, 5, 621, 354, 679, 364, 139, 1015, 104, 754, 1182, 1016, 1034, 444, 568, 594, 364, 364, 364, 280, 338, 339, 856, 634, 1044, 1270, 364, 666, 723, -880, 364, 724, 338, 339, 355, 608, 268, 678, 609, 1105, 364, 364, 340, 341, 342, 343, 1203, 344, 345, 1564, 1565, 81, 286, 335, 356, 357, 358, 359, 1356, 360, 361, 1106, 1016, 293, 1373, 1318, 874, 315, 1374, 720, 302, 684, 41, 42, 1334, 1335, 139, 1334, 1335, 1325, 1326, 246, 883, 315, 353, 1462, 67, 68, 1177, 1463, 768, 769, 770, 1321, 1333, 725, 1339, 895, 315, 689, 40, 780, 1336, 1337, 483, 1336, 1337, 499, 796, 515, 546, 904, 315, 1286, 1416, 686, 1272, 646, 1233, 1239, 364, 81, 737, 713, 913, 315, 67, 68, 774, 1107, 1108, 362, -129, -129, 1355, -880, 268, 922, 315, -104, -104, 347, 754, 347, 683, 714, 715, 716, 713, 1566, 931, 315, 191, 363, 754, 522, 364, 63, 1303, 139, 67, 68, 777, 940, 315, -872, -872, -872, 807, 336, 1099, 715, 716, -880, 949, 315, 808, 67, 68, 1400, 809, 246, 834, 1417, 1418, 1419, 1420, 958, 315, 83, 836, 1096, 693, 694, 695, 696, 758, 759, 967, 315, 316, 333, 334, 853, 81, 854, 855, 684, 685, 354, 67, 68, 849, 977, 315, 837, 316, 686, 687, 247, 1355, 766, 767, 768, 769, 770, 67, 68, 1119, 987, 315, 316, 335, 766, 767, 768, 769, 770, 338, 339, 355, 1334, 1335, 688, 689, 316, 793, 355, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1185, 67, 68, 316, 83, 356, 357, 358, 359, 384, 360, 361, 1064, 791, 1336, 1337, 316, 693, 1091, 695, 696, 996, 315, 67, 68, 1157, 67, 68, 1168, 316, 86, 791, 1005, 315, -876, -876, -876, 1016, 524, 1355, 690, 691, 316, 67, 68, 1014, 315, 695, 696, 1355, 733, 734, 735, 316, -141, -141, 1094, 1095, 1025, 315, 248, 860, 1221, 397, 247, 369, 316, 1312, 860, 1224, 860, 1225, 410, 1035, 315, 860, 1227, 316, 1083, 1514, 1084, 423, 1085, 460, 1086, 1045, 315, 83, 860, 1228, 860, 1320, 316, 1355, 338, 339, 370, 485, 1054, 315, 86, 1355, 1331, 1332, 363, 1359, 1360, 364, 316, 501, 1063, 315, 1430, 1431, 1347, 658, 371, 372, 373, 374, 670, 375, 376, 1351, 1336, 1337, 1430, 1486, 1165, 1358, 1073, 315, 1173, 1355, 527, 1368, 1346, 1511, 1198, 1372, 1430, 1523, 1082, 315, 1430, 1536, 1201, 88, 1202, 1355, 1293, 1430, 1538, 1223, 1278, 316, 1557, 1430, 1549, -681, 248, 1430, 1559, 754, 1226, 1265, 316, 1314, 1313, 1343, 79, 1316, 1345, 1346, 1348, 101, 1570, 249, 1357, 316, 1322, 1369, 1376, 86, 1370, 1371, 1379, 1446, 1375, 1465, 1378, 5, 316, 7, 8, 1392, 9, 10, 1340, 1404, 1341, 1470, 15, 1459, 1460, 1489, 1484, 316, 17, 18, 19, 1501, 1349, 1544, 1532, 378, 1547, 88, 364, 316, 1439, 1441, 1533, 1442, 1534, 1560, 1576, 1567, 1160, 1449, 1561, 1162, 316, 1572, 1568, 1569, 1577, 1466, 1406, 1302, 710, 191, 1171, 90, 316, 800, 521, 523, 525, 526, 528, 529, 530, 1464, 1217, 532, 1485, 534, 536, 538, 39, 539, 41, 42, 316, 79, 383, 541, 656, 543, 101, 186, 547, 250, 187, 188, 316, 249, 1413, 189, 1415, 1482, 1267, 804, 1292, 803, 1445, 1092, 47, 1101, 1164, 1249, 1493, 1558, 1184, 338, 339, 384, 1497, 301, 88, 79, 1087, 1389, 0, 0, 101, 0, 104, 0, 812, 0, 0, 90, 0, 0, 0, 385, 386, 387, 388, 0, 389, 390, 822, 823, 824, 825, 826, 827, 828, 829, 830, 0, 0, 0, 66, 484, 0, 0, 92, 0, 69, 70, 0, 71, 0, 531, 0, 0, 1525, 0, 1258, 1527, 0, 0, 0, 0, 1471, 0, 0, 0, 1473, 0, 0, 0, 338, 339, 485, 0, 251, 1475, 0, 250, 0, 0, 0, 0, 0, 0, 1541, 0, 0, 0, 0, 0, 1490, 1491, 486, 487, 488, 489, 0, 490, 491, 0, 90, 791, 784, 0, 366, 0, 0, 104, 1504, 394, 0, 407, 0, 420, 92, 433, 0, 446, 457, 0, 392, 0, 481, 364, 497, 0, 1515, 513, 1516, 0, 1517, 559, 571, 0, 0, 0, 597, 0, 611, 623, 94, 637, 649, 104, 0, 0, 0, 0, 533, 500, 0, 0, 0, 0, 0, 0, 0, 668, 0, 1207, 447, 0, 681, 139, 0, 0, 0, 0, 0, 492, 252, 0, 0, 0, 251, 0, 0, 0, 338, 339, 501, 0, 0, 0, 0, 1545, 0, 0, 493, 338, 339, 494, 0, 0, 364, 0, 0, 92, 0, 0, 502, 503, 504, 505, 0, 506, 507, 0, 81, 0, 94, 448, 449, 450, 451, 0, 452, 453, 0, 366, 0, 394, 407, 420, 433, 446, 457, 0, 481, 497, 513, 559, 571, 0, 597, 611, 623, 637, 649, 0, 0, 0, 793, 0, 535, 0, 0, 0, 0, 668, 0, 681, 0, 97, 0, 0, 0, 0, 139, 0, 793, 0, 0, 0, 0, 0, 0, 0, 337, 366, 252, 394, 407, 420, 433, 446, 457, 508, 481, 497, 513, 559, 571, 254, 597, 611, 623, 637, 649, 0, 668, 681, 0, 94, 139, 0, 509, 338, 339, 510, 0, 0, 364, 81, 1305, 0, 0, 0, 0, 0, 455, 0, 0, 364, 0, 0, 0, 0, 0, 340, 341, 342, 343, 97, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 781, 0, 369, 0, 0, 81, 0, 0, 0, 0, 0, 79, 83, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 537, 0, 0, 0, 0, 0, 0, 79, 338, 339, 370, 0, 101, 134, 0, 0, 0, 79, 1310, 1311, 0, 0, 101, 1298, 0, 0, 254, 1304, 0, 73, 371, 372, 373, 374, 0, 375, 376, 79, 0, 346, 0, 0, 101, 267, 0, 1388, 0, 0, 330, 97, 0, 0, 0, 0, 77, 79, 319, 79, 79, 0, 101, 347, 101, 101, 320, 0, 0, 322, 323, 79, 73, 324, 326, 0, 101, 0, 0, 327, 328, 329, 0, 330, 331, 134, 83, 86, 149, 0, 0, 319, 0, 0, 0, 0, 0, 77, 0, 320, 0, 0, 322, 323, 0, 0, 324, 326, 0, 377, 0, 95, 327, 328, 329, 0, 0, 331, 79, 545, 0, 1382, 83, 101, 0, 0, 0, 1387, 104, 149, 318, 378, 0, 0, 364, 0, 0, 79, 0, 79, 0, 253, 101, 0, 101, 267, 0, 104, 0, 0, 0, 79, 0, 0, 0, 321, 101, 104, 0, 0, 0, 0, 0, 318, 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 0, 95, 86, 0, 0, 0, 0, 325, 321, 0, 0, 0, 0, 0, 0, 104, 0, 104, 104, 0, 0, 1458, 0, 446, 88, 1461, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 79, 86, 0, 325, 79, 101, 0, 330, 0, 101, 0, 0, 0, 79, 0, 319, 0, 0, 101, 0, 79, 0, 0, 320, 253, 101, 322, 323, 79, 79, 324, 326, 73, 101, 101, 0, 327, 328, 329, 104, 0, 331, 0, 0, 1384, 0, 79, 95, 409, 0, 1506, 101, 0, 0, 793, 0, 0, 77, 104, 0, 104, 0, 139, 99, 79, 0, 79, 0, 79, 101, 0, 101, 104, 101, 0, 79, 0, 338, 339, 410, 101, 139, 88, 90, 0, 0, 0, 318, 0, 149, 0, 139, 79, 255, 0, 0, 0, 101, 1574, 411, 412, 413, 414, 1578, 415, 416, 0, 81, 0, 0, 0, 139, 321, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 79, 1546, 0, 81, 0, 101, 139, 0, 139, 139, 99, 0, 0, 81, 0, 104, 0, 79, 0, 104, 139, 325, 101, 0, 0, 1562, 0, 0, 104, 0, 0, 0, 0, 81, 0, 104, 0, 0, 0, 0, 0, 0, 0, 104, 104, 0, 0, 0, 0, 0, 0, 81, 0, 81, 81, 90, 0, 92, 0, 0, 0, 104, 0, 0, 0, 81, 0, 139, 0, 0, 255, 0, 599, 0, 0, 418, 0, 0, 364, 104, 0, 104, 0, 104, 0, 0, 139, 0, 139, 0, 104, 90, 0, 99, 0, 0, 0, 0, 0, 0, 139, 338, 339, 600, 0, 0, 422, 104, 0, 0, 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, 681, 83, 601, 602, 603, 604, 0, 605, 606, 0, 81, 0, 81, 0, 338, 339, 423, 104, 0, 0, 83, 0, 0, 0, 81, 0, 0, 0, 0, 0, 83, 92, 94, 0, 104, 0, 424, 425, 426, 427, 0, 428, 429, 0, 0, 139, 0, 0, 0, 139, 83, 0, 0, 0, 0, 0, 0, 0, 139, 0, 0, 0, 108, 0, 0, 139, 0, 92, 83, 0, 83, 83, 0, 139, 139, 0, 0, 0, 0, 607, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 81, 139, 258, 0, 81, 0, 0, 86, 608, 0, 0, 609, 0, 81, 364, 0, 0, 0, 0, 139, 81, 139, 0, 139, 0, 0, 86, 0, 81, 81, 139, 0, 0, 0, 0, 0, 86, 94, 0, 83, 0, 0, 108, 0, 0, 431, 81, 139, 364, 0, 0, 0, 0, 459, 0, 97, 86, 109, 83, 0, 83, 612, 0, 0, 81, 0, 81, 0, 81, 0, 0, 0, 83, 94, 86, 81, 86, 86, 139, 0, 0, 0, 338, 339, 460, 0, 0, 259, 86, 0, 338, 339, 81, 0, 0, 139, 0, 0, 0, 0, 0, 0, 258, 0, 461, 462, 463, 464, 0, 465, 466, 0, 613, 614, 615, 616, 0, 617, 618, 0, 0, 0, 0, 81, 88, 108, 0, 109, 0, 0, 0, 0, 0, 0, 0, 86, 0, 0, 83, 0, 81, 0, 83, 88, 0, 0, 0, 0, 0, 0, 97, 83, 0, 88, 86, 0, 86, 0, 83, 0, 0, 0, 0, 0, 0, 0, 83, 83, 86, 0, 0, 447, 134, 88, 0, 0, 0, 0, 0, 0, 0, 467, 0, 0, 83, 0, 97, 259, 0, 619, 0, 88, 0, 88, 88, 0, 0, 0, 0, 0, 338, 339, 83, 468, 83, 88, 83, 0, 620, 0, 109, 621, 0, 83, 364, 0, 0, 0, 0, 0, 90, 0, 448, 449, 450, 451, 0, 452, 453, 0, 83, 0, 0, 0, 86, 0, 0, 0, 86, 90, 110, 0, 0, 0, 0, 0, 0, 86, 0, 90, 0, 0, 88, 0, 86, 0, 0, 0, 0, 0, 0, 83, 86, 86, 0, 0, 0, 134, 95, 90, 260, 88, 0, 88, 0, 0, 0, 383, 83, 0, 86, 0, 0, 0, 0, 88, 471, 90, 0, 90, 90, 0, 0, 0, 0, 0, 0, 0, 86, 454, 86, 90, 86, 134, 0, 0, 338, 339, 384, 86, 110, 0, 0, 0, 0, 338, 339, 92, 0, 0, 0, 455, 0, 0, 364, 0, 86, 0, 385, 386, 387, 388, 0, 389, 390, 0, 92, 472, 473, 474, 475, 0, 476, 477, 0, 0, 92, 0, 90, 0, 0, 88, 0, 0, 0, 88, 0, 86, 0, 0, 0, 0, 0, 95, 88, 113, 92, 90, 0, 90, 260, 88, 0, 0, 86, 0, 0, 0, 0, 88, 88, 90, 0, 0, 92, 0, 92, 92, 0, 0, 0, 0, 0, 110, 0, 261, 0, 88, 92, 95, 0, 0, 0, 0, 0, 391, 0, 0, 0, 0, 0, 0, 0, 94, 478, 88, 0, 88, 0, 88, 0, 0, 0, 0, 0, 0, 88, 392, 0, 0, 364, 0, 94, 0, 0, 113, 479, 99, 0, 364, 0, 0, 94, 88, 0, 92, 0, 90, 0, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 94, 0, 92, 0, 92, 90, 0, 0, 115, 0, 0, 0, 88, 90, 90, 0, 92, 0, 94, 0, 94, 94, 0, 0, 0, 0, 0, 0, 0, 88, 0, 90, 94, 261, 368, 0, 381, 382, 262, 395, 0, 408, 0, 421, 0, 434, 0, 0, 458, 90, 470, 90, 482, 90, 0, 498, 113, 514, 544, 548, 90, 0, 0, 583, 97, 0, 598, 549, 0, 624, 99, 0, 650, 0, 0, 0, 0, 90, 115, 94, 0, 0, 92, 97, 0, 0, 92, 0, 0, 0, 0, 0, 682, 97, 0, 92, 338, 339, 94, 0, 94, 0, 92, 0, 0, 0, 99, 0, 90, 0, 92, 92, 94, 97, 0, 0, 0, 0, 550, 551, 552, 553, 0, 554, 555, 90, 0, 0, 92, 0, 0, 97, 0, 97, 97, 0, 0, 0, 262, 0, 0, 0, 0, 0, 0, 97, 92, 0, 92, 0, 92, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 115, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 94, 0, 0, 134, 94, 0, 0, 0, 0, 0, 0, 0, 0, 94, 97, 0, 263, 556, 0, 0, 94, 0, 134, 0, 0, 0, 0, 92, 94, 94, 0, 0, 134, 97, 0, 97, 0, 0, 0, 557, 108, 0, 364, 0, 92, 0, 94, 97, 0, 0, 396, 0, 134, 0, 0, 0, 116, 0, 409, 0, 0, 0, 0, 0, 94, 0, 94, 0, 94, 0, 134, 0, 134, 134, 0, 94, 0, 0, 0, 338, 339, 397, 0, 0, 134, 0, 0, 338, 339, 410, 0, 118, 94, 0, 0, 0, 0, 0, 0, 95, 0, 398, 399, 400, 401, 0, 402, 403, 0, 411, 412, 413, 414, 97, 415, 416, 263, 97, 95, 0, 0, 264, 0, 94, 0, 109, 97, 0, 95, 0, 0, 134, 0, 97, 0, 108, 0, 0, 0, 116, 94, 97, 97, 0, 0, 572, 0, 0, 95, 0, 134, 0, 134, 0, 0, 0, 0, 0, 0, 97, 0, 118, 422, 0, 134, 0, 95, 0, 95, 95, 0, 108, 0, 0, 338, 339, 573, 97, 404, 97, 95, 97, 0, 0, 0, 0, 417, 0, 97, 0, 0, 338, 339, 423, 0, 0, 574, 575, 576, 577, 405, 578, 579, 364, 0, 97, 0, 0, 418, 0, 0, 364, 0, 424, 425, 426, 427, 0, 428, 429, 109, 264, 0, 0, 0, 0, 0, 95, 0, 0, 134, 0, 0, 0, 134, 0, 97, 0, 0, 0, 0, 0, 0, 134, 118, 0, 95, 0, 95, 0, 134, 0, 0, 97, 0, 0, 109, 0, 134, 134, 95, 0, 0, 0, 0, 0, 0, 0, 99, 0, 119, 0, 0, 580, 0, 0, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 430, 612, 0, 0, 134, 581, 134, 99, 134, 0, 265, 0, 0, 0, 0, 134, 0, 0, 110, 0, 0, 0, 431, 0, 0, 364, 0, 99, 0, 0, 338, 339, 134, 0, 0, 0, 95, 0, 0, 0, 95, 0, 0, 0, 0, 99, 0, 99, 99, 95, 119, 0, 613, 614, 615, 616, 95, 617, 618, 99, 0, 0, 0, 134, 95, 95, 435, 0, 0, 0, -344, -344, -344, -344, -344, -344, -344, -344, -344, -344, 134, 0, 95, 0, -344, -344, -344, -344, -344, -344, -344, -344, -344, 121, 0, 338, 339, 436, 0, 0, 95, 0, 95, 0, 95, 0, 99, 0, 0, 0, 265, 95, 0, 110, 0, 0, 459, 437, 438, 439, 440, 0, 441, 442, 0, 99, 585, 99, 95, 0, 0, 0, 0, 119, 0, 572, 0, 0, 0, 99, 0, 0, 0, 113, 0, 338, 339, 460, 620, 110, 0, 621, 0, 0, 364, 338, 339, 586, 0, 95, 0, 0, 0, 121, 338, 339, 573, 461, 462, 463, 464, 0, 465, 466, 0, 0, 95, 587, 588, 589, 590, 0, 591, 592, 0, 0, 574, 575, 576, 577, 0, 578, 579, 0, 443, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 625, 0, 0, 99, 0, 0, 0, 0, 0, 0, 444, 0, 99, 364, 0, 108, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 99, 99, 338, 339, 626, 113, 0, 108, 0, 0, 0, 0, 0, 121, 0, 115, 0, 108, 99, 0, 0, 593, 0, 0, 627, 628, 629, 630, 0, 631, 632, 0, 122, 468, 0, 0, 99, 108, 99, 0, 99, 113, 0, 594, 0, 0, 364, 99, 5, 0, 7, 8, 581, 9, 10, 108, 0, 108, 108, 15, 0, 0, 0, 0, 99, 17, 18, 19, 0, 108, 0, 0, 0, 109, 0, 0, 190, 123, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 0, 99, 0, 0, 191, 657, 0, 633, 109, 0, 0, 0, 0, 307, 0, 560, 115, 0, 99, 0, 0, 122, 108, 39, 0, 41, 42, 0, 109, 634, 0, 0, 364, 0, 338, 339, 658, 0, 0, 0, 0, 108, 0, 108, 338, 339, 109, 0, 109, 109, 0, 47, 115, 123, 0, 108, 659, 660, 661, 662, 109, 663, 664, 308, 0, 0, 561, 562, 563, 564, 309, 565, 566, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 193, 194, 0, 0, 0, 0, 0, 66, 303, 0, 0, 0, 0, 69, 70, 109, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 669, 0, 108, 109, 0, 109, 0, 0, 0, 0, 665, 108, 0, 123, 0, 0, 131, 109, 108, 0, 567, 0, 0, 0, 0, 0, 108, 108, 0, 338, 339, 670, 666, 0, 0, 364, 0, 0, 0, 110, 0, 435, 568, 0, 108, 364, 0, 0, 484, 116, 0, 671, 672, 673, 674, 0, 675, 676, 110, 118, 0, 0, 108, 0, 108, 0, 108, 0, 110, 0, 338, 339, 436, 108, 0, 0, 0, 338, 339, 485, 0, 0, 0, 109, 0, 116, 131, 109, 110, 0, 108, 0, 437, 438, 439, 440, 109, 441, 442, 486, 487, 488, 489, 109, 490, 491, 110, 0, 110, 110, 0, 109, 109, 0, 0, 0, 0, 0, 0, 0, 110, 108, 0, 0, 0, 0, 0, 0, 677, 109, 0, 0, 0, 0, 0, 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 109, 678, 109, 0, 364, 118, 0, 0, 0, 109, 0, 0, 0, 0, 0, 113, 0, 0, 110, 0, 131, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 110, 0, 110, 0, 118, 444, 0, 113, 364, 493, 0, 0, 494, 0, 110, 364, 0, 0, 0, 0, 109, 0, 0, 5, 0, 7, 8, 113, 9, 10, 0, 0, 0, 0, 15, 0, 0, 109, 0, 0, 17, 18, 19, 0, 0, 113, 0, 113, 113, 0, 0, 190, 119, 0, 0, 0, 26, 27, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0, 110, 0, 0, 115, 110, 0, 0, 0, 0, 0, 0, 0, 39, 110, 41, 42, 0, 0, 0, 0, 110, 0, 115, 0, 0, 0, 113, 0, 110, 110, 0, 0, 115, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 113, 110, 113, 500, 0, 0, 0, 115, 0, 0, 0, 0, 638, 0, 113, 0, 0, 0, 0, 110, 0, 110, 119, 110, 0, 115, 0, 115, 115, 0, 110, 192, 338, 339, 501, 0, 193, 194, 0, 115, 121, 338, 339, 66, 303, 0, 0, 110, 0, 69, 70, 0, 71, 0, 502, 503, 504, 505, 119, 506, 507, 0, 0, 639, 640, 641, 642, 0, 643, 644, 0, 0, 0, 0, 0, 0, 0, 0, 110, 0, 113, 0, 0, 0, 113, 0, 115, 0, 0, 0, 0, 0, 0, 113, 0, 110, 0, 0, 0, 0, 113, 0, 0, 0, 0, 115, 0, 115, 113, 113, 0, 0, 0, 0, 116, 0, 0, 0, 0, 115, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 116, 0, 121, 0, 0, 0, 0, 645, 0, 122, 116, 113, 0, 113, 0, 113, 0, 509, 0, 0, 510, 0, 113, 364, 0, 0, 0, 0, 0, 646, 116, 0, 364, 0, 0, 0, 0, 657, 121, 113, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 116, 116, 115, 0, 0, 0, 115, 0, 0, 0, 0, 0, 116, 0, 0, 115, 338, 339, 658, 0, 113, 0, 115, 0, 0, 0, 0, 0, 0, 0, 115, 115, 0, 0, 0, 0, 118, 113, 659, 660, 661, 662, 0, 663, 664, 0, 0, 0, 115, 0, 0, 0, 0, 0, 122, 118, 0, 549, 0, 116, 0, 752, 753, 0, 0, 118, 115, 560, 115, 0, 115, 0, 754, 0, 123, 0, 0, 115, 116, 0, 116, 0, 0, 0, 0, 118, 338, 339, 0, 0, 122, 0, 116, 0, 115, 0, 338, 339, 0, 0, 0, 0, 0, 118, 0, 118, 118, 0, 550, 551, 552, 553, 0, 554, 555, 0, 0, 118, 561, 562, 563, 564, 0, 565, 566, 115, 758, 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 666, 0, 0, 364, 0, 115, 0, 0, 0, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 0, 116, 0, 0, 0, 116, 0, 118, 0, 0, 0, 0, 123, 0, 116, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 118, 0, 118, 116, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 0, 116, 123, 0, 557, 0, 0, 364, 0, 0, 0, 0, 119, 0, 568, 0, 0, 364, 0, 116, 0, 116, 0, 116, 0, 0, 0, 131, 0, 0, 116, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 119, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 116, 119, 118, 119, 119, 0, 0, 0, 0, 0, 118, 118, 0, 0, 0, 119, 0, 116, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 118, 0, 0, 0, 822, 823, 824, 825, 826, 827, 828, 829, 830, 0, 0, 0, 131, 0, 118, 121, 118, 0, 118, 0, 0, 0, 0, 0, 0, 118, 0, 0, 0, 0, 119, 0, 0, 0, 121, 0, 0, 0, 0, 0, 0, 0, 118, 0, 121, 0, 0, 0, 131, 119, 0, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 121, 0, 0, 0, 0, 0, 1115, 0, 0, 118, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 121, 121, 0, 0, 0, 0, 118, 0, 0, 0, 0, 0, 121, 0, 0, 0, 0, 0, 0, 0, 747, 748, 0, 0, 749, 750, 751, 0, 0, 0, 0, 0, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 752, 753, 0, 119, 0, 0, 0, 119, 0, 0, 122, 754, 0, 0, 0, 0, 119, 121, 0, 0, 122, 0, 0, 119, 0, 0, 0, 0, 0, 0, 0, 119, 119, 0, 0, 0, 121, 0, 121, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 119, 121, 0, 0, 0, 0, 0, 0, 0, 122, 0, 122, 122, 755, 756, 757, 758, 759, 119, 0, 119, 0, 119, 122, 0, 0, 0, 0, 0, 119, 0, 0, 0, 0, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 119, 0, 0, 0, 67, 68, 0, 0, 0, 0, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 0, 122, 121, 0, 0, 0, 0, 123, 119, 0, 0, 121, 0, 0, 0, 0, 0, 123, 121, 0, 122, 0, 122, 0, 0, 119, 121, 121, 0, 0, 0, 0, 0, 0, 122, 0, 0, 123, 0, 0, 0, 0, 0, 0, 121, 0, 0, 0, 0, 749, 750, 751, 0, 0, 0, 123, 0, 123, 123, 0, 0, 0, 121, 0, 121, 0, 121, 752, 753, 123, 0, 0, 0, 121, 0, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 747, 748, 0, 0, 749, 750, 751, 0, 122, 0, 0, 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 122, 752, 753, 123, 0, 0, 0, 122, 121, 0, 0, 0, 754, 0, 0, 122, 122, 0, 0, 758, 759, 0, 123, 0, 123, 121, 0, 0, 0, 0, 0, 131, 0, 122, 0, 0, 123, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 131, 122, 0, 122, 0, 122, 0, 0, 0, 0, 131, 0, 122, 755, 756, 757, 758, 759, 0, 0, 0, 0, 843, 844, 0, 0, 0, 0, 0, 122, 131, 0, 0, 0, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 0, 131, 0, 131, 131, 123, 0, 0, 0, 123, 0, 0, 0, 122, 0, 131, 0, 0, 123, 0, 0, 0, 0, 0, 0, 123, 0, 0, 0, 0, 122, 0, 0, 123, 123, 0, 0, 0, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 0, 0, 0, 123, 822, 823, 824, 825, 826, 827, 828, 829, 830, 0, 131, 599, 0, 0, 0, 0, 0, 123, 0, 123, 0, 123, 0, 0, 0, 0, 0, 0, 123, 131, 0, 131, 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, 600, 131, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 601, 602, 603, 604, 0, 605, 606, 0, 0, 0, 0, 0, 0, 0, 123, 0, 0, 0, -338, -338, -338, -338, -338, -338, -338, -338, -338, -338, 0, 0, 0, 123, -338, -338, -338, -338, -338, -338, -338, -338, -338, 229, 231, 234, 0, 0, 0, 131, 0, 0, 0, 131, 0, 244, 0, 0, 0, 0, 0, 276, 131, 0, 0, 0, 281, 282, 284, 131, 0, 0, 289, 290, 0, 0, 0, 131, 131, 0, 0, 0, 0, 295, 296, 0, 297, 298, 300, 0, 0, 0, 0, 0, 314, 131, 0, 0, 608, 0, 0, 609, 0, 349, 364, 349, 0, 349, 349, 0, 349, 0, 349, 131, 349, 131, 349, 131, 0, 349, 0, 349, 0, 349, 131, 0, 349, 0, 349, 520, 349, 0, 0, 0, 349, 584, 0, 349, 0, 0, 349, 131, 0, 349, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 0, 0, 0, 5, 0, 7, 8, 349, 9, 10, 174, 749, 750, 751, 15, 0, 131, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, 752, 753, 190, 0, 131, 0, 0, 26, 27, 726, 0, 754, 0, 0, 0, 0, 0, 0, 0, 0, 730, 730, 730, 730, 191, 0, 0, 0, 0, 0, 747, 748, 0, 307, 749, 750, 751, 0, 0, 0, 0, 0, 0, 39, 0, 41, 42, 0, 0, 0, 0, 332, 752, 753, 0, 0, 0, 0, 0, 0, 0, 0, 755, 754, 757, 758, 759, 0, 0, 0, 776, 47, 0, 779, 0, 730, 0, 0, 0, 786, 790, 0, 0, 308, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 801, 786, 730, 0, 193, 194, 755, 756, 757, 758, 759, 66, 303, 0, 0, 0, 844, 69, 70, 0, 71, 0, 0, 0, 0, 0, 0, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 0, 0, 0, 0, 0, 0, 727, 0, 5, 729, 7, 8, 0, 9, 10, 0, 0, 0, 0, 15, 0, 0, 0, 863, 864, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 190, 314, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, 0, 0, 0, 191, 0, 0, 775, 0, 0, 778, 0, 0, 0, 314, 0, 0, 785, 0, 0, 0, 0, 0, 39, 0, 41, 42, 0, 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, 0, 0, 0, 0, 0, 0, 0, 805, 47, 0, 0, 314, 0, 0, 0, 0, 811, 0, 0, 835, 0, 0, 838, 0, 314, 841, 0, 0, 0, 846, 847, 848, 0, 850, 0, 851, 0, 314, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 314, 193, 194, 0, 0, 0, 0, 0, 66, 788, 0, 0, 789, 314, 69, 70, 0, 71, 0, 0, 0, 0, 0, 0, 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 0, 700, 0, 314, 15, 16, -750, -750, -750, -750, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, -750, -750, -750, -750, 0, 30, 31, 32, -750, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 314, 0, 0, 0, 0, 35, 36, 37, -750, -750, 38, 314, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 314, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 314, 0, 0, 47, 48, 49, 0, 0, 51, -750, 52, -750, -750, 703, 704, 314, 0, 0, 0, 0, 0, -750, 0, 0, 56, 0, 0, 314, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 0, 0, 314, 0, 822, 823, 824, 825, 826, 827, 828, 829, 830, 66, 314, 67, 68, 0, 0, 69, 70, 0, 71, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 0, 314, 0, 0, 822, 823, 824, 825, 826, 827, 828, 829, 830, 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 1440, 700, 0, 0, 15, 16, 0, 0, -772, 0, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, -772, -772, -772, 1492, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0, 43, 1161, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 1170, 790, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 790, 0, 0, 1188, 56, 0, 0, 0, 1192, 0, 0, 0, 0, 1193, 0, 0, 0, 0, 1194, 0, 0, 0, 0, 1195, 0, 0, 0, 1088, 0, 0, 0, 66, 0, 67, 68, 0, 0, 69, 70, 0, 71, 396, 1209, 0, 0, 0, 0, 0, 0, 0, 1213, 0, 0, 0, 0, 0, 1112, 0, 0, 0, 1113, 0, 1114, 0, 0, 1120, 0, 1121, 1122, 1123, 338, 339, 397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 398, 399, 400, 401, 0, 402, 403, 0, 0, 0, 0, 0, 0, 1156, 0, 1158, 0, 0, -325, -325, -325, -325, -325, -325, -325, -325, -325, -325, 0, 1169, 0, 0, -325, -325, -325, -325, -325, -325, -325, -325, -325, 0, 0, 0, 1178, 1179, 0, 0, 1183, 0, 1186, 0, 0, 0, 0, 0, 0, 0, 0, -3, 4, 0, -46, -46, 5, 6, 7, 8, 0, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 1199, 0, 17, 18, 19, 1204, 20, 21, 22, 23, 24, 0, 0, 0, 25, 0, 0, 0, 26, 27, 405, 28, 0, 364, 0, 0, 29, 30, 31, 32, 0, 0, 0, 0, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, 48, 49, 0, 50, 51, 0, 52, 0, 0, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, 57, 58, 59, 60, 61, 62, 63, 0, 64, 65, 1234, 1235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 67, 68, 0, 0, 69, 70, 0, 71, 0, 730, 0, 0, 0, 0, 1260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 7, 8, 0, 9, 10, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, 1263, 0, 1264, 0, 190, 730, 0, 0, 1269, 26, 27, 1271, 0, 790, 471, 0, 1274, 1275, 0, 0, 0, 0, 0, 0, 0, 0, 191, 1281, 0, 1188, 0, 0, 0, 0, 0, 0, 1289, 1281, 0, 0, 0, 0, 1295, 338, 339, 39, 0, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 472, 473, 474, 475, 0, 476, 477, 0, 47, 0, 0, 0, 0, 0, 1237, 0, 0, 0, -361, -361, -361, -361, -361, -361, -361, -361, -361, -361, 0, 0, 0, 0, -361, -361, -361, -361, -361, -361, -361, -361, -361, 0, 0, 0, 192, 0, 0, 0, 0, 193, 194, 0, 0, 0, 1366, 1367, 66, 788, 0, 0, 0, 0, 69, 70, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1385, 0, 0, 0, 1268, 217, 0, 0, 0, 0, 0, 1399, 0, 0, 0, 238, 239, 0, 1276, 0, 0, 479, 0, 0, 364, 0, 0, 1288, 0, 0, 0, 0, 0, 0, 585, 0, 0, 288, 0, 0, 0, 292, 1301, 1427, 0, 294, 1308, 0, 174, 1429, 0, 0, 0, 0, 0, 0, 0, 1434, 0, 313, 0, 0, 1438, 338, 339, 586, 0, 1444, 0, 1323, 1289, 0, 0, 0, 1327, 1451, 1452, 0, 1330, 0, 0, 0, 0, 0, 1338, 587, 588, 589, 590, 174, 591, 592, 0, 0, 0, 0, 0, 0, 0, 0, 1260, 1467, 0, -335, -335, -335, -335, -335, -335, -335, -335, -335, -335, 0, 0, 0, 1364, -335, -335, -335, -335, -335, -335, -335, -335, -335, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1383, 0, 1496, 0, 0, 1499, 1390, 0, 0, 332, 0, 722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1409, 1410, 1411, 728, 0, 1414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1422, 0, 736, 332, 0, 738, 739, 594, 0, 1428, 364, 747, 748, 0, 0, 749, 750, 751, 1526, 0, 0, 0, 0, 1436, 1437, 0, 747, 748, 0, 0, 749, 750, 751, 752, 753, 1448, 0, 0, 1450, 0, 0, 0, 1454, 0, 754, 0, 1455, 1456, 752, 753, 0, 0, 1457, 0, 792, 0, 0, 0, 0, 754, 0, 0, 1551, 1552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1480, 806, 0, 0, 174, 0, 0, 0, 0, 0, 755, 756, 757, 758, 759, 0, 862, 0, 1495, 0, 0, 0, 0, 0, 0, 755, 756, 757, 758, 759, 852, 1315, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 1512, 1513, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 332, 0, 0, 0, 0, 866, 0, 0, 867, 868, 869, 870, 871, 872, 873, 0, 0, 0, 0, 0, 1531, 0, 875, 0, 876, 877, 878, 879, 880, 881, 882, 0, 884, 0, 0, 0, 0, 887, 1537, 888, 889, 890, 891, 892, 893, 894, 0, 0, 0, 0, 0, 896, 0, 897, 898, 899, 900, 901, 902, 903, 0, 0, 0, 0, 905, 0, 906, 907, 908, 909, 910, 911, 912, 0, 0, 0, 0, 914, 0, 915, 916, 917, 918, 919, 920, 921, 0, 0, 0, 0, 923, 0, 924, 925, 926, 927, 928, 929, 930, 0, 0, 0, 0, 932, 0, 933, 934, 935, 936, 937, 938, 939, 0, 0, 0, 941, 942, 943, 944, 945, 946, 947, 948, 0, 0, 0, 0, 950, 0, 951, 952, 953, 954, 955, 956, 957, 0, 0, 0, 959, 960, 961, 962, 963, 964, 965, 966, 0, 0, 0, 0, 0, 968, 0, 969, 970, 971, 972, 973, 974, 975, 0, 0, 0, 0, 0, 0, 0, 978, 0, 979, 980, 981, 982, 983, 984, 985, 0, 0, 0, 0, 0, 0, 0, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 0, 0, 0, 0, 822, 823, 824, 825, 826, 827, 828, 829, 830, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 988, 989, 990, 991, 992, 993, 994, 995, 0, 0, 0, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 0, 0, 0, 0, 1006, 0, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 0, 0, 0, 0, 1017, 0, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1524, 0, 0, 0, 0, 1026, 0, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 0, 0, 0, 0, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 0, 0, 0, 0, 0, 1046, 0, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 0, 0, 0, 669, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1065, 0, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 338, 339, 670, 1074, 0, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 671, 672, 673, 674, 0, 675, 676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 0, 0, 0, 0, -363, -363, -363, -363, -363, -363, -363, -363, -363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 0, 0, 0, 0, 0, 0, 0, 0, 0, -877, -877, -877, 0, 0, 0, 0, 678, 0, 792, 364, 0, 0, 0, 0, 0, 0, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 0, 792, 4, 0, -46, -46, 5, 6, 7, 8, 0, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 1391, 0, 17, 18, 19, 0, 20, 21, 22, 23, 24, 0, 0, 0, 25, 0, 1205, 1206, 26, 27, 0, 28, 0, 0, 0, 0, 29, 30, 31, 32, 0, 1216, 0, 0, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 1222, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, 48, 49, 0, 50, 51, 0, 52, 0, 0, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, 57, 58, 59, 60, 61, 62, 63, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 67, 68, 0, 0, 69, 70, 4, 71, -46, -46, 5, 6, 7, 8, 0, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 1424, 0, 17, 18, 19, 0, 20, 21, 22, 23, 24, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 29, 30, 31, 32, 0, 0, 0, 0, 0, 33, 0, 34, 0, 747, 748, 0, 0, 749, 750, 751, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 1487, 752, 753, 0, 0, 0, 0, 0, 43, 0, 44, 45, 754, 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, 48, 49, 0, 50, 51, 0, 52, 0, 0, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 1231, 57, 58, 59, 60, 61, 62, 63, 1236, 64, 65, 0, 0, 0, 0, 0, 0, 0, 755, 756, 757, 758, 759, 0, 0, 66, 1252, 67, 68, 0, 0, 69, 70, 0, 71, 0, 0, 0, 0, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 4, 0, -46, -46, 5, 6, 7, 8, 0, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 17, 18, 19, 0, 20, 21, 22, 23, 24, 0, 0, 792, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 29, 30, 31, 32, 0, 0, 0, 0, 0, 33, 0, 34, 0, 0, 0, 1294, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0, 43, 0, 44, 45, 1324, 0, 0, 0, 0, 0, 1329, 0, 0, 46, 47, 48, 49, 0, 50, 51, 0, 52, 0, 0, 53, 54, 0, 0, 1344, 0, 0, 0, 0, 0, 55, 56, 0, 1350, 57, 58, 59, 60, 61, 62, 63, 0, 64, 65, 0, 0, 0, 1518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 67, 68, 0, 0, 69, 70, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1397, 0, 4, 0, -46, -46, 5, 6, 7, 8, 0, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 17, 18, 19, 0, 20, 21, 22, 23, 24, 1426, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 1433, 0, 0, 29, 30, 31, 32, 0, 0, 0, 0, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, 48, 49, 0, 50, 51, 0, 52, 0, 1481, 53, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 56, 0, 0, 57, 58, 59, 60, 61, 62, 63, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1510, 0, 66, 0, 67, 68, 0, 0, 69, 70, 0, 71, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 0, 700, 1520, 0, 15, 16, 0, 0, -773, 0, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, -773, -773, -773, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 0, 0, 0, 0, 822, 823, 824, 825, 826, 827, 828, 829, 830, 0, 0, 0, 66, 0, 67, 68, 0, 0, 69, 70, 4, 71, -138, -138, 5, 6, 7, 8, 0, 9, 10, 0, 700, 0, 0, 15, 16, -749, -749, -749, -749, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 1540, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, -749, -749, -749, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, -749, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, -749, -749, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, -749, -749, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, -749, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, -749, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, -749, -749, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 0, 67, 68, 0, 0, 69, 70, 4, 71, -138, -138, 5, 6, 7, 8, 0, 9, 10, 0, 700, 0, 0, 15, 16, 0, 0, -749, -749, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, -749, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, -749, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, -749, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 0, 30, 31, 32, -749, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -138, -138, 5, 6, 7, 8, 0, 9, 10, 66, 700, 67, 68, 15, 16, 69, 70, -749, 71, 17, 18, 19, 0, 20, 21, 22, 701, 702, 0, 0, 0, 25, 0, 0, 0, 26, 27, 0, 28, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 0, 0, 0, 191, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 36, 37, 0, 0, 38, 0, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 48, 49, 0, 0, 51, 0, 52, 0, 0, 703, 704, 5, 0, 7, 8, 0, 9, 10, 0, 0, 56, 0, 15, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 0, 0, 0, 0, 0, 190, 0, 0, 0, 0, 26, 27, 0, 66, 0, 67, 68, 0, 0, 69, 70, 0, 71, 5, 0, 7, 8, 191, 9, 10, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 0, 39, 0, 41, 42, 0, 190, 0, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 625, 0, 193, 194, 0, 0, 0, 47, 0, 66, 1352, 0, 0, 0, 0, 69, 70, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, 626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 0, 0, 0, 193, 194, 669, 627, 628, 629, 630, 66, 631, 632, 0, 0, 0, 69, 70, 0, 71, 0, 0, 0, 0, -341, -341, -341, -341, -341, -341, -341, -341, -341, -341, 338, 339, 670, 0, -341, -341, -341, -341, -341, -341, -341, -341, -341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 671, 672, 673, 674, 0, 675, 676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -363, -363, -363, -363, -363, -363, -363, -363, -363, -363, 0, 0, 0, 0, -363, -363, -363, -363, -363, -363, -363, -363, -363, 638, 0, 0, 0, 0, 0, 0, 0, 634, 0, 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 639, 640, 641, 642, 0, 643, 644, 678, 0, 0, 364, 0, 0, 0, 0, 0, 0, 0, -347, -347, -347, -347, -347, -347, -347, -347, -347, -347, 0, 0, 0, 0, -347, -347, -347, -347, -347, -347, -347, -347, -347, 348, 0, 365, 0, 379, 0, 0, 393, 0, 406, 0, 419, 0, 432, 0, 445, 456, 0, 469, 0, 480, 0, 496, 0, 0, 512, 0, 0, 0, 558, 570, 582, 0, 0, 596, 0, 610, 622, 0, 636, 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 667, 0, 0, 646, 0, 0, 364, 0, 0, 747, 748, 0, 0, 749, 750, 751, 0, 0, 0, 0, 0, 747, 0, 0, 0, 749, 750, 751, 0, 0, 0, 752, 753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 754, 752, 753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 348, 365, 379, 393, 406, 419, 432, 445, 456, 469, 480, 496, 512, 558, 570, 582, 596, 610, 622, 636, 648, 749, 750, 751, 0, 0, 0, 0, 0, 0, 0, 667, 755, 756, 757, 758, 759, 0, 0, 752, 753, 0, 0, 0, 755, 756, 757, 758, 759, 0, 754, 0, 0, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 749, 750, 751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 752, 753, 0, 0, 0, 0, 755, 756, 757, 758, 759, 754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 755, 0, 0, 758, 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770 }; #define yypact_value_is_default(Yystate) \ (!!((Yystate) == (-1341))) #define yytable_value_is_error(Yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { 2, 69, 72, 710, 242, 2, 697, 698, 237, 862, 72, 5, 2, 21, 22, 789, 1356, 810, 72, 718, 719, 72, 72, 336, 5, 72, 72, 1210, 105, 5, 32, 72, 72, 72, 20, 32, 72, 2, 1189, 1117, 40, 38, 5, 272, 5, 1196, 20, 5, 5, 7, 8, 40, 10, 11, 8, 154, 10, 11, 9, 158, 5, 40, 40, 0, 22, 23, 24, 40, 1251, 2, 72, 75, 20, 154, 71, 72, 58, 59, 155, 5, 161, 0, 72, 80, 40, 82, 1164, 84, 85, 75, 87, 40, 89, 40, 91, 159, 93, 154, 162, 96, 1440, 98, 50, 100, 161, 115, 103, 72, 105, 106, 107, 40, 10, 11, 111, 40, 74, 114, 76, 77, 117, 154, 730, 120, 22, 158, 89, 40, 89, 40, 132, 76, 77, 143, 144, 132, 5, 111, 2, 72, 40, 40, 159, 140, 1484, 162, 132, 133, 152, 153, 76, 77, 1492, 155, 58, 59, 156, 40, 155, 159, 160, 40, 162, 157, 58, 59, 152, 153, 32, 146, 159, 152, 153, 781, 38, 151, 158, 40, 786, 40, 493, 159, 159, 162, 1524, 37, 137, 40, 151, 162, 151, 40, 150, 801, 151, 40, 509, 156, 156, 157, 1540, 40, 40, 159, 158, 150, 162, 71, 72, 156, 159, 156, 159, 162, 20, 162, 80, 5, 82, 20, 84, 85, 1373, 87, 150, 89, 73, 91, 40, 93, 159, 156, 96, 162, 98, 160, 100, 43, 44, 103, 237, 105, 106, 107, 45, 1428, 144, 111, 159, 101, 114, 162, 104, 117, 158, 159, 120, 109, 156, 159, 159, 113, 162, 162, 158, 159, 118, 119, 132, 121, 122, 123, 124, 56, 9, 272, 140, 156, 159, 131, 159, 162, 156, 162, 5, 159, 9, 139, 162, 2, 156, 155, 64, 805, 160, 608, 159, 159, 159, 162, 162, 162, 10, 38, 39, 307, 159, 620, 156, 162, 159, 163, 160, 162, 166, 38, 39, 40, 156, 32, 159, 159, 20, 162, 162, 60, 61, 62, 63, 841, 65, 66, 58, 59, 2, 22, 40, 60, 61, 62, 63, 156, 65, 66, 42, 160, 13, 154, 1220, 347, 347, 158, 42, 66, 154, 76, 77, 115, 116, 72, 115, 116, 1234, 1235, 32, 363, 363, 80, 154, 152, 153, 154, 158, 145, 146, 147, 1229, 1245, 160, 1247, 378, 378, 155, 75, 236, 143, 144, 100, 143, 144, 103, 243, 105, 106, 392, 392, 1189, 155, 154, 1173, 159, 1092, 1101, 162, 72, 116, 20, 405, 405, 152, 153, 154, 110, 111, 137, 152, 153, 1270, 160, 132, 418, 418, 152, 153, 159, 64, 159, 140, 42, 43, 44, 20, 158, 431, 431, 55, 159, 64, 106, 162, 132, 133, 155, 152, 153, 154, 444, 444, 152, 153, 154, 73, 156, 42, 43, 44, 160, 455, 455, 22, 152, 153, 1315, 156, 132, 156, 1334, 1335, 1336, 1337, 468, 468, 2, 143, 1181, 18, 19, 20, 21, 118, 119, 479, 479, 347, 3, 4, 8, 155, 10, 11, 154, 155, 9, 152, 153, 154, 494, 494, 155, 363, 154, 155, 32, 1356, 143, 144, 145, 146, 147, 152, 153, 154, 510, 510, 378, 40, 143, 144, 145, 146, 147, 38, 39, 40, 115, 116, 154, 155, 392, 242, 40, 740, 741, 742, 743, 744, 745, 746, 151, 152, 153, 405, 72, 60, 61, 62, 63, 40, 65, 66, 154, 789, 143, 144, 418, 18, 19, 20, 21, 557, 557, 152, 153, 772, 152, 153, 154, 431, 2, 807, 568, 568, 152, 153, 154, 160, 106, 1430, 154, 155, 444, 152, 153, 581, 581, 20, 21, 1440, 183, 184, 185, 455, 3, 4, 3, 4, 594, 594, 32, 154, 155, 40, 132, 9, 468, 1213, 154, 155, 154, 155, 40, 609, 609, 154, 155, 479, 684, 1470, 686, 40, 688, 40, 690, 621, 621, 155, 154, 155, 154, 155, 494, 1484, 38, 39, 40, 40, 634, 634, 72, 1492, 10, 11, 159, 70, 71, 162, 510, 40, 646, 646, 154, 155, 1260, 40, 60, 61, 62, 63, 40, 65, 66, 1269, 143, 144, 154, 155, 154, 1275, 666, 666, 154, 1524, 106, 1281, 154, 155, 22, 1285, 154, 155, 678, 678, 154, 155, 56, 2, 9, 1540, 1200, 154, 155, 162, 22, 557, 1547, 154, 155, 9, 132, 154, 155, 64, 1015, 9, 568, 154, 114, 9, 710, 156, 162, 154, 116, 710, 1567, 32, 51, 581, 1230, 155, 20, 155, 154, 154, 108, 89, 155, 155, 154, 5, 594, 7, 8, 146, 10, 11, 1248, 131, 1250, 154, 16, 158, 158, 20, 156, 609, 22, 23, 24, 120, 1262, 20, 159, 159, 154, 72, 162, 621, 1366, 1367, 158, 1369, 158, 158, 155, 154, 774, 1375, 158, 777, 634, 154, 158, 158, 154, 1403, 1318, 1205, 155, 55, 788, 2, 646, 269, 106, 106, 106, 106, 106, 106, 106, 1399, 860, 106, 1430, 106, 106, 106, 74, 106, 76, 77, 666, 805, 9, 106, 132, 106, 805, 15, 106, 32, 15, 15, 678, 132, 1328, 15, 1330, 1427, 1165, 272, 1197, 271, 1370, 698, 102, 718, 781, 1111, 1438, 1548, 807, 38, 39, 40, 1444, 65, 155, 841, 692, 1306, -1, -1, 841, -1, 710, -1, 78, -1, -1, 72, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, 150, 9, -1, -1, 2, -1, 156, 157, -1, 159, -1, 106, -1, -1, 1496, -1, 1119, 1499, -1, -1, -1, -1, 1408, -1, -1, -1, 1412, -1, -1, -1, 38, 39, 40, -1, 32, 1421, -1, 132, -1, -1, -1, -1, -1, -1, 1526, -1, -1, -1, -1, -1, 1436, 1437, 60, 61, 62, 63, -1, 65, 66, -1, 155, 1173, 1165, -1, 81, -1, -1, 805, 1454, 86, -1, 88, -1, 90, 72, 92, -1, 94, 95, -1, 159, -1, 99, 162, 101, -1, 1472, 104, 1474, -1, 1476, 108, 109, -1, -1, -1, 113, -1, 115, 116, 2, 118, 119, 841, -1, -1, -1, -1, 106, 9, -1, -1, -1, -1, -1, -1, -1, 134, -1, 845, 9, -1, 139, 710, -1, -1, -1, -1, -1, 137, 32, -1, -1, -1, 132, -1, -1, -1, 38, 39, 40, -1, -1, -1, -1, 1531, -1, -1, 156, 38, 39, 159, -1, -1, 162, -1, -1, 155, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, 710, -1, 72, 60, 61, 62, 63, -1, 65, 66, -1, 196, -1, 198, 199, 200, 201, 202, 203, -1, 205, 206, 207, 208, 209, -1, 211, 212, 213, 214, 215, -1, -1, -1, 789, -1, 106, -1, -1, -1, -1, 226, -1, 228, -1, 2, -1, -1, -1, -1, 805, -1, 807, -1, -1, -1, -1, -1, -1, -1, 9, 246, 132, 248, 249, 250, 251, 252, 253, 137, 255, 256, 257, 258, 259, 32, 261, 262, 263, 264, 265, -1, 267, 268, -1, 155, 841, -1, 156, 38, 39, 159, -1, -1, 162, 805, 1208, -1, -1, -1, -1, -1, 159, -1, -1, 162, -1, -1, -1, -1, -1, 60, 61, 62, 63, 72, 65, 66, -1, -1, -1, -1, -1, -1, -1, -1, 1165, -1, 9, -1, -1, 841, -1, -1, -1, -1, -1, 1181, 710, -1, -1, -1, 1181, -1, -1, -1, -1, -1, -1, 106, -1, -1, -1, -1, -1, -1, 1200, 38, 39, 40, -1, 1200, 2, -1, -1, -1, 1210, 1211, 1212, -1, -1, 1210, 1204, -1, -1, 132, 1208, -1, 1210, 60, 61, 62, 63, -1, 65, 66, 1230, -1, 137, -1, -1, 1230, 32, -1, 1306, -1, -1, 1309, 155, -1, -1, -1, -1, 1210, 1248, 1309, 1250, 1251, -1, 1248, 159, 1250, 1251, 1309, -1, -1, 1309, 1309, 1262, 1251, 1309, 1309, -1, 1262, -1, -1, 1309, 1309, 1309, -1, 1342, 1309, 72, 805, 710, 1210, -1, -1, 1342, -1, -1, -1, -1, -1, 1251, -1, 1342, -1, -1, 1342, 1342, -1, -1, 1342, 1342, -1, 137, -1, 2, 1342, 1342, 1342, -1, -1, 1342, 1309, 106, -1, 1300, 841, 1309, -1, -1, -1, 1306, 1181, 1251, 1309, 159, -1, -1, 162, -1, -1, 1328, -1, 1330, -1, 32, 1328, -1, 1330, 132, -1, 1200, -1, -1, -1, 1342, -1, -1, -1, 1309, 1342, 1210, -1, -1, -1, -1, -1, 1342, -1, -1, -1, -1, 155, -1, -1, -1, -1, -1, -1, -1, -1, 1230, -1, -1, -1, 72, 805, -1, -1, -1, -1, 1309, 1342, -1, -1, -1, -1, -1, -1, 1248, -1, 1250, 1251, -1, -1, 1392, -1, 535, 710, 1396, -1, -1, -1, 1262, -1, -1, -1, -1, -1, -1, -1, 1408, 841, -1, 1342, 1412, 1408, -1, 1483, -1, 1412, -1, -1, -1, 1421, -1, 1483, -1, -1, 1421, -1, 1428, -1, -1, 1483, 132, 1428, 1483, 1483, 1436, 1437, 1483, 1483, 1428, 1436, 1437, -1, 1483, 1483, 1483, 1309, -1, 1483, -1, -1, 1302, -1, 1454, 155, 9, -1, 1458, 1454, -1, -1, 1173, -1, -1, 1428, 1328, -1, 1330, -1, 1181, 2, 1472, -1, 1474, -1, 1476, 1472, -1, 1474, 1342, 1476, -1, 1483, -1, 38, 39, 40, 1483, 1200, 805, 710, -1, -1, -1, 1483, -1, 1428, -1, 1210, 1500, 32, -1, -1, -1, 1500, 1572, 60, 61, 62, 63, 1577, 65, 66, -1, 1181, -1, -1, -1, 1230, 1483, -1, -1, -1, -1, -1, 841, -1, -1, -1, -1, 1531, 1532, -1, 1200, -1, 1531, 1248, -1, 1250, 1251, 72, -1, -1, 1210, -1, 1408, -1, 1548, -1, 1412, 1262, 1483, 1548, -1, -1, 1556, -1, -1, 1421, -1, -1, -1, -1, 1230, -1, 1428, -1, -1, -1, -1, -1, -1, -1, 1436, 1437, -1, -1, -1, -1, -1, -1, 1248, -1, 1250, 1251, 805, -1, 710, -1, -1, -1, 1454, -1, -1, -1, 1262, -1, 1309, -1, -1, 132, -1, 9, -1, -1, 159, -1, -1, 162, 1472, -1, 1474, -1, 1476, -1, -1, 1328, -1, 1330, -1, 1483, 841, -1, 155, -1, -1, -1, -1, -1, -1, 1342, 38, 39, 40, -1, -1, 9, 1500, -1, -1, -1, -1, 1309, -1, -1, -1, -1, -1, -1, -1, -1, 793, 1181, 60, 61, 62, 63, -1, 65, 66, -1, 1328, -1, 1330, -1, 38, 39, 40, 1531, -1, -1, 1200, -1, -1, -1, 1342, -1, -1, -1, -1, -1, 1210, 805, 710, -1, 1548, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, 1408, -1, -1, -1, 1412, 1230, -1, -1, -1, -1, -1, -1, -1, 1421, -1, -1, -1, 2, -1, -1, 1428, -1, 841, 1248, -1, 1250, 1251, -1, 1436, 1437, -1, -1, -1, -1, 137, -1, -1, 1262, -1, -1, -1, -1, -1, -1, -1, 1408, 1454, 32, -1, 1412, -1, -1, 1181, 156, -1, -1, 159, -1, 1421, 162, -1, -1, -1, -1, 1472, 1428, 1474, -1, 1476, -1, -1, 1200, -1, 1436, 1437, 1483, -1, -1, -1, -1, -1, 1210, 805, -1, 1309, -1, -1, 72, -1, -1, 159, 1454, 1500, 162, -1, -1, -1, -1, 9, -1, 710, 1230, 2, 1328, -1, 1330, 9, -1, -1, 1472, -1, 1474, -1, 1476, -1, -1, -1, 1342, 841, 1248, 1483, 1250, 1251, 1531, -1, -1, -1, 38, 39, 40, -1, -1, 32, 1262, -1, 38, 39, 1500, -1, -1, 1548, -1, -1, -1, -1, -1, -1, 132, -1, 60, 61, 62, 63, -1, 65, 66, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, -1, -1, 1531, 1181, 155, -1, 72, -1, -1, -1, -1, -1, -1, -1, 1309, -1, -1, 1408, -1, 1548, -1, 1412, 1200, -1, -1, -1, -1, -1, -1, 805, 1421, -1, 1210, 1328, -1, 1330, -1, 1428, -1, -1, -1, -1, -1, -1, -1, 1436, 1437, 1342, -1, -1, 9, 710, 1230, -1, -1, -1, -1, -1, -1, -1, 137, -1, -1, 1454, -1, 841, 132, -1, 137, -1, 1248, -1, 1250, 1251, -1, -1, -1, -1, -1, 38, 39, 1472, 159, 1474, 1262, 1476, -1, 156, -1, 155, 159, -1, 1483, 162, -1, -1, -1, -1, -1, 1181, -1, 60, 61, 62, 63, -1, 65, 66, -1, 1500, -1, -1, -1, 1408, -1, -1, -1, 1412, 1200, 2, -1, -1, -1, -1, -1, -1, 1421, -1, 1210, -1, -1, 1309, -1, 1428, -1, -1, -1, -1, -1, -1, 1531, 1436, 1437, -1, -1, -1, 805, 710, 1230, 32, 1328, -1, 1330, -1, -1, -1, 9, 1548, -1, 1454, -1, -1, -1, -1, 1342, 9, 1248, -1, 1250, 1251, -1, -1, -1, -1, -1, -1, -1, 1472, 137, 1474, 1262, 1476, 841, -1, -1, 38, 39, 40, 1483, 72, -1, -1, -1, -1, 38, 39, 1181, -1, -1, -1, 159, -1, -1, 162, -1, 1500, -1, 60, 61, 62, 63, -1, 65, 66, -1, 1200, 60, 61, 62, 63, -1, 65, 66, -1, -1, 1210, -1, 1309, -1, -1, 1408, -1, -1, -1, 1412, -1, 1531, -1, -1, -1, -1, -1, 805, 1421, 2, 1230, 1328, -1, 1330, 132, 1428, -1, -1, 1548, -1, -1, -1, -1, 1436, 1437, 1342, -1, -1, 1248, -1, 1250, 1251, -1, -1, -1, -1, -1, 155, -1, 32, -1, 1454, 1262, 841, -1, -1, -1, -1, -1, 137, -1, -1, -1, -1, -1, -1, -1, 1181, 137, 1472, -1, 1474, -1, 1476, -1, -1, -1, -1, -1, -1, 1483, 159, -1, -1, 162, -1, 1200, -1, -1, 72, 159, 710, -1, 162, -1, -1, 1210, 1500, -1, 1309, -1, 1408, -1, -1, -1, 1412, -1, -1, -1, -1, -1, -1, -1, -1, 1421, -1, 1230, -1, 1328, -1, 1330, 1428, -1, -1, 2, -1, -1, -1, 1531, 1436, 1437, -1, 1342, -1, 1248, -1, 1250, 1251, -1, -1, -1, -1, -1, -1, -1, 1548, -1, 1454, 1262, 132, 82, -1, 84, 85, 32, 87, -1, 89, -1, 91, -1, 93, -1, -1, 96, 1472, 98, 1474, 100, 1476, -1, 103, 155, 105, 106, 107, 1483, -1, -1, 111, 1181, -1, 114, 9, -1, 117, 805, -1, 120, -1, -1, -1, -1, 1500, 72, 1309, -1, -1, 1408, 1200, -1, -1, 1412, -1, -1, -1, -1, -1, 140, 1210, -1, 1421, 38, 39, 1328, -1, 1330, -1, 1428, -1, -1, -1, 841, -1, 1531, -1, 1436, 1437, 1342, 1230, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, 1548, -1, -1, 1454, -1, -1, 1248, -1, 1250, 1251, -1, -1, -1, 132, -1, -1, -1, -1, -1, -1, 1262, 1472, -1, 1474, -1, 1476, -1, -1, -1, -1, -1, -1, 1483, -1, -1, -1, 155, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1500, -1, -1, -1, 1408, -1, -1, 1181, 1412, -1, -1, -1, -1, -1, -1, -1, -1, 1421, 1309, -1, 32, 137, -1, -1, 1428, -1, 1200, -1, -1, -1, -1, 1531, 1436, 1437, -1, -1, 1210, 1328, -1, 1330, -1, -1, -1, 159, 710, -1, 162, -1, 1548, -1, 1454, 1342, -1, -1, 9, -1, 1230, -1, -1, -1, 72, -1, 9, -1, -1, -1, -1, -1, 1472, -1, 1474, -1, 1476, -1, 1248, -1, 1250, 1251, -1, 1483, -1, -1, -1, 38, 39, 40, -1, -1, 1262, -1, -1, 38, 39, 40, -1, 2, 1500, -1, -1, -1, -1, -1, -1, 1181, -1, 60, 61, 62, 63, -1, 65, 66, -1, 60, 61, 62, 63, 1408, 65, 66, 132, 1412, 1200, -1, -1, 32, -1, 1531, -1, 710, 1421, -1, 1210, -1, -1, 1309, -1, 1428, -1, 805, -1, -1, -1, 155, 1548, 1436, 1437, -1, -1, 9, -1, -1, 1230, -1, 1328, -1, 1330, -1, -1, -1, -1, -1, -1, 1454, -1, 72, 9, -1, 1342, -1, 1248, -1, 1250, 1251, -1, 841, -1, -1, 38, 39, 40, 1472, 137, 1474, 1262, 1476, -1, -1, -1, -1, 137, -1, 1483, -1, -1, 38, 39, 40, -1, -1, 60, 61, 62, 63, 159, 65, 66, 162, -1, 1500, -1, -1, 159, -1, -1, 162, -1, 60, 61, 62, 63, -1, 65, 66, 805, 132, -1, -1, -1, -1, -1, 1309, -1, -1, 1408, -1, -1, -1, 1412, -1, 1531, -1, -1, -1, -1, -1, -1, 1421, 155, -1, 1328, -1, 1330, -1, 1428, -1, -1, 1548, -1, -1, 841, -1, 1436, 1437, 1342, -1, -1, -1, -1, -1, -1, -1, 1181, -1, 2, -1, -1, 137, -1, -1, 1454, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1200, -1, -1, 137, 9, -1, -1, 1472, 159, 1474, 1210, 1476, -1, 32, -1, -1, -1, -1, 1483, -1, -1, 710, -1, -1, -1, 159, -1, -1, 162, -1, 1230, -1, -1, 38, 39, 1500, -1, -1, -1, 1408, -1, -1, -1, 1412, -1, -1, -1, -1, 1248, -1, 1250, 1251, 1421, 72, -1, 60, 61, 62, 63, 1428, 65, 66, 1262, -1, -1, -1, 1531, 1436, 1437, 9, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1548, -1, 1454, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, 2, -1, 38, 39, 40, -1, -1, 1472, -1, 1474, -1, 1476, -1, 1309, -1, -1, -1, 132, 1483, -1, 805, -1, -1, 9, 60, 61, 62, 63, -1, 65, 66, -1, 1328, 9, 1330, 1500, -1, -1, -1, -1, 155, -1, 9, -1, -1, -1, 1342, -1, -1, -1, 710, -1, 38, 39, 40, 156, 841, -1, 159, -1, -1, 162, 38, 39, 40, -1, 1531, -1, -1, -1, 72, 38, 39, 40, 60, 61, 62, 63, -1, 65, 66, -1, -1, 1548, 60, 61, 62, 63, -1, 65, 66, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, 137, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1408, 9, -1, -1, 1412, -1, -1, -1, -1, -1, -1, 159, -1, 1421, 162, -1, 1181, -1, -1, -1, 1428, -1, -1, -1, -1, -1, -1, -1, 1436, 1437, 38, 39, 40, 805, -1, 1200, -1, -1, -1, -1, -1, 155, -1, 710, -1, 1210, 1454, -1, -1, 137, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, 72, 159, -1, -1, 1472, 1230, 1474, -1, 1476, 841, -1, 159, -1, -1, 162, 1483, 5, -1, 7, 8, 159, 10, 11, 1248, -1, 1250, 1251, 16, -1, -1, -1, -1, 1500, 22, 23, 24, -1, 1262, -1, -1, -1, 1181, -1, -1, 33, 2, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1200, -1, -1, 1531, -1, -1, 55, 9, -1, 137, 1210, -1, -1, -1, -1, 64, -1, 9, 805, -1, 1548, -1, -1, 155, 1309, 74, -1, 76, 77, -1, 1230, 159, -1, -1, 162, -1, 38, 39, 40, -1, -1, -1, -1, 1328, -1, 1330, 38, 39, 1248, -1, 1250, 1251, -1, 102, 841, 72, -1, 1342, 60, 61, 62, 63, 1262, 65, 66, 114, -1, -1, 60, 61, 62, 63, 121, 65, 66, -1, -1, -1, -1, 710, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, 143, 144, -1, -1, -1, -1, -1, 150, 151, -1, -1, -1, -1, 156, 157, 1309, 159, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1408, -1, 9, -1, 1412, 1328, -1, 1330, -1, -1, -1, -1, 137, 1421, -1, 155, -1, -1, 2, 1342, 1428, -1, 137, -1, -1, -1, -1, -1, 1436, 1437, -1, 38, 39, 40, 159, -1, -1, 162, -1, -1, -1, 1181, -1, 9, 159, -1, 1454, 162, -1, -1, 9, 805, -1, 60, 61, 62, 63, -1, 65, 66, 1200, 710, -1, -1, 1472, -1, 1474, -1, 1476, -1, 1210, -1, 38, 39, 40, 1483, -1, -1, -1, 38, 39, 40, -1, -1, -1, 1408, -1, 841, 72, 1412, 1230, -1, 1500, -1, 60, 61, 62, 63, 1421, 65, 66, 60, 61, 62, 63, 1428, 65, 66, 1248, -1, 1250, 1251, -1, 1436, 1437, -1, -1, -1, -1, -1, -1, -1, 1262, 1531, -1, -1, -1, -1, -1, -1, 137, 1454, -1, -1, -1, -1, -1, -1, -1, -1, 1548, -1, -1, -1, -1, -1, -1, -1, -1, 1472, -1, 1474, 159, 1476, -1, 162, 805, -1, -1, -1, 1483, -1, -1, -1, -1, -1, 1181, -1, -1, 1309, -1, 155, -1, -1, -1, -1, -1, 1500, -1, -1, -1, -1, -1, -1, -1, 1200, -1, -1, 1328, -1, 1330, -1, 841, 159, -1, 1210, 162, 156, -1, -1, 159, -1, 1342, 162, -1, -1, -1, -1, 1531, -1, -1, 5, -1, 7, 8, 1230, 10, 11, -1, -1, -1, -1, 16, -1, -1, 1548, -1, -1, 22, 23, 24, -1, -1, 1248, -1, 1250, 1251, -1, -1, 33, 710, -1, -1, -1, 38, 39, -1, 1262, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, 1408, -1, -1, 1181, 1412, -1, -1, -1, -1, -1, -1, -1, 74, 1421, 76, 77, -1, -1, -1, -1, 1428, -1, 1200, -1, -1, -1, 1309, -1, 1436, 1437, -1, -1, 1210, -1, -1, -1, -1, -1, -1, -1, 102, -1, -1, -1, -1, 1328, 1454, 1330, 9, -1, -1, -1, 1230, -1, -1, -1, -1, 9, -1, 1342, -1, -1, -1, -1, 1472, -1, 1474, 805, 1476, -1, 1248, -1, 1250, 1251, -1, 1483, 138, 38, 39, 40, -1, 143, 144, -1, 1262, 710, 38, 39, 150, 151, -1, -1, 1500, -1, 156, 157, -1, 159, -1, 60, 61, 62, 63, 841, 65, 66, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, -1, -1, -1, -1, -1, -1, 1531, -1, 1408, -1, -1, -1, 1412, -1, 1309, -1, -1, -1, -1, -1, -1, 1421, -1, 1548, -1, -1, -1, -1, 1428, -1, -1, -1, -1, 1328, -1, 1330, 1436, 1437, -1, -1, -1, -1, 1181, -1, -1, -1, -1, 1342, -1, -1, -1, -1, -1, -1, 1454, -1, -1, -1, -1, -1, -1, 1200, -1, 805, -1, -1, -1, -1, 137, -1, 710, 1210, 1472, -1, 1474, -1, 1476, -1, 156, -1, -1, 159, -1, 1483, 162, -1, -1, -1, -1, -1, 159, 1230, -1, 162, -1, -1, -1, -1, 9, 841, 1500, -1, -1, -1, -1, -1, -1, -1, -1, 1248, -1, 1250, 1251, 1408, -1, -1, -1, 1412, -1, -1, -1, -1, -1, 1262, -1, -1, 1421, 38, 39, 40, -1, 1531, -1, 1428, -1, -1, -1, -1, -1, -1, -1, 1436, 1437, -1, -1, -1, -1, 1181, 1548, 60, 61, 62, 63, -1, 65, 66, -1, -1, -1, 1454, -1, -1, -1, -1, -1, 805, 1200, -1, 9, -1, 1309, -1, 53, 54, -1, -1, 1210, 1472, 9, 1474, -1, 1476, -1, 64, -1, 710, -1, -1, 1483, 1328, -1, 1330, -1, -1, -1, -1, 1230, 38, 39, -1, -1, 841, -1, 1342, -1, 1500, -1, 38, 39, -1, -1, -1, -1, -1, 1248, -1, 1250, 1251, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, 1262, 60, 61, 62, 63, -1, 65, 66, 1531, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, 159, -1, -1, 162, -1, 1548, -1, -1, -1, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, -1, 1408, -1, -1, -1, 1412, -1, 1309, -1, -1, -1, -1, 805, -1, 1421, -1, -1, -1, -1, -1, -1, 1428, -1, -1, -1, -1, 1328, -1, 1330, 1436, 1437, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1342, -1, -1, -1, -1, -1, -1, 1454, 841, -1, 159, -1, -1, 162, -1, -1, -1, -1, 1181, -1, 159, -1, -1, 162, -1, 1472, -1, 1474, -1, 1476, -1, -1, -1, 710, -1, -1, 1483, 1200, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1210, -1, -1, -1, -1, -1, 1500, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1408, 1230, -1, -1, 1412, -1, -1, -1, -1, -1, -1, -1, -1, 1421, -1, -1, -1, -1, 1531, 1248, 1428, 1250, 1251, -1, -1, -1, -1, -1, 1436, 1437, -1, -1, -1, 1262, -1, 1548, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 1454, -1, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, 805, -1, 1472, 1181, 1474, -1, 1476, -1, -1, -1, -1, -1, -1, 1483, -1, -1, -1, -1, 1309, -1, -1, -1, 1200, -1, -1, -1, -1, -1, -1, -1, 1500, -1, 1210, -1, -1, -1, 841, 1328, -1, 1330, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1342, 1230, -1, -1, -1, -1, -1, 162, -1, -1, 1531, -1, -1, -1, -1, -1, -1, -1, -1, 1248, -1, 1250, 1251, -1, -1, -1, -1, 1548, -1, -1, -1, -1, -1, 1262, -1, -1, -1, -1, -1, -1, -1, 31, 32, -1, -1, 35, 36, 37, -1, -1, -1, -1, -1, -1, 1181, -1, -1, -1, -1, -1, -1, -1, -1, 53, 54, -1, 1408, -1, -1, -1, 1412, -1, -1, 1200, 64, -1, -1, -1, -1, 1421, 1309, -1, -1, 1210, -1, -1, 1428, -1, -1, -1, -1, -1, -1, -1, 1436, 1437, -1, -1, -1, 1328, -1, 1330, -1, 1230, -1, -1, -1, -1, -1, -1, -1, -1, 1454, 1342, -1, -1, -1, -1, -1, -1, -1, 1248, -1, 1250, 1251, 115, 116, 117, 118, 119, 1472, -1, 1474, -1, 1476, 1262, -1, -1, -1, -1, -1, 1483, -1, -1, -1, -1, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 1500, -1, -1, -1, 152, 153, -1, -1, -1, -1, -1, 1181, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1408, -1, -1, 1309, 1412, -1, -1, -1, -1, 1200, 1531, -1, -1, 1421, -1, -1, -1, -1, -1, 1210, 1428, -1, 1328, -1, 1330, -1, -1, 1548, 1436, 1437, -1, -1, -1, -1, -1, -1, 1342, -1, -1, 1230, -1, -1, -1, -1, -1, -1, 1454, -1, -1, -1, -1, 35, 36, 37, -1, -1, -1, 1248, -1, 1250, 1251, -1, -1, -1, 1472, -1, 1474, -1, 1476, 53, 54, 1262, -1, -1, -1, 1483, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1500, -1, 31, 32, -1, -1, 35, 36, 37, -1, 1408, -1, -1, -1, 1412, -1, -1, -1, -1, -1, -1, -1, -1, 1421, 53, 54, 1309, -1, -1, -1, 1428, 1531, -1, -1, -1, 64, -1, -1, 1436, 1437, -1, -1, 118, 119, -1, 1328, -1, 1330, 1548, -1, -1, -1, -1, -1, 1181, -1, 1454, -1, -1, 1342, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, 1200, 1472, -1, 1474, -1, 1476, -1, -1, -1, -1, 1210, -1, 1483, 115, 116, 117, 118, 119, -1, -1, -1, -1, 124, 125, -1, -1, -1, -1, -1, 1500, 1230, -1, -1, -1, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, -1, 1248, -1, 1250, 1251, 1408, -1, -1, -1, 1412, -1, -1, -1, 1531, -1, 1262, -1, -1, 1421, -1, -1, -1, -1, -1, -1, 1428, -1, -1, -1, -1, 1548, -1, -1, 1436, 1437, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, 1454, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, 1309, 9, -1, -1, -1, -1, -1, 1472, -1, 1474, -1, 1476, -1, -1, -1, -1, -1, -1, 1483, 1328, -1, 1330, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, 40, 1342, -1, 1500, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, -1, -1, -1, -1, -1, 1531, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, 1548, 92, 93, 94, 95, 96, 97, 98, 99, 100, 20, 21, 22, -1, -1, -1, 1408, -1, -1, -1, 1412, -1, 32, -1, -1, -1, -1, -1, 38, 1421, -1, -1, -1, 43, 44, 45, 1428, -1, -1, 49, 50, -1, -1, -1, 1436, 1437, -1, -1, -1, -1, 60, 61, -1, 63, 64, 65, -1, -1, -1, -1, -1, 71, 1454, -1, -1, 156, -1, -1, 159, -1, 80, 162, 82, -1, 84, 85, -1, 87, -1, 89, 1472, 91, 1474, 93, 1476, -1, 96, -1, 98, -1, 100, 1483, -1, 103, -1, 105, 106, 107, -1, -1, -1, 111, 112, -1, 114, -1, -1, 117, 1500, -1, 120, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 132, -1, -1, -1, 5, -1, 7, 8, 140, 10, 11, 2, 35, 36, 37, 16, -1, 1531, -1, -1, -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, 53, 54, 33, -1, 1548, -1, -1, 38, 39, 171, -1, 64, -1, -1, -1, -1, -1, -1, -1, -1, 182, 183, 184, 185, 55, -1, -1, -1, -1, -1, 31, 32, -1, 64, 35, 36, 37, -1, -1, -1, -1, -1, -1, 74, -1, 76, 77, -1, -1, -1, -1, 72, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, 115, 64, 117, 118, 119, -1, -1, -1, 232, 102, -1, 235, -1, 237, -1, -1, -1, 241, 242, -1, -1, 114, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, 270, 271, 272, -1, 143, 144, 115, 116, 117, 118, 119, 150, 151, -1, -1, -1, 125, 156, 157, -1, 159, -1, -1, -1, -1, -1, -1, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, -1, -1, -1, -1, -1, -1, 175, -1, 5, 178, 7, 8, -1, 10, 11, -1, -1, -1, -1, 16, -1, -1, -1, 333, 334, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, -1, 33, 347, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 363, -1, -1, -1, -1, 55, -1, -1, 230, -1, -1, 233, -1, -1, -1, 378, -1, -1, 240, -1, -1, -1, -1, -1, 74, -1, 76, 77, -1, 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 405, -1, -1, -1, -1, -1, -1, -1, -1, 273, 102, -1, -1, 418, -1, -1, -1, -1, 282, -1, -1, 285, -1, -1, 288, -1, 431, 291, -1, -1, -1, 295, 296, 297, -1, 299, -1, 301, -1, 444, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, 455, 143, 144, -1, -1, -1, -1, -1, 150, 151, -1, -1, 154, 468, 156, 157, -1, 159, -1, -1, -1, -1, -1, -1, 479, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 494, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, -1, 13, -1, 510, 16, 17, 18, 19, 20, 21, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, 42, 43, 44, 45, -1, 47, 48, 49, 50, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, 557, -1, -1, -1, -1, 67, 68, 69, 70, 71, 72, 568, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, 581, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, 594, -1, -1, 102, 103, 104, -1, -1, 107, 108, 109, 110, 111, 112, 113, 609, -1, -1, -1, -1, -1, 120, -1, -1, 123, -1, -1, 621, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, 634, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, 150, 646, 152, 153, -1, -1, 156, 157, -1, 159, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 666, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, 678, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 156, 13, -1, -1, 16, 17, -1, -1, 20, -1, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, 42, 43, 44, 156, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, 774, -1, 88, 777, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, 788, 789, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, 807, -1, -1, 810, 123, -1, -1, -1, 815, -1, -1, -1, -1, 820, -1, -1, -1, -1, 825, -1, -1, -1, -1, 830, -1, -1, -1, 693, -1, -1, -1, 150, -1, 152, 153, -1, -1, 156, 157, -1, 159, 9, 849, -1, -1, -1, -1, -1, -1, -1, 857, -1, -1, -1, -1, -1, 722, -1, -1, -1, 726, -1, 728, -1, -1, 731, -1, 733, 734, 735, 38, 39, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, -1, -1, -1, -1, 771, -1, 773, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, 787, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, 802, 803, -1, -1, 806, -1, 808, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, 837, -1, 22, 23, 24, 842, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, 159, 41, -1, 162, -1, -1, 46, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, 101, 102, 103, 104, -1, 106, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, 122, 123, -1, -1, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, 1094, 1095, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 150, -1, 152, 153, -1, -1, 156, 157, -1, 159, -1, 1119, -1, -1, -1, -1, 1124, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, -1, 7, 8, -1, 10, 11, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, 22, 23, 24, -1, -1, -1, -1, 1160, -1, 1162, -1, 33, 1165, -1, -1, 1168, 38, 39, 1171, -1, 1173, 9, -1, 1176, 1177, -1, -1, -1, -1, -1, -1, -1, -1, 55, 1187, -1, 1189, -1, -1, -1, -1, -1, -1, 1196, 1197, -1, -1, -1, -1, 1202, 38, 39, 74, -1, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, 102, -1, -1, -1, -1, -1, 1098, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, 138, -1, -1, -1, -1, 143, 144, -1, -1, -1, 1279, 1280, 150, 151, -1, -1, -1, -1, 156, 157, -1, 159, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1303, -1, -1, -1, 1166, 16, -1, -1, -1, -1, -1, 1314, -1, -1, -1, 26, 27, -1, 1180, -1, -1, 159, -1, -1, 162, -1, -1, 1189, -1, -1, -1, -1, -1, -1, 9, -1, -1, 48, -1, -1, -1, 52, 1204, 1346, -1, 56, 1208, -1, 1210, 1352, -1, -1, -1, -1, -1, -1, -1, 1360, -1, 70, -1, -1, 1365, 38, 39, 40, -1, 1370, -1, 1231, 1373, -1, -1, -1, 1236, 1378, 1379, -1, 1240, -1, -1, -1, -1, -1, 1246, 60, 61, 62, 63, 1251, 65, 66, -1, -1, -1, -1, -1, -1, -1, -1, 1403, 1404, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, 1278, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1300, -1, 1443, -1, -1, 1446, 1306, -1, -1, 1309, -1, 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1324, 1325, 1326, 176, -1, 1329, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1339, -1, 190, 1342, -1, 193, 194, 159, -1, 1348, 162, 31, 32, -1, -1, 35, 36, 37, 1498, -1, -1, -1, -1, 1362, 1363, -1, 31, 32, -1, -1, 35, 36, 37, 53, 54, 1374, -1, -1, 1377, -1, -1, -1, 1381, -1, 64, -1, 1385, 1386, 53, 54, -1, -1, 1391, -1, 242, -1, -1, -1, -1, 64, -1, -1, 1542, 1543, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1424, 274, -1, -1, 1428, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, 121, -1, 1442, -1, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, 303, 121, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, 1468, 1469, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, 1483, -1, -1, -1, -1, 337, -1, -1, 340, 341, 342, 343, 344, 345, 346, -1, -1, -1, -1, -1, 1503, -1, 354, -1, 356, 357, 358, 359, 360, 361, 362, -1, 364, -1, -1, -1, -1, 369, 1521, 371, 372, 373, 374, 375, 376, 377, -1, -1, -1, -1, -1, 383, -1, 385, 386, 387, 388, 389, 390, 391, -1, -1, -1, -1, 396, -1, 398, 399, 400, 401, 402, 403, 404, -1, -1, -1, -1, 409, -1, 411, 412, 413, 414, 415, 416, 417, -1, -1, -1, -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, -1, -1, -1, -1, 435, -1, 437, 438, 439, 440, 441, 442, 443, -1, -1, -1, 447, 448, 449, 450, 451, 452, 453, 454, -1, -1, -1, -1, 459, -1, 461, 462, 463, 464, 465, 466, 467, -1, -1, -1, 471, 472, 473, 474, 475, 476, 477, 478, -1, -1, -1, -1, -1, 484, -1, 486, 487, 488, 489, 490, 491, 492, -1, -1, -1, -1, -1, -1, -1, 500, -1, 502, 503, 504, 505, 506, 507, 508, -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 549, 550, 551, 552, 553, 554, 555, 556, -1, -1, -1, 560, 561, 562, 563, 564, 565, 566, 567, -1, -1, -1, -1, 572, -1, 574, 575, 576, 577, 578, 579, 580, -1, -1, -1, -1, 585, -1, 587, 588, 589, 590, 591, 592, 593, 156, -1, -1, -1, -1, 599, -1, 601, 602, 603, 604, 605, 606, 607, -1, -1, -1, -1, 612, 613, 614, 615, 616, 617, 618, 619, -1, -1, -1, -1, -1, 625, -1, 627, 628, 629, 630, 631, 632, 633, -1, -1, -1, 9, 638, 639, 640, 641, 642, 643, 644, 645, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 657, -1, 659, 660, 661, 662, 663, 664, 665, 38, 39, 40, 669, -1, 671, 672, 673, 674, 675, 676, 677, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 770, -1, -1, -1, -1, -1, -1, -1, -1, -1, 152, 153, 154, -1, -1, -1, -1, 159, -1, 789, 162, -1, -1, -1, -1, -1, -1, -1, -1, 799, -1, -1, -1, -1, -1, -1, -1, 807, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, 20, -1, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, 843, 844, 38, 39, -1, 41, -1, -1, -1, -1, 46, 47, 48, 49, -1, 858, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, 885, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, 101, 102, 103, 104, -1, 106, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, 122, 123, -1, -1, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 150, -1, 152, 153, -1, -1, 156, 157, 1, 159, 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, 20, -1, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, 46, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, 31, 32, -1, -1, 35, 36, 37, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, 52, 53, 54, -1, -1, -1, -1, -1, 88, -1, 90, 91, 64, -1, -1, -1, -1, -1, -1, -1, -1, 101, 102, 103, 104, -1, 106, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, 122, 123, -1, 1089, 126, 127, 128, 129, 130, 131, 132, 1097, 134, 135, -1, -1, -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, 150, 1115, 152, 153, -1, -1, 156, 157, -1, 159, -1, -1, -1, -1, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, 1173, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, 46, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, 1201, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, 1223, -1, -1, -1, -1, 88, -1, 90, 91, 1232, -1, -1, -1, -1, -1, 1238, -1, -1, 101, 102, 103, 104, -1, 106, 107, -1, 109, -1, -1, 112, 113, -1, -1, 1256, -1, -1, -1, -1, -1, 122, 123, -1, 1265, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, -1, -1, -1, 139, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 150, -1, 152, 153, -1, -1, 156, 157, -1, 159, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1313, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, -1, -1, -1, 22, 23, 24, -1, 26, 27, 28, 29, 30, 1345, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, 1357, -1, -1, 46, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, 101, 102, 103, 104, -1, 106, 107, -1, 109, -1, 1425, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, 122, 123, -1, -1, 126, 127, 128, 129, 130, 131, 132, -1, 134, 135, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1462, -1, 150, -1, 152, 153, -1, -1, 156, 157, -1, 159, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, -1, 13, 1487, -1, 16, 17, -1, -1, 20, -1, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, 42, 43, 44, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, 150, -1, 152, 153, -1, -1, 156, 157, 1, 159, 3, 4, 5, 6, 7, 8, -1, 10, 11, -1, 13, -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, 156, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, 42, 43, 44, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, 42, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, 110, 111, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, 70, 71, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, 108, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, 120, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, 43, 44, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 150, -1, 152, 153, -1, -1, 156, 157, 1, 159, 3, 4, 5, 6, 7, 8, -1, 10, 11, -1, 13, -1, -1, 16, 17, -1, -1, 20, 21, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, 111, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, 45, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, 120, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, -1, 47, 48, 49, 50, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, -1, -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 3, 4, 5, 6, 7, 8, -1, 10, 11, 150, 13, 152, 153, 16, 17, 156, 157, 20, 159, 22, 23, 24, -1, 26, 27, 28, 29, 30, -1, -1, -1, 34, -1, -1, -1, 38, 39, -1, 41, -1, -1, -1, -1, -1, 47, 48, 49, -1, -1, -1, -1, -1, 55, -1, 57, -1, -1, -1, -1, -1, -1, -1, -1, -1, 67, 68, 69, -1, -1, 72, -1, 74, 75, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 88, -1, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, -1, -1, 107, -1, 109, -1, -1, 112, 113, 5, -1, 7, 8, -1, 10, 11, -1, -1, 123, -1, 16, -1, -1, -1, -1, -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, 38, 39, -1, 150, -1, 152, 153, -1, -1, 156, 157, -1, 159, 5, -1, 7, 8, 55, 10, 11, -1, -1, -1, -1, 16, -1, -1, -1, -1, -1, 22, 23, 24, -1, -1, -1, 74, -1, 76, 77, -1, 33, -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, 102, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, 76, 77, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, 9, -1, 143, 144, -1, -1, -1, 102, -1, 150, 151, -1, -1, -1, -1, 156, 157, -1, 159, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, 40, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, 143, 144, 9, 60, 61, 62, 63, 150, 65, 66, -1, -1, -1, 156, 157, -1, 159, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 38, 39, 40, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, 9, -1, -1, -1, -1, -1, -1, -1, 159, -1, -1, 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 38, 39, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 60, 61, 62, 63, -1, 65, 66, 159, -1, -1, 162, -1, -1, -1, -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, -1, -1, -1, -1, 92, 93, 94, 95, 96, 97, 98, 99, 100, 79, -1, 81, -1, 83, -1, -1, 86, -1, 88, -1, 90, -1, 92, -1, 94, 95, -1, 97, -1, 99, -1, 101, -1, -1, 104, -1, -1, -1, 108, 109, 110, -1, -1, 113, -1, 115, 116, -1, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 134, -1, -1, 159, -1, -1, 162, -1, -1, 31, 32, -1, -1, 35, 36, 37, -1, -1, -1, -1, -1, 31, -1, -1, -1, 35, 36, 37, -1, -1, -1, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, 53, 54, -1, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, -1, -1, -1, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 35, 36, 37, -1, -1, -1, -1, -1, -1, -1, 226, 115, 116, 117, 118, 119, -1, -1, 53, 54, -1, -1, -1, 115, 116, 117, 118, 119, -1, 64, -1, -1, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 35, 36, 37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, 54, -1, -1, -1, -1, 115, 116, 117, 118, 119, 64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 115, -1, -1, 118, 119, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { 0, 164, 165, 0, 1, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 22, 23, 24, 26, 27, 28, 29, 30, 34, 38, 39, 41, 46, 47, 48, 49, 55, 57, 67, 68, 69, 72, 74, 75, 76, 77, 88, 90, 91, 101, 102, 103, 104, 106, 107, 109, 112, 113, 122, 123, 126, 127, 128, 129, 130, 131, 132, 134, 135, 150, 152, 153, 156, 157, 159, 166, 167, 168, 170, 175, 183, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 237, 238, 239, 240, 241, 242, 247, 249, 250, 251, 252, 253, 254, 268, 269, 271, 272, 273, 274, 275, 276, 277, 278, 279, 285, 286, 294, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 327, 330, 333, 346, 349, 350, 352, 363, 365, 367, 377, 380, 392, 395, 397, 404, 408, 410, 417, 427, 430, 432, 433, 435, 436, 437, 441, 443, 194, 188, 197, 198, 40, 40, 40, 314, 315, 316, 317, 304, 308, 309, 310, 33, 55, 138, 143, 144, 206, 208, 210, 213, 215, 217, 219, 221, 222, 225, 227, 229, 232, 237, 238, 239, 242, 249, 250, 252, 253, 255, 262, 268, 269, 270, 271, 279, 280, 281, 282, 294, 297, 306, 205, 204, 205, 241, 203, 205, 241, 186, 189, 262, 262, 366, 331, 73, 187, 205, 206, 208, 210, 213, 215, 217, 219, 221, 222, 225, 227, 229, 232, 237, 238, 239, 242, 249, 250, 252, 253, 266, 294, 306, 40, 328, 195, 191, 411, 185, 197, 205, 229, 232, 426, 10, 205, 205, 157, 205, 339, 22, 169, 262, 205, 205, 418, 262, 13, 262, 205, 205, 205, 205, 442, 205, 432, 306, 151, 244, 262, 265, 64, 114, 121, 223, 243, 244, 262, 205, 229, 232, 248, 167, 168, 170, 183, 313, 327, 330, 333, 346, 430, 433, 435, 437, 441, 443, 3, 4, 40, 156, 9, 38, 39, 60, 61, 62, 63, 65, 66, 137, 159, 267, 205, 229, 232, 236, 306, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 162, 267, 283, 284, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 236, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 9, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 236, 9, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 236, 306, 9, 40, 60, 61, 62, 63, 65, 66, 137, 156, 159, 197, 267, 283, 236, 306, 9, 40, 60, 61, 62, 63, 65, 66, 137, 156, 159, 197, 267, 283, 236, 306, 8, 10, 11, 157, 205, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 224, 225, 226, 228, 229, 231, 232, 233, 236, 294, 306, 307, 236, 9, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 9, 60, 61, 62, 63, 65, 66, 137, 159, 197, 267, 283, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 236, 205, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 197, 267, 283, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 156, 159, 267, 283, 9, 60, 61, 62, 63, 65, 66, 137, 156, 159, 267, 283, 236, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 197, 267, 283, 9, 60, 61, 62, 63, 65, 66, 137, 159, 197, 267, 283, 236, 197, 197, 197, 197, 197, 266, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 267, 283, 9, 40, 60, 61, 62, 63, 65, 66, 137, 159, 197, 267, 283, 236, 306, 154, 155, 154, 155, 154, 155, 154, 155, 184, 18, 19, 20, 21, 355, 357, 362, 13, 29, 30, 112, 113, 167, 183, 199, 200, 201, 202, 333, 443, 20, 42, 43, 44, 364, 368, 373, 42, 384, 262, 197, 197, 160, 205, 443, 262, 443, 205, 318, 321, 318, 318, 318, 262, 116, 262, 262, 256, 263, 257, 258, 260, 259, 261, 31, 32, 35, 36, 37, 53, 54, 64, 115, 116, 117, 118, 119, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 353, 264, 193, 154, 443, 205, 154, 443, 205, 197, 229, 319, 320, 321, 443, 205, 332, 151, 154, 205, 255, 262, 306, 428, 429, 197, 9, 137, 401, 234, 205, 329, 332, 319, 443, 262, 73, 22, 156, 335, 443, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 92, 93, 94, 95, 96, 97, 98, 99, 100, 178, 179, 180, 156, 443, 143, 155, 443, 405, 347, 443, 381, 124, 125, 196, 443, 443, 443, 154, 443, 443, 262, 8, 10, 11, 206, 295, 154, 158, 154, 158, 121, 205, 205, 243, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 154, 161, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 243, 248, 262, 262, 262, 262, 262, 262, 262, 262, 243, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 156, 160, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 243, 248, 262, 262, 262, 262, 262, 262, 262, 262, 243, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 154, 262, 262, 262, 262, 262, 262, 262, 262, 248, 262, 262, 262, 262, 262, 262, 262, 262, 248, 244, 244, 244, 244, 197, 443, 358, 362, 19, 355, 362, 3, 4, 199, 369, 374, 42, 364, 373, 43, 364, 385, 20, 42, 110, 111, 378, 379, 390, 443, 443, 443, 162, 178, 325, 326, 154, 443, 443, 443, 443, 298, 179, 179, 179, 179, 179, 179, 179, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 443, 179, 443, 205, 241, 205, 241, 178, 325, 154, 190, 178, 154, 443, 205, 241, 429, 154, 262, 178, 56, 154, 443, 443, 192, 202, 351, 443, 428, 151, 443, 334, 205, 338, 339, 341, 205, 205, 205, 205, 336, 340, 22, 443, 409, 56, 9, 351, 443, 262, 262, 197, 438, 205, 431, 146, 159, 205, 296, 301, 262, 244, 265, 171, 173, 155, 262, 162, 155, 155, 243, 155, 155, 287, 356, 262, 360, 362, 205, 205, 262, 443, 371, 364, 376, 10, 11, 22, 144, 156, 389, 387, 391, 378, 393, 434, 262, 322, 323, 180, 154, 161, 321, 181, 205, 299, 354, 205, 205, 9, 180, 320, 443, 205, 156, 205, 429, 398, 205, 205, 443, 412, 22, 89, 151, 205, 343, 344, 345, 342, 339, 341, 443, 205, 337, 341, 343, 351, 262, 205, 348, 419, 167, 382, 383, 443, 196, 133, 167, 437, 439, 440, 443, 166, 206, 206, 178, 114, 154, 121, 156, 176, 176, 262, 155, 265, 351, 443, 262, 176, 176, 443, 375, 262, 443, 10, 11, 389, 115, 116, 143, 144, 443, 389, 351, 351, 166, 9, 262, 162, 154, 178, 116, 351, 262, 178, 151, 245, 246, 265, 156, 51, 178, 70, 71, 414, 415, 416, 443, 151, 205, 205, 178, 155, 154, 154, 178, 154, 158, 155, 20, 406, 154, 108, 424, 425, 167, 443, 197, 205, 20, 167, 437, 440, 443, 20, 146, 58, 59, 158, 159, 262, 300, 205, 265, 105, 155, 177, 131, 182, 182, 288, 359, 443, 443, 443, 370, 351, 443, 351, 155, 389, 389, 389, 389, 386, 443, 394, 20, 324, 262, 205, 443, 205, 154, 155, 245, 262, 205, 413, 443, 443, 205, 178, 156, 178, 178, 151, 205, 345, 89, 341, 443, 178, 443, 205, 205, 420, 443, 443, 443, 443, 206, 158, 158, 206, 154, 158, 178, 155, 181, 205, 172, 174, 154, 351, 361, 351, 372, 351, 388, 20, 45, 396, 443, 262, 178, 166, 156, 246, 155, 52, 402, 20, 351, 351, 156, 178, 245, 443, 205, 178, 151, 205, 407, 120, 422, 423, 351, 158, 206, 58, 59, 158, 262, 155, 443, 443, 265, 351, 351, 351, 139, 245, 262, 399, 245, 155, 156, 178, 205, 178, 351, 403, 421, 443, 159, 158, 158, 289, 155, 443, 155, 245, 156, 178, 20, 50, 20, 351, 206, 154, 400, 155, 245, 205, 205, 58, 59, 158, 159, 265, 403, 155, 158, 158, 206, 290, 58, 59, 158, 154, 158, 158, 265, 291, 154, 293, 244, 292, 155, 154, 244 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) /* Error token number */ #define YYTERROR 1 #define YYERRCODE 256 /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { FILE *yyo = yyoutput; YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = YY_NULL; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; { YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } { YYSIZE_T yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { case 22: /* LITERAL */ { if( ((*yyvaluep).valChar).dealloc ) hb_xfree( ((*yyvaluep).valChar).string ); }; break; default: break; } } /* The lookahead symbol. */ int yychar; #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif /* The semantic value of the lookahead symbol. */ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yyssp = yyss = yyssa; yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: { hb_compLinePush(); } break; case 3: { } break; case 35: { ( void ) (yyvsp[(3) - (4)].valChar); hb_comp_iLine = (yyvsp[(2) - (4)].iNumber); } break; case 36: { ( void ) (yyvsp[(3) - (6)].valChar); ( void ) (yyvsp[(5) - (6)].valChar); hb_comp_iLine = (yyvsp[(2) - (6)].iNumber); } break; case 37: {} break; case 38: { if( (yyvsp[(1) - (1)].valChar).dealloc ) { (yyvsp[(1) - (1)].valChar).string = hb_compIdentifierNew( (yyvsp[(1) - (1)].valChar).string, FALSE ); (yyvsp[(1) - (1)].valChar).dealloc = FALSE; } hb_compAutoOpenAdd( (yyvsp[(1) - (1)].valChar).string ); } break; case 39: { char szFileName[ HB_PATH_MAX ]; hb_strncat( hb_strncpy( szFileName, (yyvsp[(1) - (3)].valChar).string, HB_PATH_MAX ), (yyvsp[(3) - (3)].valChar).string, HB_PATH_MAX ); hb_compAutoOpenAdd( hb_compIdentifierNew( szFileName, TRUE ) ); if( (yyvsp[(1) - (3)].valChar).dealloc ) { hb_xfree( (yyvsp[(1) - (3)].valChar).string ); (yyvsp[(1) - (3)].valChar).dealloc = FALSE; } if( (yyvsp[(3) - (3)].valChar).dealloc ) { hb_xfree( (yyvsp[(3) - (3)].valChar).string ); (yyvsp[(3) - (3)].valChar).dealloc = FALSE; } } break; case 40: { hb_comp_cVarType = ' '; hb_comp_bVarParams = FALSE; } break; case 41: { hb_compFunctionAdd( (yyvsp[(3) - (6)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (6)].iNumber), 0 ); if( hb_comp_bVarParams ) { hb_comp_functions.pLast->pCode[2] = HB_VAR_PARAM_FLAG; } else { while( hb_comp_LocalParams ) { PLOCALPARAM pDelete = hb_comp_LocalParams; hb_compVariableAdd( hb_comp_LocalParams->szName, hb_comp_LocalParams->cType ); hb_comp_LocalParams = hb_comp_LocalParams->pNext; hb_xfree( (void *) pDelete ); } } if( (yyvsp[(6) - (6)].string) ) { hb_compNamespaceEnd(); } } break; case 42: { hb_comp_wSeqCounter = 0; hb_comp_wForCounter = 0; hb_comp_wIfCounter = 0; hb_comp_wWhileCounter = 0; hb_comp_wCaseCounter = 0; hb_comp_wWithObjCounter = 0; hb_comp_wSwitchCounter = 0; hb_comp_wFinallyCounter = 0; } break; case 43: { hb_comp_cVarType = ' '; hb_comp_bVarParams = FALSE; } break; case 44: { hb_compFunctionAdd( (yyvsp[(3) - (6)].string), ( HB_SYMBOLSCOPE ) (yyvsp[(1) - (6)].iNumber), FUN_PROCEDURE ); if( hb_comp_bVarParams ) { hb_comp_functions.pLast->pCode[2] = HB_VAR_PARAM_FLAG; } else { while( hb_comp_LocalParams ) { PLOCALPARAM pDelete = hb_comp_LocalParams; hb_compVariableAdd( hb_comp_LocalParams->szName, hb_comp_LocalParams->cType ); hb_comp_LocalParams = hb_comp_LocalParams->pNext; hb_xfree( (void *) pDelete ); } } if( (yyvsp[(6) - (6)].string) ) { hb_compNamespaceEnd(); } } break; case 45: { hb_comp_wSeqCounter = 0; hb_comp_wForCounter = 0; hb_comp_wIfCounter = 0; hb_comp_wWhileCounter = 0; hb_comp_wCaseCounter = 0; hb_comp_wWithObjCounter = 0; hb_comp_wSwitchCounter = 0; hb_comp_wFinallyCounter = 0; } break; case 46: { (yyval.iNumber) = HB_FS_PUBLIC; } break; case 47: { (yyval.iNumber) = HB_FS_STATIC; } break; case 48: { (yyval.iNumber) = ( HB_FS_UTILITY | HB_FS_PUBLIC ); } break; case 49: { (yyval.iNumber) = ( HB_FS_UTILITY | HB_FS_STATIC ); } break; case 50: { (yyval.iNumber) = HB_FS_INIT; } break; case 51: { (yyval.iNumber) = HB_FS_EXIT; } break; case 52: { (yyval.iNumber) = HB_FS_CRITICAL | HB_FS_PUBLIC; } break; case 53: { (yyval.iNumber) = ( HB_FS_CRITICAL | HB_FS_STATIC ); } break; case 56: { hb_comp_iVarScope = VS_PARAMETER; } break; case 58: { hb_comp_bVarParams = TRUE; } break; case 59: { hb_comp_cVarType = ' '; } break; case 61: { hb_comp_cVarType = 'N'; } break; case 62: { hb_comp_cVarType = 'C'; } break; case 63: { hb_comp_cVarType = 'D'; } break; case 64: { hb_comp_cVarType = 'L'; } break; case 65: { hb_comp_cVarType = 'B'; } break; case 66: { hb_comp_cVarType = 'O'; } break; case 67: { hb_comp_cVarType = 'S'; hb_comp_szFromClass = (yyvsp[(2) - (2)].string); } break; case 68: { hb_comp_cVarType = 'E'; hb_comp_szFromEnum = (yyvsp[(2) - (2)].string); } break; case 69: { hb_comp_cVarType = ' '; } break; case 71: { hb_comp_cVarType = 'A'; } break; case 72: { hb_comp_cVarType = 'n'; } break; case 73: { hb_comp_cVarType = 'c'; } break; case 74: { hb_comp_cVarType = 'd'; } break; case 75: { hb_comp_cVarType = 'l'; } break; case 76: { hb_comp_cVarType = 'a'; } break; case 77: { hb_comp_cVarType = 'b'; } break; case 78: { hb_comp_cVarType = 'o'; } break; case 79: { hb_comp_cVarType = 's'; hb_comp_szFromClass = (yyvsp[(2) - (2)].string); } break; case 80: { hb_comp_cVarType = 'e'; hb_comp_szFromEnum = (yyvsp[(2) - (2)].string); } break; case 81: { hb_comp_LocalParams = (PLOCALPARAM) hb_xgrab( sizeof( LOCALPARAM ) ); hb_comp_LocalParams->szName = (yyvsp[(1) - (2)].string); hb_comp_LocalParams->cType = hb_comp_cVarType; hb_comp_LocalParams->pNext = NULL; (yyval.pVoid) = (void *) hb_comp_LocalParams; } break; case 82: { PLOCALPARAM pLocalParam = (PLOCALPARAM) hb_xgrab( sizeof( LOCALPARAM ) ); pLocalParam->szName = (yyvsp[(3) - (4)].string); pLocalParam->cType = hb_comp_cVarType; pLocalParam->pNext = NULL; ( (PLOCALPARAM) (yyval.pVoid) )->pNext = pLocalParam; (yyval.pVoid) = (void *) pLocalParam; } break; case 83: { (yyval.string) = NULL; } break; case 84: { PNAMESPACE pNamespace; (yyval.string) = (yyvsp[(2) - (2)].string); if( hb_comp_Namespaces.pCurrent ) { hb_compYYError( 'E', HB_COMP_ERR_IMPLEMENTS_IN_NAMESPACE, hb_comp_Namespaces.pCurrent->szName, NULL ); } /* Might be IMPLEMENTS NAMESPACE in same compilation as namespace definition */ pNamespace = hb_compNamespaceFind( hb_comp_Namespaces.pFirst, (yyval.string), NSTYPE_SPACE ); hb_compNamespaceNew( (yyval.string), NSTYPE_STEALTH ); if( pNamespace ) { hb_comp_Namespaces.pCurrent->iID = pNamespace->iID; } } break; case 85: { hb_comp_bDontGenLineNum = TRUE; } break; case 86: { } break; case 87: {} break; case 88: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 89: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 90: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 91: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 92: { if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) ) hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); else hb_compExprDelete( hb_compErrorSyntax( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 93: { if( HB_COMP_ISSUPPORTED( HB_COMPFLAG_XBASE ) ) hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); else hb_compExprDelete( hb_compErrorSyntax( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 94: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 95: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 96: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 97: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 98: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 99: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 100: { hb_compExprDelete( hb_compExprGenStatement( (yyvsp[(1) - (2)].asExpr) ) ); } break; case 101: { hb_compGenBreak(); hb_compGenPCode2( HB_P_DOSHORT, 0, ( BOOL ) 1 ); hb_comp_functions.pLast->bFlags |= FUN_BREAK_CODE; } break; case 102: { hb_compLinePushIfInside(); } break; case 103: { hb_compGenBreak(); hb_compExprDelete( hb_compExprGenPush( (yyvsp[(3) - (4)].asExpr) ) ); hb_compGenPCode2( HB_P_DOSHORT, 1, ( BOOL ) 1 ); hb_comp_functions.pLast->bFlags |= FUN_BREAK_CODE; } break; case 104: { hb_comp_bDontGenLineNum = !hb_comp_bDebugInfo; } break; case 105: { hb_compLoopExit(); hb_comp_functions.pLast->bFlags |= FUN_BREAK_CODE; } break; case 106: { hb_comp_bDontGenLineNum = !hb_comp_bDebugInfo; } break; case 107: { hb_compLoopLoop(); hb_comp_functions.pLast->bFlags |= FUN_BREAK_CODE; } break; case 108: { if( hb_comp_wSeqCounter ) { hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "RETURN", NULL ); } hb_compGenPCode1( HB_P_ENDPROC ); if( (hb_comp_functions.pLast->bFlags & FUN_PROCEDURE) == 0 ) { /* return from a function without a return value */ hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_NO_RETURN_VALUE, NULL, NULL ); } hb_comp_functions.pLast->bFlags |= FUN_WITH_RETURN; hb_comp_bDontGenLineNum = FALSE; hb_comp_functions.pLast->bFlags |= FUN_BREAK_CODE; } break; case 109: { hb_compLinePushIfInside(); hb_comp_cVarType = ' '; } break; case 110: { hb_comp_cCastType = hb_comp_cVarType; hb_comp_cVarType = ' '; if( hb_comp_wSeqCounter ) { hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "RETURN", NULL ); } hb_compExprDelete( hb_compExprGenPush( (yyvsp[(3) - (4)].asExpr) ) ); /* TODO: check if return value agree with declared value */ hb_compGenPCode2( HB_P_RETVALUE, HB_P_ENDPROC, ( BOOL ) 1 ); if( hb_comp_functions.pLast->bFlags & FUN_PROCEDURE ) { /* procedure returns a value */ hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_PROC_RETURN_VALUE, NULL, NULL ); } hb_comp_functions.pLast->bFlags |= FUN_WITH_RETURN; hb_comp_bDontGenLineNum = FALSE; hb_comp_functions.pLast->bFlags |= FUN_BREAK_CODE; } break; case 111: { hb_compLinePushIfInside(); hb_comp_iVarScope = VS_PUBLIC; } break; case 112: { hb_compRTVariableGen( hb_compExpr_IDs.__MVPUBLIC ); hb_comp_cVarType = ' '; hb_comp_iVarScope = VS_NONE; } break; case 114: { hb_compLinePushIfInside(); hb_comp_iVarScope = VS_PRIVATE; } break; case 115: { hb_compRTVariableGen( hb_compExpr_IDs.__MVPRIVATE ); hb_comp_cVarType = ' '; hb_comp_iVarScope = VS_NONE; } break; case 119: { if( hb_comp_szAnnounce == NULL ) { /* check for reserved name * NOTE: Clipper doesn't check for it */ char * szFunction = hb_compReservedName( (yyvsp[(2) - (2)].string) ); if( szFunction ) { hb_compYYError( 'E', HB_COMP_ERR_FUNC_RESERVED, szFunction, (yyvsp[(2) - (2)].string) ); } hb_comp_szAnnounce = (yyvsp[(2) - (2)].string); } else { hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_DUPL_ANNOUNCE, (yyvsp[(2) - (2)].string), NULL ); } } break; case 121: { if( hb_comp_bError == FALSE ) { yyerror( NULL ); }; } break; case 122: { yyclearin; yyerrok; } break; case 123: { if( hb_comp_functions.pLast->bFlags & FUN_USES_LOCAL_PARAMS ) { hb_compYYError( 'E', HB_COMP_ERR_PARAMETERS_NOT_ALLOWED, NULL, NULL ); } else { hb_comp_functions.pLast->wParamNum = 0; hb_comp_iVarScope = ( VS_PRIVATE | VS_PARAMETER ); } } break; case 124: { hb_comp_iVarScope = VS_NONE; } break; case 125: { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(2) - (4)].asExpr) ) ); hb_compExprDelete( hb_compExprGenPush( (yyvsp[(3) - (4)].asExpr) ) ); hb_compGenPCode1( HB_P_DIVERT ); } break; case 126: { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(4) - (6)].asExpr) ) ); hb_compExprDelete( hb_compExprGenPush( (yyvsp[(2) - (6)].asExpr) ) ); hb_compExprDelete( hb_compExprGenPush( (yyvsp[(5) - (6)].asExpr) ) ); hb_compGenPCode1( HB_P_DIVERTOF ); } break; case 127: { (yyval.asExpr) = hb_compExprNewLong(0); } break; case 128: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 129: { hb_compLinePushIfInside(); } break; case 131: { (yyval.lNumber) = 0; } break; case 132: { (yyval.lNumber) = 0; } break; case 133: { (yyval.lNumber) = 1; } break; case 134: { (yyval.lNumber) = 1; } break; case 135: { char LineAsString[32]; hb_snprintf( LineAsString, sizeof( LineAsString ), "at line %i", s_iLastControlLine - 1 ); hb_compYYError( 'E', HB_COMP_ERR_UNCLOSED_STRU, LineAsString, NULL ); } break; case 136: {} break; case 137: {} break; case 144: { (yyval.lNumber) = (yyvsp[(1) - (1)].lNumber); } break; case 145: { (yyval.lNumber) += (yyvsp[(2) - (2)].lNumber); } break; case 146: { hb_compExternAdd( (yyvsp[(1) - (1)].string), NULL, (HB_SYMBOLSCOPE) 0 ); } break; case 147: { hb_compExternAdd( (yyvsp[(2) - (2)].string), (yyvsp[(1) - (2)].string), (HB_SYMBOLSCOPE) 0 ); } break; case 148: { hb_compExternAdd( (yyvsp[(3) - (3)].string), NULL, (HB_SYMBOLSCOPE) 0 ); } break; case 149: { hb_compExternAdd( (yyvsp[(4) - (4)].string), (yyvsp[(3) - (4)].string), (HB_SYMBOLSCOPE) 0 ); } break; case 150: { hb_compExternAdd( (yyvsp[(1) - (1)].string), NULL, HB_FS_DEFERRED ); } break; case 151: { hb_compExternAdd( (yyvsp[(2) - (2)].string), (yyvsp[(1) - (2)].string), HB_FS_DEFERRED ); } break; case 152: { hb_compExternAdd( (yyvsp[(3) - (3)].string), NULL, HB_FS_DEFERRED ); } break; case 153: { hb_compExternAdd( (yyvsp[(4) - (4)].string), (yyvsp[(3) - (4)].string), HB_FS_DEFERRED ); } break; case 154: { (yyval.string) = (yyvsp[(1) - (1)].string); } break; case 155: { (yyval.asExpr) = hb_compExprNewDouble( (yyvsp[(1) - (1)].valDouble).dNumber, (yyvsp[(1) - (1)].valDouble).bWidth, (yyvsp[(1) - (1)].valDouble).bDec ); } break; case 156: { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (1)].valInteger).iNumber ); } break; case 157: { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (1)].valLong).lNumber ); } break; case 158: { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (2)].valInteger).iNumber ); } break; case 159: { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (2)].valLong).lNumber ); } break; case 160: { (yyval.asExpr) = hb_compErrorAlias( hb_compExprNewDouble( (yyvsp[(1) - (2)].valDouble).dNumber, (yyvsp[(1) - (2)].valDouble).bWidth, (yyvsp[(1) - (2)].valDouble).bDec ) ); } break; case 161: { (yyval.asExpr) = hb_compExprNewNil(); } break; case 162: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 163: { (yyval.asExpr) = hb_compExprNewString( (yyvsp[(1) - (1)].valChar).string, (yyvsp[(1) - (1)].valChar).length, (yyvsp[(1) - (1)].valChar).dealloc ); (yyvsp[(1) - (1)].valChar).dealloc = FALSE; if( bTrancuateBaseArray && pBaseArrayName == NULL ) { char *pCopy = hb_strdup( (yyvsp[(1) - (1)].valChar).string ), *pTmp = strchr( pCopy, '[' ); if( pTmp ) { pCopy[ pTmp - pCopy ] = '\0'; pBaseArrayName = hb_compExprNewString( pCopy, pTmp - pCopy, TRUE ); } else hb_xfree( pCopy ); bTrancuateBaseArray = FALSE; } } break; case 164: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 165: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 166: { (yyval.asExpr) = hb_compExprNewLogical( TRUE ); } break; case 167: { (yyval.asExpr) = hb_compExprNewLogical( FALSE ); } break; case 168: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 169: { (yyval.asExpr) = hb_compExprNewSelf(); } break; case 170: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 171: { (yyval.asExpr) = hb_compExprNewDate( (yyvsp[(3) - (8)].asExpr), (yyvsp[(5) - (8)].asExpr), (yyvsp[(7) - (8)].asExpr) ); hb_compExprDelete( (yyvsp[(3) - (8)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (8)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (8)].asExpr) ); } break; case 172: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 173: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( (yyvsp[(3) - (13)].asExpr), (yyvsp[(5) - (13)].asExpr), (yyvsp[(7) - (13)].asExpr), (yyvsp[(8) - (13)].asExpr), (yyvsp[(10) - (13)].asExpr), (yyvsp[(12) - (13)].asExpr), 0, &iOk ); hb_compExprDelete( (yyvsp[(3) - (13)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (13)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (13)].asExpr) ); hb_compExprDelete( (yyvsp[(8) - (13)].asExpr) ); hb_compExprDelete( (yyvsp[(10) - (13)].asExpr) ); hb_compExprDelete( (yyvsp[(12) - (13)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 174: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( (yyvsp[(3) - (11)].asExpr), (yyvsp[(5) - (11)].asExpr), (yyvsp[(7) - (11)].asExpr), (yyvsp[(8) - (11)].asExpr), (yyvsp[(10) - (11)].asExpr), NULL, 0, &iOk ); hb_compExprDelete( (yyvsp[(3) - (11)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (11)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (11)].asExpr) ); hb_compExprDelete( (yyvsp[(8) - (11)].asExpr) ); hb_compExprDelete( (yyvsp[(10) - (11)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 175: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( (yyvsp[(3) - (14)].asExpr), (yyvsp[(5) - (14)].asExpr), (yyvsp[(7) - (14)].asExpr), (yyvsp[(8) - (14)].asExpr), (yyvsp[(10) - (14)].asExpr), (yyvsp[(12) - (14)].asExpr), 1, &iOk ); hb_compExprDelete( (yyvsp[(3) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(8) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(10) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(12) - (14)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 176: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( (yyvsp[(3) - (12)].asExpr), (yyvsp[(5) - (12)].asExpr), (yyvsp[(7) - (12)].asExpr), (yyvsp[(8) - (12)].asExpr), (yyvsp[(10) - (12)].asExpr), NULL, 1, &iOk ); hb_compExprDelete( (yyvsp[(3) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(8) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(10) - (12)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 177: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( (yyvsp[(3) - (14)].asExpr), (yyvsp[(5) - (14)].asExpr), (yyvsp[(7) - (14)].asExpr), (yyvsp[(8) - (14)].asExpr), (yyvsp[(10) - (14)].asExpr), (yyvsp[(12) - (14)].asExpr), 2, &iOk ); hb_compExprDelete( (yyvsp[(3) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(8) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(10) - (14)].asExpr) ); hb_compExprDelete( (yyvsp[(12) - (14)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 178: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( (yyvsp[(3) - (12)].asExpr), (yyvsp[(5) - (12)].asExpr), (yyvsp[(7) - (12)].asExpr), (yyvsp[(8) - (12)].asExpr), (yyvsp[(10) - (12)].asExpr), NULL, 2, &iOk ); hb_compExprDelete( (yyvsp[(3) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(8) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(10) - (12)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 179: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( NULL, NULL, NULL, (yyvsp[(3) - (8)].asExpr), (yyvsp[(5) - (8)].asExpr), (yyvsp[(7) - (8)].asExpr), 0, &iOk ); hb_compExprDelete( (yyvsp[(3) - (8)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (8)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (8)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 180: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( NULL, NULL, NULL, (yyvsp[(3) - (6)].asExpr), (yyvsp[(5) - (6)].asExpr), NULL, 0, &iOk ); hb_compExprDelete( (yyvsp[(3) - (6)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (6)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 181: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( NULL, NULL, NULL, (yyvsp[(3) - (9)].asExpr), (yyvsp[(5) - (9)].asExpr), (yyvsp[(7) - (9)].asExpr), 1, &iOk ); hb_compExprDelete( (yyvsp[(3) - (9)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (9)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (9)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 182: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( NULL, NULL, NULL, (yyvsp[(3) - (7)].asExpr), (yyvsp[(5) - (7)].asExpr), NULL, 1, &iOk ); hb_compExprDelete( (yyvsp[(3) - (7)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (7)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 183: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( NULL, NULL, NULL, (yyvsp[(3) - (9)].asExpr), (yyvsp[(5) - (9)].asExpr), (yyvsp[(7) - (9)].asExpr), 2, &iOk ); hb_compExprDelete( (yyvsp[(3) - (9)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (9)].asExpr) ); hb_compExprDelete( (yyvsp[(7) - (9)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 184: { int iOk = 0; (yyval.asExpr) = hb_compExprNewDateTime( NULL, NULL, NULL, (yyvsp[(3) - (7)].asExpr), (yyvsp[(5) - (7)].asExpr), NULL, 2, &iOk ); hb_compExprDelete( (yyvsp[(3) - (7)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (7)].asExpr) ); if( !iOk ) { (yyval.asExpr) = NULL; } } break; case 185: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 186: { (yyval.asExpr) = hb_compExprNewArray( (yyvsp[(2) - (3)].asExpr) ); } break; case 187: { (yyval.asExpr) = hb_compExprNewFunCall( hb_compExprNewFunName( hb_compExpr_IDs.HASH ), (yyvsp[(2) - (3)].asExpr) ); } break; case 188: { (yyval.asExpr) = NULL; } break; case 189: { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewArgList( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 190: { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprAddListExpr( (yyvsp[(1) - (5)].asExpr), (yyvsp[(3) - (5)].asExpr) ), (yyvsp[(5) - (5)].asExpr) ); } break; case 191: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 192: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 193: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 194: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 195: { (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string) ); if( hb_comp_BlocksList ) { PHB_CBVAR pVar = ( PHB_CBVAR ) hb_comp_BlocksList->pBlock->value.asList.pIndex; while( pVar ) { if( pVar->szName && HB_EXPR_ISEQUAL_IDS( (yyvsp[(1) - (1)].string), pVar->szName ) ) { break; } pVar = pVar->pNext; } if( pVar == NULL ) { s_bBlockDeclared = ( s_bBlockDeclared || hb_compLocalGetPos( (yyvsp[(1) - (1)].string) ) || hb_compStaticGetPos( (yyvsp[(1) - (1)].string), hb_comp_functions.pLast ) || hb_compVariableGetPos( hb_comp_pGlobals, (yyvsp[(1) - (1)].string) ) || ( hb_comp_bStartProc == FALSE && hb_compStaticGetPos( (yyvsp[(1) - (1)].string), hb_comp_functions.pFirst ) ) ); } } } break; case 196: { (yyval.asExpr) = hb_compExprNewAlias( (yyvsp[(1) - (2)].string) ); } break; case 197: { (yyval.asExpr) = hb_compExprNewMacro( NULL, '&', (yyvsp[(1) - (1)].string) ); if( hb_comp_BlocksList ) { s_bBlockDeclared = ( s_bBlockDeclared || hb_compLocalGetPos( (yyvsp[(1) - (1)].string) ) || hb_compStaticGetPos( (yyvsp[(1) - (1)].string), hb_comp_functions.pLast ) || hb_compVariableGetPos( hb_comp_pGlobals, (yyvsp[(1) - (1)].string) ) || ( hb_comp_bStartProc == FALSE && hb_compStaticGetPos( (yyvsp[(1) - (1)].string), hb_comp_functions.pFirst ) ) ); s_bBlockMacro = TRUE; } } break; case 198: { // Was: MACROTEXT befvore optimization. //$$ = hb_compExprNewMacro( NULL, 0, $1 ); (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 199: { HB_EXPR_PTR pPlus = NULL, pLeft = NULL, pRight, pDestExpr; char *pPosition = (yyvsp[(1) - (1)].string), *pStart, *sToken; BOOL bVar; if( *pPosition == '&' ) { bVar = TRUE; pPosition++; } else { bVar = FALSE; } pStart = pPosition; while( *pPosition ) { if( *pPosition == '&' ) { *pPosition = '\0'; sToken = hb_compIdentifierNew( pStart, TRUE ); //printf( "\n%s: '%s'\n", bVar ? "Var" : "String", sToken ); pDestExpr = ( bVar ? hb_compExprNewVar( sToken ) : hb_compExprNewString( sToken, strlen( sToken ), FALSE ) ); if( pPlus ) { pRight = pDestExpr; pPlus = hb_compExprSetOperand( hb_compExprNewPlus( pPlus ), pRight ); } else if( pLeft ) { pRight = pDestExpr; pPlus = hb_compExprSetOperand( hb_compExprNewPlus( pLeft ), pRight ); } else { pLeft = pDestExpr; } bVar = TRUE; pPosition++; pStart = pPosition; continue; } else if( *pPosition == '.' ) { if( ! bVar ) { hb_compYYError( 'E', HB_COMP_ERR_SYNTAX, pPosition, NULL ); } *pPosition = '\0'; sToken = hb_compIdentifierNew( pStart, TRUE ); //printf( "\n%s: '%s'\n", bVar ? "Var" : "String", sToken ); pDestExpr = ( bVar ? hb_compExprNewVar( sToken ) : hb_compExprNewString( sToken, strlen( sToken ), FALSE ) ); if( pPlus ) { pRight = pDestExpr; pPlus = hb_compExprSetOperand( hb_compExprNewPlus( pPlus ), pRight ); } else if( pLeft ) { pRight = pDestExpr; pPlus = hb_compExprSetOperand( hb_compExprNewPlus( pLeft ), pRight ); } else { pLeft = pDestExpr; } bVar = FALSE; pPosition++; pStart = pPosition; continue; } pPosition++; } sToken = hb_compIdentifierNew( pStart, TRUE ); //printf( "\nLast - %s: '%s'\n\n\n", bVar ? "Var" : "String", sToken ); pDestExpr = ( bVar ? hb_compExprNewVar( sToken ) : hb_compExprNewString( sToken, strlen( sToken ), FALSE ) ); if( pPlus ) { pRight = pDestExpr; pPlus = hb_compExprSetOperand( hb_compExprNewPlus( pPlus ), pRight ); } else if( pLeft ) { pRight = pDestExpr; pPlus = hb_compExprSetOperand( hb_compExprNewPlus( pLeft ), pRight ); } else { pPlus = pDestExpr; hb_compYYError( 'E', HB_COMP_ERR_SYNTAX, sToken, NULL ); } (yyval.asExpr) = hb_compExprNewMacro( hb_compExprNewList( pPlus ), 0, NULL ); hb_xfree( (yyvsp[(1) - (1)].string) ); } break; case 200: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 201: { (yyval.asExpr) = hb_compExprNewMacro( (yyvsp[(2) - (2)].asExpr), 0, NULL ); } break; case 202: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 203: { (yyval.asExpr) = hb_compExprNewAlias( hb_compExpr_IDs.FIELD_ ); } break; case 204: { (yyval.asExpr) = (yyvsp[(3) - (3)].asExpr); } break; case 205: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 206: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 207: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 208: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 209: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 210: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 211: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 212: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 213: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 214: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 215: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 216: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 217: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 218: { hb_compExprDelete( (yyvsp[(1) - (2)].asExpr) ); (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 219: { (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string) ); } break; case 220: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 221: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 222: { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 223: { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 224: { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 225: { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 226: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 227: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 228: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 229: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 230: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 231: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 232: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 233: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 234: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 235: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 236: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 237: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 238: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(1) - (2)].asExpr) ); hb_compExprDelete((yyvsp[(2) - (2)].asExpr)); } break; case 239: { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 240: { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 241: { (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 242: { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 243: { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 244: { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 245: { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 246: { (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 247: { (yyval.asExpr) = hb_compErrorAlias( (yyvsp[(2) - (2)].asExpr) ); } break; case 248: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 249: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 250: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 251: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 252: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 253: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 254: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 255: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 256: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 257: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 258: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 259: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 260: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 261: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 262: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 263: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 264: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 265: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 266: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 267: { (yyval.string) = (yyvsp[(1) - (2)].string); } break; case 268: { /* IdentName not NamespaceName is intentional - we don't want Global -> except when 1st! */ if( (yyvsp[(1) - (3)].string)[0] == '*' ) { hb_compYYError( 'E', HB_COMP_ERR_NONMEMBER_NAMESPACE, (yyvsp[(2) - (3)].string), "*" ); (yyval.string) = (yyvsp[(1) - (3)].string); } else { char *szNamespace = (char *) hb_xgrab( strlen( (yyvsp[(1) - (3)].string) ) + 1 + strlen( (yyvsp[(2) - (3)].string) ) + 1 ); hb_xstrcpy( szNamespace, (yyvsp[(1) - (3)].string), ".", (yyvsp[(2) - (3)].string), NULL ); (yyval.string) = hb_compIdentifierNew( szNamespace, FALSE ); } } break; case 269: { (yyval.asExpr) = hb_compExprNewFunCall( hb_compExprNewFunName( (yyvsp[(1) - (4)].string) ), (yyvsp[(3) - (4)].asExpr) ); } break; case 270: { (yyval.asExpr) = hb_compExprNewFunCall( hb_compExprNewNamespaceFunName( (yyvsp[(1) - (5)].string), (yyvsp[(2) - (5)].string) ), (yyvsp[(4) - (5)].asExpr) ); } break; case 271: { (yyval.asExpr) = hb_compExprNewFunCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr) ); } break; case 272: { (yyval.asExpr) = hb_compExprNewFunCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr) ); } break; case 273: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 274: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 275: { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[(1) - (1)].asExpr) ); } break; case 276: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 277: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 278: { switch( (yyvsp[(2) - (2)].asExpr)->ExprType ) { case HB_ET_VARIABLE: (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); (yyval.asExpr)->ExprType = HB_ET_VARREF; (yyval.asExpr)->ValType = HB_EV_VARREF; break; case HB_ET_ALIASVAR: { char *szAlias = (yyvsp[(2) - (2)].asExpr)->value.asAlias.pAlias->value.asSymbol.szName; if( strcmp( szAlias, "M" ) == 0 || strncmp( szAlias, "MEMVAR", 4 > strlen( szAlias ) ? 4 : strlen( szAlias ) ) == 0 ) { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr)->value.asAlias.pVar; (yyvsp[(2) - (2)].asExpr)->value.asAlias.pVar = NULL; hb_compExprDelete( (yyvsp[(2) - (2)].asExpr) ); if( (yyval.asExpr)->ExprType == HB_ET_MACRO ) { (yyval.asExpr)->value.asMacro.SubType = HB_ET_MACRO_VAR_REF; } else { (yyval.asExpr)->ExprType = HB_ET_MEMVARREF; (yyval.asExpr)->ValType = HB_EV_VARREF; } } break; } case HB_ET_FUNCALL: (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr)->value.asFunCall.pFunName; (yyvsp[(2) - (2)].asExpr)->value.asFunCall.pFunName = NULL; hb_compExprDelete( (yyvsp[(2) - (2)].asExpr) ); (yyval.asExpr)->ExprType = HB_ET_FUNREF; (yyval.asExpr)->ValType = HB_EV_FUNREF; break; case HB_ET_SEND: (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); (yyval.asExpr)->value.asMessage.bByRef = TRUE; break; case HB_ET_MACRO: (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); (yyval.asExpr)->value.asMacro.SubType = HB_ET_MACRO_VAR_REF; break; case HB_ET_ARRAYAT: (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); (yyval.asExpr)->value.asList.bByRef = TRUE; break; default: hb_compYYError( 'E', HB_COMP_ERR_INVALID_REFER, hb_compExprDescription( (yyvsp[(2) - (2)].asExpr) ), NULL ); (yyval.asExpr) = NULL; } } break; case 279: {} break; case 280: {} break; case 281: { hb_compExprDelete((yyvsp[(1) - (1)].asExpr)); } break; case 282: {} break; case 283: {} break; case 284: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 285: { (yyval.asExpr) = hb_compExprNewFunName( (yyvsp[(1) - (1)].string) ); } break; case 286: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); (yyvsp[(1) - (1)].asExpr)->value.asMacro.SubType = HB_ET_MACRO_SYMBOL; } break; case 287: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); (yyvsp[(1) - (1)].asExpr)->value.asMacro.SubType = HB_ET_MACRO_SYMBOL; } break; case 288: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 289: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 290: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 291: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 292: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 293: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 294: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 295: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 296: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 297: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 298: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 299: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 300: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 301: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 302: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 303: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 304: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 305: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 306: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 307: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 308: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 309: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 310: { (yyval.asExpr) = hb_compExprNewSendExp( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 311: { if( hb_comp_wWithObjCounter == 0 ) { if( (yyvsp[(2) - (2)].asExpr)->ExprType == HB_ET_FUNNAME ) hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_WITHOBJECT, (yyvsp[(2) - (2)].asExpr)->value.asSymbol.szName, NULL ); else hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_WITHOBJECT, "&", NULL ); } (yyval.asExpr) = hb_compExprNewWithSendExp( (yyvsp[(2) - (2)].asExpr) ); } break; case 312: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 313: { (yyval.asExpr) = hb_compExprNewMethodCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr) ); } break; case 314: { if( hb_comp_wWithObjCounter == 0 ) { hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_WITHOBJECT, (yyvsp[(1) - (4)].asExpr)->value.asMessage.szMessage, NULL ); } (yyval.asExpr) = hb_compExprNewWithMethodCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr) ); } break; case 315: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 317: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 318: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 319: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 320: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 321: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 322: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 323: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 324: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 325: {hb_comp_cVarType = ' ';} break; case 326: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 327: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 328: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 329: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 330: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 331: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 332: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 333: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 334: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 335: {hb_comp_cVarType = ' ';} break; case 336: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 337: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 338: {hb_comp_cVarType = ' ';} break; case 339: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 340: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 341: {hb_comp_cVarType = ' ';} break; case 342: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 343: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 344: {hb_comp_cVarType = ' ';} break; case 345: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 346: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 347: {hb_comp_cVarType = ' ';} break; case 348: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 349: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 350: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 351: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 352: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 353: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 354: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 355: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 356: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 357: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 358: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 359: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 360: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 361: { hb_comp_cVarType = ' ';} break; case 362: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 363: { hb_comp_cVarType = ' ';} break; case 364: { (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 365: { (yyval.asExpr) = hb_compExprNewEmpty(); } break; case 367: { (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string) ); } break; case 374: { (yyval.asExpr) = hb_compExprListStrip( (yyvsp[(1) - (1)].asExpr), NULL ); } break; case 375: { (yyval.asExpr) = hb_compExprNewPostInc( (yyvsp[(0) - (1)].asExpr) ); } break; case 376: { (yyval.asExpr) = hb_compExprNewPostDec( (yyvsp[(0) - (1)].asExpr) ); } break; case 377: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 378: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 379: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 380: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 381: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 382: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 383: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 384: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 385: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 386: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 387: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 388: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 389: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 390: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 391: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 392: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 393: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 394: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 395: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 396: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 397: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 398: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 399: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 400: { (yyval.asExpr) = hb_compExprNewPreInc( (yyvsp[(2) - (2)].asExpr) ); } break; case 401: { (yyval.asExpr) = hb_compExprNewPreDec( (yyvsp[(2) - (2)].asExpr) ); } break; case 402: { (yyval.asExpr) = hb_compExprNewNot( (yyvsp[(2) - (2)].asExpr) ); } break; case 403: { (yyval.asExpr) = hb_compExprNewNegate( (yyvsp[(2) - (2)].asExpr) ); } break; case 404: { (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); } break; case 405: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 406: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 407: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 408: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 409: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 410: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 411: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 412: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 413: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 414: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 415: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 416: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); hb_comp_cCastType = hb_comp_cVarType; hb_comp_cVarType = ' ';} break; case 417: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 418: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 419: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 420: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 421: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); hb_comp_cCastType = hb_comp_cVarType; hb_comp_cVarType = ' ';} break; case 422: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 423: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 424: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); hb_comp_cCastType = hb_comp_cVarType; hb_comp_cVarType = ' ';} break; case 425: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); hb_comp_cCastType = hb_comp_cVarType; hb_comp_cVarType = ' ';} break; case 426: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 427: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 428: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 429: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 430: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 431: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 432: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 433: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 434: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 435: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 436: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 437: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 438: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 439: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 440: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 441: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 442: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 443: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 444: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 445: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 446: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 447: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 448: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 449: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 450: { (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 451: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 452: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 453: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 454: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 455: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 456: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 457: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 458: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 459: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 460: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 461: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 462: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 463: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 464: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 465: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 466: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 467: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 468: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 469: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 470: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 471: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 472: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 473: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 474: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 475: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 476: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 477: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 478: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 479: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 480: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 481: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 482: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 483: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 484: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 485: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 486: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 487: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 488: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 489: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 490: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 491: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 492: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 493: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 494: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 495: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 496: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 497: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 498: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 499: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 500: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 501: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 502: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 503: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 504: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 505: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 506: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 507: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 508: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 509: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 510: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 511: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 512: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 513: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 514: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 515: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 516: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 517: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 518: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 519: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 520: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 521: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 522: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 523: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 524: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 525: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 526: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 527: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 528: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 529: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 530: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 531: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 532: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 533: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 534: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 535: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 536: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 537: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 538: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 539: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 540: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 541: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 542: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 543: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 544: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 545: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 546: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 547: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 548: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 549: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 550: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 551: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 552: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 553: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 554: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 555: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 556: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 557: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 558: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 559: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 560: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 561: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 562: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 563: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 564: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 565: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 566: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 567: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 568: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 569: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 570: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 571: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 572: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 573: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 574: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 575: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 576: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 577: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 578: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 579: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 580: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 581: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 582: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 583: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 584: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 585: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 586: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 587: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 588: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 589: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 590: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 591: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 592: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 593: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 594: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 595: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlus( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 596: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinus( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 597: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMult( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 598: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDiv( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 599: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMod( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 600: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPower( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 601: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewBitAnd( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 602: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewBitOr( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 603: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewBitXOr( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 604: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewBitShiftR( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 605: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewBitShiftL( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 606: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewAnd( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 607: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewOr( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 608: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEQ( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 609: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLT( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 610: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGT( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 611: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLE( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 612: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGE( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 613: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 614: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 615: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewIN( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 616: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEqual( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 617: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLike( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 618: { (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMatch( (yyvsp[(1) - (3)].asExpr) ), (yyvsp[(3) - (3)].asExpr) ); } break; case 619: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 620: { (yyval.asExpr) = hb_compExprNewArrayAt( (yyvsp[(0) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr) ); } break; case 621: { (yyval.asExpr) = hb_compExprNewArrayAt( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 622: { (yyval.asExpr) = hb_compExprNewArrayAt( (yyvsp[(1) - (4)].asExpr), (yyvsp[(4) - (4)].asExpr) ); } break; case 623: { pBaseArrayName = NULL; pGetVarArray = NULL; pGetArgList = NULL; pGetFunction = NULL; } break; case 624: { /* $4 */ (yyvsp[(2) - (3)].asExpr) = hb_compExprListStripSingle( (yyvsp[(2) - (3)].asExpr), NULL ); (yyvsp[(2) - (3)].asExpr) = HB_EXPR_USE( (yyvsp[(2) - (3)].asExpr), HB_EA_REDUCE ); switch( (yyvsp[(2) - (3)].asExpr)->ExprType ) { case HB_ET_VARIABLE: case HB_ET_ALIASVAR: case HB_ET_SEND: case HB_ET_WITHSEND: { BOOL bSetGet; if( (yyvsp[(2) - (3)].asExpr)->ExprType == HB_ET_VARIABLE ) { char *szName = (yyvsp[(2) - (3)].asExpr)->value.asSymbol.szName; bSetGet = ( hb_compLocalGetPos( szName ) || hb_compStaticGetPos( szName, hb_comp_functions.pLast ) || hb_compVariableGetPos( hb_comp_pGlobals, szName ) || ( hb_comp_bStartProc == FALSE && hb_compStaticGetPos( szName, hb_comp_functions.pFirst ) ) || hb_compMemvarGetPos( szName, hb_comp_functions.pLast ) || hb_compFieldGetPos( szName, hb_comp_functions.pLast ) ); } else { bSetGet = TRUE; } if( bSetGet ) { HB_EXPR_PTR pSetGetBlock, pGetVar = hb_compExprClone( (yyvsp[(2) - (3)].asExpr) ), pIsNil, pIfList, pIIF; pIsNil = hb_compExprSetOperand( hb_compExprNewEQ( hb_compExprNewVar( hb_compExpr_IDs._1 ) ), hb_compExprNewNil() ); pIfList = hb_compExprNewList( pIsNil ); pIfList = hb_compExprAddListExpr( pIfList, pGetVar ); pIfList = hb_compExprAddListExpr( pIfList, hb_compExprAssign( hb_compExprClone( pGetVar ), hb_compExprNewVar( hb_compExpr_IDs._1 ) ) ); pIIF = hb_compExprNewIIF( pIfList ); pSetGetBlock = hb_compExprNewCodeBlock(); pSetGetBlock = hb_compExprCBVarAdd( pSetGetBlock, hb_compExpr_IDs._1, ' ' ); pSetGetBlock = hb_compExprAddListExpr( pSetGetBlock, pIIF ); pGetArgList = hb_compExprNewArgList( pSetGetBlock ); } else { pGetArgList = hb_compExprNewArgList( hb_compExprNewNil() ); } break; } case HB_ET_MACRO: pGetArgList = hb_compExprNewArgList( hb_compExprNewNil() ); break; case HB_ET_ARRAYAT: { HB_EXPR_PTR pArrayVar, pSetGetBlock; bTrancuateBaseArray = TRUE; pGetVarArray = (yyvsp[(2) - (3)].asExpr); pGetFunction = hb_compExprNewFunName( hb_compExpr_IDs.__GETA ); pArrayVar = pGetVarArray->value.asList.pExprList; while( pArrayVar->ExprType == HB_ET_ARRAYAT ) { pArrayVar = pArrayVar->value.asList.pExprList; } if( pArrayVar->ExprType == HB_ET_MACRO ) { if( pArrayVar->value.asMacro.pExprList ) { pBaseArrayName = hb_compExprClone( pArrayVar->value.asMacro.pExprList ); } else { if( pArrayVar->value.asMacro.cMacroOp ) { //printf( "MacroVar: '%s'\n", pArrayVar->value.asMacro.szMacro ); pBaseArrayName = hb_compExprNewVar( pArrayVar->value.asMacro.szMacro ); } else { //printf( "MacroText: '%s'\n", pArray->value.asMacro.szMacro ); pBaseArrayName = hb_compExprNewString( pArrayVar->value.asMacro.szMacro, strlen( pArrayVar->value.asMacro.szMacro ), FALSE ); } } pSetGetBlock = hb_compExprNewNil(); } else { pSetGetBlock = hb_compExprAddListExpr( hb_compExprNewCodeBlock(), hb_compExprClone( pArrayVar ) ); } pGetArgList = hb_compExprNewArgList( pSetGetBlock ); break; } default: hb_compErrorLValue( (yyvsp[(2) - (3)].asExpr) ); } } break; case 625: { /* $6 */ HB_EXPR_PTR pVarName; switch( (yyvsp[(2) - (5)].asExpr)->ExprType ) { case HB_ET_VARIABLE: case HB_ET_ALIASVAR: case HB_ET_SEND: case HB_ET_WITHSEND: pVarName = hb_compExprClone( (yyvsp[(5) - (5)].asExpr) ); break; case HB_ET_MACRO: { if( (yyvsp[(2) - (5)].asExpr)->value.asMacro.cMacroOp == '&' ) { pVarName = hb_compExprNewVar( (yyvsp[(2) - (5)].asExpr)->value.asMacro.szMacro ); } else if( (yyvsp[(2) - (5)].asExpr)->value.asMacro.szMacro ) { pVarName = hb_compExprClone( (yyvsp[(2) - (5)].asExpr)->value.asMacro.pExprList ); } else { /* Clipper allways error, but we can handle simple macros or macros with no declared symbols!!! hb_compYYError( 'E', HB_COMP_ERR_GET_COMPLEX_MACRO, NULL, NULL ); */ pVarName = hb_compExprClone( (yyvsp[(5) - (5)].asExpr) ); } break; } default: { /* HB_ET_ARRAYAT */ if( pGetVarArray ) { if( pBaseArrayName ) { pVarName = pBaseArrayName; pBaseArrayName = NULL; } else { pVarName = hb_compExprClone( (yyvsp[(5) - (5)].asExpr) ); } bTrancuateBaseArray = FALSE; break; } else { pVarName = NULL; hb_compErrorLValue( (yyvsp[(2) - (5)].asExpr) ); return 0; } } } hb_compExprAddListExpr( pGetArgList, pVarName ); /* Var Name */ } break; case 626: { /* $9 */ hb_compExprAddListExpr( pGetArgList, (yyvsp[(8) - (8)].asExpr) ); /* Picture */ } break; case 627: { /* $12 */ hb_compExprAddListExpr( pGetArgList, (yyvsp[(11) - (11)].asExpr) ); /* ValidBlock */ } break; case 628: { /* $15 */ hb_compExprAddListExpr( pGetArgList, (yyvsp[(14) - (14)].asExpr) ); /* WhenBlock */ if( pGetVarArray ) { HB_EXPR_PTR pArrayVar, pIndex, pTmp; // We need to scan the Array backwards and build a list of the Index Expressions. pArrayVar = pGetVarArray->value.asList.pExprList; pIndex = hb_compExprClone( pGetVarArray->value.asList.pIndex ); while( pArrayVar->ExprType == HB_ET_ARRAYAT ) { pTmp = hb_compExprClone( pArrayVar->value.asList.pIndex ); pTmp->pNext = pIndex; pIndex = pTmp; pArrayVar = pArrayVar->value.asList.pExprList; } pIndex = hb_compExprNewList( pIndex ); /* Array with Index Expressions as 6th parameter */ hb_compExprAddListExpr( pGetArgList, hb_compExprNewArray( pIndex ) ); } } break; case 629: { /* $17 */ if( pGetFunction == NULL ) { pGetFunction = hb_compExprNewFunName( hb_compExpr_IDs.__GET ); } if( pBaseArrayName ) { hb_compExprDelete( pBaseArrayName ); } hb_compExprDelete( (yyvsp[(2) - (17)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (17)].asExpr) ); (yyval.asExpr) = hb_compExprNewFunCall( pGetFunction, pGetArgList ); } break; case 630: { (yyval.asExpr) = hb_compExprAddListExpr( pGetArgList, (yyvsp[(1) - (1)].asExpr) ); } break; case 631: { (yyval.asExpr) = hb_compExprAddListExpr( pGetArgList, (yyvsp[(3) - (3)].asExpr) ); } break; case 632: { /* Nothing*/ } break; case 634: { (yyval.asExpr) = hb_compExprNewCodeBlock(); if( hb_comp_BlocksList == NULL ) { hb_comp_BlocksList = (PBLOCKSLIST) hb_xgrab( sizeof( BLOCKSLIST ) ); hb_comp_BlocksList->pBlock = (yyval.asExpr); hb_comp_BlocksList->pOuter = NULL; } else { PBLOCKSLIST pBlocksList = (PBLOCKSLIST) hb_xgrab( sizeof( BLOCKSLIST ) ); pBlocksList->pBlock = (yyval.asExpr); pBlocksList->pOuter = hb_comp_BlocksList; hb_comp_BlocksList = pBlocksList; } } break; case 635: { PBLOCKSLIST pDelete = hb_comp_BlocksList; if( s_bBlockMacro ) { if( pBlockSimple && pBlockSimple->ExprType == HB_ET_MACRO && pBlockSimple->value.asMacro.SubType == HB_ET_MACRO_VAR ) { HB_EXPR_PTR pMacroVar, pBlockString; pMacroVar = hb_compExprNewVar( pBlockSimple->value.asMacro.szMacro ); pBlockString = hb_compExprNewString( "{||", 3, FALSE ); pBlockString = hb_compExprSetOperand( hb_compExprNewPlus( pBlockString ), pMacroVar ); pBlockString = hb_compExprSetOperand( hb_compExprNewPlus( pBlockString ), hb_compExprNewString( "}", 1, FALSE ) ); (yyval.asExpr) = hb_compExprNewMacro( pBlockString, 0, NULL ); hb_compExprDelete( (yyvsp[(3) - (7)].asExpr) ); } else if( s_bBlockDeclared ) { hb_compYYError( 'E', HB_COMP_ERR_BLOCK, NULL, NULL ); (yyval.asExpr) = (yyvsp[(3) - (7)].asExpr); } else { char *szLastBlock = hb_comp_SLX_LastBlock( FALSE ); (yyval.asExpr) = hb_compExprNewMacro( hb_compExprNewString( szLastBlock, strlen( szLastBlock ), FALSE ), 0, NULL ); hb_compExprDelete( (yyvsp[(3) - (7)].asExpr) ); } } else { (yyval.asExpr) = (yyvsp[(3) - (7)].asExpr); } hb_comp_BlocksList = hb_comp_BlocksList->pOuter; hb_xfree( (void *) pDelete ); if( hb_comp_BlocksList == NULL ) { hb_comp_SLX_LastBlock( TRUE ); s_bBlockMacro = FALSE; s_bBlockDeclared = FALSE; } } break; case 636: { PHB_CBVAR pVar = (PHB_CBVAR) (yyvsp[(1) - (1)].asExpr)->value.asList.pIndex; while( pVar->pNext ) { pVar = pVar->pNext; } if( pVar->szName == NULL ) { if( pVar == (PHB_CBVAR) (yyvsp[(1) - (1)].asExpr)->value.asList.pIndex ) { //{|| ...} not realy a nameless argument. } else { hb_compYYError( 'E', HB_COMP_ERR_NAMELESS_PARAM, NULL, NULL ); hb_compExprDelete( (yyvsp[(1) - (1)].asExpr) ); (yyval.asExpr) = NULL; } } } break; case 637: { hb_compCodeBlockStart(); hb_comp_iVarScope = VS_PARAMETER; } break; case 638: { (yyval.asExpr) = hb_compCodeBlockEnd( TRUE ); } break; case 640: { while( hb_comp_LocalParams ) { PLOCALPARAM pDelete = hb_comp_LocalParams; hb_compVariableAdd( hb_comp_LocalParams->szName, hb_comp_LocalParams->cType ); hb_comp_LocalParams = hb_comp_LocalParams->pNext; hb_xfree( (void *) pDelete ); } } break; case 641: { pBlockSimple = (yyvsp[(1) - (1)].asExpr); (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(-2) - (1)].asExpr), (yyvsp[(1) - (1)].asExpr) ); } break; case 642: { pBlockSimple = NULL; (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(-2) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 643: { hb_comp_iVarScope = VS_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (2)].asExpr), (yyvsp[(1) - (2)].string), hb_comp_cVarType ); hb_comp_cVarType = ' '; } break; case 644: { hb_comp_iVarScope = VS_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (0)].asExpr), NULL , hb_comp_cVarType ); hb_comp_cVarType = ' '; } break; case 645: { hb_comp_iVarScope = VS_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].string), hb_comp_cVarType ); hb_comp_cVarType = ' '; } break; case 646: { hb_comp_iVarScope = VS_LOCAL; (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(1) - (2)].asExpr), NULL, hb_comp_cVarType ); hb_comp_cVarType = ' '; } break; case 647: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 648: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 649: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 650: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 651: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 652: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 653: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 654: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 655: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 656: { (yyval.asExpr) = hb_compExprNewList( (yyvsp[(2) - (2)].asExpr) ); } break; case 657: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 658: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 659: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 660: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 661: { (yyval.asExpr) = hb_compExprNewIIF( (yyvsp[(2) - (2)].asExpr) ); } break; case 662: { hb_comp_iVarScope = VS_LOCAL; hb_compLinePush(); } break; case 663: { hb_comp_cVarType = ' '; } break; case 664: { hb_comp_iVarScope = VS_STATIC; hb_compLinePush(); } break; case 665: { hb_comp_cVarType = ' '; } break; case 666: { hb_comp_iVarScope = VS_GLOBAL; hb_compLinePush(); } break; case 667: { hb_comp_cVarType = ' '; } break; case 668: { hb_comp_iVarScope = VS_EXTERNGLOBAL; hb_compLinePush(); } break; case 669: { hb_comp_cVarType = ' '; } break; case 670: { (yyval.iNumber) = 1; } break; case 671: { (yyval.iNumber)++; } break; case 672: { (yyval.iNumber) = 1; } break; case 673: { (yyval.iNumber)++; } break; case 675: { hb_compRTVariableAdd( hb_compExprNewRTVar( NULL, (yyvsp[(1) - (2)].asExpr) ), FALSE ); } break; case 676: { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(4) - (4)].asExpr) ) ); hb_compRTVariableAdd( hb_compExprNewRTVar( NULL, (yyvsp[(1) - (4)].asExpr) ), TRUE ); } break; case 677: { USHORT uCount = (USHORT) hb_compExprListLen( (yyvsp[(2) - (2)].asExpr) ); hb_compExprDelete( hb_compExprGenPush( (yyvsp[(2) - (2)].asExpr) ) ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); hb_compRTVariableAdd( hb_compExprNewRTVar( NULL, (yyvsp[(1) - (2)].asExpr) ), TRUE ); } break; case 678: { USHORT uCount = (USHORT) hb_compExprListLen( (yyvsp[(2) - (3)].asExpr) ); hb_compExprDelete( hb_compExprGenPush( (yyvsp[(2) - (3)].asExpr) ) ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); hb_compRTVariableAdd( hb_compExprNewRTVar( NULL, (yyvsp[(1) - (3)].asExpr) ), TRUE ); } break; case 679: { hb_compVariableAdd( (yyvsp[(1) - (2)].string), hb_comp_cVarType ); } break; case 680: { if( hb_comp_iVarScope == VS_STATIC ) { hb_compStaticDefStart(); /* switch to statics pcode buffer */ hb_compStaticDefEnd(); hb_compGenStaticName( (yyvsp[(1) - (3)].string) ); } else if( hb_comp_iVarScope == VS_GLOBAL || hb_comp_iVarScope == VS_EXTERNGLOBAL ) { /* hb_comp_pGlobals can be NULL after a "Misplaced GLOBAL" * error in hb_compVariableAdd() call above. * hb_compGenGlobalName() does not expect such situation */ if( hb_comp_pGlobals ) { hb_compGlobalsDefStart(); /* switch to globals pcode buffer */ hb_compGlobalsDefEnd(); hb_compGenGlobalName( (yyvsp[(1) - (3)].string) ); } } else if( hb_comp_iVarScope == VS_PUBLIC || hb_comp_iVarScope == VS_PRIVATE ) { hb_compRTVariableAdd( hb_compExprNewRTVar( (yyvsp[(1) - (3)].string), NULL ), FALSE ); } } break; case 681: { (yyval.iNumber) = hb_comp_iVarScope; hb_compVariableAdd( (yyvsp[(1) - (2)].string), hb_comp_cVarType ); } break; case 682: {hb_comp_cVarType = ' ';} break; case 683: { hb_comp_cCastType = hb_comp_cVarType; hb_comp_cVarType = ' '; hb_comp_iVarScope = (yyvsp[(3) - (6)].iNumber); if( hb_comp_iVarScope == VS_STATIC ) { hb_compStaticDefStart(); /* switch to statics pcode buffer */ hb_compExprDelete( hb_compExprGenStatement( hb_compExprAssignStatic( hb_compExprNewVar( (yyvsp[(1) - (6)].string) ), (yyvsp[(6) - (6)].asExpr) ) ) ); hb_compStaticDefEnd(); hb_compGenStaticName( (yyvsp[(1) - (6)].string) ); } else if( hb_comp_iVarScope == VS_GLOBAL ) { hb_compGlobalsDefStart(); /* switch to globals pcode buffer */ hb_compExprDelete( hb_compExprGenStatement( hb_compExprAssignStatic( hb_compExprNewVar( (yyvsp[(1) - (6)].string) ), (yyvsp[(6) - (6)].asExpr) ) ) ); hb_compGlobalsDefEnd(); hb_compGenGlobalName( (yyvsp[(1) - (6)].string) ); } else if( hb_comp_iVarScope == VS_EXTERNGLOBAL ) { hb_compYYError( 'E', HB_COMP_ERR_EXTERNGLOBAL_ASSIGN, (yyvsp[(1) - (6)].string), NULL ); } else if( hb_comp_iVarScope == VS_PUBLIC || hb_comp_iVarScope == VS_PRIVATE ) { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(6) - (6)].asExpr) ) ); hb_compRTVariableAdd( hb_compExprNewRTVar( (yyvsp[(1) - (6)].string), NULL ), TRUE ); } else { hb_compExprDelete( hb_compExprGenStatement( hb_compExprAssign( hb_compExprNewVar( (yyvsp[(1) - (6)].string) ), (yyvsp[(6) - (6)].asExpr) ) ) ); } hb_comp_iVarScope = (yyvsp[(3) - (6)].iNumber); } break; case 684: { hb_compVariableDim( (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].asExpr) ); } break; case 685: { hb_compVariableDim( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].asExpr) ); } break; case 686: { (yyval.asExpr) = (yyvsp[(1) - (2)].asExpr); } break; case 687: { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[(2) - (2)].asExpr) ); } break; case 688: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 689: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (4)].asExpr), (yyvsp[(4) - (4)].asExpr) ); } break; case 690: { hb_comp_iVarScope = VS_FIELD; } break; case 691: { hb_comp_cVarType = ' '; } break; case 692: { (yyval.iNumber)=hb_compFieldsCount(); hb_compVariableAdd( (yyvsp[(1) - (2)].string), hb_comp_cVarType ); } break; case 693: { hb_compVariableAdd( (yyvsp[(3) - (4)].string), hb_comp_cVarType ); } break; case 694: { hb_compFieldSetAlias( (yyvsp[(3) - (3)].string), (yyvsp[(1) - (3)].iNumber) ); } break; case 695: { hb_comp_iVarScope = VS_MEMVAR; } break; case 696: { hb_comp_cVarType = ' '; } break; case 697: { hb_compVariableAdd( (yyvsp[(1) - (2)].string), hb_comp_cVarType ); } break; case 698: { hb_compVariableAdd( (yyvsp[(3) - (4)].string), hb_comp_cVarType ); } break; case 699: { hb_compDeclaredAdd( (yyvsp[(2) - (3)].string) ); hb_comp_szDeclaredFun = (yyvsp[(2) - (3)].string); } break; case 700: { if( hb_comp_pLastDeclared ) { hb_comp_pLastDeclared->cType = hb_comp_cVarType; if ( toupper( hb_comp_cVarType ) == 'S' ) { hb_comp_pLastDeclared->Extended.pClass = hb_compClassFind( hb_comp_szFromClass ); if( ! hb_comp_pLastDeclared->Extended.pClass ) { hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, hb_comp_szFromClass, hb_comp_pLastDeclared->szName ); hb_comp_pLastDeclared->cType = ( isupper( ( BYTE ) hb_comp_cVarType ) ? 'O' : 'o' ); } /* Resetting */ hb_comp_szFromClass = NULL; } } hb_comp_szDeclaredFun = NULL; hb_comp_cVarType = ' '; hb_comp_iVarScope = VS_NONE; } break; case 701: { hb_comp_pLastClass = hb_compClassAdd( (yyvsp[(2) - (2)].string) ); } break; case 702: { hb_comp_iVarScope = VS_NONE; } break; case 703: { hb_comp_pLastClass = hb_compClassAdd( (yyvsp[(2) - (3)].string) ); hb_comp_iVarScope = VS_NONE; } break; case 704: { hb_comp_iVarScope = VS_NONE; hb_compLinePushIfInside(); } break; case 705: { hb_comp_cDataListType = hb_comp_cVarType; } break; case 706: { hb_comp_cDataListType = 0; hb_comp_iVarScope = VS_NONE; hb_compLinePushIfInside(); } break; case 713: { hb_comp_pLastMethod = hb_compMethodAdd( hb_comp_pLastClass, (yyvsp[(1) - (2)].string), FALSE ); } break; case 714: { if( hb_comp_pLastMethod ) { hb_comp_pLastMethod->cType = hb_comp_cVarType; if ( toupper( hb_comp_cVarType ) == 'S' ) { hb_comp_pLastMethod->Extended.pClass = hb_compClassFind( hb_comp_szFromClass ); if( ! hb_comp_pLastMethod->Extended.pClass ) { hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, hb_comp_szFromClass, hb_comp_pLastMethod->szName ); hb_comp_pLastMethod->cType = ( isupper( ( BYTE ) hb_comp_cVarType ) ? 'O' : 'o' ); } hb_comp_szFromClass = NULL; } } hb_comp_pLastMethod = NULL; hb_comp_cVarType = ' '; } break; case 715: { hb_comp_pLastMethod = hb_compMethodAdd( hb_comp_pLastClass, (yyvsp[(1) - (1)].string), FALSE ); } break; case 716: { if( hb_comp_pLastMethod ) { PCOMCLASS pClass; char * szSetData = ( char * ) hb_xgrab( strlen( (yyvsp[(1) - (3)].string) ) + 2 ); /* List Type overrides if exists. */ if( hb_comp_cDataListType ) { hb_comp_cVarType = hb_comp_cDataListType; } hb_comp_pLastMethod->cType = hb_comp_cVarType; if ( toupper( hb_comp_cVarType ) == 'S' ) { pClass = hb_compClassFind( hb_comp_szFromClass ); hb_comp_pLastMethod->Extended.pClass = pClass; if( ! hb_comp_pLastMethod->Extended.pClass ) { hb_compGenWarning( hb_comp_szWarnings, 'W', HB_COMP_WARN_CLASS_NOT_FOUND, hb_comp_szFromClass, hb_comp_pLastMethod->szName ); hb_comp_pLastMethod->cType = ( isupper( ( BYTE ) hb_comp_cVarType ) ? 'O' :'o' ); } } else { pClass = NULL; } hb_snprintf( szSetData, strlen( (yyvsp[(1) - (3)].string) ) + 2, "_%s", (yyvsp[(1) - (3)].string) ); hb_comp_pLastMethod = hb_compMethodAdd( hb_comp_pLastClass, szSetData, TRUE ); hb_comp_pLastMethod->cType = hb_comp_cVarType; hb_comp_pLastMethod->iParamCount = 1; hb_comp_pLastMethod->cParamTypes = ( BYTE * ) hb_xgrab( 1 ); hb_comp_pLastMethod->cParamTypes[0] = hb_comp_cVarType; hb_comp_pLastMethod->pParamClasses = ( PCOMCLASS * ) hb_xgrab( sizeof( COMCLASS ) ); hb_comp_pLastMethod->pParamClasses[0] = pClass; if ( toupper( hb_comp_cVarType ) == 'S' ) { hb_comp_pLastMethod->Extended.pClass = pClass; hb_comp_szFromClass = NULL; } // hb_xfree( szSetData ); } hb_comp_pLastMethod = NULL; hb_comp_cVarType = ' '; } break; case 717: {} break; case 721: { hb_compDeclaredParameterAdd( (yyvsp[(1) - (2)].string), hb_comp_cVarType ); } break; case 722: { hb_compDeclaredParameterAdd( (yyvsp[(2) - (3)].string), hb_comp_cVarType + VT_OFFSET_BYREF ); } break; case 723: { hb_compDeclaredParameterAdd( (yyvsp[(2) - (5)].string), 'F' ); } break; case 724: { hb_compDeclaredParameterAdd( (yyvsp[(3) - (4)].string), hb_comp_cVarType ); } break; case 725: { hb_compDeclaredParameterAdd( (yyvsp[(4) - (5)].string), hb_comp_cVarType + VT_OFFSET_BYREF ); } break; case 726: { hb_compDeclaredParameterAdd( (yyvsp[(4) - (7)].string), 'F' ); } break; case 727: { hb_compDeclaredParameterAdd( (yyvsp[(2) - (3)].string), hb_comp_cVarType + VT_OFFSET_OPTIONAL ); } break; case 728: { hb_compDeclaredParameterAdd( (yyvsp[(3) - (4)].string), hb_comp_cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF ); } break; case 729: { hb_compDeclaredParameterAdd( (yyvsp[(3) - (6)].string), hb_comp_cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF ); } break; case 730: { hb_compDeclaredParameterAdd( (yyvsp[(4) - (5)].string), hb_comp_cVarType + VT_OFFSET_OPTIONAL ); } break; case 731: { hb_compDeclaredParameterAdd( (yyvsp[(5) - (6)].string), hb_comp_cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF ); } break; case 732: { hb_compDeclaredParameterAdd( (yyvsp[(5) - (8)].string), hb_comp_cVarType + VT_OFFSET_OPTIONAL + VT_OFFSET_BYREF ); } break; case 733: { hb_compEnumAdd( (yyvsp[(2) - (2)].string) ); } break; case 735: { hb_compEnumMemberAdd( (yyvsp[(1) - (1)].string) ); } break; case 736: { hb_compEnumMemberAdd( (yyvsp[(3) - (3)].string) ); } break; case 745: { hb_compGenJumpHere( (yyvsp[(1) - (2)].iNumber) ); s_iControlLevel--; } break; case 746: { hb_compGenJumpHere( (yyvsp[(1) - (3)].iNumber) ); s_iControlLevel--; } break; case 747: { hb_compGenJumpHere( (yyvsp[(1) - (3)].iNumber) ); hb_compElseIfFix( (yyvsp[(2) - (3)].pVoid) ); s_iControlLevel--; } break; case 748: { hb_compGenJumpHere( (yyvsp[(1) - (4)].iNumber) ); hb_compElseIfFix( (yyvsp[(2) - (4)].pVoid) ); s_iControlLevel--; } break; case 749: { (yyval.lNumber) = 0; } break; case 750: { (yyval.lNumber) = (yyvsp[(1) - (1)].lNumber); } break; case 751: { ++hb_comp_wIfCounter; hb_compLinePush(); if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine ; } } break; case 752: { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(2) - (4)].asExpr) ) ); (yyval.iNumber) = (int) hb_compGenJumpFalse( 0 ); } break; case 753: { (yyval.iNumber) = (int) hb_compGenJump( 0 ); hb_compGenJumpHere( (yyvsp[(5) - (6)].iNumber) ); } break; case 754: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; } break; case 756: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; hb_compLinePush(); } break; case 757: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; hb_compExprDelete( hb_compExprGenPush( (yyvsp[(3) - (4)].asExpr) ) ); (yyval.iNumber) = (int) hb_compGenJumpFalse( 0 ); } break; case 758: { (yyval.pVoid) = hb_compElseIfGen( NULL, hb_compGenJump( 0 ) ); hb_compGenJumpHere( (yyvsp[(5) - (6)].iNumber) ); } break; case 759: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; hb_compLinePush(); } break; case 760: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; hb_compExprDelete( hb_compExprGenPush( (yyvsp[(4) - (5)].asExpr) ) ); (yyval.iNumber) = (int) hb_compGenJumpFalse( 0 ); } break; case 761: { (yyval.pVoid) = hb_compElseIfGen( (yyvsp[(1) - (7)].pVoid), hb_compGenJump( 0 ) ); hb_compGenJumpHere( (yyvsp[(6) - (7)].iNumber) ); } break; case 762: { --hb_comp_wIfCounter; hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); } break; case 763: { --hb_comp_wIfCounter; hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); } break; case 764: { hb_compElseIfFix( (yyvsp[(2) - (3)].pVoid) ); } break; case 767: { hb_compElseIfFix( (yyvsp[(2) - (4)].pVoid) ); } break; case 768: { --hb_comp_wCaseCounter; hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); s_iControlLevel--; } break; case 769: { --hb_comp_wCaseCounter; hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); s_iControlLevel--; } break; case 770: { ++hb_comp_wCaseCounter; if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine; } hb_compLinePushIfDebugger(); } break; case 772: { } break; case 773: { if( (yyvsp[(2) - (2)].lNumber) > 0 ) { hb_compYYError( 'E', HB_COMP_ERR_MAYHEM_IN_CASE, NULL, NULL ); } } break; case 774: { hb_comp_bDontGenLineNum = FALSE; hb_compLinePush(); } break; case 775: { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(3) - (4)].asExpr) ) ); (yyval.iNumber) = (int) hb_compGenJumpFalse( 0 ); } break; case 776: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; (yyval.pVoid) = hb_compElseIfGen( 0, hb_compGenJump( 0 ) ); hb_compGenJumpHere( (yyvsp[(5) - (6)].iNumber) ); } break; case 777: { hb_comp_bDontGenLineNum = FALSE; hb_compLinePush(); } break; case 778: { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(4) - (5)].asExpr) ) ); (yyval.iNumber) = (int) hb_compGenJumpFalse( 0 ); } break; case 779: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; (yyval.pVoid) = hb_compElseIfGen( (yyvsp[(1) - (7)].pVoid), hb_compGenJump( 0 ) ); hb_compGenJumpHere( (yyvsp[(6) - (7)].iNumber) ); } break; case 780: { hb_compLinePushIfDebugger(); } break; case 781: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; hb_comp_bDontGenLineNum = FALSE; } break; case 783: { hb_compYYError( 'E', HB_COMP_ERR_MAYHEM_IN_CASE, NULL, NULL ); } break; case 785: { hb_compLoopEnd(); //hb_compElseIfFix( $2 ); // No default BREAK in SWITCH. hb_compGenPCode1( HB_P_POP ); } break; case 786: { hb_compLoopEnd(); //hb_compElseIfFix( $2 ); hb_compGenPCode1( HB_P_POP ); } break; case 787: { --hb_comp_wCaseCounter; // NO EXIT statement precedes this END statement (must be the case where NO DEFAULT section exists). if( hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter ] ) { LONG lOffset; /* We must REMOVE the unconditional JUMP instruction at the end of the preceding CASE statement [aiming to SKIP over the expected trailing CASE if no EXIT specified]. */ hb_comp_functions.pLast->lPCodePos -= 4; hb_comp_functions.pLast->iJumps--; hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter ] = 0; /* We must RE-correct the prior CASE Jump, since we removed 4 bytes. $0 points to the previous rule (SwitchCases) which holds the offset to that last Jump. */ switch( hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) - 1 ) ] ) { case HB_P_JUMPFALSENEAR : hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] -= 4; break; case HB_P_JUMPFALSE : lOffset = HB_PCODE_MKUSHORT( &( hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] ) ) - 4; hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] = HB_LOBYTE( lOffset ); hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) + 1 ) ] = HB_HIBYTE( lOffset ); break; case HB_P_JUMPFALSEFAR : lOffset = HB_PCODE_MKUINT24( &( hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] ) ) - 4; hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] = HB_LOBYTE( lOffset ); hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) + 1 ] = HB_HIBYTE( lOffset ); hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) + 2 ] = HB_LOBYTE( HB_HIWORD( lOffset ) ); break; default : hb_compYYError( 'F', HB_COMP_ERR_JUMP_NOT_FOUND, NULL, NULL ); } } hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); s_iControlLevel--; } break; case 790: { hb_comp_bDontGenLineNum = FALSE; hb_compLinePush(); hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter++ ] = 0; hb_compExprDelete( hb_compExprGenPush( (yyvsp[(2) - (2)].asExpr) ) ); hb_compLoopStart( FALSE ); if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine; } } break; case 798: { hb_comp_bDontGenLineNum = FALSE; hb_compLinePush(); } break; case 799: { hb_compGenSwitchCase( ( LONG ) (yyvsp[(3) - (4)].asExpr)->value.asNum.lVal ); hb_compExprDelete( (yyvsp[(3) - (4)].asExpr) ); (yyval.iNumber) = (int) hb_compGenJumpFalse( 0 ); } break; case 800: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; //$$ = hb_compElseIfGen( 0, hb_compGenJump( 0 ) ); // No default BREAK in SWITCH. hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] = hb_compGenJump( 0 ); // Skip over NEXT HB_P_SWITCHCASE hb_compGenJumpHere( (yyvsp[(5) - (6)].iNumber) ); // Will be used as $0 in Default. (yyval.iNumber) = (yyvsp[(5) - (6)].iNumber); } break; case 801: { hb_comp_bDontGenLineNum = FALSE; hb_compLinePush(); } break; case 802: { hb_compGenSwitchCase( ( LONG ) (yyvsp[(4) - (5)].asExpr)->value.asNum.lVal ); hb_compExprDelete( (yyvsp[(4) - (5)].asExpr) ); (yyval.iNumber) = (int) hb_compGenJumpFalse( 0 ); if( hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] ) { hb_compGenJumpHere( hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] ); } } break; case 803: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; //$$ = hb_compElseIfGen( $1, hb_compGenJump( 0 ) ); // No default BREAK in SWITCH. hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] = hb_compGenJump( 0 ); // Skip over NEXT HB_P_SWITCHCASE hb_compGenJumpHere( (yyvsp[(6) - (7)].iNumber) ); // Will be used as $0 in Default. (yyval.iNumber) = (yyvsp[(6) - (7)].iNumber); } break; case 804: { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (1)].valInteger).iNumber ); } break; case 805: { (yyval.asExpr) = hb_compExprNewLong( - (yyvsp[(2) - (2)].valInteger).iNumber ); } break; case 806: { (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (1)].valLong).lNumber ); } break; case 807: { (yyval.asExpr) = hb_compExprNewLong( - (yyvsp[(2) - (2)].valLong).lNumber ); } break; case 808: { (yyvsp[(1) - (3)].asExpr)->value.asNum.lVal += (yyvsp[(3) - (3)].asExpr)->value.asNum.lVal; hb_compExprDelete( (yyvsp[(3) - (3)].asExpr) ); (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 809: { (yyvsp[(1) - (3)].asExpr)->value.asNum.lVal -= (yyvsp[(3) - (3)].asExpr)->value.asNum.lVal; hb_compExprDelete( (yyvsp[(3) - (3)].asExpr) ); (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 810: { (yyvsp[(1) - (3)].asExpr)->value.asNum.lVal |= (yyvsp[(3) - (3)].asExpr)->value.asNum.lVal; hb_compExprDelete( (yyvsp[(3) - (3)].asExpr) ); (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 811: { (yyvsp[(1) - (3)].asExpr)->value.asNum.lVal &= (yyvsp[(3) - (3)].asExpr)->value.asNum.lVal; hb_compExprDelete( (yyvsp[(3) - (3)].asExpr) ); (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); } break; case 812: { (yyval.asExpr) = (yyvsp[(2) - (3)].asExpr); } break; case 813: { if( (yyvsp[(1) - (1)].valChar).length == 1 ) { (yyval.asExpr) = hb_compExprNewLong( (LONG) (yyvsp[(1) - (1)].valChar).string[0] ); } else { hb_compYYError( 'E', HB_COMP_ERR_INVALID_CONSTANT, (yyvsp[(1) - (1)].valChar).string, NULL ); (yyval.asExpr) = hb_compExprNewLong( 0 ); } } break; case 814: { // NO EXIT statement precedes this DEFAULT statement. if( hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] ) { LONG lOffset; /* We must REMOVE the unconditional JUMP instruction at the end of the preceding CASE statement [aiming to SKIP over the expected trailing CASE if no EXIT specified]. */ hb_comp_functions.pLast->lPCodePos -= 4; hb_comp_functions.pLast->iJumps--; hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] = 0; /* We must RE-correct the prior CASE Jump, since we removed 4 bytes. $0 points to the previous rule (SwitchCases) which holds the offset to that last Jump. */ switch( hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) - 1 ) ] ) { case HB_P_JUMPFALSENEAR : hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] -= 4; break; case HB_P_JUMPFALSE : lOffset = HB_PCODE_MKUSHORT( &( hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] ) ) - 4; hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] = HB_LOBYTE( lOffset ); hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) + 1 ) ] = HB_HIBYTE( lOffset ); break; case HB_P_JUMPFALSEFAR : lOffset = HB_PCODE_MKUINT24( &( hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] ) ) - 4; hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) ] = HB_LOBYTE( lOffset ); hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) + 1 ] = HB_HIBYTE( lOffset ); hb_comp_functions.pLast->pCode[ ( ULONG ) ( (yyvsp[(0) - (1)].iNumber) ) + 2 ] = HB_LOBYTE( HB_HIWORD( lOffset ) ); break; default : hb_compYYError( 'F', HB_COMP_ERR_JUMP_NOT_FOUND, NULL, NULL ); } } hb_comp_bDontGenLineNum = FALSE; hb_compLinePush(); } break; case 815: { /* // Correct last JUMP generated by SWITCHCASE to Skip the DEFAULT section. if( hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] ) { hb_compGenJumpHere( hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] ); hb_comp_alLastSwitchPos[ hb_comp_wCaseCounter - 1 ] = 0; } hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; */ } break; case 816: { if( (yyvsp[(2) - (3)].asExpr)->ValType == HB_EV_LOGICAL && (yyvsp[(2) - (3)].asExpr)->value.asLogical ) { hb_compExprDelete( (yyvsp[(2) - (3)].asExpr) ); (yyval.lNumber) = -1; } else { hb_compExprDelete( hb_compExprGenPush( (yyvsp[(2) - (3)].asExpr) ) ); (yyval.lNumber) = hb_compGenJumpFalse( 0 ); } } break; case 817: { hb_compLoopHere(); hb_compGenJump( (yyvsp[(1) - (5)].lNumber) - hb_comp_functions.pLast->lPCodePos ); } break; case 818: { if( (yyvsp[(4) - (7)].lNumber) != -1 ) { hb_compGenJumpHere( (yyvsp[(4) - (7)].lNumber) ); } --hb_comp_wWhileCounter; hb_compLoopEnd(); hb_comp_functions.pLast->bFlags &= ~ FUN_WITH_RETURN; } break; case 819: { (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; hb_compLinePushIfInside(); ++hb_comp_wWhileCounter; hb_compLoopStart( TRUE ); if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine; } } break; case 820: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; s_iControlLevel--; } break; case 821: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; s_iControlLevel--; } break; case 822: { hb_compLinePush(); hb_compDebugStart(); ++hb_comp_wForCounter; /* 5 */ (yyval.asExpr) = hb_compExprGenStatement( hb_compExprAssign( hb_compExprClone( (yyvsp[(2) - (4)].asExpr) ), (yyvsp[(4) - (4)].asExpr) ) ); } break; case 823: { hb_compLoopStart( TRUE ); (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; /* 9 */ (yyvsp[(2) - (8)].asExpr) = hb_compExprGenPush( (yyvsp[(2) - (8)].asExpr) ); /* counter */ (yyvsp[(7) - (8)].asExpr) = hb_compExprGenPush( (yyvsp[(7) - (8)].asExpr) ); /* end */ if( (yyvsp[(8) - (8)].asExpr) ) { (yyvsp[(8) - (8)].asExpr) = hb_compExprGenPush( (yyvsp[(8) - (8)].asExpr) ); /* step */ } } break; case 824: { if( (yyvsp[(8) - (10)].asExpr) ) { hb_compGenPCode1( HB_P_FORTEST ); } else { hb_compGenPCode1( HB_P_LESSEQUAL ); } (yyval.lNumber) = hb_compGenJumpFalse( 0 ); /* 11 */ if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine; } } break; case 825: { short iStep, iLocal; hb_compLoopHere(); if( (yyvsp[(8) - (12)].asExpr) ) { if( (yyvsp[(8) - (12)].asExpr)->ExprType == HB_ET_NUMERIC && (yyvsp[(8) - (12)].asExpr)->value.asNum.NumType == HB_ET_LONG && (yyvsp[(8) - (12)].asExpr)->value.asNum.lVal >= -32768 && (yyvsp[(8) - (12)].asExpr)->value.asNum.lVal <= 32767 ) { iStep = ( short ) (yyvsp[(8) - (12)].asExpr)->value.asNum.lVal; } else { iStep = 0; } } else { iStep = 1; } if( iStep && ( iLocal = (short) hb_compLocalGetPos( (yyvsp[(2) - (12)].asExpr)->value.asSymbol.szName ) ) != 0 && HB_LIM_INT8( iLocal ) ) { if( iStep == 1 ) { hb_compGenPCode2( HB_P_LOCALNEARINC, ( BYTE ) iLocal, ( BOOL ) 0 ); } else if( iStep == -1 ) { hb_compGenPCode2( HB_P_LOCALNEARDEC, ( BYTE ) iLocal, ( BOOL ) 0 ); } else { hb_compGenPCode4( HB_P_LOCALNEARADDINT, ( BYTE ) iLocal, HB_LOBYTE( iStep ), HB_HIBYTE( iStep ), ( BOOL ) 0 ); } } else if( (yyvsp[(8) - (12)].asExpr) ) { (yyvsp[(8) - (12)].asExpr) = hb_compExprGenStatement( hb_compExprSetOperand( hb_compExprNewPlusEq( hb_compExprClone( (yyvsp[(2) - (12)].asExpr) ) ), (yyvsp[(8) - (12)].asExpr) ) ); } else { (yyvsp[(8) - (12)].asExpr) = hb_compExprGenStatement( hb_compExprNewPreInc( hb_compExprClone( (yyvsp[(2) - (12)].asExpr) ) ) ); } hb_compGenJump( (yyvsp[(9) - (12)].lNumber) - hb_comp_functions.pLast->lPCodePos ); hb_compGenJumpHere( (yyvsp[(11) - (12)].lNumber) ); hb_compLoopEnd(); hb_compExprDelete( (yyvsp[(2) - (12)].asExpr) ); hb_compExprDelete( (yyvsp[(5) - (12)].asExpr) ); /* Deletes $5, hb_compExprClone( $2 ), $4 */ hb_compExprDelete( (yyvsp[(7) - (12)].asExpr) ); if( (yyvsp[(8) - (12)].asExpr) ) { hb_compExprDelete( (yyvsp[(8) - (12)].asExpr) ); /* Deletes hb_compExprClone( $2 ), and original $8 */ } hb_comp_functions.pLast->bFlags &= ~ FUN_WITH_RETURN; } break; case 828: { (yyval.asExpr) = NULL; } break; case 829: { (yyval.asExpr) = hb_compExprReduce( (yyvsp[(2) - (2)].asExpr) ); } break; case 830: { hb_compLinePush(); if( hb_comp_wForCounter ) --hb_comp_wForCounter; s_iControlLevel--; } break; case 831: { hb_compLinePush(); if( hb_comp_wForCounter ) --hb_comp_wForCounter; s_iControlLevel--; } break; case 832: { hb_compLinePush(); if( hb_comp_wForCounter ) --hb_comp_wForCounter; s_iControlLevel--; } break; case 833: { hb_compLinePush(); if( hb_comp_wForCounter ) --hb_comp_wForCounter; s_iControlLevel--; } break; case 834: { /* 3 */ hb_compLinePush(); hb_compDebugStart(); ++hb_comp_wForCounter; //$2->ExprType = HB_ET_VARREF; hb_compExprGenPush( $2 ); hb_compExprDelete( hb_compExprGenPush( hb_compExprNewVarRef( (yyvsp[(2) - (2)].string) ) ) ); } break; case 835: { /* 6 */ hb_compExprDelete( hb_compExprGenPush( (yyvsp[(5) - (5)].asExpr) ) ); hb_compGenPCode1( HB_P_FOREACH ); (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; /* 6 */ hb_compGenPCode1( HB_P_ENUMERATE ); hb_compLoopStart( TRUE ); } break; case 836: { /* 8 */ (yyval.lNumber) = hb_compGenJumpFalse( 0 ); /* 8 */ if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine; } } break; case 837: { hb_compLoopHere(); hb_compGenJump( (yyvsp[(6) - (9)].lNumber) - hb_comp_functions.pLast->lPCodePos ); hb_compGenJumpHere( (yyvsp[(8) - (9)].lNumber) ); hb_compLoopEnd(); hb_compGenPCode1( HB_P_ENDENUMERATE ); hb_comp_functions.pLast->bFlags &= ~ FUN_WITH_RETURN; } break; case 838: { hb_compLinePush(); hb_compGenWithObject((yyvsp[(2) - (3)].asExpr)); if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine; } } break; case 839: { hb_compGenEndWithObject(); s_iControlLevel--; } break; case 840: { ++hb_comp_wSeqCounter; (yyval.lNumber) = hb_compSequenceBegin(); if( s_iControlLevel++ == 0 ) { s_iLastControlLine = hb_comp_iLine; } } break; case 841: { /* Set jump address for HB_P_SEQBEGIN opcode - this address * will be used in BREAK code if there is no RECOVER clause */ hb_compGenJumpHere( (yyvsp[(2) - (4)].lNumber) ); (yyval.lNumber) = hb_compSequenceEnd(); } break; case 842: { /* Replace END address with RECOVER address in * HB_P_SEQBEGIN opcode if there is RECOVER clause */ if( (yyvsp[(6) - (6)].lNumber) ) hb_compGenJumpThere( (yyvsp[(2) - (6)].lNumber), (yyvsp[(6) - (6)].lNumber) ); else if( hb_comp_wSeqCounter ) --hb_comp_wSeqCounter; } break; case 843: { /* Fix END address * There is no line number after HB_P_SEQEND in case no * RECOVER clause is used */ hb_compGenJumpThere( (yyvsp[(5) - (8)].lNumber), hb_comp_functions.pLast->lPCodePos ); hb_compSequenceFinish( (ULONG)(yyvsp[(2) - (8)].lNumber), (int)(yyvsp[(4) - (8)].lNumber) ); hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); s_iControlLevel--; } break; case 844: { (yyval.lNumber) = 0; hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; } break; case 847: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; if( hb_comp_wSeqCounter ) --hb_comp_wSeqCounter; hb_compLinePush(); hb_compGenPCode2( HB_P_SEQRECOVER, HB_P_POP, ( BOOL ) 0 ); } break; case 848: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; if( hb_comp_wSeqCounter ) --hb_comp_wSeqCounter; hb_compLinePush(); hb_compGenPCode1( HB_P_SEQRECOVER ); hb_compGenPopVar( (yyvsp[(2) - (2)].string) ); } break; case 849: { /* 2 */ ++hb_comp_wSeqCounter; (yyval.lNumber) = hb_compTryBegin(); if( s_iControlLevel++ == 0 ) s_iLastControlLine = hb_comp_iLine; } break; case 850: { /* 5 */ /* Set jump address for HB_P_TRYBEGIN opcode - this address * will be used in BREAK code if there is no RECOVER clause */ hb_compGenJumpHere( (yyvsp[(2) - (4)].lNumber) ); (yyval.lNumber) = hb_compTryEnd(); (yyvsp[(3) - (4)].lNumber) = hb_compLoopCount(); } break; case 851: { /* 7 */ /* Replace END address with RECOVER address in * HB_P_TRYBEGIN opcode if there is RECOVER clause */ if( (yyvsp[(6) - (6)].lNumber) ) hb_compGenJumpThere( (yyvsp[(2) - (6)].lNumber), (yyvsp[(6) - (6)].lNumber) ); } break; case 852: { /* 9 */ long lLoopCount = hb_compLoopCount(); hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); if( (yyvsp[(8) - (8)].lNumber) ) { if( (yyvsp[(3) - (8)].lNumber) != lLoopCount ) { /* FINALLY statement after CATCH with EXIT/LOOP statments */ hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "EXIT/LOOP", NULL ); } --hb_comp_wFinallyCounter; if( (yyvsp[(6) - (8)].lNumber) == 0 ) hb_compGenJumpThere( (yyvsp[(2) - (8)].lNumber), (yyvsp[(8) - (8)].lNumber) ); /* replace END address with FINALLY address in HB_P_ENDFINALLY opcode */ hb_compGenJumpThere( (yyvsp[(5) - (8)].lNumber), (yyvsp[(8) - (8)].lNumber) ); if( (yyvsp[(6) - (8)].lNumber) ) hb_compGenJumpThere( (yyvsp[(6) - (8)].lNumber) + 1, (yyvsp[(8) - (8)].lNumber) ); else { /* Only if there is no CATCH clause */ --hb_comp_wSeqCounter; /* CATCH is also considered as end of sequence */ } hb_compGenPCode1( HB_P_ENDFINALLY ); } else { //printf( "END to %li\n", hb_comp_functions.pLast->lPCodePos ); hb_compGenJumpThere( (yyvsp[(5) - (8)].lNumber), hb_comp_functions.pLast->lPCodePos ); if( (yyvsp[(6) - (8)].lNumber) == 0 ) { /* Only if there is no CATCH clause */ --hb_comp_wSeqCounter; /* CATCH is also considered as end of sequence */ hb_compYYError( 'E', HB_COMP_ERR_MISSING_HANDLER, NULL, NULL ); } } //hb_compTryFinish( $<lNumber>2, $<iNumber>4 ); hb_comp_functions.pLast->bFlags &= ~ FUN_WITH_RETURN; s_iControlLevel--; } break; case 854: { (yyval.lNumber) = 0; } break; case 856: { hb_comp_functions.pLast->bFlags &= ~ ( FUN_WITH_RETURN | FUN_BREAK_CODE ); (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; ++hb_comp_wFinallyCounter; hb_compGenPCode1( HB_P_FINALLY ); } break; case 857: { (yyval.lNumber) = 0; } break; case 859: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; if ( hb_comp_wSeqCounter ) --hb_comp_wSeqCounter; hb_compGenPCode4( HB_P_TRYRECOVER, 0, 0, 0, TRUE ); hb_compPrepareOptimize(); hb_compGenPopVar( (yyvsp[(2) - (2)].string) ); } break; case 860: { hb_comp_functions.pLast->bFlags &= ~ FUN_BREAK_CODE; (yyval.lNumber) = hb_comp_functions.pLast->lPCodePos; if ( hb_comp_wSeqCounter ) --hb_comp_wSeqCounter; hb_compGenPCode4( HB_P_TRYRECOVER, 0, 0, 0, TRUE ); hb_compPrepareOptimize(); hb_compGenPCode1( HB_P_POP ); } break; case 861: { (yyval.asExpr) = hb_compExprNewFunName( (yyvsp[(1) - (1)].string) ); hb_compAutoOpenAdd( (yyvsp[(1) - (1)].string) ); } break; case 862: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 863: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 864: { (yyval.asExpr) = hb_compExprNewFunCall( (yyvsp[(2) - (2)].asExpr), NULL ); } break; case 865: { (yyval.asExpr) = hb_compExprNewFunCall( (yyvsp[(2) - (4)].asExpr), (yyvsp[(4) - (4)].asExpr) ); } break; case 866: { hb_compAutoOpenAdd( hb_compExpr_IDs.WHILE_ ); (yyval.asExpr) = hb_compExprNewFunCall( hb_compExprNewFunName( hb_compExpr_IDs.WHILE_ ), (yyvsp[(3) - (3)].asExpr) ); } break; case 867: { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewArgList( hb_compExprNewNil() ), hb_compExprNewNil() ); } break; case 868: { (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewArgList( hb_compExprNewNil() ), (yyvsp[(2) - (2)].asExpr) ); } break; case 869: { (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[(1) - (1)].asExpr) ); } break; case 870: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (2)].asExpr), hb_compExprNewNil() ); } break; case 871: { (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); } break; case 872: { if( hb_compFieldGetPos( (yyvsp[(1) - (1)].string), hb_comp_functions.pLast ) || ( hb_comp_bStartProc == FALSE && hb_compFieldGetPos( (yyvsp[(1) - (1)].string), hb_comp_functions.pFirst ) ) ) { (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string) ); } else { (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[(1) - (1)].string) ); } } break; case 873: { (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[(2) - (2)].string) ); } break; case 874: { (yyval.asExpr) = hb_compExprNewFunRef( (yyvsp[(2) - (5)].string) ); } break; case 875: { (yyval.asExpr) = hb_compExprNewNamespaceFunRef( (yyvsp[(2) - (6)].string), (yyvsp[(3) - (6)].string) ); } break; case 876: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 877: { (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); } break; case 878: { PNAMESPACE pNamespace; if( hb_comp_UsedNamespaces.pFirst ) { pNamespace = hb_compNamespaceFind( hb_comp_UsedNamespaces.pFirst, (yyvsp[(2) - (3)].string), NSTYPE_SPACE ); if( pNamespace == NULL && (yyvsp[(2) - (3)].string)[0] == '*' ) { pNamespace = hb_compUsedNamespaceNew( "*", NSTYPE_SPACE ); hb_compUsedNamespaceEnd(); } } else { if( (yyvsp[(2) - (3)].string)[0] == '*' ) { pNamespace = hb_compUsedNamespaceNew( "*", NSTYPE_SPACE ); hb_compUsedNamespaceEnd(); } else { pNamespace = NULL; } } if( pNamespace == NULL || ( ( pNamespace->type & NSTYPE_SPACE ) != NSTYPE_SPACE ) ) { hb_compYYError( 'E', HB_COMP_ERR_UNKNOWN_NAMESPACE, (yyvsp[(2) - (3)].string), NULL ); } else { PNAMESPACE pClone; pClone = (PNAMESPACE) hb_xgrab( sizeof( _NAMESPACE ) ); HB_MEMCPY( (void *) pClone, (void *) pNamespace, sizeof( _NAMESPACE ) ); pClone->pOuter = hb_comp_UsedNamespaces.pCurrent; hb_comp_UsedNamespaces.pCurrent = pClone; } } break; case 879: { PNAMESPACE pClone; pClone = hb_comp_UsedNamespaces.pCurrent; hb_comp_UsedNamespaces.pCurrent = hb_comp_UsedNamespaces.pCurrent->pOuter; hb_xfree( pClone ); } break; case 880: { (yyval.string) = ( (yyvsp[(1) - (1)].string) == hb_compExpr_IDs.GLOBAL_ ? (char *) "*" : (yyvsp[(1) - (1)].string) ); } break; case 881: { if( hb_comp_functions.pLast ) { hb_comp_functions.pLast->bFlags |= FUN_SEALED; } if( ( ( (yyvsp[(1) - (3)].iNumber) & NSTYPE_IMPLEMENTS ) == NSTYPE_IMPLEMENTS ) && hb_comp_Namespaces.pCurrent ) { hb_compYYError( 'E', HB_COMP_ERR_IMPLEMENTS_IN_NAMESPACE, hb_comp_Namespaces.pCurrent->szName, NULL ); } hb_compNamespaceNew( (yyvsp[(2) - (3)].string), (yyvsp[(1) - (3)].iNumber) ); } break; case 882: { if( hb_comp_functions.pLast ) { hb_comp_functions.pLast->bFlags |= FUN_SEALED; } hb_compNamespaceEnd(); } break; case 883: { if( hb_comp_functions.pLast ) { hb_comp_functions.pLast->bFlags |= FUN_SEALED; } if( hb_comp_Namespaces.pCurrent ) { hb_compNamespaceNew( (yyvsp[(2) - (3)].string), NSTYPE_EXTERNAL | NSTYPE_SPACE ); hb_compNamespaceEnd(); } else { hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_NAMESPACE, (yyvsp[(2) - (3)].string), NULL ); } } break; case 884: { if( hb_comp_functions.pLast ) { hb_comp_functions.pLast->bFlags |= FUN_SEALED; } if( hb_comp_Namespaces.pCurrent ) { hb_compNamespaceNew( (yyvsp[(2) - (3)].string), ( NSTYPE_EXTERNAL | NSTYPE_MEMBER ) ); hb_comp_Namespaces.pLast->pOuter = hb_comp_Namespaces.pCurrent; hb_compSymbolAdd( (yyvsp[(2) - (3)].string), NULL, (void *) hb_comp_Namespaces.pCurrent, SYMF_NS_EXPLICITPTR ); } else { hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_NAMESPACE, (yyvsp[(2) - (3)].string), NULL ); } } break; case 885: { (yyval.iNumber) = NSTYPE_SPACE; } break; case 886: { (yyval.iNumber) = NSTYPE_RUNTIME; } break; case 887: { (yyval.iNumber) = NSTYPE_OPTIONAL; } break; case 888: { (yyval.iNumber) = NSTYPE_IMPLEMENTS; } break; case 889: { hb_compUsedNamespaceNew( (yyvsp[(2) - (3)].string), NSTYPE_SPACE ); } break; case 890: { hb_compUsedNamespaceEnd(); } break; case 899: { hb_compUsedNamespaceNew( (yyvsp[(2) - (3)].string), NSTYPE_MEMBER ); } break; case 900: { if( (yyvsp[(2) - (3)].pVoid) ) { ( (PNAMESPACE) (yyvsp[(2) - (3)].pVoid) )->type |= NSTYPE_USED; } } break; case 901: { if( hb_comp_UsedNamespaces.pFirst ) { (yyval.pVoid) = (void *) hb_compNamespaceFind( hb_comp_UsedNamespaces.pFirst, (yyvsp[(1) - (1)].string), NSTYPE_SPACE ); } else { (yyval.pVoid) = NULL; } if( (yyval.pVoid) == NULL ) { hb_compYYError( 'E', HB_COMP_ERR_UNKNOWN_NAMESPACE, (yyvsp[(1) - (1)].string), NULL ); (yyval.pVoid) = NULL; } } break; case 902: { if( (yyvsp[(1) - (3)].pVoid) ) { if( ( (PNAMESPACE) (yyvsp[(1) - (3)].pVoid) )->pNext == NULL ) { hb_compYYError( 'E', HB_COMP_ERR_EMPTY_NAMESPACE, ( (PNAMESPACE) (yyvsp[(1) - (3)].pVoid) )->szName, NULL ); } (yyval.pVoid) = (void *) hb_compNamespaceFindMember( ( (PNAMESPACE) (yyvsp[(1) - (3)].pVoid) )->pNext, (yyvsp[(3) - (3)].string), NSTYPE_SPACE ); if( (yyval.pVoid) == NULL ) { hb_compYYError( 'E', HB_COMP_ERR_NONMEMBER_NAMESPACE, (yyvsp[(3) - (3)].string), ( (PNAMESPACE) (yyvsp[(1) - (3)].pVoid) )->szName ); } } } break; case 903: { hb_comp_bError = FALSE; } break; case 904: { hb_comp_bDontGenLineNum = TRUE; } break; default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* ** ------------------------------------------------------------------------ ** */ #if 0 int hb_compYACCMain( char * szName ) { /* Generate the starting procedure frame */ if( hb_comp_bStartProc ) hb_compFunctionAdd( hb_strupr( hb_strdup( szName ) ), HB_FS_PUBLIC, FUN_PROCEDURE ); else /* Don't pass the name of module if the code for starting procedure * will be not generated. The name cannot be placed as first symbol * because this symbol can be used as function call or memvar's name. */ hb_compFunctionAdd( hb_strupr( hb_strdup( "" ) ), HB_FS_PUBLIC, FUN_PROCEDURE ); yyparse(); /* fix all previous function returns offsets */ hb_compFinalizeFunction(); hb_compExternGen(); /* generates EXTERN symbols names */ if( hb_comp_pInitFunc ) { PCOMSYMBOL pSym; /* Fix the number of static variables */ hb_comp_pInitFunc->pCode[ 3 ] = HB_LOBYTE( hb_comp_iStaticCnt ); hb_comp_pInitFunc->pCode[ 4 ] = HB_HIBYTE( hb_comp_iStaticCnt ); hb_comp_pInitFunc->iStaticsBase = hb_comp_iStaticCnt; pSym = hb_compSymbolAdd( hb_comp_pInitFunc->szName, NULL, NULL, SYMF_FUNCALL ); pSym->cScope |= hb_comp_pInitFunc->cScope; hb_comp_functions.pLast->pNext = hb_comp_pInitFunc; hb_comp_functions.pLast = hb_comp_pInitFunc; hb_compGenPCode1( HB_P_ENDPROC ); ++hb_comp_functions.iCount; } if( hb_comp_szAnnounce ) hb_compAnnounce( hb_comp_szAnnounce ); /* Close processed file (it is opened in hb_compInclude() function ) */ fclose( yyin ); while( hb_comp_files.pLast ) { PFILE pFile = hb_comp_files.pLast; if( pFile->pBuffer ) hb_xfree( (void *) pFile->pBuffer ); hb_xfree( (void *) pFile->szFileName ); hb_comp_files.pLast = pFile->pPrev; hb_xfree( pFile ); } hb_comp_files.pLast = NULL; return 0; } #endif /* ------------------------------------------------------------------------ */ void yyerror( char * s ) { //printf( "Error: %i Line: %i Error at '%s'\n", hb_comp_bError, hb_comp_iLine, yytext ); if( yytext[ 0 ] == '\n' ) { if( yychar == 0 ) { if( s_iControlLevel ) { char LineAsString[32]; hb_snprintf( LineAsString, sizeof( LineAsString ), "at line %i", s_iLastControlLine - 1 ); hb_compYYError( 'E', HB_COMP_ERR_UNCLOSED_STRU, LineAsString, NULL ); } else { hb_compYYError( 'E', HB_COMP_ERR_INCOMPLETE_STMT, NULL, NULL ); } } else { hb_compYYError( 'E', HB_COMP_ERR_INCOMPLETE_STMT, NULL, NULL ); } } else { if( hb_comp_wForCounter == 0 && ( yychar == NEXT || yychar == LOOP ) ) { hb_compYYError( 'E', HB_COMP_ERR_NEXTFOR, NULL, NULL ); } else if( yychar == EXIT && hb_comp_wForCounter == 0 && hb_comp_wSwitchCounter == 0 ) { hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_EXIT, yytext, NULL ); } else if( yychar == ENDDO && hb_comp_wWhileCounter == 0 ) { hb_compYYError( 'E', HB_COMP_ERR_ENDDO, NULL, NULL ); } else if( yychar == ENDCASE && hb_comp_wCaseCounter == 0 ) { hb_compYYError( 'E', HB_COMP_ERR_ENDCASE, NULL, NULL ); } else if( yychar == ENDIF && hb_comp_wIfCounter == 0 ) { hb_compYYError( 'E', HB_COMP_ERR_ENDIF, NULL, NULL ); } if( s_iControlLevel ) { if( yychar == NEXT || yychar == ENDDO || yychar == ENDCASE ) { if( hb_comp_wSeqCounter ) { hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, yytext, NULL ); } else { char LineAsString[32]; hb_snprintf( LineAsString, sizeof( LineAsString ), "at line %i", s_iLastControlLine - 1 ); hb_compYYError( 'E', HB_COMP_ERR_UNCLOSED_STRU, LineAsString, NULL ); } } else { hb_compYYError( 'E', HB_COMP_ERR_YACC, s, yytext ); } /* hb_comp_wForCounter hb_comp_wIfCounter hb_comp_wWhileCounter hb_comp_wCaseCounter hb_comp_wWithObjCounter hb_comp_wSwitchCounter */ hb_comp_pLoops = NULL; //printf( "Token: %s (%i)\n", yytext, yychar ); } else { hb_compYYError( 'E', HB_COMP_ERR_YACC, s, yytext ); } } } #if 0 BOOL hb_compInclude( char * szFileName, HB_PATHNAMES * pSearch ) { PFILE pFile; yyin = hb_fopen( szFileName, "r" ); if( ! yyin ) { if( pSearch ) { PHB_FNAME pFileName = hb_fsFNameSplit( szFileName ); while( pSearch && !yyin ) { char szFName[ HB_PATH_MAX ]; /* filename to parse */ pFileName->szPath = pSearch->szPath; hb_fsFNameMerge( szFName, pFileName ); yyin = hb_fopen( szFName, "r" ); if( ! yyin ) { pSearch = pSearch->pNext; if( ! pSearch ) return FALSE; } } hb_xfree( ( void * ) pFileName ); } else return FALSE; } pFile = ( PFILE ) hb_xgrab( sizeof( _FILE ) ); pFile->handle = yyin; pFile->pBuffer = hb_xgrab( HB_PP_BUFF_SIZE ); pFile->iBuffer = pFile->lenBuffer = 10; pFile->szFileName = szFileName; pFile->iLine = 0; pFile->pPrev = hb_comp_files.pLast; hb_comp_files.pLast = pFile; #ifdef __cplusplus yy_switch_to_buffer( ( YY_BUFFER_STATE ) ( hb_comp_buffer = ( char * ) yy_create_buffer( yyin, 8192 * 2 ) ) ); #else yy_switch_to_buffer( hb_comp_buffer = yy_create_buffer( yyin, 8192 * 2 ) ); #endif hb_comp_files.iFiles++; return TRUE; } int yywrap( void ) /* handles the EOF of the currently processed file */ { if( hb_comp_files.iFiles == 1 ) { hb_xfree( hb_comp_files.pLast->pBuffer ); hb_comp_files.pLast->pBuffer = NULL; return 1; /* we have reached the main EOF */ } return 0; } #endif /* ************************************************************************* */ /* * This function stores the position in pcode buffer where the FOR/WHILE * loop starts. It will be used to fix any LOOP/EXIT statements */ static void hb_compLoopStart( BOOL fCanLoop ) { PTR_LOOPEXIT pLoop = ( PTR_LOOPEXIT ) hb_xgrab( sizeof( LOOPEXIT ) ); if( hb_comp_pLoops ) { PTR_LOOPEXIT pLast = hb_comp_pLoops; while( pLast->pNext ) pLast = pLast->pNext; pLast->pNext = pLoop; } else hb_comp_pLoops = pLoop; pLoop->ulOffset = hb_comp_functions.pLast->lPCodePos; /* store the start position */ pLoop->fCanLoop = fCanLoop; /* can we use LOOP inside */ pLoop->iLine = hb_comp_iLine; pLoop->wSeqCounter = hb_comp_wSeqCounter; /* store current SEQUENCE counter */ pLoop->wWithObjCounter = hb_comp_wWithObjCounter; /* store current WITH OBJECT counter */ pLoop->wFinallyCounter = hb_comp_wFinallyCounter; /* store current FINALLY counter */ pLoop->pExitList = NULL; pLoop->pLoopList = NULL; pLoop->pNext = NULL; } /* * return number of LOOP of EXIT statement in the top most structure */ static long hb_compLoopCount( void ) { PTR_LOOPEXIT pLastLoop, pLastExit, pLoop; long lCount = 0; pLastLoop = pLastExit = NULL; pLoop = hb_comp_pLoops; while( pLoop ) { if( pLoop->fCanLoop ) pLastLoop = pLoop; pLastExit = pLoop; pLoop = pLoop->pNext; } if( pLastLoop ) { while( pLastLoop->pLoopList ) { ++lCount; pLastLoop = pLastLoop->pLoopList; } } if( pLastExit ) { while( pLastExit->pExitList ) { ++lCount; pLastExit = pLastExit->pExitList; } } return lCount; } /* * Stores the position of LOOP statement to fix it later at the end of loop */ static void hb_compLoopLoop( void ) { PTR_LOOPEXIT pLast = NULL, pLoop; pLoop = hb_comp_pLoops; while( pLoop ) { if( pLoop->fCanLoop ) pLast = pLoop; pLoop = pLoop->pNext; } if( ! pLast ) { hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_EXIT, "LOOP", NULL ); } else { if( pLast->wSeqCounter != hb_comp_wSeqCounter ) { /* Attempt to LOOP from BEGIN/END sequence * Current SEQUENCE counter is different then at the beginning of loop * Notice that LOOP is allowed in RECOVER code. */ hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "LOOP", NULL ); } else if( pLast->wFinallyCounter != hb_comp_wFinallyCounter ) { /* Attempt to LOOP from FINALLY block of TRY/END sequence */ hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "LOOP", NULL ); } else { USHORT wWithObjCounter = pLast->wWithObjCounter; pLoop = ( PTR_LOOPEXIT ) hb_xgrab( sizeof( LOOPEXIT ) ); pLoop->pLoopList = NULL; while( pLast->pLoopList ) { pLast = pLast->pLoopList; } pLast->pLoopList = pLoop; while( wWithObjCounter < hb_comp_wWithObjCounter ) { hb_compGenPCode1( HB_P_ENDWITHOBJECT ); wWithObjCounter++; } pLoop->ulOffset = hb_comp_functions.pLast->lPCodePos; /* store the position to fix */ hb_compGenJump( 0 ); } } } /* * Stores the position of EXIT statement to fix it later at the end of loop */ static void hb_compLoopExit( void ) { if( ! hb_comp_pLoops ) { hb_compYYError( 'E', HB_COMP_ERR_UNMATCHED_EXIT, "EXIT", NULL ); } else { PTR_LOOPEXIT pLast, pLoop; pLast = hb_comp_pLoops; while( pLast->pNext ) pLast = pLast->pNext; if( pLast->wSeqCounter != hb_comp_wSeqCounter ) { /* Attempt to EXIT from BEGIN/END sequence * Current SEQUENCE counter is different then at the beginning of loop * Notice that LOOP is allowed in RECOVER code. */ hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "EXIT", NULL ); } else if( pLast->wFinallyCounter != hb_comp_wFinallyCounter ) { /* Attempt to EXIT from FINALLY block of TRY/END sequence */ hb_compYYError( 'E', HB_COMP_ERR_EXIT_IN_SEQUENCE, "EXIT", NULL ); } else { USHORT wWithObjCounter = pLast->wWithObjCounter; pLoop = ( PTR_LOOPEXIT ) hb_xgrab( sizeof( LOOPEXIT ) ); pLoop->pExitList = NULL; while( pLast->pExitList ) pLast = pLast->pExitList; pLast->pExitList = pLoop; while( wWithObjCounter < hb_comp_wWithObjCounter ) { hb_compGenPCode1( HB_P_ENDWITHOBJECT ); wWithObjCounter++; } pLoop->ulOffset = hb_comp_functions.pLast->lPCodePos; /* store the position to fix */ hb_compGenJump( 0 ); } } } /* * Fixes the LOOP statement */ static void hb_compLoopHere( void ) { PTR_LOOPEXIT pLoop = hb_comp_pLoops, pFree, pLast; if( pLoop ) { while( pLoop->pNext ) { pLoop = pLoop->pNext; } pLast = pLoop; pLoop = pLoop->pLoopList; while( pLoop ) { hb_compGenJumpHere( pLoop->ulOffset + 1 ); pFree = pLoop; pLoop = pLoop->pLoopList; hb_xfree( ( void * ) pFree ); } pLast->pLoopList = NULL; } } /* * Fixes the EXIT statements and releases memory allocated for current loop */ static void hb_compLoopEnd( void ) { PTR_LOOPEXIT pExit, pLoop = hb_comp_pLoops, pLast = hb_comp_pLoops, pFree; if( pLoop ) { while( pLoop->pNext ) { pLast = pLoop; pLoop = pLoop->pNext; } pExit = pLoop->pExitList; while( pExit ) { hb_compGenJumpHere( pExit->ulOffset + 1 ); pFree = pExit; pExit = pExit->pExitList; hb_xfree( ( void * ) pFree ); } pLast->pNext = NULL; if( pLoop == hb_comp_pLoops ) hb_comp_pLoops = NULL; hb_xfree( ( void * ) pLoop ); } } void hb_compReleaseLoops( void ) { PTR_LOOPEXIT pLoop, pFree; while( hb_comp_pLoops ) { pLoop = hb_comp_pLoops; while( pLoop->pExitList ) { pFree = pLoop->pExitList; pLoop->pExitList = pFree->pExitList; hb_xfree( ( void * ) pFree ); } while( pLoop->pLoopList ) { pFree = pLoop->pLoopList; pLoop->pLoopList = pFree->pLoopList; hb_xfree( ( void * ) pFree ); } hb_comp_pLoops = pLoop->pNext; hb_xfree( ( void * ) pLoop ); } } static void * hb_compElseIfGen( void * pFirst, HB_SIZE ulOffset ) { PELSEIF pElseIf = ( PELSEIF ) hb_xgrab( sizeof( _ELSEIF ) ), pLast; pElseIf->ulOffset = ulOffset; pElseIf->pNext = NULL; pElseIf->pPrevGroup = NULL; if( pFirst ) { pLast = ( PELSEIF ) pFirst; while( pLast->pNext ) { pLast = pLast->pNext; } pLast->pNext = pElseIf; } else { if( hb_comp_pElseIfs ) { pElseIf->pPrevGroup = hb_comp_pElseIfs; } hb_comp_pElseIfs = pElseIf; pFirst = pElseIf; } return pFirst; } static void hb_compElseIfFix( void * pFixElseIfs ) { PELSEIF pFix = ( PELSEIF ) pFixElseIfs; while( pFix ) { hb_compGenJumpHere( pFix->ulOffset ); pFix = pFix->pNext; } } void hb_compReleaseElseIfs( void ) { PELSEIF pElseIf; PELSEIF pDel; while( hb_comp_pElseIfs ) { pElseIf = hb_comp_pElseIfs; hb_comp_pElseIfs = pElseIf->pPrevGroup; while( pElseIf ) { pDel = pElseIf; pElseIf = pElseIf->pNext; hb_xfree( pDel ); } } } static void hb_compRTVariableAdd( HB_EXPR_PTR pVar, BOOL bPopInitValue ) { HB_RTVAR_PTR pRTvar = ( HB_RTVAR_PTR ) hb_xgrab( sizeof( HB_RTVAR ) ); pRTvar->pVar = pVar; pRTvar->bPopValue = bPopInitValue; pRTvar->pNext = NULL; pRTvar->pPrev = NULL; if( hb_comp_rtvars ) { HB_RTVAR_PTR pLast = hb_comp_rtvars; while( pLast->pNext ) { pLast = pLast->pNext; } pLast->pNext = pRTvar; pRTvar->pPrev = pLast; } else { hb_comp_rtvars = pRTvar; } } static void hb_compRTVariableGen( char * szCreateFun ) { USHORT usCount = 0; HB_RTVAR_PTR pVar = hb_comp_rtvars; HB_RTVAR_PTR pDel; /* generate the function call frame */ hb_compGenPushFunCall( szCreateFun, NULL ); hb_compGenPushNil(); /* push variable names to create */ while( pVar->pNext ) { hb_compExprGenPush( pVar->pVar ); pVar = pVar->pNext; ++usCount; } hb_compExprGenPush( pVar->pVar ); ++usCount; /* call function that will create either PUBLIC or PRIVATE variables */ if( usCount > 255 ) { hb_compGenPCode3( HB_P_DO, HB_LOBYTE( usCount ), HB_HIBYTE( usCount ), ( BOOL ) 1 ); } else { hb_compGenPCode2( HB_P_DOSHORT, ( BYTE ) usCount, ( BOOL ) 1 ); } /* pop initial values */ while( pVar ) { if( pVar->bPopValue ) { hb_compExprDelete( hb_compExprGenPop( pVar->pVar ) ); } else { hb_compExprDelete( pVar->pVar ); } pDel = pVar; pVar = pVar->pPrev; hb_xfree( pDel ); } hb_comp_rtvars = NULL; } static void hb_compVariableDim( char * szName, HB_EXPR_PTR pInitValue ) { if( hb_comp_iVarScope == VS_PUBLIC || hb_comp_iVarScope == VS_PRIVATE ) { USHORT uCount = (USHORT) hb_compExprListLen( pInitValue ); hb_compVariableAdd( szName, 'A' ); hb_compExprDelete( hb_compExprGenPush( pInitValue ) ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); hb_compRTVariableAdd( hb_compExprNewRTVar( szName, NULL ), TRUE ); } else if( hb_comp_iVarScope == VS_STATIC ) { USHORT uCount = (USHORT) hb_compExprListLen( pInitValue ); HB_EXPR_PTR pVar = hb_compExprNewVar( szName ); HB_EXPR_PTR pAssign; /* create a static variable */ hb_compVariableAdd( szName, 'A' ); hb_compStaticDefStart(); /* switch to statics pcode buffer */ /* create an array */ hb_compExprGenPush( pInitValue ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); /* check if valid initializers were used but don't generate any code */ pAssign = hb_compExprAssignStatic( pVar, pInitValue ); /* now pop an array */ hb_compExprGenPop( pVar ); /* delete all used expressions */ hb_compExprDelete( pAssign ); hb_compStaticDefEnd(); hb_compGenStaticName( szName ); } else if( hb_comp_iVarScope == VS_GLOBAL ) { USHORT uCount = (USHORT) hb_compExprListLen( pInitValue ); HB_EXPR_PTR pVar = hb_compExprNewVar( szName ); HB_EXPR_PTR pAssign; /* create a global variable */ hb_compVariableAdd( szName, 'A' ); hb_compGlobalsDefStart(); /* switch to globals pcode buffer */ /* create an array */ hb_compExprGenPush( pInitValue ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); /* check if valid initializers were used but don't generate any code */ pAssign = hb_compExprAssignStatic( pVar, pInitValue ); /* now pop an array */ hb_compExprGenPop( pVar ); /* delete all used expressions */ hb_compExprDelete( pAssign ); hb_compGlobalsDefEnd(); hb_compGenGlobalName( szName ); } else if( hb_comp_iVarScope == VS_EXTERNGLOBAL ) { hb_compYYError( 'E', HB_COMP_ERR_EXTERNGLOBAL_ASSIGN, szName, NULL ); } else { USHORT uCount = (USHORT) hb_compExprListLen( pInitValue ); hb_compVariableAdd( szName, 'A' ); hb_compExprDelete( hb_compExprGenPush( pInitValue ) ); hb_compGenPCode3( HB_P_ARRAYDIM, HB_LOBYTE( uCount ), HB_HIBYTE( uCount ), ( BOOL ) 1 ); hb_compExprDelete( hb_compExprGenPop( hb_compExprNewVar( szName ) ) ); } } void hb_compReleaseRTVars( void ) { HB_RTVAR_PTR pVar; while( hb_comp_rtvars ) { pVar = hb_comp_rtvars; hb_compExprDelete( pVar->pVar ); hb_comp_rtvars = pVar->pPrev; hb_xfree( pVar ); } } static void hb_compYYError( char cPrefix, int iError, const char * szError1, const char * szError2 ) { hb_compGenError( hb_comp_szErrors, cPrefix, iError, szError1, szError2 ); while( hb_comp_BlocksList ) { PBLOCKSLIST pDelete = hb_comp_BlocksList; hb_comp_BlocksList = hb_comp_BlocksList->pOuter; hb_xfree( (void *) pDelete ); } while( hb_comp_LocalParams ) { PLOCALPARAM pDelete = hb_comp_LocalParams; hb_comp_LocalParams = hb_comp_LocalParams->pNext; hb_xfree( (void *) pDelete ); } hb_compReleaseLoops(); }
xharbour/core
source/compiler/harbouryy.c
C
gpl-2.0
483,454
/* * Copyright (C) 2011-2013 Team XBMC * http://xbmc.org * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This Program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XBMC; see the file COPYING. If not, see * <http://www.gnu.org/licenses/>. * */ #include "system.h" #if defined (HAS_OMXPLAYER) #include <sstream> #include <iomanip> #include "OMXPlayerAudio.h" #include "OMXPlayerVideo.h" #include "OMXPlayer.h" #include "Application.h" #include "ApplicationMessenger.h" #include "GUIInfoManager.h" #include "cores/VideoRenderers/RenderManager.h" #include "cores/VideoRenderers/RenderFlags.h" #include "FileItem.h" #include "filesystem/File.h" #include "filesystem/SpecialProtocol.h" #include "guilib/GUIWindowManager.h" #include "settings/AdvancedSettings.h" #include "settings/MediaSettings.h" #include "settings/Settings.h" #include "threads/SingleLock.h" #include "windowing/WindowingFactory.h" #include "utils/log.h" #include "utils/TimeUtils.h" #include "utils/URIUtils.h" #include "utils/Variant.h" #include "utils/StreamDetails.h" #include "xbmc/playlists/PlayListM3U.h" #include "utils/LangCodeExpander.h" #include "guilib/LocalizeStrings.h" #include "guilib/Key.h" #include "storage/MediaManager.h" #include "GUIUserMessages.h" #include "utils/StreamUtils.h" #include "DVDInputStreams/DVDFactoryInputStream.h" #include "DVDInputStreams/DVDInputStreamNavigator.h" #include "DVDInputStreams/DVDInputStreamTV.h" #include "DVDInputStreams/DVDInputStreamPVRManager.h" #include "DVDDemuxers/DVDDemux.h" #include "DVDDemuxers/DVDDemuxUtils.h" #include "DVDDemuxers/DVDDemuxVobsub.h" #include "DVDDemuxers/DVDFactoryDemuxer.h" #include "DVDDemuxers/DVDDemuxFFmpeg.h" #include "DVDCodecs/DVDCodecs.h" #include "DVDCodecs/DVDFactoryCodec.h" #include "DVDFileInfo.h" #include "utils/LangCodeExpander.h" #include "guilib/Key.h" #include "guilib/LocalizeStrings.h" #include "utils/URIUtils.h" #include "GUIInfoManager.h" #include "guilib/GUIWindowManager.h" #include "guilib/StereoscopicsManager.h" #include "Application.h" #include "ApplicationMessenger.h" #include "filesystem/File.h" #include "pictures/Picture.h" #include "libswscale/swscale.h" #ifdef HAS_VIDEO_PLAYBACK #include "cores/VideoRenderers/RenderManager.h" #endif #ifdef HAS_PERFORMANCE_SAMPLE #include "xbmc/utils/PerformanceSample.h" #else #define MEASURE_FUNCTION #endif #include "settings/AdvancedSettings.h" #include "FileItem.h" #include "GUIUserMessages.h" #include "settings/Settings.h" #include "settings/MediaSettings.h" #include "utils/log.h" #include "utils/TimeUtils.h" #include "utils/StreamDetails.h" #include "pvr/PVRManager.h" #include "pvr/channels/PVRChannel.h" #include "pvr/addons/PVRClients.h" #include "filesystem/PVRFile.h" #include "video/dialogs/GUIDialogFullScreenInfo.h" #include "utils/StreamUtils.h" #include "utils/Variant.h" #include "storage/MediaManager.h" #include "dialogs/GUIDialogBusy.h" #include "dialogs/GUIDialogKaiToast.h" #include "xbmc/playlists/PlayListM3U.h" #include "utils/StringUtils.h" #include "Util.h" #include "LangInfo.h" #include "URL.h" #include "utils/LangCodeExpander.h" // video not playing from clock, but stepped #define TP(speed) ((speed) < 0 || (speed) > 4*DVD_PLAYSPEED_NORMAL) // audio not playing #define TPA(speed) ((speed) != DVD_PLAYSPEED_PAUSE && (speed) != DVD_PLAYSPEED_NORMAL) using namespace std; using namespace PVR; void COMXSelectionStreams::Clear(StreamType type, StreamSource source) { CSingleLock lock(m_section); for(int i=m_Streams.size()-1;i>=0;i--) { if(type && m_Streams[i].type != type) continue; if(source && m_Streams[i].source != source) continue; m_Streams.erase(m_Streams.begin() + i); } } OMXSelectionStream& COMXSelectionStreams::Get(StreamType type, int index) { CSingleLock lock(m_section); int count = -1; for(int i=0;i<(int)m_Streams.size();i++) { if(m_Streams[i].type != type) continue; count++; if(count == index) return m_Streams[i]; } CLog::Log(LOGERROR, "%s - failed to get stream", __FUNCTION__); return m_invalid; } std::vector<OMXSelectionStream> COMXSelectionStreams::Get(StreamType type) { std::vector<OMXSelectionStream> streams; int count = Count(type); for(int index = 0; index < count; ++index){ streams.push_back(Get(type, index)); } return streams; } #define PREDICATE_RETURN(lh, rh) \ do { \ if((lh) != (rh)) \ return (lh) > (rh); \ } while(0) class PredicateSubtitleFilter { private: std::string audiolang; bool original; public: /** \brief The class' operator() decides if the given (subtitle) SelectionStream is relevant wrt. * preferred subtitle language and audio language. If the subtitle is relevant <B>false</B> false is returned. * * A subtitle is relevant if * - it was previously selected, or * - it's an external sub, or * - it's a forced sub and "original stream's language" was selected, or * - it's a forced sub and its language matches the audio's language, or * - it's a default sub, or * - its language matches the preferred subtitle's language (unequal to "original stream's language") */ PredicateSubtitleFilter(std::string& lang) : audiolang(lang), original(StringUtils::EqualsNoCase(CSettings::Get().GetString("locale.subtitlelanguage"), "original")) { }; bool operator()(const OMXSelectionStream& ss) const { if (ss.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream) return false; if(STREAM_SOURCE_MASK(ss.source) == STREAM_SOURCE_DEMUX_SUB || STREAM_SOURCE_MASK(ss.source) == STREAM_SOURCE_TEXT) return false; if ((ss.flags & CDemuxStream::FLAG_FORCED) && (original || g_LangCodeExpander.CompareLangCodes(ss.language, audiolang))) return false; if ((ss.flags & CDemuxStream::FLAG_DEFAULT)) return false; if(!original) { std::string subtitle_language = g_langInfo.GetSubtitleLanguage(); if (g_LangCodeExpander.CompareLangCodes(subtitle_language, ss.language)) return false; } return true; } }; static bool PredicateAudioPriority(const OMXSelectionStream& lh, const OMXSelectionStream& rh) { PREDICATE_RETURN(lh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream , rh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream); // TrueHD never has enough cpu to decode on Pi, so prefer to avoid that PREDICATE_RETURN(lh.codec != "truehd" , rh.codec != "truehd"); if(!StringUtils::EqualsNoCase(CSettings::Get().GetString("locale.audiolanguage"), "original")) { std::string audio_language = g_langInfo.GetAudioLanguage(); PREDICATE_RETURN(g_LangCodeExpander.CompareLangCodes(audio_language, lh.language) , g_LangCodeExpander.CompareLangCodes(audio_language, rh.language)); } PREDICATE_RETURN(lh.flags & CDemuxStream::FLAG_DEFAULT , rh.flags & CDemuxStream::FLAG_DEFAULT); PREDICATE_RETURN(lh.channels , rh.channels); PREDICATE_RETURN(StreamUtils::GetCodecPriority(lh.codec) , StreamUtils::GetCodecPriority(rh.codec)); return false; } /** \brief The class' operator() decides if the given (subtitle) SelectionStream lh is 'better than' the given (subtitle) SelectionStream rh. * If lh is 'better than' rh the return value is true, false otherwise. * * A subtitle lh is 'better than' a subtitle rh (in evaluation order) if * - lh was previously selected, or * - lh is an external sub and rh not, or * - lh is a forced sub and ("original stream's language" was selected or subtitles are off) and rh not, or * - lh is an external sub and its language matches the preferred subtitle's language (unequal to "original stream's language") and rh not, or * - lh is language matches the preferred subtitle's language (unequal to "original stream's language") and rh not, or * - lh is a default sub and rh not */ class PredicateSubtitlePriority { private: std::string audiolang; bool original; bool subson; PredicateSubtitleFilter filter; public: PredicateSubtitlePriority(std::string& lang) : audiolang(lang), original(StringUtils::EqualsNoCase(CSettings::Get().GetString("locale.subtitlelanguage"), "original")), subson(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn), filter(lang) { }; bool relevant(const OMXSelectionStream& ss) const { return !filter(ss); } bool operator()(const OMXSelectionStream& lh, const OMXSelectionStream& rh) const { PREDICATE_RETURN(relevant(lh) , relevant(rh)); PREDICATE_RETURN(lh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream , rh.type_index == CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream); // prefer external subs PREDICATE_RETURN(STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_DEMUX_SUB , STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_DEMUX_SUB); PREDICATE_RETURN(STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_TEXT , STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_TEXT); if(!subson || original) { PREDICATE_RETURN(lh.flags & CDemuxStream::FLAG_FORCED && g_LangCodeExpander.CompareLangCodes(lh.language, audiolang) , rh.flags & CDemuxStream::FLAG_FORCED && g_LangCodeExpander.CompareLangCodes(rh.language, audiolang)); PREDICATE_RETURN(lh.flags & CDemuxStream::FLAG_FORCED , rh.flags & CDemuxStream::FLAG_FORCED); } std::string subtitle_language = g_langInfo.GetSubtitleLanguage(); if(!original) { PREDICATE_RETURN((STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_DEMUX_SUB || STREAM_SOURCE_MASK(lh.source) == STREAM_SOURCE_TEXT) && g_LangCodeExpander.CompareLangCodes(subtitle_language, lh.language) , (STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_DEMUX_SUB || STREAM_SOURCE_MASK(rh.source) == STREAM_SOURCE_TEXT) && g_LangCodeExpander.CompareLangCodes(subtitle_language, rh.language)); } if(!original) { PREDICATE_RETURN(g_LangCodeExpander.CompareLangCodes(subtitle_language, lh.language) , g_LangCodeExpander.CompareLangCodes(subtitle_language, rh.language)); } PREDICATE_RETURN(lh.flags & CDemuxStream::FLAG_DEFAULT , rh.flags & CDemuxStream::FLAG_DEFAULT); return false; } }; static bool PredicateVideoPriority(const OMXSelectionStream& lh, const OMXSelectionStream& rh) { PREDICATE_RETURN(lh.flags & CDemuxStream::FLAG_DEFAULT , rh.flags & CDemuxStream::FLAG_DEFAULT); return false; } bool COMXSelectionStreams::Get(StreamType type, CDemuxStream::EFlags flag, OMXSelectionStream& out) { CSingleLock lock(m_section); for(int i=0;i<(int)m_Streams.size();i++) { if(m_Streams[i].type != type) continue; if((m_Streams[i].flags & flag) != flag) continue; out = m_Streams[i]; return true; } return false; } int COMXSelectionStreams::IndexOf(StreamType type, int source, int id) const { CSingleLock lock(m_section); int count = -1; for(int i=0;i<(int)m_Streams.size();i++) { if(type && m_Streams[i].type != type) continue; count++; if(source && m_Streams[i].source != source) continue; if(id < 0) continue; if(m_Streams[i].id == id) return count; } if(id < 0) return count; else return -1; } int COMXSelectionStreams::IndexOf(StreamType type, COMXPlayer& p) const { if (p.m_pInputStream && p.m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) { int id = -1; if(type == STREAM_AUDIO) id = ((CDVDInputStreamNavigator*)p.m_pInputStream)->GetActiveAudioStream(); else if(type == STREAM_VIDEO) id = p.m_CurrentVideo.id; else if(type == STREAM_SUBTITLE) id = ((CDVDInputStreamNavigator*)p.m_pInputStream)->GetActiveSubtitleStream(); return IndexOf(type, STREAM_SOURCE_NAV, id); } if(type == STREAM_AUDIO) return IndexOf(type, p.m_CurrentAudio.source, p.m_CurrentAudio.id); else if(type == STREAM_VIDEO) return IndexOf(type, p.m_CurrentVideo.source, p.m_CurrentVideo.id); else if(type == STREAM_SUBTITLE) return IndexOf(type, p.m_CurrentSubtitle.source, p.m_CurrentSubtitle.id); else if(type == STREAM_TELETEXT) return IndexOf(type, p.m_CurrentTeletext.source, p.m_CurrentTeletext.id); return -1; } int COMXSelectionStreams::Source(StreamSource source, std::string filename) { CSingleLock lock(m_section); int index = source - 1; for(int i=0;i<(int)m_Streams.size();i++) { OMXSelectionStream &s = m_Streams[i]; if(STREAM_SOURCE_MASK(s.source) != source) continue; // if it already exists, return same if(s.filename == filename) return s.source; if(index < s.source) index = s.source; } // return next index return index + 1; } void COMXSelectionStreams::Update(OMXSelectionStream& s) { CSingleLock lock(m_section); int index = IndexOf(s.type, s.source, s.id); if(index >= 0) { OMXSelectionStream& o = Get(s.type, index); s.type_index = o.type_index; o = s; } else { s.type_index = Count(s.type); m_Streams.push_back(s); } } void COMXSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer) { if(input && input->IsStreamType(DVDSTREAM_TYPE_DVD)) { CDVDInputStreamNavigator* nav = (CDVDInputStreamNavigator*)input; string filename = nav->GetFileName(); int source = Source(STREAM_SOURCE_NAV, filename); int count; count = nav->GetAudioStreamCount(); for(int i=0;i<count;i++) { OMXSelectionStream s; s.source = source; s.type = STREAM_AUDIO; s.id = i; s.flags = CDemuxStream::FLAG_NONE; s.filename = filename; DVDNavStreamInfo info; nav->GetAudioStreamInfo(i, info); s.name = info.name; s.language = g_LangCodeExpander.ConvertToISO6392T(info.language); s.channels = info.channels; Update(s); } count = nav->GetSubTitleStreamCount(); for(int i=0;i<count;i++) { OMXSelectionStream s; s.source = source; s.type = STREAM_SUBTITLE; s.id = i; s.flags = CDemuxStream::FLAG_NONE; s.filename = filename; s.channels = 0; DVDNavStreamInfo info; nav->GetSubtitleStreamInfo(i, info); s.name = info.name; s.language = g_LangCodeExpander.ConvertToISO6392T(info.language); Update(s); } } else if(demuxer) { string filename = demuxer->GetFileName(); int count = demuxer->GetNrOfStreams(); int source; if(input) /* hack to know this is sub decoder */ source = Source(STREAM_SOURCE_DEMUX, filename); else source = Source(STREAM_SOURCE_DEMUX_SUB, filename); for(int i=0;i<count;i++) { CDemuxStream* stream = demuxer->GetStream(i); /* skip streams with no type */ if (stream->type == STREAM_NONE) continue; /* make sure stream is marked with right source */ stream->source = source; OMXSelectionStream s; s.source = source; s.type = stream->type; s.id = stream->iId; s.language = g_LangCodeExpander.ConvertToISO6392T(stream->language); s.flags = stream->flags; s.filename = demuxer->GetFileName(); stream->GetStreamName(s.name); std::string codec; demuxer->GetStreamCodecName(stream->iId, codec); s.codec = codec; s.channels = 0; // Default to 0. Overwrite if STREAM_AUDIO below. if(stream->type == STREAM_AUDIO) { std::string type; ((CDemuxStreamAudio*)stream)->GetStreamType(type); if(type.length() > 0) { if(s.name.length() > 0) s.name += " - "; s.name += type; } s.channels = ((CDemuxStreamAudio*)stream)->iChannels; } Update(s); } } } COMXPlayer::COMXPlayer(IPlayerCallback &callback) : IPlayer(callback), CThread("OMXPlayer"), m_CurrentAudio(STREAM_AUDIO, DVDPLAYER_AUDIO), m_CurrentVideo(STREAM_VIDEO, DVDPLAYER_VIDEO), m_CurrentSubtitle(STREAM_SUBTITLE, DVDPLAYER_SUBTITLE), m_CurrentTeletext(STREAM_TELETEXT, DVDPLAYER_TELETEXT), m_messenger("player"), m_omxPlayerVideo(&m_av_clock, &m_overlayContainer, m_messenger), m_omxPlayerAudio(&m_av_clock, m_messenger), m_dvdPlayerSubtitle(&m_overlayContainer), m_dvdPlayerTeletext(), m_ready(true), m_DemuxerPausePending(false) { m_pDemuxer = NULL; m_pSubtitleDemuxer = NULL; m_pInputStream = NULL; m_dvd.Clear(); m_State.Clear(); m_EdlAutoSkipMarkers.Clear(); m_UpdateApplication = 0; m_bAbortRequest = false; m_errorCount = 0; m_offset_pts = 0.0; m_playSpeed = DVD_PLAYSPEED_NORMAL; m_caching = CACHESTATE_DONE; m_HasVideo = false; m_HasAudio = false; m_stepped = false; m_video_fifo = 0; m_audio_fifo = 0; m_last_check_time = 0.0; m_stamp = 0.0; memset(&m_SpeedState, 0, sizeof(m_SpeedState)); } COMXPlayer::~COMXPlayer() { CloseFile(); } bool COMXPlayer::OpenFile(const CFileItem &file, const CPlayerOptions &options) { try { CLog::Log(LOGNOTICE, "COMXPlayer: Opening: %s", CURL::GetRedacted(file.GetPath()).c_str()); // if playing a file close it first // this has to be changed so we won't have to close it. if(IsRunning()) CloseFile(); m_bAbortRequest = false; SetPlaySpeed(DVD_PLAYSPEED_NORMAL); m_State.Clear(); m_UpdateApplication = 0; m_offset_pts = 0; m_PlayerOptions = options; m_item = file; m_mimetype = file.GetMimeType(); m_filename = file.GetPath(); m_ready.Reset(); #if defined(HAS_VIDEO_PLAYBACK) g_renderManager.PreInit(); #endif Create(); // wait for the ready event CGUIDialogBusy::WaitOnEvent(m_ready, g_advancedSettings.m_videoBusyDialogDelay_ms, false); // Playback might have been stopped due to some error if (m_bStop || m_bAbortRequest) return false; return true; } catch(...) { CLog::Log(LOGERROR, "%s - Exception thrown on open", __FUNCTION__); return false; } } bool COMXPlayer::CloseFile(bool reopen) { CLog::Log(LOGDEBUG, "COMXPlayer::CloseFile"); // set the abort request so that other threads can finish up m_bAbortRequest = true; // tell demuxer to abort if(m_pDemuxer) m_pDemuxer->Abort(); if(m_pSubtitleDemuxer) m_pSubtitleDemuxer->Abort(); if(m_pInputStream) m_pInputStream->Abort(); CLog::Log(LOGDEBUG, "COMXPlayer: waiting for threads to exit"); // wait for the main thread to finish up // since this main thread cleans up all other resources and threads // we are done after the StopThread call StopThread(); m_Edl.Clear(); m_EdlAutoSkipMarkers.Clear(); m_HasVideo = false; m_HasAudio = false; CLog::Log(LOGNOTICE, "COMXPlayer: finished waiting"); #if defined(HAS_VIDEO_PLAYBACK) g_renderManager.UnInit(); #endif return true; } bool COMXPlayer::IsPlaying() const { return !m_bStop; } void COMXPlayer::OnStartup() { m_CurrentVideo.Clear(); m_CurrentAudio.Clear(); m_CurrentSubtitle.Clear(); m_CurrentTeletext.Clear(); m_messenger.Init(); CUtil::ClearTempFonts(); } bool COMXPlayer::OpenInputStream() { if(m_pInputStream) SAFE_DELETE(m_pInputStream); CLog::Log(LOGNOTICE, "Creating InputStream"); // correct the filename if needed std::string filename(m_filename); if (URIUtils::IsProtocol(filename, "dvd") || StringUtils::EqualsNoCase(filename, "iso9660://video_ts/video_ts.ifo")) { m_filename = g_mediaManager.TranslateDevicePath(""); } m_pInputStream = CDVDFactoryInputStream::CreateInputStream(this, m_filename, m_mimetype); if(m_pInputStream == NULL) { CLog::Log(LOGERROR, "COMXPlayer::OpenInputStream - unable to create input stream for [%s]", m_filename.c_str()); return false; } else m_pInputStream->SetFileItem(m_item); if (!m_pInputStream->Open(m_filename.c_str(), m_mimetype)) { CLog::Log(LOGERROR, "COMXPlayer::OpenInputStream - error opening [%s]", m_filename.c_str()); return false; } if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD) || m_pInputStream->IsStreamType(DVDSTREAM_TYPE_BLURAY)) { CLog::Log(LOGINFO, "COMXPlayer::OpenInputStream - DVD/BD not supported - Will try..."); } // find any available external subtitles for non dvd files if (!m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD) && !m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER) && !m_pInputStream->IsStreamType(DVDSTREAM_TYPE_TV) && !m_pInputStream->IsStreamType(DVDSTREAM_TYPE_HTSP)) { // find any available external subtitles std::vector<std::string> filenames; CUtil::ScanForExternalSubtitles( m_filename, filenames ); // find any upnp subtitles std::string key("upnp:subtitle:1"); for(unsigned s = 1; m_item.HasProperty(key); key = StringUtils::Format("upnp:subtitle:%u", ++s)) filenames.push_back(m_item.GetProperty(key).asString()); for(unsigned int i=0;i<filenames.size();i++) { // if vobsub subtitle: if (URIUtils::HasExtension(filenames[i], ".idx")) { std::string strSubFile; if ( CUtil::FindVobSubPair( filenames, filenames[i], strSubFile ) ) AddSubtitleFile(filenames[i], strSubFile); } else { if ( !CUtil::IsVobSub(filenames, filenames[i] ) ) { AddSubtitleFile(filenames[i]); } } } // end loop over all subtitle files CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleCached = true; } SetAVDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_AudioDelay); SetSubTitleDelay(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleDelay); m_clock.Reset(); m_dvd.Clear(); m_errorCount = 0; m_ChannelEntryTimeOut.SetInfinite(); return true; } bool COMXPlayer::OpenDemuxStream() { if(m_pDemuxer) SAFE_DELETE(m_pDemuxer); CLog::Log(LOGNOTICE, "Creating Demuxer"); try { int attempts = 10; while(!m_bStop && attempts-- > 0) { m_pDemuxer = CDVDFactoryDemuxer::CreateDemuxer(m_pInputStream); if(!m_pDemuxer && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER)) { continue; } else if(!m_pDemuxer && m_pInputStream->NextStream() != CDVDInputStream::NEXTSTREAM_NONE) { CLog::Log(LOGDEBUG, "%s - New stream available from input, retry open", __FUNCTION__); continue; } break; } if(!m_pDemuxer) { CLog::Log(LOGERROR, "%s - Error creating demuxer", __FUNCTION__); return false; } } catch(...) { CLog::Log(LOGERROR, "%s - Exception thrown when opening demuxer", __FUNCTION__); return false; } m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_DEMUX); m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_NAV); m_SelectionStreams.Update(m_pInputStream, m_pDemuxer); int64_t len = m_pInputStream->GetLength(); int64_t tim = m_pDemuxer->GetStreamLength(); if(len > 0 && tim > 0) m_pInputStream->SetReadRate(g_advancedSettings.m_readBufferFactor * len * 1000 / tim); return true; } void COMXPlayer::OpenDefaultStreams(bool reset) { // if input stream dictate, we will open later if(m_dvd.iSelectedAudioStream >= 0 || m_dvd.iSelectedSPUStream >= 0) return; OMXSelectionStreams streams; bool valid; // open video stream streams = m_SelectionStreams.Get(STREAM_VIDEO, PredicateVideoPriority); valid = false; for(OMXSelectionStreams::iterator it = streams.begin(); it != streams.end() && !valid; ++it) { if(OpenVideoStream(it->id, it->source, reset)) valid = true; } if(!valid) CloseVideoStream(true); // open audio stream if(m_PlayerOptions.video_only) streams.clear(); else streams = m_SelectionStreams.Get(STREAM_AUDIO, PredicateAudioPriority); valid = false; for(OMXSelectionStreams::iterator it = streams.begin(); it != streams.end() && !valid; ++it) { if(OpenAudioStream(it->id, it->source, reset)) valid = true; } if(!valid) CloseAudioStream(true); // enable or disable subtitles bool visible = CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn; // open subtitle stream OMXSelectionStream as = m_SelectionStreams.Get(STREAM_AUDIO, GetAudioStream()); PredicateSubtitlePriority psp(as.language); streams = m_SelectionStreams.Get(STREAM_SUBTITLE, psp); valid = false; for(OMXSelectionStreams::iterator it = streams.begin(); it != streams.end() && !valid; ++it) { if(OpenSubtitleStream(it->id, it->source)) { valid = true; if(!psp.relevant(*it)) visible = false; else if(it->flags & CDemuxStream::FLAG_FORCED) visible = true; } } if(!valid) CloseSubtitleStream(true); SetSubtitleVisibleInternal(visible); // open teletext stream streams = m_SelectionStreams.Get(STREAM_TELETEXT); valid = false; for(OMXSelectionStreams::iterator it = streams.begin(); it != streams.end() && !valid; ++it) { if(OpenTeletextStream(it->id, it->source)) valid = true; } if(!valid) CloseTeletextStream(true); } bool COMXPlayer::ReadPacket(DemuxPacket*& packet, CDemuxStream*& stream) { // check if we should read from subtitle demuxer if( m_pSubtitleDemuxer && m_dvdPlayerSubtitle.AcceptsData() ) { packet = m_pSubtitleDemuxer->Read(); if(packet) { UpdateCorrection(packet, m_offset_pts); if(packet->iStreamId < 0) return true; stream = m_pSubtitleDemuxer->GetStream(packet->iStreamId); if (!stream) { CLog::Log(LOGERROR, "%s - Error demux packet doesn't belong to a valid stream", __FUNCTION__); return false; } if(stream->source == STREAM_SOURCE_NONE) { m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_DEMUX_SUB); m_SelectionStreams.Update(NULL, m_pSubtitleDemuxer); } return true; } } // read a data frame from stream. if(m_pDemuxer) packet = m_pDemuxer->Read(); if(packet) { // stream changed, update and open defaults if(packet->iStreamId == DMX_SPECIALID_STREAMCHANGE) { m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_DEMUX); m_SelectionStreams.Update(m_pInputStream, m_pDemuxer); OpenDefaultStreams(false); // reevaluate HasVideo/Audio, we may have switched from/to a radio channel if(m_CurrentVideo.id < 0) m_HasVideo = false; if(m_CurrentAudio.id < 0) m_HasAudio = false; return true; } UpdateCorrection(packet, m_offset_pts); if(packet->iStreamId < 0) return true; if(m_pDemuxer) { stream = m_pDemuxer->GetStream(packet->iStreamId); if (!stream) { CLog::Log(LOGERROR, "%s - Error demux packet doesn't belong to a valid stream", __FUNCTION__); return false; } if(stream->source == STREAM_SOURCE_NONE) { m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_DEMUX); m_SelectionStreams.Update(m_pInputStream, m_pDemuxer); } } return true; } return false; } bool COMXPlayer::IsValidStream(COMXCurrentStream& stream) { if(stream.id<0) return true; // we consider non selected as valid int source = STREAM_SOURCE_MASK(stream.source); if(source == STREAM_SOURCE_TEXT) return true; if(source == STREAM_SOURCE_DEMUX_SUB) { CDemuxStream* st = m_pSubtitleDemuxer->GetStream(stream.id); if(st == NULL || st->disabled) return false; if(st->type != stream.type) return false; return true; } if(source == STREAM_SOURCE_DEMUX) { CDemuxStream* st = m_pDemuxer->GetStream(stream.id); if(st == NULL || st->disabled) return false; if(st->type != stream.type) return false; if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) { if(stream.type == STREAM_AUDIO && st->iPhysicalId != m_dvd.iSelectedAudioStream) return false; if(stream.type == STREAM_SUBTITLE && st->iPhysicalId != m_dvd.iSelectedSPUStream) return false; } return true; } return false; } bool COMXPlayer::IsBetterStream(COMXCurrentStream& current, CDemuxStream* stream) { // Do not reopen non-video streams if we're in video-only mode if(m_PlayerOptions.video_only && current.type != STREAM_VIDEO) return false; if(stream->disabled) return false; if (m_pInputStream && ( m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD) || m_pInputStream->IsStreamType(DVDSTREAM_TYPE_BLURAY) ) ) { int source_type; source_type = STREAM_SOURCE_MASK(current.source); if(source_type != STREAM_SOURCE_DEMUX && source_type != STREAM_SOURCE_NONE) return false; source_type = STREAM_SOURCE_MASK(stream->source); if(source_type != STREAM_SOURCE_DEMUX || stream->type != current.type || stream->iId == current.id) return false; if(current.type == STREAM_AUDIO && stream->iPhysicalId == m_dvd.iSelectedAudioStream) return true; if(current.type == STREAM_SUBTITLE && stream->iPhysicalId == m_dvd.iSelectedSPUStream) return true; if(current.type == STREAM_VIDEO && current.id < 0) return true; } else { if(stream->source == current.source && stream->iId == current.id) return false; if(stream->type != current.type) return false; if(current.type == STREAM_SUBTITLE) return false; if(current.id < 0) return true; } return false; } void COMXPlayer::Process() { bool bOmxWaitVideo = false; bool bOmxWaitAudio = false; bool bOmxSentEOFs = false; float m_threshold = 0.2f; if (!OpenInputStream()) { m_bAbortRequest = true; return; } if (CDVDInputStream::IMenus* ptr = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream)) { CLog::Log(LOGNOTICE, "OMXPlayer: playing a file with menu's"); if(dynamic_cast<CDVDInputStreamNavigator*>(m_pInputStream)) m_PlayerOptions.starttime = 0; if(m_PlayerOptions.state.size() > 0) ptr->SetState(m_PlayerOptions.state); else if(CDVDInputStreamNavigator* nav = dynamic_cast<CDVDInputStreamNavigator*>(m_pInputStream)) nav->EnableSubtitleStream(CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn); CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleCached = true; } if(!OpenDemuxStream()) { m_bAbortRequest = true; return; } // allow renderer to switch to fullscreen if requested m_omxPlayerVideo.EnableFullscreen(m_PlayerOptions.fullscreen); if(!m_av_clock.OMXInitialize(&m_clock)) { m_bAbortRequest = true; return; } if(CSettings::Get().GetInt("videoplayer.adjustrefreshrate") != ADJUST_REFRESHRATE_OFF) m_av_clock.HDMIClockSync(); m_av_clock.OMXStateIdle(); m_av_clock.OMXStop(); m_av_clock.OMXPause(); OpenDefaultStreams(); // look for any EDL files m_Edl.Clear(); m_EdlAutoSkipMarkers.Clear(); if (m_CurrentVideo.id >= 0 && m_CurrentVideo.hint.fpsrate > 0 && m_CurrentVideo.hint.fpsscale > 0) { float fFramesPerSecond = (float)m_CurrentVideo.hint.fpsrate / (float)m_CurrentVideo.hint.fpsscale; m_Edl.ReadEditDecisionLists(m_filename, fFramesPerSecond, m_CurrentVideo.hint.height); } /* * Check to see if the demuxer should start at something other than time 0. This will be the case * if there was a start time specified as part of the "Start from where last stopped" (aka * auto-resume) feature or if there is an EDL cut or commercial break that starts at time 0. */ CEdl::Cut cut; int starttime = 0; if(m_PlayerOptions.starttime > 0 || m_PlayerOptions.startpercent > 0) { if (m_PlayerOptions.startpercent > 0 && m_pDemuxer) { int64_t playerStartTime = (int64_t) ( ( (float) m_pDemuxer->GetStreamLength() ) * ( m_PlayerOptions.startpercent/(float)100 ) ); starttime = m_Edl.RestoreCutTime(playerStartTime); } else { starttime = m_Edl.RestoreCutTime((int64_t)m_PlayerOptions.starttime * 1000); // s to ms } CLog::Log(LOGDEBUG, "%s - Start position set to last stopped position: %d", __FUNCTION__, starttime); } else if(m_Edl.InCut(0, &cut) && (cut.action == CEdl::CUT || cut.action == CEdl::COMM_BREAK)) { starttime = cut.end; CLog::Log(LOGDEBUG, "%s - Start position set to end of first cut or commercial break: %d", __FUNCTION__, starttime); if(cut.action == CEdl::COMM_BREAK) { /* * Setup auto skip markers as if the commercial break had been skipped using standard * detection. */ m_EdlAutoSkipMarkers.commbreak_start = cut.start; m_EdlAutoSkipMarkers.commbreak_end = cut.end; m_EdlAutoSkipMarkers.seek_to_start = true; } } if(starttime > 0) { double startpts = DVD_NOPTS_VALUE; if(m_pDemuxer) { if (m_pDemuxer->SeekTime(starttime, false, &startpts)) CLog::Log(LOGDEBUG, "%s - starting demuxer from: %d", __FUNCTION__, starttime); else CLog::Log(LOGDEBUG, "%s - failed to start demuxing from: %d", __FUNCTION__, starttime); } if(m_pSubtitleDemuxer) { if(m_pSubtitleDemuxer->SeekTime(starttime, false, &startpts)) CLog::Log(LOGDEBUG, "%s - starting subtitle demuxer from: %d", __FUNCTION__, starttime); else CLog::Log(LOGDEBUG, "%s - failed to start subtitle demuxing from: %d", __FUNCTION__, starttime); } } // make sure all selected stream have data on startup if (CachePVRStream()) SetCaching(CACHESTATE_PVR); // make sure application know our info UpdateApplication(0); UpdatePlayState(0); if(m_PlayerOptions.identify == false) m_callback.OnPlayBackStarted(); // we are done initializing now, set the readyevent m_ready.Set(); if (!CachePVRStream()) SetCaching(CACHESTATE_FLUSH); EDEINTERLACEMODE current_deinterlace = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode; while (!m_bAbortRequest) { double now = m_clock.GetAbsoluteClock(); if (m_last_check_time == 0.0 || m_last_check_time + DVD_MSEC_TO_TIME(20) <= now) { m_last_check_time = now; m_stamp = m_av_clock.OMXMediaTime(); const bool m_Pause = m_playSpeed == DVD_PLAYSPEED_PAUSE; const bool not_accepts_data = (!m_omxPlayerAudio.AcceptsData() && m_CurrentAudio.id >= 0) || (!m_omxPlayerVideo.AcceptsData() && m_CurrentVideo.id >= 0); /* when the video/audio fifos are low, we pause clock, when high we resume */ double audio_pts = floor(m_omxPlayerAudio.GetCurrentPts()); double video_pts = floor(m_omxPlayerVideo.GetCurrentPts()); float audio_fifo = audio_pts / DVD_TIME_BASE - m_stamp * 1e-6; float video_fifo = video_pts / DVD_TIME_BASE - m_stamp * 1e-6; float threshold = 0.1f; bool audio_fifo_low = false, video_fifo_low = false, audio_fifo_high = false, video_fifo_high = false; // if deinterlace setting has changed, we should close and open video if (current_deinterlace != CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode) { int iStream = m_CurrentVideo.id, source = m_CurrentVideo.source; CloseVideoStream(false); OpenVideoStream(iStream, source); if (m_State.canseek) m_messenger.Put(new CDVDMsgPlayerSeek(GetTime(), true, true, true, true, true)); current_deinterlace = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode; } m_video_fifo = (int)(100.0*(m_omxPlayerVideo.GetDecoderBufferSize()-m_omxPlayerVideo.GetDecoderFreeSpace())/m_omxPlayerVideo.GetDecoderBufferSize()); m_audio_fifo = (int)(100.0*audio_fifo/m_omxPlayerAudio.GetCacheTotal()); #ifdef _DEBUG static unsigned count; if ((count++ & 7) == 0) { char response[80]; if (m_omxPlayerVideo.GetDecoderBufferSize() && m_omxPlayerAudio.GetCacheTotal()) vc_gencmd(response, sizeof response, "render_bar 4 video_fifo %d %d %d %d", m_video_fifo, (int)(100.0*video_fifo/m_omxPlayerAudio.GetCacheTotal()), 0, 100); if (m_omxPlayerAudio.GetCacheTotal()) vc_gencmd(response, sizeof response, "render_bar 5 audio_fifo %d %d %d %d", m_audio_fifo, (int)(100.0*m_omxPlayerAudio.GetDelay()/m_omxPlayerAudio.GetCacheTotal()), 0, 100); vc_gencmd(response, sizeof response, "render_bar 6 video_queue %d %d %d %d", m_omxPlayerVideo.GetLevel(), 0, 0, 100); vc_gencmd(response, sizeof response, "render_bar 7 audio_queue %d %d %d %d", m_omxPlayerAudio.GetLevel(), 0, 0, 100); } #endif if (audio_pts != DVD_NOPTS_VALUE) { audio_fifo_low = m_HasAudio && audio_fifo < threshold; audio_fifo_high = audio_pts != DVD_NOPTS_VALUE && audio_fifo >= m_threshold; } if (video_pts != DVD_NOPTS_VALUE) { video_fifo_low = m_HasVideo && video_fifo < threshold; video_fifo_high = video_pts != DVD_NOPTS_VALUE && video_fifo >= m_threshold; } if (!m_HasAudio && m_HasVideo) audio_fifo_high = true; if (!m_HasVideo && m_HasAudio) video_fifo_high = true; #ifdef _DEBUG CLog::Log(LOGDEBUG, "%s - M:%.6f-%.6f (A:%.6f V:%.6f) PEF:%d%d%d S:%.2f A:%.2f V:%.2f/T:%.2f (A:%d%d V:%d%d) A:%d%% V:%d%% (%.2f,%.2f)", __FUNCTION__, m_stamp*1e-6, m_av_clock.OMXClockAdjustment()*1e-6, audio_pts*1e-6, video_pts*1e-6, m_av_clock.OMXIsPaused(), bOmxSentEOFs, not_accepts_data, m_playSpeed * (1.0f/DVD_PLAYSPEED_NORMAL), audio_pts == DVD_NOPTS_VALUE ? 0.0:audio_fifo, video_pts == DVD_NOPTS_VALUE ? 0.0:video_fifo, m_threshold, audio_fifo_low, audio_fifo_high, video_fifo_low, video_fifo_high, m_omxPlayerAudio.GetLevel(), m_omxPlayerVideo.GetLevel(), m_omxPlayerAudio.GetDelay(), (float)m_omxPlayerAudio.GetCacheTotal()); #endif if (TP(m_playSpeed)) { if (m_CurrentVideo.started) { if (m_stamp == 0.0 && (!m_stepped || m_playSpeed > 0)) { /* trickplay modes progress by stepping */ CLog::Log(LOGDEBUG, "COMXPlayer::Process - Seeking step speed:%.2f last:%.2f v:%.2f", (double)m_playSpeed / DVD_PLAYSPEED_NORMAL, m_SpeedState.lastpts*1e-6, video_pts*1e-6); m_av_clock.OMXStep(); } else { m_av_clock.OMXMediaTime(0.0); m_last_check_time = 0.0; m_stepped = true; } } } else if(!m_Pause && (bOmxSentEOFs || not_accepts_data || (audio_fifo_high && video_fifo_high))) { if (m_av_clock.OMXIsPaused()) { CLog::Log(LOGDEBUG, "Resume %.2f,%.2f (A:%d%d V:%d%d) EOF:%d FULL:%d T:%.2f\n", audio_fifo, video_fifo, audio_fifo_low, audio_fifo_high, video_fifo_low, video_fifo_high, bOmxSentEOFs, not_accepts_data, m_threshold); m_av_clock.OMXStateExecute(); m_av_clock.OMXResume(); } } else if (m_Pause || audio_fifo_low || video_fifo_low) { if (!m_av_clock.OMXIsPaused() && !TPA(m_playSpeed)) { if (!m_Pause) m_threshold = std::min(2.0f*m_threshold, 16.0f); CLog::Log(LOGDEBUG, "Pause %.2f,%.2f (A:%d%d V:%d%d) EOF:%d FULL:%d T:%.2f\n", audio_fifo, video_fifo, audio_fifo_low, audio_fifo_high, video_fifo_low, video_fifo_high, bOmxSentEOFs, not_accepts_data, m_threshold); m_av_clock.OMXPause(); } } } HandleMessages(); if(m_bAbortRequest) break; // should we open a new input stream? if(!m_pInputStream) { if (OpenInputStream() == false) { CLog::Log(LOGERROR, "%s - Closing stream due to OpenInputStream()", __FUNCTION__); m_bAbortRequest = true; break; } } // should we open a new demuxer? if(!m_pDemuxer) { if (m_pInputStream->NextStream() == CDVDInputStream::NEXTSTREAM_NONE) break; if (m_pInputStream->IsEOF()) break; if (OpenDemuxStream() == false) { CLog::Log(LOGERROR, "%s - Closing stream due to OpenDemuxStream()", __FUNCTION__); m_bAbortRequest = true; break; } OpenDefaultStreams(); // never allow first frames after open to be skipped if( m_omxPlayerVideo.IsInited() ) m_omxPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::VIDEO_NOSKIP)); if (CachePVRStream()) SetCaching(CACHESTATE_PVR); UpdateApplication(0); UpdatePlayState(0); } // handle eventual seeks due to playspeed HandlePlaySpeed(); // update player state UpdatePlayState(200); // update application with our state UpdateApplication(1000); // make sure we run subtitle process here m_dvdPlayerSubtitle.Process(m_clock.GetClock() + m_State.time_offset - m_omxPlayerVideo.GetSubtitleDelay(), m_State.time_offset); // OMX emergency exit if(HasAudio() && m_omxPlayerAudio.BadState()) { CLog::Log(LOGERROR, "%s - Closing stream due to m_omxPlayerAudio.BadState()", __FUNCTION__); m_bAbortRequest = true; break; } if (CheckDelayedChannelEntry()) continue; // if the queues are full, no need to read more if ((!m_omxPlayerAudio.AcceptsData() && m_CurrentAudio.id >= 0) || (!m_omxPlayerVideo.AcceptsData() && m_CurrentVideo.id >= 0)) { if(m_pDemuxer && m_DemuxerPausePending) { m_DemuxerPausePending = false; m_pDemuxer->SetSpeed(DVD_PLAYSPEED_PAUSE); } Sleep(10); continue; } // always yield to players if they have data levels > 50 percent if((m_omxPlayerAudio.GetLevel() > 50 || m_CurrentAudio.id < 0) && (m_omxPlayerVideo.GetLevel() > 50 || m_CurrentVideo.id < 0)) Sleep(0); DemuxPacket* pPacket = NULL; CDemuxStream *pStream = NULL; ReadPacket(pPacket, pStream); if (pPacket && !pStream) { /* probably a empty packet, just free it and move on */ CDVDDemuxUtils::FreeDemuxPacket(pPacket); continue; } if (pPacket) { // reset eos state when we get a packet (e.g. for case of seek after eos) bOmxWaitVideo = false; bOmxWaitAudio = false; bOmxSentEOFs = false; } if (!pPacket) { // when paused, demuxer could be be returning empty if (m_playSpeed == DVD_PLAYSPEED_PAUSE) continue; // check for a still frame state if (CDVDInputStream::IMenus* pStream = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream)) { // stills will be skipped if(m_dvd.state == DVDSTATE_STILL) { if (m_dvd.iDVDStillTime > 0) { if ((XbmcThreads::SystemClockMillis() - m_dvd.iDVDStillStartTime) >= m_dvd.iDVDStillTime) { m_dvd.iDVDStillTime = 0; m_dvd.iDVDStillStartTime = 0; m_dvd.state = DVDSTATE_NORMAL; pStream->SkipStill(); continue; } } } } // if there is another stream available, reopen demuxer CDVDInputStream::ENextStream next = m_pInputStream->NextStream(); if(next == CDVDInputStream::NEXTSTREAM_OPEN) { SAFE_DELETE(m_pDemuxer); m_CurrentAudio.stream = NULL; m_CurrentVideo.stream = NULL; m_CurrentSubtitle.stream = NULL; continue; } // input stream asked us to just retry if(next == CDVDInputStream::NEXTSTREAM_RETRY) { Sleep(100); continue; } // make sure we tell all players to finish it's data if (!bOmxSentEOFs) { if(m_CurrentAudio.inited) { m_omxPlayerAudio.SendMessage (new CDVDMsg(CDVDMsg::GENERAL_EOF)); bOmxWaitAudio = true; } if(m_CurrentVideo.inited) { m_omxPlayerVideo.SendMessage (new CDVDMsg(CDVDMsg::GENERAL_EOF)); bOmxWaitVideo = true; } if(m_CurrentSubtitle.inited) m_dvdPlayerSubtitle.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_EOF)); if(m_CurrentTeletext.inited) m_dvdPlayerTeletext.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_EOF)); m_CurrentAudio.inited = false; m_CurrentVideo.inited = false; m_CurrentSubtitle.inited = false; m_CurrentTeletext.inited = false; bOmxSentEOFs = true; } // if we are caching, start playing it again SetCaching(CACHESTATE_DONE); // while players are still playing, keep going to allow seekbacks if(m_omxPlayerVideo.HasData() || m_omxPlayerAudio.HasData()) { Sleep(100); continue; } // wait for omx components to finish if(bOmxWaitVideo && !m_omxPlayerVideo.IsEOS()) { Sleep(100); continue; } if(bOmxWaitAudio && !m_omxPlayerAudio.IsEOS()) { Sleep(100); continue; } if (!m_pInputStream->IsEOF()) CLog::Log(LOGINFO, "%s - eof reading from demuxer", __FUNCTION__); m_CurrentAudio.started = false; m_CurrentVideo.started = false; m_CurrentSubtitle.started = false; m_CurrentTeletext.started = false; break; } // it's a valid data packet, reset error counter m_errorCount = 0; // check so that none of our streams has become invalid if (!IsValidStream(m_CurrentAudio) && m_omxPlayerAudio.IsStalled()) CloseAudioStream(true); if (!IsValidStream(m_CurrentVideo) && m_omxPlayerVideo.IsStalled()) CloseVideoStream(true); if (!IsValidStream(m_CurrentSubtitle) && m_dvdPlayerSubtitle.IsStalled()) CloseSubtitleStream(true); if (!IsValidStream(m_CurrentTeletext)) CloseTeletextStream(true); // see if we can find something better to play if (IsBetterStream(m_CurrentAudio, pStream)) OpenAudioStream (pStream->iId, pStream->source); if (IsBetterStream(m_CurrentVideo, pStream)) OpenVideoStream (pStream->iId, pStream->source); if (IsBetterStream(m_CurrentSubtitle, pStream)) OpenSubtitleStream(pStream->iId, pStream->source); if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source); // process the packet ProcessPacket(pStream, pPacket); // check if in a cut or commercial break that should be automatically skipped CheckAutoSceneSkip(); } } bool COMXPlayer::CheckDelayedChannelEntry(void) { bool bReturn(false); if (m_ChannelEntryTimeOut.IsTimePast()) { CFileItem currentFile(g_application.CurrentFileItem()); CPVRChannel *currentChannel = currentFile.GetPVRChannelInfoTag(); SwitchChannel(*currentChannel); bReturn = true; m_ChannelEntryTimeOut.SetInfinite(); } return bReturn; } void COMXPlayer::ProcessPacket(CDemuxStream* pStream, DemuxPacket* pPacket) { /* process packet if it belongs to selected stream. for dvd's don't allow automatic opening of streams*/ OMXStreamLock lock(this); try { if (pPacket->iStreamId == m_CurrentAudio.id && pStream->source == m_CurrentAudio.source && pStream->type == STREAM_AUDIO) ProcessAudioData(pStream, pPacket); else if (pPacket->iStreamId == m_CurrentVideo.id && pStream->source == m_CurrentVideo.source && pStream->type == STREAM_VIDEO) ProcessVideoData(pStream, pPacket); else if (pPacket->iStreamId == m_CurrentSubtitle.id && pStream->source == m_CurrentSubtitle.source && pStream->type == STREAM_SUBTITLE) ProcessSubData(pStream, pPacket); else if (pPacket->iStreamId == m_CurrentTeletext.id && pStream->source == m_CurrentTeletext.source && pStream->type == STREAM_TELETEXT) ProcessTeletextData(pStream, pPacket); else { pStream->SetDiscard(AVDISCARD_ALL); CDVDDemuxUtils::FreeDemuxPacket(pPacket); // free it since we won't do anything with it } } catch(...) { CLog::Log(LOGERROR, "%s - Exception thrown when processing demux packet", __FUNCTION__); } } void COMXPlayer::ProcessAudioData(CDemuxStream* pStream, DemuxPacket* pPacket) { if (m_CurrentAudio.stream != (void*)pStream || m_CurrentAudio.changes != pStream->changes) { /* check so that dmuxer hints or extra data hasn't changed */ /* if they have, reopen stream */ if (m_CurrentAudio.hint != CDVDStreamInfo(*pStream, true)) OpenAudioStream( pPacket->iStreamId, pStream->source ); m_CurrentAudio.stream = (void*)pStream; m_CurrentAudio.changes = pStream->changes; } // check if we are too slow and need to recache CheckStartCaching(m_CurrentAudio); CheckContinuity(m_CurrentAudio, pPacket); UpdateTimestamps(m_CurrentAudio, pPacket); bool drop = false; if (CheckPlayerInit(m_CurrentAudio, DVDPLAYER_AUDIO)) drop = true; /* * If CheckSceneSkip() returns true then demux point is inside an EDL cut and the packets are dropped. * If not inside a hard cut, but the demux point has reached an EDL mute section then trigger the * AUDIO_SILENCE state. The AUDIO_SILENCE state is reverted as soon as the demux point is outside * of any EDL section while EDL mute is still active. */ CEdl::Cut cut; if (CheckSceneSkip(m_CurrentAudio)) drop = true; else if (m_Edl.InCut(DVD_TIME_TO_MSEC(m_CurrentAudio.dts + m_offset_pts), &cut) && cut.action == CEdl::MUTE // Inside EDL mute && !m_EdlAutoSkipMarkers.mute) // Mute not already triggered { m_omxPlayerAudio.SendMessage(new CDVDMsgBool(CDVDMsg::AUDIO_SILENCE, true)); m_EdlAutoSkipMarkers.mute = true; } else if (!m_Edl.InCut(DVD_TIME_TO_MSEC(m_CurrentAudio.dts + m_offset_pts), &cut) // Outside of any EDL && m_EdlAutoSkipMarkers.mute) // But the mute hasn't been removed yet { m_omxPlayerAudio.SendMessage(new CDVDMsgBool(CDVDMsg::AUDIO_SILENCE, false)); m_EdlAutoSkipMarkers.mute = false; } m_omxPlayerAudio.SendMessage(new CDVDMsgDemuxerPacket(pPacket, drop)); } void COMXPlayer::ProcessVideoData(CDemuxStream* pStream, DemuxPacket* pPacket) { if (m_CurrentVideo.stream != (void*)pStream || m_CurrentVideo.changes != pStream->changes) { /* check so that dmuxer hints or extra data hasn't changed */ /* if they have reopen stream */ if (m_CurrentVideo.hint != CDVDStreamInfo(*pStream, true)) OpenVideoStream(pPacket->iStreamId, pStream->source); m_CurrentVideo.stream = (void*)pStream; m_CurrentVideo.changes = pStream->changes; } // check if we are too slow and need to recache CheckStartCaching(m_CurrentVideo); if( pPacket->iSize != 4) //don't check the EOF_SEQUENCE of stillframes { CheckContinuity(m_CurrentVideo, pPacket); UpdateTimestamps(m_CurrentVideo, pPacket); } bool drop = false; if (CheckPlayerInit(m_CurrentVideo, DVDPLAYER_VIDEO)) drop = true; if (CheckSceneSkip(m_CurrentVideo)) drop = true; m_omxPlayerVideo.SendMessage(new CDVDMsgDemuxerPacket(pPacket, drop)); } void COMXPlayer::ProcessSubData(CDemuxStream* pStream, DemuxPacket* pPacket) { if (m_CurrentSubtitle.stream != (void*)pStream || m_CurrentSubtitle.changes != pStream->changes) { /* check so that dmuxer hints or extra data hasn't changed */ /* if they have reopen stream */ if (m_CurrentSubtitle.hint != CDVDStreamInfo(*pStream, true)) OpenSubtitleStream(pPacket->iStreamId, pStream->source); m_CurrentSubtitle.stream = (void*)pStream; m_CurrentSubtitle.changes = pStream->changes; } UpdateTimestamps(m_CurrentSubtitle, pPacket); bool drop = false; if (CheckPlayerInit(m_CurrentSubtitle, DVDPLAYER_SUBTITLE)) drop = true; if (CheckSceneSkip(m_CurrentSubtitle)) drop = true; m_dvdPlayerSubtitle.SendMessage(new CDVDMsgDemuxerPacket(pPacket, drop)); if(m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) m_dvdPlayerSubtitle.UpdateOverlayInfo((CDVDInputStreamNavigator*)m_pInputStream, LIBDVDNAV_BUTTON_NORMAL); } void COMXPlayer::ProcessTeletextData(CDemuxStream* pStream, DemuxPacket* pPacket) { if (m_CurrentTeletext.stream != (void*)pStream || m_CurrentTeletext.changes != pStream->changes) { /* check so that dmuxer hints or extra data hasn't changed */ /* if they have, reopen stream */ if (m_CurrentTeletext.hint != CDVDStreamInfo(*pStream, true)) OpenTeletextStream( pPacket->iStreamId, pStream->source ); m_CurrentTeletext.stream = (void*)pStream; m_CurrentTeletext.changes = pStream->changes; } UpdateTimestamps(m_CurrentTeletext, pPacket); bool drop = false; if (CheckPlayerInit(m_CurrentTeletext, DVDPLAYER_TELETEXT)) drop = true; if (CheckSceneSkip(m_CurrentTeletext)) drop = true; m_dvdPlayerTeletext.SendMessage(new CDVDMsgDemuxerPacket(pPacket, drop)); } bool COMXPlayer::GetCachingTimes(double& level, double& delay, double& offset) { if(!m_pInputStream || !m_pDemuxer) return false; XFILE::SCacheStatus status; if (!m_pInputStream->GetCacheStatus(&status)) return false; int64_t cached = status.forward; unsigned currate = status.currate; unsigned maxrate = status.maxrate; bool full = status.full; int64_t length = m_pInputStream->GetLength(); int64_t remain = length - m_pInputStream->Seek(0, SEEK_CUR); if(cached < 0 || length <= 0 || remain < 0) return false; double play_sbp = DVD_MSEC_TO_TIME(m_pDemuxer->GetStreamLength()) / length; double queued = 1000.0 * GetQueueTime() / play_sbp; delay = 0.0; level = 0.0; offset = (double)(cached + queued) / length; if (currate == 0) return true; double cache_sbp = 1.1 * (double)DVD_TIME_BASE / currate; /* underestimate by 10 % */ double play_left = play_sbp * (remain + queued); /* time to play out all remaining bytes */ double cache_left = cache_sbp * (remain - cached); /* time to cache the remaining bytes */ double cache_need = std::max(0.0, remain - play_left / cache_sbp); /* bytes needed until play_left == cache_left */ delay = cache_left - play_left; if (full && (currate < maxrate) ) level = -1.0; /* buffer is full & our read rate is too low */ else level = (cached + queued) / (cache_need + queued); return true; } void COMXPlayer::HandlePlaySpeed() { ECacheState caching = m_caching; if(IsInMenu() && caching != CACHESTATE_DONE) caching = CACHESTATE_DONE; if(caching == CACHESTATE_FULL) { double level, delay, offset; if(GetCachingTimes(level, delay, offset)) { if(level < 0.0) { CGUIDialogKaiToast::QueueNotification(g_localizeStrings.Get(21454), g_localizeStrings.Get(21455)); caching = CACHESTATE_INIT; } if(level >= 1.0) caching = CACHESTATE_INIT; } else { if ((!m_omxPlayerAudio.AcceptsData() && m_CurrentAudio.id >= 0) || (!m_omxPlayerVideo.AcceptsData() && m_CurrentVideo.id >= 0)) caching = CACHESTATE_INIT; } } if(caching == CACHESTATE_INIT) { // if all enabled streams have been inited we are done if((m_CurrentVideo.id < 0 || m_CurrentVideo.started) && (m_CurrentAudio.id < 0 || m_CurrentAudio.started)) caching = CACHESTATE_PLAY; // handle situation that we get no data on one stream if(m_CurrentAudio.id >= 0 && m_CurrentVideo.id >= 0) { if ((!m_omxPlayerAudio.AcceptsData() && !m_CurrentVideo.started) || (!m_omxPlayerVideo.AcceptsData() && !m_CurrentAudio.started)) { caching = CACHESTATE_DONE; } } } if (caching == CACHESTATE_PVR) { bool bGotAudio(m_pDemuxer->GetNrOfAudioStreams() > 0); bool bGotVideo(m_pDemuxer->GetNrOfVideoStreams() > 0); bool bAudioLevelOk(m_omxPlayerAudio.GetLevel() > g_advancedSettings.m_iPVRMinAudioCacheLevel); bool bVideoLevelOk(m_omxPlayerVideo.GetLevel() > g_advancedSettings.m_iPVRMinVideoCacheLevel); bool bAudioFull(!m_omxPlayerAudio.AcceptsData()); bool bVideoFull(!m_omxPlayerVideo.AcceptsData()); if (/* if all streams got at least g_advancedSettings.m_iPVRMinCacheLevel in their buffers, we're done */ ((bGotVideo || bGotAudio) && (!bGotAudio || bAudioLevelOk) && (!bGotVideo || bVideoLevelOk)) || /* or if one of the buffers is full */ (bAudioFull || bVideoFull)) { CLog::Log(LOGDEBUG, "set caching from pvr to done. audio (%d) = %d. video (%d) = %d", bGotAudio, m_omxPlayerAudio.GetLevel(), bGotVideo, m_omxPlayerVideo.GetLevel()); caching = CACHESTATE_DONE; } else { /* ensure that automatically started players are stopped while caching */ if (m_CurrentAudio.started) m_omxPlayerAudio.SetSpeed(DVD_PLAYSPEED_PAUSE); if (m_CurrentVideo.started) m_omxPlayerVideo.SetSpeed(DVD_PLAYSPEED_PAUSE); } } if(caching == CACHESTATE_PLAY) { // if all enabled streams have started playing we are done if((m_CurrentVideo.id < 0 || !m_omxPlayerVideo.IsStalled()) && (m_CurrentAudio.id < 0 || !m_omxPlayerAudio.IsStalled())) caching = CACHESTATE_DONE; } if(m_caching != caching) SetCaching(caching); if(GetPlaySpeed() != DVD_PLAYSPEED_NORMAL && GetPlaySpeed() != DVD_PLAYSPEED_PAUSE) { if (IsInMenu()) { // this can't be done in menu SetPlaySpeed(DVD_PLAYSPEED_NORMAL); } else if (m_CurrentVideo.id >= 0 && m_CurrentVideo.inited == true && m_SpeedState.lastpts != m_omxPlayerVideo.GetCurrentPts() && m_SpeedState.lasttime != GetTime() && m_stepped) { m_SpeedState.lastpts = m_omxPlayerVideo.GetCurrentPts(); m_SpeedState.lasttime = GetTime(); // check how much off clock video is when ff/rw:ing // a problem here is that seeking isn't very accurate // and since the clock will be resynced after seek // we might actually not really be playing at the wanted // speed. we'd need to have some way to not resync the clock // after a seek to remember timing. still need to handle // discontinuities somehow // when seeking, give the player a headstart to make sure // the time it takes to seek doesn't make a difference. double error; error = m_clock.GetClock() - m_SpeedState.lastpts; error *= m_playSpeed / abs(m_playSpeed); if(error > DVD_MSEC_TO_TIME(1000)) { CLog::Log(LOGDEBUG, "COMXPlayer::Process - Seeking to catch up"); int64_t iTime = (int64_t)DVD_TIME_TO_MSEC(m_clock.GetClock() + m_State.time_offset + 500000.0 * m_playSpeed / DVD_PLAYSPEED_NORMAL); m_messenger.Put(new CDVDMsgPlayerSeek(iTime, (GetPlaySpeed() < 0), true, false, false, true)); } } } } bool COMXPlayer::CheckStartCaching(COMXCurrentStream& current) { if(m_caching != CACHESTATE_DONE || m_playSpeed != DVD_PLAYSPEED_NORMAL) return false; if(IsInMenu()) return false; if((current.type == STREAM_AUDIO && m_omxPlayerAudio.IsStalled()) || (current.type == STREAM_VIDEO && m_omxPlayerVideo.IsStalled())) { if (CachePVRStream()) { if ((current.type == STREAM_AUDIO && current.started && m_omxPlayerAudio.GetLevel() == 0) || (current.type == STREAM_VIDEO && current.started && m_omxPlayerVideo.GetLevel() == 0)) { CLog::Log(LOGDEBUG, "%s stream stalled. start buffering", current.type == STREAM_AUDIO ? "audio" : "video"); SetCaching(CACHESTATE_PVR); } return true; } // don't start caching if it's only a single stream that has run dry if(m_omxPlayerAudio.GetLevel() > 50 || m_omxPlayerVideo.GetLevel() > 50) return false; if(current.inited) SetCaching(CACHESTATE_FULL); else SetCaching(CACHESTATE_INIT); return true; } return false; } bool COMXPlayer::CheckPlayerInit(COMXCurrentStream& current, unsigned int source) { if(current.inited) return false; if(current.startpts != DVD_NOPTS_VALUE) { if(current.dts == DVD_NOPTS_VALUE) { CLog::Log(LOGDEBUG, "%s - dropping packet type:%d dts:%f to get to start point at %f", __FUNCTION__, source, current.dts, current.startpts); return true; } if((current.startpts - current.dts) > DVD_SEC_TO_TIME(20)) { CLog::Log(LOGDEBUG, "%s - too far to decode before finishing seek", __FUNCTION__); if(m_CurrentAudio.startpts != DVD_NOPTS_VALUE) m_CurrentAudio.startpts = current.dts; if(m_CurrentVideo.startpts != DVD_NOPTS_VALUE) m_CurrentVideo.startpts = current.dts; if(m_CurrentSubtitle.startpts != DVD_NOPTS_VALUE) m_CurrentSubtitle.startpts = current.dts; if(m_CurrentTeletext.startpts != DVD_NOPTS_VALUE) m_CurrentTeletext.startpts = current.dts; } if(current.dts < current.startpts) { CLog::Log(LOGDEBUG, "%s - dropping packet type:%d dts:%f to get to start point at %f", __FUNCTION__, source, current.dts, current.startpts); return true; } } //If this is the first packet after a discontinuity, send it as a resync if (current.dts != DVD_NOPTS_VALUE) { current.inited = true; current.startpts = current.dts; bool setclock = false; if(m_playSpeed == DVD_PLAYSPEED_NORMAL) { if( source == DVDPLAYER_AUDIO) setclock = !m_CurrentVideo.inited; else if(source == DVDPLAYER_VIDEO) setclock = !m_CurrentAudio.inited; } else { if(source == DVDPLAYER_VIDEO) setclock = true; } double starttime = current.startpts; if(m_CurrentAudio.inited && m_CurrentAudio.startpts != DVD_NOPTS_VALUE && m_CurrentAudio.startpts < starttime) starttime = m_CurrentAudio.startpts; if(m_CurrentVideo.inited && m_CurrentVideo.startpts != DVD_NOPTS_VALUE && m_CurrentVideo.startpts < starttime) starttime = m_CurrentVideo.startpts; starttime = current.startpts - starttime; if(starttime > 0 && setclock) { if(starttime > DVD_SEC_TO_TIME(2)) CLog::Log(LOGWARNING, "COMXPlayer::CheckPlayerInit(%d) - Ignoring too large delay of %f", source, starttime); else SendPlayerMessage(new CDVDMsgDouble(CDVDMsg::GENERAL_DELAY, starttime), source); } SendPlayerMessage(new CDVDMsgGeneralResync(current.dts, setclock), source); } return false; } void COMXPlayer::UpdateCorrection(DemuxPacket* pkt, double correction) { //CLog::Log(LOGINFO,"%s: %d dts:%.0f pts:%.0f s:%d c:%.0f (%d,%d)", __func__, (int)pkt->iStreamId, pkt->dts, pkt->pts, pkt->iSize, correction, pkt->dts==DVD_NOPTS_VALUE, pkt->pts==DVD_NOPTS_VALUE); if(pkt->dts != DVD_NOPTS_VALUE) pkt->dts -= correction; if(pkt->pts != DVD_NOPTS_VALUE) pkt->pts -= correction; } void COMXPlayer::UpdateTimestamps(COMXCurrentStream& current, DemuxPacket* pPacket) { double dts = current.dts; /* update stored values */ if(pPacket->dts != DVD_NOPTS_VALUE) dts = pPacket->dts; else if(pPacket->pts != DVD_NOPTS_VALUE) dts = pPacket->pts; /* calculate some average duration */ if(pPacket->duration != DVD_NOPTS_VALUE) current.dur = pPacket->duration; else if(dts != DVD_NOPTS_VALUE && current.dts != DVD_NOPTS_VALUE) current.dur = 0.1 * (current.dur * 9 + (dts - current.dts)); current.dts = dts; /* send a playback state structure periodically */ if(current.dts_state == DVD_NOPTS_VALUE || abs(current.dts - current.dts_state) > DVD_MSEC_TO_TIME(200)) { current.dts_state = current.dts; if (current.inited) { // make sure we send no outdated state to a/v players UpdatePlayState(0); SendPlayerMessage(new CDVDMsgType<SPlayerState>(CDVDMsg::PLAYER_DISPLAYTIME, m_StateInput), current.player); } else { CSingleLock lock(m_StateSection); m_State = m_StateInput; } } } static void UpdateLimits(double& minimum, double& maximum, double dts) { if(dts == DVD_NOPTS_VALUE) return; if(minimum == DVD_NOPTS_VALUE || minimum > dts) minimum = dts; if(maximum == DVD_NOPTS_VALUE || maximum < dts) maximum = dts; } void COMXPlayer::CheckContinuity(COMXCurrentStream& current, DemuxPacket* pPacket) { if (m_playSpeed < DVD_PLAYSPEED_PAUSE) return; if( pPacket->dts == DVD_NOPTS_VALUE || current.dts == DVD_NOPTS_VALUE) return; double mindts = DVD_NOPTS_VALUE, maxdts = DVD_NOPTS_VALUE; UpdateLimits(mindts, maxdts, m_CurrentAudio.dts); UpdateLimits(mindts, maxdts, m_CurrentVideo.dts); UpdateLimits(mindts, maxdts, m_CurrentAudio.dts_end()); UpdateLimits(mindts, maxdts, m_CurrentVideo.dts_end()); /* if we don't have max and min, we can't do anything more */ if( mindts == DVD_NOPTS_VALUE || maxdts == DVD_NOPTS_VALUE ) return; double correction = 0.0; if( pPacket->dts > maxdts + DVD_MSEC_TO_TIME(1000)) { CLog::Log(LOGDEBUG, "COMXPlayer::CheckContinuity - resync forward :%d, prev:%f, curr:%f, diff:%f" , current.type, current.dts, pPacket->dts, pPacket->dts - maxdts); correction = pPacket->dts - maxdts; } /* if it's large scale jump, correct for it */ if(pPacket->dts + DVD_MSEC_TO_TIME(100) < current.dts_end()) { CLog::Log(LOGDEBUG, "COMXPlayer::CheckContinuity - resync backward :%d, prev:%f, curr:%f, diff:%f" , current.type, current.dts, pPacket->dts, pPacket->dts - current.dts); correction = pPacket->dts - current.dts_end(); } else if(pPacket->dts < current.dts) { CLog::Log(LOGDEBUG, "COMXPlayer::CheckContinuity - wrapback :%d, prev:%f, curr:%f, diff:%f" , current.type, current.dts, pPacket->dts, pPacket->dts - current.dts); } if(correction != 0.0) { /* disable detection on next packet on other stream to avoid ping pong-ing */ if(m_CurrentAudio.player != current.player) m_CurrentAudio.dts = DVD_NOPTS_VALUE; if(m_CurrentVideo.player != current.player) m_CurrentVideo.dts = DVD_NOPTS_VALUE; m_offset_pts += correction; UpdateCorrection(pPacket, correction); } } bool COMXPlayer::CheckSceneSkip(COMXCurrentStream& current) { if(!m_Edl.HasCut()) return false; if(current.dts == DVD_NOPTS_VALUE) return false; if(current.inited == false) return false; CEdl::Cut cut; return m_Edl.InCut(DVD_TIME_TO_MSEC(current.dts + m_offset_pts), &cut) && cut.action == CEdl::CUT; } void COMXPlayer::CheckAutoSceneSkip() { if(!m_Edl.HasCut()) return; /* * Check that there is an audio and video stream. */ if(m_CurrentAudio.id < 0 || m_CurrentVideo.id < 0) return; /* * If there is a startpts defined for either the audio or video stream then dvdplayer is still * still decoding frames to get to the previously requested seek point. */ if(m_CurrentAudio.inited == false || m_CurrentVideo.inited == false) return; if(m_CurrentAudio.dts == DVD_NOPTS_VALUE || m_CurrentVideo.dts == DVD_NOPTS_VALUE) return; const int64_t clock = GetTime(); CEdl::Cut cut; if(!m_Edl.InCut(clock, &cut)) return; if(cut.action == CEdl::CUT && !(cut.end == m_EdlAutoSkipMarkers.cut || cut.start == m_EdlAutoSkipMarkers.cut)) // To prevent looping if same cut again { CLog::Log(LOGDEBUG, "%s - Clock in EDL cut [%s - %s]: %s. Automatically skipping over.", __FUNCTION__, CEdl::MillisecondsToTimeString(cut.start).c_str(), CEdl::MillisecondsToTimeString(cut.end).c_str(), CEdl::MillisecondsToTimeString(clock).c_str()); /* * Seeking either goes to the start or the end of the cut depending on the play direction. */ int64_t seek = GetPlaySpeed() >= 0 ? cut.end : cut.start; /* * Seeking is NOT flushed so any content up to the demux point is retained when playing forwards. */ m_messenger.Put(new CDVDMsgPlayerSeek((int)seek, true, true, true, false, true)); /* * Seek doesn't always work reliably. Last physical seek time is recorded to prevent looping * if there was an error with seeking and it landed somewhere unexpected, perhaps back in the * cut. The cut automatic skip marker is reset every 500ms allowing another attempt at the seek. */ m_EdlAutoSkipMarkers.cut = GetPlaySpeed() >= 0 ? cut.end : cut.start; } else if(cut.action == CEdl::COMM_BREAK && GetPlaySpeed() >= 0 && cut.start > m_EdlAutoSkipMarkers.commbreak_end) { CLog::Log(LOGDEBUG, "%s - Clock in commercial break [%s - %s]: %s. Automatically skipping to end of commercial break (only done once per break)", __FUNCTION__, CEdl::MillisecondsToTimeString(cut.start).c_str(), CEdl::MillisecondsToTimeString(cut.end).c_str(), CEdl::MillisecondsToTimeString(clock).c_str()); /* * Seeking is NOT flushed so any content up to the demux point is retained when playing forwards. */ m_messenger.Put(new CDVDMsgPlayerSeek(cut.end + 1, true, true, true, false, true)); /* * Each commercial break is only skipped once so poorly detected commercial breaks can be * manually re-entered. Start and end are recorded to prevent looping and to allow seeking back * to the start of the commercial break if incorrectly flagged. */ m_EdlAutoSkipMarkers.commbreak_start = cut.start; m_EdlAutoSkipMarkers.commbreak_end = cut.end; m_EdlAutoSkipMarkers.seek_to_start = true; // Allow backwards Seek() to go directly to the start } } void COMXPlayer::SynchronizeDemuxer(unsigned int timeout) { if(IsCurrentThread()) return; if(!m_messenger.IsInited()) return; CDVDMsgGeneralSynchronize* message = new CDVDMsgGeneralSynchronize(timeout, 0); m_messenger.Put(message->Acquire()); message->Wait(&m_bStop, 0); message->Release(); } void COMXPlayer::SynchronizePlayers(unsigned int sources) { /* we need a big timeout as audio queue is about 8seconds for 2ch ac3 */ const int timeout = 10*1000; // in milliseconds CDVDMsgGeneralSynchronize* message = new CDVDMsgGeneralSynchronize(timeout, sources); if (m_CurrentAudio.id >= 0) m_omxPlayerAudio.SendMessage(message->Acquire()); if (m_CurrentVideo.id >= 0) m_omxPlayerVideo.SendMessage(message->Acquire()); /* TODO - we have to rewrite the sync class, to not require all other players waiting for subtitle, should only be the oposite way if (m_CurrentSubtitle.id >= 0) m_dvdPlayerSubtitle.SendMessage(message->Acquire()); */ message->Release(); } void COMXPlayer::SendPlayerMessage(CDVDMsg* pMsg, unsigned int target) { if(target == DVDPLAYER_AUDIO) m_omxPlayerAudio.SendMessage(pMsg); if(target == DVDPLAYER_VIDEO) m_omxPlayerVideo.SendMessage(pMsg); if(target == DVDPLAYER_SUBTITLE) m_dvdPlayerSubtitle.SendMessage(pMsg); if(target == DVDPLAYER_TELETEXT) m_dvdPlayerTeletext.SendMessage(pMsg); } void COMXPlayer::OnExit() { try { CLog::Log(LOGNOTICE, "COMXPlayer::OnExit()"); // set event to inform openfile something went wrong in case openfile is still waiting for this event SetCaching(CACHESTATE_DONE); // close each stream if (!m_bAbortRequest) CLog::Log(LOGNOTICE, "OMXPlayer: eof, waiting for queues to empty"); if (m_CurrentAudio.id >= 0) CloseAudioStream(!m_bAbortRequest); if (m_CurrentVideo.id >= 0) CloseVideoStream(!m_bAbortRequest); if (m_CurrentSubtitle.id >= 0) CloseSubtitleStream(!m_bAbortRequest); if (m_CurrentTeletext.id >= 0) CloseTeletextStream(!m_bAbortRequest); // destroy the demuxer if (m_pDemuxer) { CLog::Log(LOGNOTICE, "COMXPlayer::OnExit() deleting demuxer"); delete m_pDemuxer; } m_pDemuxer = NULL; if (m_pSubtitleDemuxer) { CLog::Log(LOGNOTICE, "COMXPlayer::OnExit() deleting subtitle demuxer"); delete m_pSubtitleDemuxer; } m_pSubtitleDemuxer = NULL; // destroy the inputstream if (m_pInputStream) { CLog::Log(LOGNOTICE, "COMXPlayer::OnExit() deleting input stream"); delete m_pInputStream; } m_pInputStream = NULL; // clean up all selection streams m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_NONE); m_messenger.End(); m_av_clock.OMXStop(); m_av_clock.OMXStateIdle(); m_av_clock.OMXDeinitialize(); } catch (...) { CLog::Log(LOGERROR, "%s - Exception thrown when trying to close down player, memory leak will follow", __FUNCTION__); m_pInputStream = NULL; m_pDemuxer = NULL; } m_bStop = true; // if we didn't stop playing, advance to the next item in xbmc's playlist if(m_PlayerOptions.identify == false) { if (m_bAbortRequest) m_callback.OnPlayBackStopped(); else m_callback.OnPlayBackEnded(); } // set event to inform openfile something went wrong in case openfile is still waiting for this event m_ready.Set(); } void COMXPlayer::HandleMessages() { CDVDMsg* pMsg; OMXStreamLock lock(this); while (m_messenger.Get(&pMsg, 0) == MSGQ_OK) { try { if (pMsg->IsType(CDVDMsg::PLAYER_SEEK) && m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK) == 0 && m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK_CHAPTER) == 0) { CDVDMsgPlayerSeek &msg(*((CDVDMsgPlayerSeek*)pMsg)); if (!m_State.canseek) { pMsg->Release(); continue; } if(!msg.GetTrickPlay()) { g_infoManager.SetDisplayAfterSeek(100000); } if(msg.GetFlush()) SetCaching(CACHESTATE_FLUSH); double start = DVD_NOPTS_VALUE; int time = msg.GetRestore() ? (int)m_Edl.RestoreCutTime(msg.GetTime()) : msg.GetTime(); // if input streams doesn't support seektime we must convert back to clock if(dynamic_cast<CDVDInputStream::ISeekTime*>(m_pInputStream) == NULL) time -= DVD_TIME_TO_MSEC(m_State.time_offset - m_offset_pts); CLog::Log(LOGDEBUG, "demuxer seek to: %d", time); if (m_pDemuxer && m_pDemuxer->SeekTime(time, msg.GetBackward(), &start)) { CLog::Log(LOGDEBUG, "demuxer seek to: %.0f, success", start); if(m_pSubtitleDemuxer) { if(!m_pSubtitleDemuxer->SeekTime(time, msg.GetBackward())) CLog::Log(LOGDEBUG, "failed to seek subtitle demuxer: %d, success", time); } // dts after successful seek if (m_StateInput.time_src == ETIMESOURCE_CLOCK && start == DVD_NOPTS_VALUE) m_StateInput.dts = DVD_MSEC_TO_TIME(time); else m_StateInput.dts = start; FlushBuffers(!msg.GetFlush(), start, msg.GetAccurate()); // mark mediatime as invalid m_av_clock.OMXMediaTime(0.0); m_last_check_time = 0.0; } else CLog::Log(LOGWARNING, "error while seeking"); // set flag to indicate we have finished a seeking request if(!msg.GetTrickPlay()) g_infoManager.SetDisplayAfterSeek(); // dvd's will issue a HOP_CHANNEL that we need to skip if(m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) m_dvd.state = DVDSTATE_SEEK; } else if (pMsg->IsType(CDVDMsg::PLAYER_SEEK_CHAPTER) && m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK) == 0 && m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK_CHAPTER) == 0) { g_infoManager.SetDisplayAfterSeek(100000); SetCaching(CACHESTATE_FLUSH); CDVDMsgPlayerSeekChapter &msg(*((CDVDMsgPlayerSeekChapter*)pMsg)); double start = DVD_NOPTS_VALUE; // This should always be the case. if(m_pDemuxer && m_pDemuxer->SeekChapter(msg.GetChapter(), &start)) { FlushBuffers(false, start, true); // mark mediatime as invalid m_av_clock.OMXMediaTime(0.0); m_callback.OnPlayBackSeekChapter(msg.GetChapter()); } g_infoManager.SetDisplayAfterSeek(); } else if (pMsg->IsType(CDVDMsg::DEMUXER_RESET)) { m_CurrentAudio.stream = NULL; m_CurrentVideo.stream = NULL; m_CurrentSubtitle.stream = NULL; // we need to reset the demuxer, probably because the streams have changed if(m_pDemuxer) m_pDemuxer->Reset(); if(m_pSubtitleDemuxer) m_pSubtitleDemuxer->Reset(); } else if (pMsg->IsType(CDVDMsg::PLAYER_SET_AUDIOSTREAM)) { CDVDMsgPlayerSetAudioStream* pMsg2 = (CDVDMsgPlayerSetAudioStream*)pMsg; OMXSelectionStream& st = m_SelectionStreams.Get(STREAM_AUDIO, pMsg2->GetStreamId()); if(st.source != STREAM_SOURCE_NONE) { if(st.source == STREAM_SOURCE_NAV && m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) { CDVDInputStreamNavigator* pStream = (CDVDInputStreamNavigator*)m_pInputStream; if(pStream->SetActiveAudioStream(st.id)) { m_dvd.iSelectedAudioStream = -1; CloseAudioStream(false); m_messenger.Put(new CDVDMsgPlayerSeek(GetTime(), true, true, true, true, true)); } } else { CloseAudioStream(false); OpenAudioStream(st.id, st.source); AdaptForcedSubtitles(); m_messenger.Put(new CDVDMsgPlayerSeek(GetTime(), true, true, true, true, true)); } } } else if (pMsg->IsType(CDVDMsg::PLAYER_SET_SUBTITLESTREAM)) { CDVDMsgPlayerSetSubtitleStream* pMsg2 = (CDVDMsgPlayerSetSubtitleStream*)pMsg; OMXSelectionStream& st = m_SelectionStreams.Get(STREAM_SUBTITLE, pMsg2->GetStreamId()); if(st.source != STREAM_SOURCE_NONE) { if(st.source == STREAM_SOURCE_NAV && m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) { CDVDInputStreamNavigator* pStream = (CDVDInputStreamNavigator*)m_pInputStream; if(pStream->SetActiveSubtitleStream(st.id)) { m_dvd.iSelectedSPUStream = -1; CloseSubtitleStream(false); } } else { CloseSubtitleStream(false); OpenSubtitleStream(st.id, st.source); } } } else if (pMsg->IsType(CDVDMsg::PLAYER_SET_SUBTITLESTREAM_VISIBLE)) { CDVDMsgBool* pValue = (CDVDMsgBool*)pMsg; SetSubtitleVisibleInternal(pValue->m_value); } else if (pMsg->IsType(CDVDMsg::PLAYER_SET_STATE)) { g_infoManager.SetDisplayAfterSeek(100000); SetCaching(CACHESTATE_FLUSH); CDVDMsgPlayerSetState* pMsgPlayerSetState = (CDVDMsgPlayerSetState*)pMsg; if (CDVDInputStream::IMenus* ptr = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream)) { if(ptr->SetState(pMsgPlayerSetState->GetState())) { m_dvd.state = DVDSTATE_NORMAL; m_dvd.iDVDStillStartTime = 0; m_dvd.iDVDStillTime = 0; } } g_infoManager.SetDisplayAfterSeek(); } else if (pMsg->IsType(CDVDMsg::PLAYER_SET_RECORD)) { CDVDInputStream::IChannel* input = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream); if(input) input->Record(*(CDVDMsgBool*)pMsg); } else if (pMsg->IsType(CDVDMsg::GENERAL_FLUSH)) { FlushBuffers(false); } else if (pMsg->IsType(CDVDMsg::PLAYER_SETSPEED)) { int speed = static_cast<CDVDMsgInt*>(pMsg)->m_value; // correct our current clock, as it would start going wrong otherwise if(m_State.timestamp > 0) { double offset; offset = m_clock.GetAbsoluteClock() - m_State.timestamp; offset *= m_playSpeed / DVD_PLAYSPEED_NORMAL; if(offset > 1000) offset = 1000; if(offset < -1000) offset = -1000; m_State.time += DVD_TIME_TO_MSEC(offset); m_State.timestamp = m_clock.GetAbsoluteClock(); } if (speed != DVD_PLAYSPEED_PAUSE && m_playSpeed != DVD_PLAYSPEED_PAUSE && speed != m_playSpeed) m_callback.OnPlayBackSpeedChanged(speed / DVD_PLAYSPEED_NORMAL); if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER) && speed != m_playSpeed) { CDVDInputStreamPVRManager* pvrinputstream = static_cast<CDVDInputStreamPVRManager*>(m_pInputStream); pvrinputstream->Pause( speed == 0 ); } // if playspeed is different then DVD_PLAYSPEED_NORMAL or DVD_PLAYSPEED_PAUSE // audioplayer, stops outputing audio to audiorender, but still tries to // sleep an correct amount for each packet // videoplayer just plays faster after the clock speed has been increased // 1. disable audio // 2. skip frames and adjust their pts or the clock // when switching from trickplay to normal, we may not have a full set of reference frames // in decoder and we may get corrupt frames out. Seeking to current time will avoid this. if ( TP(speed) || TP(m_playSpeed) || ( (speed == DVD_PLAYSPEED_PAUSE || speed == DVD_PLAYSPEED_NORMAL) && (m_playSpeed != DVD_PLAYSPEED_PAUSE && m_playSpeed != DVD_PLAYSPEED_NORMAL) ) ) m_messenger.Put(new CDVDMsgPlayerSeek(GetTime(), (speed < 0), true, false, false, true)); m_playSpeed = speed; m_caching = CACHESTATE_DONE; m_clock.SetSpeed(speed); m_av_clock.OMXSetSpeed(speed); m_av_clock.OMXPause(); m_omxPlayerAudio.SetSpeed(speed); m_omxPlayerVideo.SetSpeed(speed); // We can't pause demuxer until our buffers are full. Doing so will result in continued // calls to Read() which may then block indefinitely (CDVDInputStreamRTMP for example). if(m_pDemuxer) { m_DemuxerPausePending = (speed == DVD_PLAYSPEED_PAUSE); if (!m_DemuxerPausePending) m_pDemuxer->SetSpeed(speed); } CLog::Log(LOGDEBUG, "COMXPlayer - CDVDMsg::PLAYER_SETSPEED speed : %d", speed); } else if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_SELECT_NUMBER) && m_messenger.GetPacketCount(CDVDMsg::PLAYER_CHANNEL_SELECT_NUMBER) == 0) { FlushBuffers(false); CDVDInputStream::IChannel* input = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream); if(input && input->SelectChannelByNumber(static_cast<CDVDMsgInt*>(pMsg)->m_value)) { SAFE_DELETE(m_pDemuxer); }else { CLog::Log(LOGWARNING, "%s - failed to switch channel. playback stopped", __FUNCTION__); CApplicationMessenger::Get().MediaStop(false); } } else if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_SELECT) && m_messenger.GetPacketCount(CDVDMsg::PLAYER_CHANNEL_SELECT) == 0) { FlushBuffers(false); CDVDInputStream::IChannel* input = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream); if(input && input->SelectChannel(static_cast<CDVDMsgType <CPVRChannel> *>(pMsg)->m_value)) { SAFE_DELETE(m_pDemuxer); }else { CLog::Log(LOGWARNING, "%s - failed to switch channel. playback stopped", __FUNCTION__); CApplicationMessenger::Get().MediaStop(false); } } else if (pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_NEXT) || pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_PREV)) { CDVDInputStream::IChannel* input = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream); if(input) { bool bSwitchSuccessful(false); bool bShowPreview(CSettings::Get().GetInt("pvrplayback.channelentrytimeout") > 0); if (!bShowPreview) { g_infoManager.SetDisplayAfterSeek(100000); FlushBuffers(false); } if(pMsg->IsType(CDVDMsg::PLAYER_CHANNEL_NEXT)) bSwitchSuccessful = input->NextChannel(bShowPreview); else bSwitchSuccessful = input->PrevChannel(bShowPreview); if(bSwitchSuccessful) { if (bShowPreview) { UpdateApplication(0); m_ChannelEntryTimeOut.Set(CSettings::Get().GetInt("pvrplayback.channelentrytimeout")); } else { m_ChannelEntryTimeOut.SetInfinite(); SAFE_DELETE(m_pDemuxer); g_infoManager.SetDisplayAfterSeek(); } } else { CLog::Log(LOGWARNING, "%s - failed to switch channel. playback stopped", __FUNCTION__); CApplicationMessenger::Get().MediaStop(false); } } } else if (pMsg->IsType(CDVDMsg::GENERAL_GUI_ACTION)) OnAction(((CDVDMsgType<CAction>*)pMsg)->m_value); else if (pMsg->IsType(CDVDMsg::PLAYER_STARTED)) { int player = ((CDVDMsgInt*)pMsg)->m_value; if(player == DVDPLAYER_AUDIO) m_CurrentAudio.started = true; if(player == DVDPLAYER_VIDEO) m_CurrentVideo.started = true; if ((player == DVDPLAYER_AUDIO || player == DVDPLAYER_VIDEO) && (TPA(m_playSpeed) || !m_HasAudio || m_CurrentAudio.started) && (!m_HasVideo || m_CurrentVideo.started)) { CLog::Log(LOGDEBUG, "COMXPlayer::HandleMessages - player started RESET"); m_av_clock.OMXReset(m_HasVideo, m_playSpeed != DVD_PLAYSPEED_NORMAL && m_playSpeed != DVD_PLAYSPEED_PAUSE ? false:m_HasAudio); } CLog::Log(LOGDEBUG, "COMXPlayer::HandleMessages - player started %d (tpa:%d,a:%d,v:%d)", player, TPA(m_playSpeed), m_CurrentAudio.started, m_CurrentVideo.started); } else if (pMsg->IsType(CDVDMsg::PLAYER_DISPLAYTIME)) { COMXPlayer::SPlayerState& state = ((CDVDMsgType<COMXPlayer::SPlayerState>*)pMsg)->m_value; CSingleLock lock(m_StateSection); /* prioritize data from video player, but only accept data * * after it has been started to avoid race conditions after seeks */ if(m_CurrentVideo.started && !m_omxPlayerVideo.SubmittedEOS()) { if(state.player == DVDPLAYER_VIDEO) m_State = state; } else if(m_CurrentAudio.started) { if(state.player == DVDPLAYER_AUDIO) m_State = state; } } } catch (...) { CLog::Log(LOGERROR, "%s - Exception thrown when handling message", __FUNCTION__); } pMsg->Release(); } } void COMXPlayer::SetCaching(ECacheState state) { if(state == CACHESTATE_FLUSH) { double level, delay, offset; if(GetCachingTimes(level, delay, offset)) state = CACHESTATE_FULL; else state = CACHESTATE_INIT; } if(m_caching == state) return; CLog::Log(LOGDEBUG, "COMXPlayer::SetCaching - caching state %d", state); if(state == CACHESTATE_FULL || state == CACHESTATE_INIT || state == CACHESTATE_PVR) { m_clock.SetSpeed(DVD_PLAYSPEED_PAUSE); m_av_clock.OMXPause(); m_omxPlayerAudio.SetSpeed(DVD_PLAYSPEED_PAUSE); m_omxPlayerAudio.SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1); m_omxPlayerVideo.SetSpeed(DVD_PLAYSPEED_PAUSE); m_omxPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1); if (state == CACHESTATE_PVR) m_pInputStream->ResetScanTimeout((unsigned int) CSettings::Get().GetInt("pvrplayback.scantime") * 1000); } if(state == CACHESTATE_PLAY ||(state == CACHESTATE_DONE && m_caching != CACHESTATE_PLAY)) { m_clock.SetSpeed(m_playSpeed); m_omxPlayerAudio.SetSpeed(m_playSpeed); m_omxPlayerVideo.SetSpeed(m_playSpeed); m_pInputStream->ResetScanTimeout(0); } m_caching = state; } void COMXPlayer::SetPlaySpeed(int speed) { m_messenger.Put(new CDVDMsgInt(CDVDMsg::PLAYER_SETSPEED, speed)); m_omxPlayerAudio.SetSpeed(speed); m_omxPlayerVideo.SetSpeed(speed); SynchronizeDemuxer(100); } bool COMXPlayer::CanPause() { CSingleLock lock(m_StateSection); return m_State.canpause; } void COMXPlayer::Pause() { CSingleLock lock(m_StateSection); if (!m_State.canpause) return; lock.Leave(); if(m_playSpeed != DVD_PLAYSPEED_PAUSE && IsCaching()) { SetCaching(CACHESTATE_DONE); return; } // return to normal speed if it was paused before, pause otherwise if (m_playSpeed == DVD_PLAYSPEED_PAUSE) { SetPlaySpeed(DVD_PLAYSPEED_NORMAL); m_callback.OnPlayBackResumed(); } else { SetPlaySpeed(DVD_PLAYSPEED_PAUSE); m_callback.OnPlayBackPaused(); } } bool COMXPlayer::IsPaused() const { return m_playSpeed == DVD_PLAYSPEED_PAUSE || IsCaching(); } bool COMXPlayer::HasVideo() const { return m_HasVideo; } bool COMXPlayer::HasAudio() const { return m_HasAudio; } bool COMXPlayer::IsPassthrough() const { return m_omxPlayerAudio.Passthrough(); } bool COMXPlayer::CanSeek() { CSingleLock lock(m_StateSection); return m_State.canseek; } void COMXPlayer::Seek(bool bPlus, bool bLargeStep, bool bChapterOverride) { // Single step if( m_playSpeed == DVD_PLAYSPEED_PAUSE && bPlus && !bLargeStep) { m_av_clock.OMXStep(); return; } if (!m_State.canseek) return; if (bLargeStep && bChapterOverride && GetChapter() > 0) { if (!bPlus) { SeekChapter(GetChapter() - 1); return; } else if (GetChapter() < GetChapterCount()) { SeekChapter(GetChapter() + 1); return; } } int64_t seek; if (g_advancedSettings.m_videoUseTimeSeeking && GetTotalTime() > 2000*g_advancedSettings.m_videoTimeSeekForwardBig) { if (bLargeStep) seek = bPlus ? g_advancedSettings.m_videoTimeSeekForwardBig : g_advancedSettings.m_videoTimeSeekBackwardBig; else seek = bPlus ? g_advancedSettings.m_videoTimeSeekForward : g_advancedSettings.m_videoTimeSeekBackward; seek *= 1000; seek += GetTime(); } else { float percent; if (bLargeStep) percent = bPlus ? g_advancedSettings.m_videoPercentSeekForwardBig : g_advancedSettings.m_videoPercentSeekBackwardBig; else percent = bPlus ? g_advancedSettings.m_videoPercentSeekForward : g_advancedSettings.m_videoPercentSeekBackward; seek = (int64_t)(GetTotalTimeInMsec()*(GetPercentage()+percent)/100); } bool restore = true; if (m_Edl.HasCut()) { /* * Alter the standard seek position based on whether any commercial breaks have been * automatically skipped. */ const int clock = DVD_TIME_TO_MSEC(m_clock.GetClock()); /* * If a large backwards seek occurs within 10 seconds of the end of the last automated * commercial skip, then seek back to the start of the commercial break under the assumption * it was flagged incorrectly. 10 seconds grace period is allowed in case the watcher has to * fumble around finding the remote. Only happens once per commercial break. * * Small skip does not trigger this in case the start of the commercial break was in fact fine * but it skipped too far into the program. In that case small skip backwards behaves as normal. */ if (!bPlus && bLargeStep && m_EdlAutoSkipMarkers.seek_to_start && clock >= m_EdlAutoSkipMarkers.commbreak_end && clock <= m_EdlAutoSkipMarkers.commbreak_end + 10*1000) // Only if within 10 seconds of the end (in msec) { CLog::Log(LOGDEBUG, "%s - Seeking back to start of commercial break [%s - %s] as large backwards skip activated within 10 seconds of the automatic commercial skip (only done once per break).", __FUNCTION__, CEdl::MillisecondsToTimeString(m_EdlAutoSkipMarkers.commbreak_start).c_str(), CEdl::MillisecondsToTimeString(m_EdlAutoSkipMarkers.commbreak_end).c_str()); seek = m_EdlAutoSkipMarkers.commbreak_start; restore = false; m_EdlAutoSkipMarkers.seek_to_start = false; // So this will only happen within the 10 second grace period once. } /* * If big skip forward within the last "reverted" commercial break, seek to the end of the * commercial break under the assumption that the break was incorrectly flagged and playback has * now reached the actual start of the commercial break. Assume that the end is flagged more * correctly than the landing point for a standard big skip (ends seem to be flagged more * accurately than the start). */ else if (bPlus && bLargeStep && clock >= m_EdlAutoSkipMarkers.commbreak_start && clock <= m_EdlAutoSkipMarkers.commbreak_end) { CLog::Log(LOGDEBUG, "%s - Seeking to end of previously skipped commercial break [%s - %s] as big forwards skip activated within the break.", __FUNCTION__, CEdl::MillisecondsToTimeString(m_EdlAutoSkipMarkers.commbreak_start).c_str(), CEdl::MillisecondsToTimeString(m_EdlAutoSkipMarkers.commbreak_end).c_str()); seek = m_EdlAutoSkipMarkers.commbreak_end; restore = false; } } int64_t time = GetTime(); if(g_application.CurrentFileItem().IsStack() && (seek > GetTotalTimeInMsec() || seek < 0)) { g_application.SeekTime((seek - time) * 0.001 + g_application.GetTime()); // warning, don't access any dvdplayer variables here as // the dvdplayer object may have been destroyed return; } m_messenger.Put(new CDVDMsgPlayerSeek((int)seek, !bPlus, true, false, restore)); SynchronizeDemuxer(100); if (seek < 0) seek = 0; m_callback.OnPlayBackSeek((int)seek, (int)(seek - time)); } bool COMXPlayer::SeekScene(bool bPlus) { if (!m_Edl.HasSceneMarker()) return false; /* * There is a 5 second grace period applied when seeking for scenes backwards. If there is no * grace period applied it is impossible to go backwards past a scene marker. */ int64_t clock = GetTime(); if (!bPlus && clock > 5 * 1000) // 5 seconds clock -= 5 * 1000; int iScenemarker; if (m_Edl.GetNextSceneMarker(bPlus, clock, &iScenemarker)) { /* * Seeking is flushed and inaccurate, just like Seek() */ m_messenger.Put(new CDVDMsgPlayerSeek(iScenemarker, !bPlus, true, false, false)); SynchronizeDemuxer(100); return true; } return false; } void COMXPlayer::GetAudioInfo(std::string &strAudioInfo) { { CSingleLock lock(m_StateSection); strAudioInfo = StringUtils::Format("D(%s)", m_StateInput.demux_audio.c_str()); } strAudioInfo += StringUtils::Format("\nP(%s)", m_omxPlayerAudio.GetPlayerInfo().c_str()); } void COMXPlayer::GetVideoInfo(std::string &strVideoInfo) { { CSingleLock lock(m_StateSection); strVideoInfo = StringUtils::Format("D(%s)", m_StateInput.demux_video.c_str()); } strVideoInfo += StringUtils::Format("\nP(%s)", m_omxPlayerVideo.GetPlayerInfo().c_str()); } void COMXPlayer::GetGeneralInfo(std::string& strGeneralInfo) { if (!m_bStop) { double apts = m_omxPlayerAudio.GetCurrentPts(); double vpts = m_omxPlayerVideo.GetCurrentPts(); double dDiff = 0; if( apts != DVD_NOPTS_VALUE && vpts != DVD_NOPTS_VALUE ) dDiff = (apts - vpts) / DVD_TIME_BASE; std::string strEDL = StringUtils::Format(", edl:%s", m_Edl.GetInfo().c_str()); std::string strBuf; CSingleLock lock(m_StateSection); if(m_StateInput.cache_bytes >= 0) { strBuf += StringUtils::Format(" cache:%s %2.0f%%" , StringUtils::SizeToString(m_State.cache_bytes).c_str() , m_State.cache_level * 100); if(m_playSpeed == 0 || m_caching == CACHESTATE_FULL) strBuf += StringUtils::Format(" %d sec", DVD_TIME_TO_SEC(m_State.cache_delay)); } strGeneralInfo = StringUtils::Format("C( ad:% 6.3f a/v:% 6.3f%s, dcpu:%2i%% acpu:%2i%% vcpu:%2i%%%s af:%d%% vf:%d%% amp:% 5.2f )" , m_omxPlayerAudio.GetDelay() , dDiff , strEDL.c_str() , (int)(CThread::GetRelativeUsage()*100) , (int)(m_omxPlayerAudio.GetRelativeUsage()*100) , (int)(m_omxPlayerVideo.GetRelativeUsage()*100) , strBuf.c_str() , m_audio_fifo , m_video_fifo , m_omxPlayerAudio.GetDynamicRangeAmplification()); } } void COMXPlayer::SeekPercentage(float iPercent) { int64_t iTotalTime = GetTotalTimeInMsec(); if (!iTotalTime) return; SeekTime((int64_t)(iTotalTime * iPercent / 100)); } float COMXPlayer::GetPercentage() { int64_t iTotalTime = GetTotalTimeInMsec(); if (!iTotalTime) return 0.0f; return GetTime() * 100 / (float)iTotalTime; } float COMXPlayer::GetCachePercentage() { CSingleLock lock(m_StateSection); return m_StateInput.cache_offset * 100; // NOTE: Percentage returned is relative } void COMXPlayer::SetAVDelay(float fValue) { m_omxPlayerVideo.SetDelay(fValue * DVD_TIME_BASE); } float COMXPlayer::GetAVDelay() { return m_omxPlayerVideo.GetDelay() / (float)DVD_TIME_BASE; } void COMXPlayer::SetSubTitleDelay(float fValue) { m_omxPlayerVideo.SetSubtitleDelay(-fValue * DVD_TIME_BASE); } float COMXPlayer::GetSubTitleDelay() { return -m_omxPlayerVideo.GetSubtitleDelay() / DVD_TIME_BASE; } // priority: 1: libdvdnav, 2: external subtitles, 3: muxed subtitles int COMXPlayer::GetSubtitleCount() { return m_SelectionStreams.Count(STREAM_SUBTITLE); } int COMXPlayer::GetSubtitle() { return m_SelectionStreams.IndexOf(STREAM_SUBTITLE, *this); } void COMXPlayer::GetSubtitleStreamInfo(int index, SPlayerSubtitleStreamInfo &info) { if (index < 0 || index > (int) GetSubtitleCount() - 1) return; OMXSelectionStream& s = m_SelectionStreams.Get(STREAM_SUBTITLE, index); if(s.name.length() > 0) info.name = s.name; if(s.type == STREAM_NONE) info.name += "(Invalid)"; info.language = s.language; } void COMXPlayer::SetSubtitle(int iStream) { CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream = iStream; m_messenger.Put(new CDVDMsgPlayerSetSubtitleStream(iStream)); } bool COMXPlayer::GetSubtitleVisible() { if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) { CDVDInputStreamNavigator* pStream = (CDVDInputStreamNavigator*)m_pInputStream; if(pStream->IsInMenu()) return CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn; else return pStream->IsSubtitleStreamEnabled(); } return m_omxPlayerVideo.IsSubtitleEnabled(); } void COMXPlayer::SetSubtitleVisible(bool bVisible) { CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = bVisible; m_messenger.Put(new CDVDMsgBool(CDVDMsg::PLAYER_SET_SUBTITLESTREAM_VISIBLE, bVisible)); } void COMXPlayer::SetSubtitleVisibleInternal(bool bVisible) { CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn = bVisible; m_omxPlayerVideo.EnableSubtitle(bVisible); if (m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) static_cast<CDVDInputStreamNavigator*>(m_pInputStream)->EnableSubtitleStream(bVisible); } int COMXPlayer::GetAudioStreamCount() { return m_SelectionStreams.Count(STREAM_AUDIO); } int COMXPlayer::GetAudioStream() { return m_SelectionStreams.IndexOf(STREAM_AUDIO, *this); } void COMXPlayer::SetAudioStream(int iStream) { CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = iStream; m_messenger.Put(new CDVDMsgPlayerSetAudioStream(iStream)); SynchronizeDemuxer(100); } TextCacheStruct_t* COMXPlayer::GetTeletextCache() { if (m_CurrentTeletext.id < 0) return 0; return m_dvdPlayerTeletext.GetTeletextCache(); } void COMXPlayer::LoadPage(int p, int sp, unsigned char* buffer) { if (m_CurrentTeletext.id < 0) return; return m_dvdPlayerTeletext.LoadPage(p, sp, buffer); } void COMXPlayer::SeekTime(int64_t iTime) { int seekOffset = (int)(iTime - GetTime()); m_messenger.Put(new CDVDMsgPlayerSeek((int)iTime, true, true, true)); SynchronizeDemuxer(100); m_callback.OnPlayBackSeek((int)iTime, seekOffset); } // return the time in milliseconds int64_t COMXPlayer::GetTime() { CSingleLock lock(m_StateSection); double offset = 0; const double limit = DVD_MSEC_TO_TIME(200); if(m_State.timestamp > 0) { offset = m_clock.GetAbsoluteClock() - m_State.timestamp; offset *= m_playSpeed / DVD_PLAYSPEED_NORMAL; if(offset > limit) offset = limit; if(offset < -limit) offset = -limit; } //{CLog::Log(LOGINFO, "%s: time:%.2f stamp:%.2f dts:%d m:%d (p:%d,c:%d) =%llu", __func__, (double)m_State.time, (double)m_State.timestamp, (int)DVD_TIME_TO_MSEC(m_State.dts + m_offset_pts), (int)DVD_TIME_TO_MSEC(m_stamp), (int)m_playSpeed, (int)m_caching, llrint(m_State.time + DVD_TIME_TO_MSEC(offset)));} return llrint(m_State.time + DVD_TIME_TO_MSEC(offset)); } // return length in msec int64_t COMXPlayer::GetTotalTimeInMsec() { CSingleLock lock(m_StateSection); return llrint(m_State.time_total); } // return length in seconds.. this should be changed to return in milleseconds throughout xbmc int64_t COMXPlayer::GetTotalTime() { return GetTotalTimeInMsec(); } void COMXPlayer::ToFFRW(int iSpeed) { // can't rewind in menu as seeking isn't possible // forward is fine if (iSpeed < 0 && IsInMenu()) return; SetPlaySpeed(iSpeed * DVD_PLAYSPEED_NORMAL); } bool COMXPlayer::OpenAudioStream(int iStream, int source, bool reset) { CLog::Log(LOGNOTICE, "Opening audio stream: %i source: %i", iStream, source); if (!m_pDemuxer) { CLog::Log(LOGWARNING, "Opening audio stream: no demuxer"); return false; } CDemuxStream* pStream = m_pDemuxer->GetStream(iStream); if (!pStream || pStream->disabled) { CLog::Log(LOGWARNING, "Opening audio stream: pStream=%p disabled=%d", pStream, pStream ? pStream->disabled:0); return false; } if( m_CurrentAudio.id < 0 && m_CurrentVideo.id >= 0 ) { // up until now we wheren't playing audio, but we did play video // this will change what is used to sync the dvdclock. // since the new audio data doesn't have to have any relation // to the current video data in the packet que, we have to // wait for it to empty // this happens if a new cell has audio data, but previous didn't // and both have video data SynchronizePlayers(SYNCSOURCE_AUDIO); } CDVDStreamInfo hint(*pStream, true); if(m_CurrentAudio.id < 0 || m_CurrentAudio.hint != hint) { if(!m_omxPlayerAudio.OpenStream(hint)) { /* mark stream as disabled, to disallaw further attempts*/ CLog::Log(LOGWARNING, "%s - Unsupported stream %d. Stream disabled.", __FUNCTION__, iStream); pStream->disabled = true; pStream->SetDiscard(AVDISCARD_ALL); return false; } } else if (reset) m_omxPlayerAudio.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); /* store information about stream */ m_CurrentAudio.id = iStream; m_CurrentAudio.source = source; m_CurrentAudio.hint = hint; m_CurrentAudio.stream = (void*)pStream; m_CurrentAudio.started = false; m_HasAudio = true; /* we are potentially going to be waiting on this */ m_omxPlayerAudio.SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1); /* software decoding normaly consumes full cpu time so prio it */ m_omxPlayerAudio.SetPriority(GetPriority()+1); CMediaSettings::Get().GetCurrentVideoSettings().m_AudioStream = GetAudioStream(); return true; } bool COMXPlayer::OpenVideoStream(int iStream, int source, bool reset) { CLog::Log(LOGNOTICE, "Opening video stream: %i source: %i", iStream, source); if (!m_pDemuxer) { CLog::Log(LOGWARNING, "Opening video stream: no demuxer"); return false; } CDemuxStream* pStream = m_pDemuxer->GetStream(iStream); if(!pStream || pStream->disabled) { CLog::Log(LOGWARNING, "Opening video stream: pStream=%p disabled=%d", pStream, pStream ? pStream->disabled:0); return false; } pStream->SetDiscard(AVDISCARD_NONE); CDVDStreamInfo hint(*pStream, true); if( m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD) ) { /* set aspect ratio as requested by navigator for dvd's */ float aspect = static_cast<CDVDInputStreamNavigator*>(m_pInputStream)->GetVideoAspectRatio(); if(aspect != 0.0) { hint.aspect = aspect; hint.forced_aspect = true; } hint.software = true; } boost::shared_ptr<CPVRClient> client; if(m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER) && pStream->type == STREAM_VIDEO && g_PVRClients->GetPlayingClient(client) && client->HandlesDemuxing()) { // set the fps in hints const CDemuxStreamVideo *stream = static_cast<const CDemuxStreamVideo*>(pStream); hint.fpsrate = stream->iFpsRate; hint.fpsscale = stream->iFpsScale; } CDVDInputStream::IMenus* pMenus = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream); if(pMenus && pMenus->IsInMenu()) hint.stills = true; if (hint.stereo_mode.empty()) hint.stereo_mode = CStereoscopicsManager::Get().DetectStereoModeByString(m_filename); if(m_CurrentVideo.id < 0 || m_CurrentVideo.hint != hint) { // discard if it's a picture attachment (e.g. album art embedded in MP3 or AAC) if ((pStream->flags & AV_DISPOSITION_ATTACHED_PIC) || !m_omxPlayerVideo.OpenStream(hint)) { /* mark stream as disabled, to disallaw further attempts */ CLog::Log(LOGWARNING, "%s - Unsupported stream %d. Stream disabled.", __FUNCTION__, iStream); pStream->disabled = true; pStream->SetDiscard(AVDISCARD_ALL); return false; } } else if (reset) m_omxPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); /* store information about stream */ m_CurrentVideo.id = iStream; m_CurrentVideo.source = source; m_CurrentVideo.hint = hint; m_CurrentVideo.stream = (void*)pStream; m_CurrentVideo.started = false; m_HasVideo = true; /* we are potentially going to be waiting on this */ m_omxPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::PLAYER_STARTED), 1); /* use same priority for video thread as demuxing thread, as */ /* otherwise demuxer will starve if video consumes the full cpu */ m_omxPlayerVideo.SetPriority(GetPriority()); return true; } bool COMXPlayer::OpenSubtitleStream(int iStream, int source) { CLog::Log(LOGNOTICE, "Opening Subtitle stream: %i source: %i", iStream, source); CDemuxStream* pStream = NULL; std::string filename; CDVDStreamInfo hint; if(STREAM_SOURCE_MASK(source) == STREAM_SOURCE_DEMUX_SUB) { int index = m_SelectionStreams.IndexOf(STREAM_SUBTITLE, source, iStream); if(index < 0) return false; OMXSelectionStream st = m_SelectionStreams.Get(STREAM_SUBTITLE, index); if(!m_pSubtitleDemuxer || m_pSubtitleDemuxer->GetFileName() != st.filename) { CLog::Log(LOGNOTICE, "Opening Subtitle file: %s", st.filename.c_str()); auto_ptr<CDVDDemuxVobsub> demux(new CDVDDemuxVobsub()); if(!demux->Open(st.filename, st.filename2)) return false; m_pSubtitleDemuxer = demux.release(); } pStream = m_pSubtitleDemuxer->GetStream(iStream); if(!pStream || pStream->disabled) return false; pStream->SetDiscard(AVDISCARD_NONE); double pts = m_omxPlayerVideo.GetCurrentPts(); if(pts == DVD_NOPTS_VALUE) pts = m_CurrentVideo.dts; if(pts == DVD_NOPTS_VALUE) pts = 0; pts += m_offset_pts; m_pSubtitleDemuxer->SeekTime((int)(1000.0 * pts / (double)DVD_TIME_BASE)); hint.Assign(*pStream, true); } else if(STREAM_SOURCE_MASK(source) == STREAM_SOURCE_TEXT) { int index = m_SelectionStreams.IndexOf(STREAM_SUBTITLE, source, iStream); if(index < 0) return false; filename = m_SelectionStreams.Get(STREAM_SUBTITLE, index).filename; hint.Clear(); hint.fpsscale = m_CurrentVideo.hint.fpsscale; hint.fpsrate = m_CurrentVideo.hint.fpsrate; } else { if(!m_pDemuxer) return false; pStream = m_pDemuxer->GetStream(iStream); if(!pStream || pStream->disabled) return false; pStream->SetDiscard(AVDISCARD_NONE); hint.Assign(*pStream, true); if(m_pInputStream && m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) filename = "dvd"; } if(m_CurrentSubtitle.id < 0 || m_CurrentSubtitle.hint != hint) { if(m_CurrentSubtitle.id >= 0) { CLog::Log(LOGDEBUG, " - codecs hints have changed, must close previous stream"); CloseSubtitleStream(false); } if(!m_dvdPlayerSubtitle.OpenStream(hint, filename)) { CLog::Log(LOGWARNING, "%s - Unsupported stream %d. Stream disabled.", __FUNCTION__, iStream); if(pStream) { pStream->disabled = true; pStream->SetDiscard(AVDISCARD_ALL); } return false; } } else m_dvdPlayerSubtitle.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); m_CurrentSubtitle.id = iStream; m_CurrentSubtitle.source = source; m_CurrentSubtitle.hint = hint; m_CurrentSubtitle.stream = (void*)pStream; m_CurrentSubtitle.started = false; CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleStream = GetSubtitle(); return true; } bool COMXPlayer::AdaptForcedSubtitles() { bool valid = false; OMXSelectionStream ss = m_SelectionStreams.Get(STREAM_SUBTITLE, GetSubtitle()); if (ss.flags & CDemuxStream::FLAG_FORCED || !GetSubtitleVisible()) { OMXSelectionStream as = m_SelectionStreams.Get(STREAM_AUDIO, GetAudioStream()); OMXSelectionStreams streams = m_SelectionStreams.Get(STREAM_SUBTITLE); for(OMXSelectionStreams::iterator it = streams.begin(); it != streams.end() && !valid; ++it) { if (it->flags & CDemuxStream::FLAG_FORCED && g_LangCodeExpander.CompareLangCodes(it->language, as.language)) { if(OpenSubtitleStream(it->id, it->source)) { valid = true; SetSubtitleVisibleInternal(true); } } } if(!valid) { CloseSubtitleStream(true); SetSubtitleVisibleInternal(false); } } return valid; } bool COMXPlayer::OpenTeletextStream(int iStream, int source) { if (!m_pDemuxer) return false; CDemuxStream* pStream = m_pDemuxer->GetStream(iStream); if(!pStream || pStream->disabled) return false; CDVDStreamInfo hint(*pStream, true); if (!m_dvdPlayerTeletext.CheckStream(hint)) return false; CLog::Log(LOGNOTICE, "Opening teletext stream: %i source: %i", iStream, source); if(m_CurrentTeletext.id < 0 || m_CurrentTeletext.hint != hint) { if(m_CurrentTeletext.id >= 0) { CLog::Log(LOGDEBUG, " - teletext codecs hints have changed, must close previous stream"); CloseTeletextStream(true); } if (!m_dvdPlayerTeletext.OpenStream(hint)) { /* mark stream as disabled, to disallaw further attempts*/ CLog::Log(LOGWARNING, "%s - Unsupported teletext stream %d. Stream disabled.", __FUNCTION__, iStream); pStream->disabled = true; pStream->SetDiscard(AVDISCARD_ALL); return false; } } else m_dvdPlayerTeletext.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); /* store information about stream */ m_CurrentTeletext.id = iStream; m_CurrentTeletext.source = source; m_CurrentTeletext.hint = hint; m_CurrentTeletext.stream = (void*)pStream; m_CurrentTeletext.started = false; return true; } bool COMXPlayer::CloseAudioStream(bool bWaitForBuffers) { if (m_CurrentAudio.id < 0) return false; CLog::Log(LOGNOTICE, "Closing audio stream"); if(bWaitForBuffers) SetCaching(CACHESTATE_DONE); m_omxPlayerAudio.CloseStream(bWaitForBuffers); m_CurrentAudio.Clear(); return true; } bool COMXPlayer::CloseVideoStream(bool bWaitForBuffers) { if (m_CurrentVideo.id < 0) return false; CLog::Log(LOGNOTICE, "Closing video stream"); if(bWaitForBuffers) SetCaching(CACHESTATE_DONE); m_omxPlayerVideo.CloseStream(bWaitForBuffers); m_CurrentVideo.Clear(); return true; } bool COMXPlayer::CloseSubtitleStream(bool bKeepOverlays) { if (m_CurrentSubtitle.id < 0) return false; CLog::Log(LOGNOTICE, "Closing subtitle stream"); m_dvdPlayerSubtitle.CloseStream(!bKeepOverlays); m_CurrentSubtitle.Clear(); return true; } bool COMXPlayer::CloseTeletextStream(bool bWaitForBuffers) { if (m_CurrentTeletext.id < 0) return false; CLog::Log(LOGNOTICE, "Closing teletext stream"); if(bWaitForBuffers) SetCaching(CACHESTATE_DONE); m_dvdPlayerTeletext.CloseStream(bWaitForBuffers); m_CurrentTeletext.Clear(); return true; } void COMXPlayer::FlushBuffers(bool queued, double pts, bool accurate) { double startpts; CLog::Log(LOGNOTICE, "FlushBuffers: q:%d pts:%.0f a:%d", queued, pts, accurate); if (!TP(m_playSpeed)) m_av_clock.OMXStop(); m_av_clock.OMXPause(); m_stepped = false; /* for now, ignore accurate flag as it discards keyframes and causes corrupt frames */ if(0 && accurate) startpts = pts; else startpts = DVD_NOPTS_VALUE; /* call with demuxer pts */ if(startpts != DVD_NOPTS_VALUE) startpts -= m_offset_pts; m_CurrentAudio.inited = false; m_CurrentAudio.dts = DVD_NOPTS_VALUE; m_CurrentAudio.startpts = startpts; m_CurrentVideo.inited = false; m_CurrentVideo.dts = DVD_NOPTS_VALUE; m_CurrentVideo.startpts = startpts; m_CurrentSubtitle.inited = false; m_CurrentSubtitle.dts = DVD_NOPTS_VALUE; m_CurrentSubtitle.startpts = startpts; m_CurrentTeletext.inited = false; m_CurrentTeletext.dts = DVD_NOPTS_VALUE; m_CurrentTeletext.startpts = startpts; if(queued) { m_omxPlayerAudio.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); m_omxPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); m_omxPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::VIDEO_NOSKIP)); m_dvdPlayerSubtitle.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); m_dvdPlayerTeletext.SendMessage(new CDVDMsg(CDVDMsg::GENERAL_RESET)); SynchronizePlayers(SYNCSOURCE_ALL); } else { m_omxPlayerAudio.Flush(); m_omxPlayerVideo.Flush(); m_dvdPlayerSubtitle.Flush(); m_dvdPlayerTeletext.Flush(); // clear subtitle and menu overlays m_overlayContainer.Clear(); if(m_playSpeed == DVD_PLAYSPEED_NORMAL || m_playSpeed == DVD_PLAYSPEED_PAUSE) { // make sure players are properly flushed, should put them in stalled state CDVDMsgGeneralSynchronize* msg = new CDVDMsgGeneralSynchronize(1000, 0); m_omxPlayerAudio.SendMessage(msg->Acquire(), 1); m_omxPlayerVideo.SendMessage(msg->Acquire(), 1); msg->Wait(&m_bStop, 0); msg->Release(); // purge any pending PLAYER_STARTED messages m_messenger.Flush(CDVDMsg::PLAYER_STARTED); // we should now wait for init cache SetCaching(CACHESTATE_FLUSH); m_CurrentAudio.started = false; m_CurrentVideo.started = false; m_CurrentSubtitle.started = false; m_CurrentTeletext.started = false; } if(pts != DVD_NOPTS_VALUE) m_clock.Discontinuity(pts); UpdatePlayState(0); // update state, buffers are flushed and it may take some time until // we get an update from players CSingleLock lock(m_StateSection); m_State = m_StateInput; } } // since we call ffmpeg functions to decode, this is being called in the same thread as ::Process() is int COMXPlayer::OnDVDNavResult(void* pData, int iMessage) { if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_BLURAY)) { if(iMessage == 0) m_overlayContainer.Add((CDVDOverlay*)pData); else if(iMessage == 1) m_messenger.Put(new CDVDMsg(CDVDMsg::GENERAL_FLUSH)); else if(iMessage == 2) m_dvd.iSelectedAudioStream = *(int*)pData; else if(iMessage == 3) m_dvd.iSelectedSPUStream = *(int*)pData; else if(iMessage == 4) m_omxPlayerVideo.EnableSubtitle(*(int*)pData ? true: false); else if(iMessage == 5) { if (m_dvd.state != DVDSTATE_STILL) { // else notify the player we have received a still frame m_dvd.iDVDStillTime = *(int*)pData; m_dvd.iDVDStillStartTime = XbmcThreads::SystemClockMillis(); /* adjust for the output delay in the video queue */ unsigned int time = 0; if( m_CurrentVideo.stream && m_dvd.iDVDStillTime > 0 ) { time = (unsigned int)(m_omxPlayerVideo.GetOutputDelay() / ( DVD_TIME_BASE / 1000 )); if( time < 10000 && time > 0 ) m_dvd.iDVDStillTime += time; } m_dvd.state = DVDSTATE_STILL; CLog::Log(LOGDEBUG, "DVDNAV_STILL_FRAME - waiting %i sec, with delay of %d sec", m_dvd.iDVDStillTime, time / 1000); } } else if (iMessage == 6) { m_dvd.state = DVDSTATE_NORMAL; CLog::Log(LOGDEBUG, "COMXPlayer::OnDVDNavResult - libbluray read error (DVDSTATE_NORMAL)"); CGUIDialogKaiToast::QueueNotification(g_localizeStrings.Get(25008), g_localizeStrings.Get(25009)); } return 0; } if (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) { CDVDInputStreamNavigator* pStream = (CDVDInputStreamNavigator*)m_pInputStream; switch (iMessage) { case DVDNAV_STILL_FRAME: { //CLog::Log(LOGDEBUG, "DVDNAV_STILL_FRAME"); dvdnav_still_event_t *still_event = (dvdnav_still_event_t *)pData; // should wait the specified time here while we let the player running // after that call dvdnav_still_skip(m_dvdnav); if (m_dvd.state != DVDSTATE_STILL) { // else notify the player we have received a still frame if(still_event->length < 0xff) m_dvd.iDVDStillTime = still_event->length * 1000; else m_dvd.iDVDStillTime = 0; m_dvd.iDVDStillStartTime = XbmcThreads::SystemClockMillis(); /* adjust for the output delay in the video queue */ unsigned int time = 0; if( m_CurrentVideo.stream && m_dvd.iDVDStillTime > 0 ) { time = (unsigned int)(m_omxPlayerVideo.GetOutputDelay() / ( DVD_TIME_BASE / 1000 )); if( time < 10000 && time > 0 ) m_dvd.iDVDStillTime += time; } m_dvd.state = DVDSTATE_STILL; CLog::Log(LOGDEBUG, "DVDNAV_STILL_FRAME - waiting %i sec, with delay of %d sec", still_event->length, time / 1000); } return NAVRESULT_HOLD; } break; case DVDNAV_SPU_CLUT_CHANGE: { m_dvdPlayerSubtitle.SendMessage(new CDVDMsgSubtitleClutChange((uint8_t*)pData)); } break; case DVDNAV_SPU_STREAM_CHANGE: { dvdnav_spu_stream_change_event_t* event = (dvdnav_spu_stream_change_event_t*)pData; int iStream = event->physical_wide; bool visible = !(iStream & 0x80); SetSubtitleVisibleInternal(visible); if (iStream >= 0) m_dvd.iSelectedSPUStream = (iStream & ~0x80); else m_dvd.iSelectedSPUStream = -1; m_CurrentSubtitle.stream = NULL; } break; case DVDNAV_AUDIO_STREAM_CHANGE: { // This should be the correct way i think, however we don't have any streams right now // since the demuxer hasn't started so it doesn't change. not sure how to do this. dvdnav_audio_stream_change_event_t* event = (dvdnav_audio_stream_change_event_t*)pData; // Tell system what audiostream should be opened by default if (event->logical >= 0) m_dvd.iSelectedAudioStream = event->physical; else m_dvd.iSelectedAudioStream = -1; m_CurrentAudio.stream = NULL; } break; case DVDNAV_HIGHLIGHT: { //dvdnav_highlight_event_t* pInfo = (dvdnav_highlight_event_t*)pData; int iButton = pStream->GetCurrentButton(); CLog::Log(LOGDEBUG, "DVDNAV_HIGHLIGHT: Highlight button %d\n", iButton); m_dvdPlayerSubtitle.UpdateOverlayInfo((CDVDInputStreamNavigator*)m_pInputStream, LIBDVDNAV_BUTTON_NORMAL); } break; case DVDNAV_VTS_CHANGE: { //dvdnav_vts_change_event_t* vts_change_event = (dvdnav_vts_change_event_t*)pData; CLog::Log(LOGDEBUG, "DVDNAV_VTS_CHANGE"); //Make sure we clear all the old overlays here, or else old forced items are left. m_overlayContainer.Clear(); //Force an aspect ratio that is set in the dvdheaders if available m_CurrentVideo.hint.aspect = pStream->GetVideoAspectRatio(); if( m_omxPlayerVideo.IsInited() ) m_omxPlayerVideo.SendMessage(new CDVDMsgDouble(CDVDMsg::VIDEO_SET_ASPECT, m_CurrentVideo.hint.aspect)); m_SelectionStreams.Clear(STREAM_NONE, STREAM_SOURCE_NAV); m_SelectionStreams.Update(m_pInputStream, m_pDemuxer); return NAVRESULT_HOLD; } break; case DVDNAV_CELL_CHANGE: { //dvdnav_cell_change_event_t* cell_change_event = (dvdnav_cell_change_event_t*)pData; CLog::Log(LOGDEBUG, "DVDNAV_CELL_CHANGE"); m_dvd.state = DVDSTATE_NORMAL; if( m_omxPlayerVideo.IsInited() ) m_omxPlayerVideo.SendMessage(new CDVDMsg(CDVDMsg::VIDEO_NOSKIP)); } break; case DVDNAV_NAV_PACKET: { //pci_t* pci = (pci_t*)pData; // this should be possible to use to make sure we get // seamless transitions over these boundaries // if we remember the old vobunits boundaries // when a packet comes out of demuxer that has // pts values outside that boundary, it belongs // to the new vobunit, wich has new timestamps UpdatePlayState(0); } break; case DVDNAV_HOP_CHANNEL: { // This event is issued whenever a non-seamless operation has been executed. // Applications with fifos should drop the fifos content to speed up responsiveness. CLog::Log(LOGDEBUG, "DVDNAV_HOP_CHANNEL"); if(m_dvd.state == DVDSTATE_SEEK) m_dvd.state = DVDSTATE_NORMAL; else m_messenger.Put(new CDVDMsg(CDVDMsg::GENERAL_FLUSH)); return NAVRESULT_ERROR; } break; case DVDNAV_STOP: { CLog::Log(LOGDEBUG, "DVDNAV_STOP"); m_dvd.state = DVDSTATE_NORMAL; CGUIDialogKaiToast::QueueNotification(g_localizeStrings.Get(16026), g_localizeStrings.Get(16029)); } break; default: {} break; } } return NAVRESULT_NOP; } bool COMXPlayer::ShowPVRChannelInfo(void) { bool bReturn(false); if (CSettings::Get().GetInt("pvrmenu.displaychannelinfo") > 0) { g_PVRManager.ShowPlayerInfo(CSettings::Get().GetInt("pvrmenu.displaychannelinfo")); bReturn = true; } return bReturn; } bool COMXPlayer::OnAction(const CAction &action) { #define THREAD_ACTION(action) \ do { \ if (!IsCurrentThread()) { \ m_messenger.Put(new CDVDMsgType<CAction>(CDVDMsg::GENERAL_GUI_ACTION, action)); \ return true; \ } \ } while(false) CDVDInputStream::IMenus* pMenus = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream); if (pMenus) { if( m_dvd.state == DVDSTATE_STILL && m_dvd.iDVDStillTime != 0 && pMenus->GetTotalButtons() == 0 ) { switch(action.GetID()) { case ACTION_NEXT_ITEM: case ACTION_MOVE_RIGHT: case ACTION_MOVE_UP: case ACTION_SELECT_ITEM: { THREAD_ACTION(action); /* this will force us out of the stillframe */ CLog::Log(LOGDEBUG, "%s - User asked to exit stillframe", __FUNCTION__); m_dvd.iDVDStillStartTime = 0; m_dvd.iDVDStillTime = 1; } return true; } } switch (action.GetID()) { /* this code is disabled to allow switching playlist items (dvdimage "stacks") */ #if 0 case ACTION_PREV_ITEM: // SKIP-: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - pushed prev"); pMenus->OnPrevious(); g_infoManager.SetDisplayAfterSeek(); return true; } break; case ACTION_NEXT_ITEM: // SKIP+: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - pushed next"); pMenus->OnNext(); g_infoManager.SetDisplayAfterSeek(); return true; } break; #endif case ACTION_SHOW_VIDEOMENU: // start button { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - go to menu"); pMenus->OnMenu(); if (m_playSpeed == DVD_PLAYSPEED_PAUSE) { SetPlaySpeed(DVD_PLAYSPEED_NORMAL); m_callback.OnPlayBackResumed(); } // send a message to everyone that we've gone to the menu CGUIMessage msg(GUI_MSG_VIDEO_MENU_STARTED, 0, 0); g_windowManager.SendThreadMessage(msg); return true; } break; } if (pMenus->IsInMenu()) { switch (action.GetID()) { case ACTION_NEXT_ITEM: THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - pushed next in menu, stream will decide"); pMenus->OnNext(); g_infoManager.SetDisplayAfterSeek(); return true; case ACTION_PREV_ITEM: THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - pushed prev in menu, stream will decide"); pMenus->OnPrevious(); g_infoManager.SetDisplayAfterSeek(); return true; case ACTION_PREVIOUS_MENU: case ACTION_NAV_BACK: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - menu back"); pMenus->OnBack(); } break; case ACTION_MOVE_LEFT: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - move left"); pMenus->OnLeft(); } break; case ACTION_MOVE_RIGHT: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - move right"); pMenus->OnRight(); } break; case ACTION_MOVE_UP: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - move up"); pMenus->OnUp(); } break; case ACTION_MOVE_DOWN: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - move down"); pMenus->OnDown(); } break; case ACTION_MOUSE_MOVE: case ACTION_MOUSE_LEFT_CLICK: { CRect rs, rd; g_renderManager.GetVideoRect(rs, rd); CPoint pt(action.GetAmount(), action.GetAmount(1)); if (!rd.PtInRect(pt)) return false; // out of bounds THREAD_ACTION(action); // convert to video coords... pt -= CPoint(rd.x1, rd.y1); pt.x *= rs.Width() / rd.Width(); pt.y *= rs.Height() / rd.Height(); pt += CPoint(rs.x1, rs.y1); if (action.GetID() == ACTION_MOUSE_LEFT_CLICK) { if (pMenus->OnMouseClick(pt)) return true; else { CApplicationMessenger::Get().SendAction(CAction(ACTION_TRIGGER_OSD), WINDOW_INVALID, false); // Trigger the osd return false; } } return pMenus->OnMouseMove(pt); } break; case ACTION_SELECT_ITEM: { THREAD_ACTION(action); CLog::Log(LOGDEBUG, " - button select"); // show button pushed overlay if(m_pInputStream->IsStreamType(DVDSTREAM_TYPE_DVD)) m_dvdPlayerSubtitle.UpdateOverlayInfo((CDVDInputStreamNavigator*)m_pInputStream, LIBDVDNAV_BUTTON_CLICKED); pMenus->ActivateButton(); } break; case REMOTE_0: case REMOTE_1: case REMOTE_2: case REMOTE_3: case REMOTE_4: case REMOTE_5: case REMOTE_6: case REMOTE_7: case REMOTE_8: case REMOTE_9: { THREAD_ACTION(action); // Offset from key codes back to button number int button = action.GetID() - REMOTE_0; CLog::Log(LOGDEBUG, " - button pressed %d", button); pMenus->SelectButton(button); } break; default: return false; break; } return true; // message is handled } } if (dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream)) { switch (action.GetID()) { case ACTION_MOVE_UP: case ACTION_NEXT_ITEM: case ACTION_CHANNEL_UP: m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_NEXT)); g_infoManager.SetDisplayAfterSeek(); ShowPVRChannelInfo(); return true; break; case ACTION_MOVE_DOWN: case ACTION_PREV_ITEM: case ACTION_CHANNEL_DOWN: m_messenger.Put(new CDVDMsg(CDVDMsg::PLAYER_CHANNEL_PREV)); g_infoManager.SetDisplayAfterSeek(); ShowPVRChannelInfo(); return true; break; case ACTION_CHANNEL_SWITCH: { // Offset from key codes back to button number int channel = action.GetAmount(); m_messenger.Put(new CDVDMsgInt(CDVDMsg::PLAYER_CHANNEL_SELECT_NUMBER, channel)); g_infoManager.SetDisplayAfterSeek(); ShowPVRChannelInfo(); return true; } break; } } switch (action.GetID()) { case ACTION_NEXT_ITEM: if (GetChapter() > 0 && GetChapter() < GetChapterCount()) { m_messenger.Put(new CDVDMsgPlayerSeekChapter(GetChapter() + 1)); g_infoManager.SetDisplayAfterSeek(); return true; } else break; case ACTION_PREV_ITEM: if (GetChapter() > 0) { m_messenger.Put(new CDVDMsgPlayerSeekChapter(GetChapter() - 1)); g_infoManager.SetDisplayAfterSeek(); return true; } else break; } // return false to inform the caller we didn't handle the message return false; } bool COMXPlayer::IsInMenu() const { CDVDInputStream::IMenus* pStream = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream); if (pStream) { if( m_dvd.state == DVDSTATE_STILL ) return true; else return pStream->IsInMenu(); } return false; } bool COMXPlayer::HasMenu() { CDVDInputStream::IMenus* pStream = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream); if (pStream) return pStream->HasMenu(); else return false; } std::string COMXPlayer::GetPlayerState() { CSingleLock lock(m_StateSection); return m_State.player_state; } bool COMXPlayer::SetPlayerState(std::string state) { m_messenger.Put(new CDVDMsgPlayerSetState(state)); return true; } int COMXPlayer::GetChapterCount() { CSingleLock lock(m_StateSection); return m_State.chapter_count; } int COMXPlayer::GetChapter() { CSingleLock lock(m_StateSection); return m_State.chapter; } void COMXPlayer::GetChapterName(std::string& strChapterName) { CSingleLock lock(m_StateSection); strChapterName = m_State.chapter_name; } int COMXPlayer::SeekChapter(int iChapter) { if (GetChapter() > 0) { if (iChapter < 0) iChapter = 0; if (iChapter > GetChapterCount()) return 0; // Seek to the chapter. m_messenger.Put(new CDVDMsgPlayerSeekChapter(iChapter)); SynchronizeDemuxer(100); } return 0; } int COMXPlayer::AddSubtitle(const std::string& strSubPath) { return AddSubtitleFile(strSubPath); } int COMXPlayer::GetCacheLevel() const { CSingleLock lock(m_StateSection); return (int)(m_StateInput.cache_level * 100); } double COMXPlayer::GetQueueTime() { int a = m_omxPlayerAudio.GetLevel(); int v = m_omxPlayerVideo.GetLevel(); return max(a, v) * 8000.0 / 100; } void COMXPlayer::GetVideoStreamInfo(SPlayerVideoStreamInfo &info) { info.bitrate = m_omxPlayerVideo.GetVideoBitrate(); std::string retVal; if (m_pDemuxer && (m_CurrentVideo.id != -1)) { m_pDemuxer->GetStreamCodecName(m_CurrentVideo.id, retVal); CDemuxStreamVideo* stream = static_cast<CDemuxStreamVideo*>(m_pDemuxer->GetStream(m_CurrentVideo.id)); if (stream) { info.width = stream->iWidth; info.height = stream->iHeight; } } info.videoCodecName = retVal; info.videoAspectRatio = g_renderManager.GetAspectRatio(); g_renderManager.GetVideoRect(info.SrcRect, info.DestRect); info.stereoMode = m_omxPlayerVideo.GetStereoMode(); if (info.stereoMode == "mono") info.stereoMode = ""; } int COMXPlayer::GetSourceBitrate() { if (m_pInputStream) return (int)m_pInputStream->GetBitstreamStats().GetBitrate(); return 0; } void COMXPlayer::GetAudioStreamInfo(int index, SPlayerAudioStreamInfo &info) { if (index < 0 || index > GetAudioStreamCount() - 1) return; if (index == GetAudioStream()) info.bitrate = m_omxPlayerAudio.GetAudioBitrate(); else if (m_pDemuxer) { CDemuxStreamAudio* stream = m_pDemuxer->GetStreamFromAudioId(index); if (stream) info.bitrate = stream->iBitRate; } OMXSelectionStream& s = m_SelectionStreams.Get(STREAM_AUDIO, index); if(s.language.length() > 0) info.language = s.language; if(s.name.length() > 0) info.name = s.name; if(s.type == STREAM_NONE) info.name += " (Invalid)"; if (m_pDemuxer) { CDemuxStreamAudio* stream = static_cast<CDemuxStreamAudio*>(m_pDemuxer->GetStreamFromAudioId(index)); if (stream) { info.channels = stream->iChannels; std::string codecName; m_pDemuxer->GetStreamCodecName(stream->iId, codecName); info.audioCodecName = codecName; } } } int COMXPlayer::AddSubtitleFile(const std::string& filename, const std::string& subfilename, CDemuxStream::EFlags flags) { std::string ext = URIUtils::GetExtension(filename); std::string vobsubfile = subfilename; if(ext == ".idx") { if (vobsubfile.empty()) { // find corresponding .sub (e.g. in case of manually selected .idx sub) vobsubfile = CUtil::GetVobSubSubFromIdx(filename); if (vobsubfile.empty()) return -1; } CDVDDemuxVobsub v; if(!v.Open(filename, vobsubfile)) return -1; m_SelectionStreams.Update(NULL, &v); int index = m_SelectionStreams.IndexOf(STREAM_SUBTITLE, m_SelectionStreams.Source(STREAM_SOURCE_DEMUX_SUB, filename), 0); m_SelectionStreams.Get(STREAM_SUBTITLE, index).flags = flags; m_SelectionStreams.Get(STREAM_SUBTITLE, index).filename2 = vobsubfile; ExternalStreamInfo info; CUtil::GetExternalStreamDetailsFromFilename(m_filename, vobsubfile, info); m_SelectionStreams.Get(STREAM_SUBTITLE, index).name = info.name; if (m_SelectionStreams.Get(STREAM_SUBTITLE, index).language.empty()) m_SelectionStreams.Get(STREAM_SUBTITLE, index).language = info.language; if (static_cast<CDemuxStream::EFlags>(info.flag) == CDemuxStream::FLAG_NONE) m_SelectionStreams.Get(STREAM_SUBTITLE, index).flags = flags; else m_SelectionStreams.Get(STREAM_SUBTITLE, index).flags = static_cast<CDemuxStream::EFlags>(info.flag); return index; } if(ext == ".sub") { // if this looks like vobsub file (i.e. .idx found), add it as such std::string vobsubidx = CUtil::GetVobSubIdxFromSub(filename); if (!vobsubidx.empty()) return AddSubtitleFile(vobsubidx, filename, flags); } OMXSelectionStream s; s.source = m_SelectionStreams.Source(STREAM_SOURCE_TEXT, filename); s.type = STREAM_SUBTITLE; s.id = 0; s.filename = filename; ExternalStreamInfo info; CUtil::GetExternalStreamDetailsFromFilename(m_filename, filename, info); s.name = info.name; s.language = info.language; if (static_cast<CDemuxStream::EFlags>(info.flag) == CDemuxStream::FLAG_NONE) s .flags = flags; else s.flags = static_cast<CDemuxStream::EFlags>(info.flag); m_SelectionStreams.Update(s); return m_SelectionStreams.IndexOf(STREAM_SUBTITLE, s.source, s.id); } void COMXPlayer::UpdatePlayState(double timeout) { if(m_StateInput.timestamp != 0 && m_StateInput.timestamp + DVD_MSEC_TO_TIME(timeout) > m_clock.GetAbsoluteClock()) return; SPlayerState state(m_StateInput); if (m_CurrentVideo.dts != DVD_NOPTS_VALUE) state.dts = m_CurrentVideo.dts; else if(m_CurrentAudio.dts != DVD_NOPTS_VALUE) state.dts = m_CurrentAudio.dts; else if(m_CurrentVideo.startpts != DVD_NOPTS_VALUE) state.dts = m_CurrentVideo.startpts; else if(m_CurrentAudio.startpts != DVD_NOPTS_VALUE) state.dts = m_CurrentAudio.startpts; if(m_pDemuxer) { state.chapter = m_pDemuxer->GetChapter(); state.chapter_count = m_pDemuxer->GetChapterCount(); m_pDemuxer->GetChapterName(state.chapter_name); if(state.dts == DVD_NOPTS_VALUE) state.time = 0; else state.time = DVD_TIME_TO_MSEC(state.dts + m_offset_pts); state.time_total = m_pDemuxer->GetStreamLength(); state.time_src = ETIMESOURCE_CLOCK; } state.canpause = true; state.canseek = true; if(m_pInputStream) { // override from input stream if needed CDVDInputStream::IChannel* pChannel = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream); if (pChannel) { state.canrecord = pChannel->CanRecord(); state.recording = pChannel->IsRecording(); } CDVDInputStream::IDisplayTime* pDisplayTime = dynamic_cast<CDVDInputStream::IDisplayTime*>(m_pInputStream); if (pDisplayTime && pDisplayTime->GetTotalTime() > 0) { state.time = pDisplayTime->GetTime(); state.time_total = pDisplayTime->GetTotalTime(); state.time_src = ETIMESOURCE_INPUT; } if (CDVDInputStream::IMenus* ptr = dynamic_cast<CDVDInputStream::IMenus*>(m_pInputStream)) { if(!ptr->GetState(state.player_state)) state.player_state = ""; if(m_dvd.state == DVDSTATE_STILL) { state.time = XbmcThreads::SystemClockMillis() - m_dvd.iDVDStillStartTime; state.time_total = m_dvd.iDVDStillTime; state.time_src = ETIMESOURCE_MENU; } } if (CDVDInputStream::ISeekable* ptr = dynamic_cast<CDVDInputStream::ISeekable*>(m_pInputStream)) { state.canpause = ptr->CanPause(); state.canseek = ptr->CanSeek(); } } if (m_Edl.HasCut()) { state.time = m_Edl.RemoveCutTime(llrint(state.time)); state.time_total = m_Edl.RemoveCutTime(llrint(state.time_total)); } if(state.time_total <= 0) state.canseek = false; if (state.time_src == ETIMESOURCE_CLOCK) state.time_offset = m_offset_pts; else if (state.dts != DVD_NOPTS_VALUE) state.time_offset = DVD_MSEC_TO_TIME(state.time) - state.dts; if (m_CurrentAudio.id >= 0 && m_pDemuxer) { CDemuxStream* pStream = m_pDemuxer->GetStream(m_CurrentAudio.id); if (pStream && pStream->type == STREAM_AUDIO) ((CDemuxStreamAudio*)pStream)->GetStreamInfo(state.demux_audio); } else state.demux_audio = ""; if (m_CurrentVideo.id >= 0 && m_pDemuxer) { CDemuxStream* pStream = m_pDemuxer->GetStream(m_CurrentVideo.id); if (pStream && pStream->type == STREAM_VIDEO) ((CDemuxStreamVideo*)pStream)->GetStreamInfo(state.demux_video); } else state.demux_video = ""; double level, delay, offset; if(GetCachingTimes(level, delay, offset)) { state.cache_delay = max(0.0, delay); state.cache_level = max(0.0, min(1.0, level)); state.cache_offset = offset; } else { state.cache_delay = 0.0; state.cache_level = min(1.0, GetQueueTime() / 8000.0); state.cache_offset = GetQueueTime() / state.time_total; } XFILE::SCacheStatus status; if(m_pInputStream && m_pInputStream->GetCacheStatus(&status)) { state.cache_bytes = status.forward; if(state.time_total) state.cache_bytes += m_pInputStream->GetLength() * GetQueueTime() / state.time_total; } else state.cache_bytes = 0; state.timestamp = m_clock.GetAbsoluteClock(); //{CLog::Log(LOGINFO, "%s: time:%.2f stamp:%.2f dts:%d m:%d (p:%d,c:%d) =%llu", __func__, (double)state.time, (double)state.timestamp, (int)DVD_TIME_TO_MSEC(state.dts + m_offset_pts), (int)DVD_TIME_TO_MSEC(m_stamp), (int)m_playSpeed, (int)m_caching, llrint(state.time + DVD_TIME_TO_MSEC(offset)));} CSingleLock lock(m_StateSection); m_StateInput = state; } void COMXPlayer::UpdateApplication(double timeout) { if(m_UpdateApplication != 0 && m_UpdateApplication + DVD_MSEC_TO_TIME(timeout) > m_clock.GetAbsoluteClock()) return; CDVDInputStream::IChannel* pStream = dynamic_cast<CDVDInputStream::IChannel*>(m_pInputStream); if(pStream) { CFileItem item(g_application.CurrentFileItem()); if(pStream->UpdateItem(item)) { g_application.CurrentFileItem() = item; CApplicationMessenger::Get().SetCurrentItem(item); } } m_UpdateApplication = m_clock.GetAbsoluteClock(); } bool COMXPlayer::CanRecord() { CSingleLock lock(m_StateSection); return m_State.canrecord; } bool COMXPlayer::IsRecording() { CSingleLock lock(m_StateSection); return m_State.recording; } bool COMXPlayer::Record(bool bOnOff) { if (m_pInputStream && (m_pInputStream->IsStreamType(DVDSTREAM_TYPE_TV) || m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER)) ) { m_messenger.Put(new CDVDMsgBool(CDVDMsg::PLAYER_SET_RECORD, bOnOff)); return true; } return false; } bool COMXPlayer::GetStreamDetails(CStreamDetails &details) { if (m_pDemuxer) { std::vector<OMXSelectionStream> subs = m_SelectionStreams.Get(STREAM_SUBTITLE); std::vector<CStreamDetailSubtitle> extSubDetails; for (unsigned int i = 0; i < subs.size(); i++) { if (subs[i].filename == m_filename) continue; CStreamDetailSubtitle p; p.m_strLanguage = subs[i].language; extSubDetails.push_back(p); } bool result = CDVDFileInfo::DemuxerToStreamDetails(m_pInputStream, m_pDemuxer, extSubDetails, details); if (result && details.GetStreamCount(CStreamDetail::VIDEO) > 0) // this is more correct (dvds in particular) { /* * We can only obtain the aspect & duration from dvdplayer when the Process() thread is running * and UpdatePlayState() has been called at least once. In this case dvdplayer duration/AR will * return 0 and we'll have to fallback to the (less accurate) info from the demuxer. */ float aspect = m_omxPlayerVideo.GetAspectRatio(); if (aspect > 0.0f) ((CStreamDetailVideo*)details.GetNthStream(CStreamDetail::VIDEO,0))->m_fAspect = aspect; int64_t duration = GetTotalTime() / 1000; if (duration > 0) ((CStreamDetailVideo*)details.GetNthStream(CStreamDetail::VIDEO,0))->m_iDuration = duration; } return result; } else return false; } std::string COMXPlayer::GetPlayingTitle() { /* Currently we support only Title Name from Teletext line 30 */ TextCacheStruct_t* ttcache = m_dvdPlayerTeletext.GetTeletextCache(); if (ttcache && !ttcache->line30.empty()) return ttcache->line30; return ""; } bool COMXPlayer::SwitchChannel(const CPVRChannel &channel) { if (!g_PVRManager.CheckParentalLock(channel)) return false; /* set GUI info */ if (!g_PVRManager.PerformChannelSwitch(channel, true)) return false; UpdateApplication(0); UpdatePlayState(0); /* select the new channel */ m_messenger.Put(new CDVDMsgType<CPVRChannel>(CDVDMsg::PLAYER_CHANNEL_SELECT, channel)); return true; } bool COMXPlayer::CachePVRStream(void) const { return m_pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER) && !g_PVRManager.IsPlayingRecording() && g_advancedSettings.m_bPVRCacheInDvdPlayer; } void COMXPlayer::GetRenderFeatures(std::vector<int> &renderFeatures) { renderFeatures.push_back(RENDERFEATURE_STRETCH); renderFeatures.push_back(RENDERFEATURE_CROP); renderFeatures.push_back(RENDERFEATURE_PIXEL_RATIO); renderFeatures.push_back(RENDERFEATURE_ZOOM); } void COMXPlayer::GetDeinterlaceMethods(std::vector<int> &deinterlaceMethods) { deinterlaceMethods.push_back(VS_INTERLACEMETHOD_DEINTERLACE); } void COMXPlayer::GetDeinterlaceModes(std::vector<int> &deinterlaceModes) { deinterlaceModes.push_back(VS_DEINTERLACEMODE_AUTO); deinterlaceModes.push_back(VS_DEINTERLACEMODE_OFF); deinterlaceModes.push_back(VS_DEINTERLACEMODE_FORCE); } void COMXPlayer::GetScalingMethods(std::vector<int> &scalingMethods) { } void COMXPlayer::GetAudioCapabilities(std::vector<int> &audioCaps) { audioCaps.push_back(IPC_AUD_OFFSET); audioCaps.push_back(IPC_AUD_SELECT_STREAM); audioCaps.push_back(IPC_AUD_SELECT_OUTPUT); audioCaps.push_back(IPC_AUD_AMP); } void COMXPlayer::GetSubtitleCapabilities(std::vector<int> &subCaps) { subCaps.push_back(IPC_SUBS_ALL); } #endif
NaeiKinDus/xbmc
xbmc/cores/omxplayer/OMXPlayer.cpp
C++
gpl-2.0
145,869
import java.util.Iterator; public class Stakk<E> implements StakkIterable<E>{ private Node forste; public Stakk(){ forste = new Node(null); } public void push(E data){ Node ny = new Node(data); ny.neste = forste.neste; forste.neste = ny; } public E top(){ if(forste.neste == null){ return null; } return forste.neste.data; } public E pop(){ if(forste.neste == null){ return null; } Node tmp = forste.neste; forste.neste = forste.neste.neste; return tmp.data; } public Iterator<E> iterator(){ return new StakkIterator(); } private class StakkIterator implements Iterator<E>{ Node denne; Node forrige; boolean kaltNext; StakkIterator(){ denne = forste; forrige = forste; kaltNext = false; } public boolean hasNext(){ return denne.neste != null; } public E next(){ kaltNext = true; if(denne != forste){ forrige = denne; } denne = denne.neste; return denne.data; } public void remove(){ if(kaltNext){ forrige.neste = denne.neste; kaltNext = false; }else{ throw new IllegalStateException(); } } } private class Node{ Node neste; E data; Node(E e){ data = e; } } }
gardir/INF1010-V16
uke06/Stakk.java
Java
gpl-2.0
1,209
package org.usfirst.frc.team1758.robot.commands.groups; import edu.wpi.first.wpilibj.command.CommandGroup; import org.usfirst.frc.team1758.robot.commands.MoveBack; import org.usfirst.frc.team1758.robot.commands.TurnOnLight; import org.usfirst.frc.team1758.robot.commands.TurnRight; public class HardAutoLeft extends CommandGroup { public HardAutoLeft() { addSequential(new TurnOnLight()); addSequential(new MoveBack(8000)); addSequential(new TurnRight(30)); addSequential(new MoveBack(9931)); } }
technomancers/2017SteamWorks
src/main/java/org/usfirst/frc/team1758/robot/commands/groups/HardAutoLeft.java
Java
gpl-2.0
521
/* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. This file is part of Quake III Arena source code. Quake III Arena source code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Quake III Arena source code 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 General Public License for more details. You should have received a copy of the GNU General Public License along with Foobar; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA =========================================================================== */ // // q_shared.c -- stateless support routines that are included in each code dll #include "q_shared.h" float Com_Clamp( float min, float max, float value ) { if ( value < min ) { return min; } if ( value > max ) { return max; } return value; } /* ============ COM_SkipPath ============ */ char *COM_SkipPath (char *pathname) { char *last; last = pathname; while (*pathname) { if (*pathname=='/') last = pathname+1; pathname++; } return last; } /* ============ COM_StripExtension ============ */ void COM_StripExtension( const char *in, char *out ) { while ( *in && *in != '.' ) { *out++ = *in++; } *out = 0; } /* ================== COM_DefaultExtension ================== */ void COM_DefaultExtension (char *path, int maxSize, const char *extension ) { char oldPath[MAX_QPATH]; char *src; // // if path doesn't have a .EXT, append extension // (extension should include the .) // src = path + strlen(path) - 1; while (*src != '/' && src != path) { if ( *src == '.' ) { return; // it has an extension } src--; } Q_strncpyz( oldPath, path, sizeof( oldPath ) ); Com_sprintf( path, maxSize, "%s%s", oldPath, extension ); } /* ============================================================================ BYTE ORDER FUNCTIONS ============================================================================ */ /* // can't just use function pointers, or dll linkage can // mess up when qcommon is included in multiple places static short (*_BigShort) (short l); static short (*_LittleShort) (short l); static int (*_BigLong) (int l); static int (*_LittleLong) (int l); static qint64 (*_BigLong64) (qint64 l); static qint64 (*_LittleLong64) (qint64 l); static float (*_BigFloat) (const float *l); static float (*_LittleFloat) (const float *l); short BigShort(short l){return _BigShort(l);} short LittleShort(short l) {return _LittleShort(l);} int BigLong (int l) {return _BigLong(l);} int LittleLong (int l) {return _LittleLong(l);} qint64 BigLong64 (qint64 l) {return _BigLong64(l);} qint64 LittleLong64 (qint64 l) {return _LittleLong64(l);} float BigFloat (const float *l) {return _BigFloat(l);} float LittleFloat (const float *l) {return _LittleFloat(l);} */ short ShortSwap (short l) { byte b1,b2; b1 = l&255; b2 = (l>>8)&255; return (b1<<8) + b2; } short ShortNoSwap (short l) { return l; } int LongSwap (int l) { byte b1,b2,b3,b4; b1 = l&255; b2 = (l>>8)&255; b3 = (l>>16)&255; b4 = (l>>24)&255; return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4; } int LongNoSwap (int l) { return l; } qint64 Long64Swap (qint64 ll) { qint64 result; result.b0 = ll.b7; result.b1 = ll.b6; result.b2 = ll.b5; result.b3 = ll.b4; result.b4 = ll.b3; result.b5 = ll.b2; result.b6 = ll.b1; result.b7 = ll.b0; return result; } qint64 Long64NoSwap (qint64 ll) { return ll; } typedef union { float f; unsigned int i; } _FloatByteUnion; float FloatSwap (const float *f) { _FloatByteUnion out; out.f = *f; out.i = LongSwap(out.i); return out.f; } float FloatNoSwap (const float *f) { return *f; } /* ================ Swap_Init ================ */ /* void Swap_Init (void) { byte swaptest[2] = {1,0}; // set the byte swapping variables in a portable manner if ( *(short *)swaptest == 1) { _BigShort = ShortSwap; _LittleShort = ShortNoSwap; _BigLong = LongSwap; _LittleLong = LongNoSwap; _BigLong64 = Long64Swap; _LittleLong64 = Long64NoSwap; _BigFloat = FloatSwap; _LittleFloat = FloatNoSwap; } else { _BigShort = ShortNoSwap; _LittleShort = ShortSwap; _BigLong = LongNoSwap; _LittleLong = LongSwap; _BigLong64 = Long64NoSwap; _LittleLong64 = Long64Swap; _BigFloat = FloatNoSwap; _LittleFloat = FloatSwap; } } */ /* ============================================================================ PARSING ============================================================================ */ static char com_token[MAX_TOKEN_CHARS]; static char com_parsename[MAX_TOKEN_CHARS]; static int com_lines; void COM_BeginParseSession( const char *name ) { com_lines = 0; Com_sprintf(com_parsename, sizeof(com_parsename), "%s", name); } int COM_GetCurrentParseLine( void ) { return com_lines; } char *COM_Parse( char **data_p ) { return COM_ParseExt( data_p, qtrue ); } void COM_ParseError( char *format, ... ) { va_list argptr; static char string[4096]; va_start (argptr, format); vsprintf (string, format, argptr); va_end (argptr); Com_Printf("ERROR: %s, line %d: %s\n", com_parsename, com_lines, string); } void COM_ParseWarning( char *format, ... ) { va_list argptr; static char string[4096]; va_start (argptr, format); vsprintf (string, format, argptr); va_end (argptr); Com_Printf("WARNING: %s, line %d: %s\n", com_parsename, com_lines, string); } /* ============== COM_Parse Parse a token out of a string Will never return NULL, just empty strings If "allowLineBreaks" is qtrue then an empty string will be returned if the next token is a newline. ============== */ static char *SkipWhitespace( char *data, qboolean *hasNewLines ) { int c; while( (c = *data) <= ' ') { if( !c ) { return NULL; } if( c == '\n' ) { com_lines++; *hasNewLines = qtrue; } data++; } return data; } int COM_Compress( char *data_p ) { char *in, *out; int c; qboolean newline = qfalse, whitespace = qfalse; in = out = data_p; if (in) { while ((c = *in) != 0) { // skip double slash comments if ( c == '/' && in[1] == '/' ) { while (*in && *in != '\n') { in++; } // skip /* */ comments } else if ( c == '/' && in[1] == '*' ) { while ( *in && ( *in != '*' || in[1] != '/' ) ) in++; if ( *in ) in += 2; // record when we hit a newline } else if ( c == '\n' || c == '\r' ) { newline = qtrue; in++; // record when we hit whitespace } else if ( c == ' ' || c == '\t') { whitespace = qtrue; in++; // an actual token } else { // if we have a pending newline, emit it (and it counts as whitespace) if (newline) { *out++ = '\n'; newline = qfalse; whitespace = qfalse; } if (whitespace) { *out++ = ' '; whitespace = qfalse; } // copy quoted strings unmolested if (c == '"') { *out++ = c; in++; while (1) { c = *in; if (c && c != '"') { *out++ = c; in++; } else { break; } } if (c == '"') { *out++ = c; in++; } } else { *out = c; out++; in++; } } } } *out = 0; return out - data_p; } char *COM_ParseExt( char **data_p, qboolean allowLineBreaks ) { int c = 0, len; qboolean hasNewLines = qfalse; char *data; data = *data_p; len = 0; com_token[0] = 0; // make sure incoming data is valid if ( !data ) { *data_p = NULL; return com_token; } while ( 1 ) { // skip whitespace data = SkipWhitespace( data, &hasNewLines ); if ( !data ) { *data_p = NULL; return com_token; } if ( hasNewLines && !allowLineBreaks ) { *data_p = data; return com_token; } c = *data; // skip double slash comments if ( c == '/' && data[1] == '/' ) { data += 2; while (*data && *data != '\n') { data++; } } // skip /* */ comments else if ( c=='/' && data[1] == '*' ) { data += 2; while ( *data && ( *data != '*' || data[1] != '/' ) ) { data++; } if ( *data ) { data += 2; } } else { break; } } // handle quoted strings if (c == '\"') { data++; while (1) { c = *data++; if (c=='\"' || !c) { com_token[len] = 0; *data_p = ( char * ) data; return com_token; } if (len < MAX_TOKEN_CHARS - 1) { com_token[len] = c; len++; } } } // parse a regular word do { if (len < MAX_TOKEN_CHARS - 1) { com_token[len] = c; len++; } data++; c = *data; if ( c == '\n' ) com_lines++; } while (c>32); com_token[len] = 0; *data_p = ( char * ) data; return com_token; } #if 0 // no longer used /* =============== COM_ParseInfos =============== */ int COM_ParseInfos( char *buf, int max, char infos[][MAX_INFO_STRING] ) { char *token; int count; char key[MAX_TOKEN_CHARS]; count = 0; while ( 1 ) { token = COM_Parse( &buf ); if ( !token[0] ) { break; } if ( strcmp( token, "{" ) ) { Com_Printf( "Missing { in info file\n" ); break; } if ( count == max ) { Com_Printf( "Max infos exceeded\n" ); break; } infos[count][0] = 0; while ( 1 ) { token = COM_ParseExt( &buf, qtrue ); if ( !token[0] ) { Com_Printf( "Unexpected end of info file\n" ); break; } if ( !strcmp( token, "}" ) ) { break; } Q_strncpyz( key, token, sizeof( key ) ); token = COM_ParseExt( &buf, qfalse ); if ( !token[0] ) { strcpy( token, "<NULL>" ); } Info_SetValueForKey( infos[count], key, token ); } count++; } return count; } #endif /* ================== COM_MatchToken ================== */ void COM_MatchToken( char **buf_p, char *match ) { char *token; token = COM_Parse( buf_p ); if ( strcmp( token, match ) ) { Com_Error( ERR_DROP, "MatchToken: %s != %s", token, match ); } } /* ================= SkipBracedSection The next token should be an open brace. Skips until a matching close brace is found. Internal brace depths are properly skipped. ================= */ qboolean SkipBracedSection (char **program, int depth) { char *token; do { token = COM_ParseExt( program, qtrue ); if( token[1] == 0 ) { if( token[0] == '{' ) { depth++; } else if( token[0] == '}' ) { depth--; } } } while( depth && *program ); return ( depth == 0 ); } /* ================= SkipRestOfLine ================= */ void SkipRestOfLine ( char **data ) { char *p; int c; p = *data; while ( (c = *p++) != 0 ) { if ( c == '\n' ) { com_lines++; break; } } *data = p; } void Parse1DMatrix (char **buf_p, int x, float *m) { char *token; int i; COM_MatchToken( buf_p, "(" ); for (i = 0 ; i < x ; i++) { token = COM_Parse(buf_p); m[i] = atof(token); } COM_MatchToken( buf_p, ")" ); } void Parse2DMatrix (char **buf_p, int y, int x, float *m) { int i; COM_MatchToken( buf_p, "(" ); for (i = 0 ; i < y ; i++) { Parse1DMatrix (buf_p, x, m + i * x); } COM_MatchToken( buf_p, ")" ); } void Parse3DMatrix (char **buf_p, int z, int y, int x, float *m) { int i; COM_MatchToken( buf_p, "(" ); for (i = 0 ; i < z ; i++) { Parse2DMatrix (buf_p, y, x, m + i * x*y); } COM_MatchToken( buf_p, ")" ); } /* ============================================================================ LIBRARY REPLACEMENT FUNCTIONS ============================================================================ */ int Q_isprint( int c ) { if ( c >= 0x20 && c <= 0x7E ) return ( 1 ); return ( 0 ); } int Q_islower( int c ) { if (c >= 'a' && c <= 'z') return ( 1 ); return ( 0 ); } int Q_isupper( int c ) { if (c >= 'A' && c <= 'Z') return ( 1 ); return ( 0 ); } int Q_isalpha( int c ) { if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) return ( 1 ); return ( 0 ); } char* Q_strrchr( const char* string, int c ) { char cc = c; char *s; char *sp=(char *)0; s = (char*)string; while (*s) { if (*s == cc) sp = s; s++; } if (cc == 0) sp = s; return sp; } /* ============= Q_strncpyz Safe strncpy that ensures a trailing zero ============= */ void Q_strncpyz( char *dest, const char *src, int destsize ) { // bk001129 - also NULL dest if ( !dest ) { // return qfalse; Com_Error( ERR_FATAL, "Q_strncpyz: NULL dest" ); } if ( !src ) { // return qfalse; Com_Error( ERR_FATAL, "Q_strncpyz: NULL src" ); } if ( destsize < 1 ) { Com_Error(ERR_FATAL,"Q_strncpyz: destsize < 1" ); } strncpy( dest, src, destsize-1 ); dest[destsize-1] = 0; // return qtrue; } int Q_stricmpn (const char *s1, const char *s2, int n) { int c1, c2; // bk001129 - moved in 1.17 fix not in id codebase if ( s1 == NULL ) { if ( s2 == NULL ) return 0; else return -1; } else if ( s2==NULL ) return 1; do { c1 = *s1++; c2 = *s2++; if (!n--) { return 0; // strings are equal until end point } if (c1 != c2) { if (c1 >= 'a' && c1 <= 'z') { c1 -= ('a' - 'A'); } if (c2 >= 'a' && c2 <= 'z') { c2 -= ('a' - 'A'); } if (c1 != c2) { return c1 < c2 ? -1 : 1; } } } while (c1); return 0; // strings are equal } int Q_strncmp (const char *s1, const char *s2, int n) { int c1, c2; do { c1 = *s1++; c2 = *s2++; if (!n--) { return 0; // strings are equal until end point } if (c1 != c2) { return c1 < c2 ? -1 : 1; } } while (c1); return 0; // strings are equal } int Q_stricmp (const char *s1, const char *s2) { return (s1 && s2) ? Q_stricmpn (s1, s2, 99999) : -1; } char *Q_strlwr( char *s1 ) { char *s; s = s1; while ( *s ) { *s = tolower(*s); s++; } return s1; } char *Q_strupr( char *s1 ) { char *s; s = s1; while ( *s ) { *s = toupper(*s); s++; } return s1; } // never goes past bounds or leaves without a terminating 0 void Q_strcat( char *dest, int size, const char *src ) { int l1; l1 = strlen( dest ); if ( l1 >= size ) { Com_Error( ERR_FATAL, "Q_strcat: already overflowed" ); } Q_strncpyz( dest + l1, src, size - l1 ); } vec3_t defaultColors[10] = { {0.0f, 0.0f, 0.0f}, {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {1.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f}, {0.0f, 1.0f, 1.0f}, {1.0f, 0.0f, 1.0f}, {1.0f, 1.0f, 1.0f}, {0.6f, 0.6f, 0.6f}, {0.3f, 0.3f, 0.3f}, }; vec3_t ospColors[10] = { {1.0f, 1.0f, 1.0f}, {1.0f, 0.2f, 0.2f}, {0.2f, 1.0f, 0.2f}, {1.0f, 1.0f, 0.1f}, {0.2f, 0.2f, 1.0f}, {1.0f, 0.1f, 1.0f}, {0.1f, 1.0f, 1.0f}, {1.0f, 0.59f, 0.12f}, {0.65f, 0.2f, 0.65f}, {0.6f, 0.6f, 1.0f}, }; int Q_parseColor( const char *p, const vec3_t numberColors[10], float *color ) { char c = *p++; if (c >= '0' && c <='9') { if (!color) return 1; memcpy( color, numberColors + c - '0', sizeof( vec3_t )); return 1; } else if ( ( c >= 'a' && c < 'x') || (c >= 'A' && c < 'X') ) { int deg; float angle, v; if (!color) return 1; deg = (((c|32) - 'a') * 360) / 24; angle = (DEG2RAD(deg % 120)); v = ((cos(angle) / cos((M_PI / 3) - angle)) + 1) / 3; if ( deg <= 120) { color[0] = v; color[1] = 1-v; color[2] = 0; } else if ( deg <= 240) { color[0] = 0; color[1] = v; color[2] = 1-v; } else { color[0] = 1-v; color[1] = 0; color[2] = v; } return 1; } else if ( c == 'x' || c == 'X' ) { int i; int val; for (i = 0;i<6;i++) { int readHex; c = p[i]; if ( c >= '0' && c<= '9') { readHex = c - '0'; } else if ( c >= 'a' && c<= 'f') { readHex = 0xa + c - 'a'; } else if ( c >= 'A' && c<= 'F') { readHex = 0xa + c - 'A'; } else { if (color) { color[0] = color[1] = color[2] = 1.0f; } return 1; } if (!color) continue; if ( i & 1) { val|= readHex; color[i >> 1] = val * (1 / 255.0f); } else { val = readHex << 4; } } return 7; } if (color) { color[0] = color[1] = color[2] = 1.0f; } return 0; } int Q_parseColorString( const char *p, float *color) { char c; if (!p ) return 0; c = *p; if (!c || c!= Q_COLOR_ESCAPE || (c== Q_COLOR_ESCAPE && !p[1])) return 0; return 1 + Q_parseColor( p+1, defaultColors, color ); } int Q_PrintStrlen( const char *string ) { int len; const char *p; if( !string ) { return 0; } len = 0; p = string; while( *p ) { int colorLen = Q_parseColorString( p, 0); if( colorLen ) { p += colorLen; continue; } p++; len++; } return len; } char *Q_CleanStr( char *string ) { char* d; char* s; int c; s = string; d = string; while ((c = *s) != 0 ) { int colorLen = Q_parseColorString( s, 0); if ( colorLen ) { s += colorLen; continue; } if ( c >= 0x20 && c <= 0x7E ) { *d++ = c; } s++; } *d = '\0'; return string; } void QDECL Com_sprintf( char *dest, int size, const char *fmt, ...) { int len; va_list argptr; char bigbuffer[32000]; // big, but small enough to fit in PPC stack va_start (argptr,fmt); len = vsprintf (bigbuffer,fmt,argptr); va_end (argptr); if ( len >= sizeof( bigbuffer ) ) { Com_Error( ERR_FATAL, "Com_sprintf: overflowed bigbuffer" ); } if (len >= size) { Com_Printf ("Com_sprintf: overflow of %i in %i\n", len, size); #ifdef _DEBUG __asm { int 3; } #endif } Q_strncpyz (dest, bigbuffer, size ); } /* ============ va does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functions. FIXME: make this buffer size safe someday ============ */ char * QDECL va( char *format, ... ) { va_list argptr; static char string[2][32000]; // in case va is called by nested functions static int index = 0; char *buf; buf = string[index & 1]; index++; va_start (argptr, format); vsprintf (buf, format,argptr); va_end (argptr); return buf; } /* ===================================================================== INFO STRINGS ===================================================================== */ /* =============== Info_ValueForKey Searches the string for the given key and returns the associated value, or an empty string. FIXME: overflow check? =============== */ char *Info_ValueForKey( const char *s, const char *key ) { char pkey[BIG_INFO_KEY]; static char value[2][BIG_INFO_VALUE]; // use two buffers so compares // work without stomping on each other static int valueindex = 0; char *o; if ( !s || !key ) { return ""; } if ( strlen( s ) >= BIG_INFO_STRING ) { Com_Error( ERR_DROP, "Info_ValueForKey: oversize infostring" ); } valueindex ^= 1; if (*s == '\\') s++; while (1) { o = pkey; while (*s != '\\') { if (!*s) return ""; *o++ = *s++; } *o = 0; s++; o = value[valueindex]; while (*s != '\\' && *s) { *o++ = *s++; } *o = 0; if (!Q_stricmp (key, pkey) ) return value[valueindex]; if (!*s) break; s++; } return ""; } /* =================== Info_NextPair Used to itterate through all the key/value pairs in an info string =================== */ void Info_NextPair( const char **head, char *key, char *value ) { char *o; const char *s; s = *head; if ( *s == '\\' ) { s++; } key[0] = 0; value[0] = 0; o = key; while ( *s != '\\' ) { if ( !*s ) { *o = 0; *head = s; return; } *o++ = *s++; } *o = 0; s++; o = value; while ( *s != '\\' && *s ) { *o++ = *s++; } *o = 0; *head = s; } /* =================== Info_RemoveKey =================== */ void Info_RemoveKey( char *s, const char *key ) { char *start; char pkey[MAX_INFO_KEY]; char value[MAX_INFO_VALUE]; char *o; if ( strlen( s ) >= MAX_INFO_STRING ) { Com_Error( ERR_DROP, "Info_RemoveKey: oversize infostring" ); } if (strchr (key, '\\')) { return; } while (1) { start = s; if (*s == '\\') s++; o = pkey; while (*s != '\\') { if (!*s) return; *o++ = *s++; } *o = 0; s++; o = value; while (*s != '\\' && *s) { if (!*s) return; *o++ = *s++; } *o = 0; if (!strcmp (key, pkey) ) { strcpy (start, s); // remove this part return; } if (!*s) return; } } /* =================== Info_RemoveKey_Big =================== */ void Info_RemoveKey_Big( char *s, const char *key ) { char *start; char pkey[BIG_INFO_KEY]; char value[BIG_INFO_VALUE]; char *o; if ( strlen( s ) >= BIG_INFO_STRING ) { Com_Error( ERR_DROP, "Info_RemoveKey_Big: oversize infostring" ); } if (strchr (key, '\\')) { return; } while (1) { start = s; if (*s == '\\') s++; o = pkey; while (*s != '\\') { if (!*s) return; *o++ = *s++; } *o = 0; s++; o = value; while (*s != '\\' && *s) { if (!*s) return; *o++ = *s++; } *o = 0; if (!strcmp (key, pkey) ) { strcpy (start, s); // remove this part return; } if (!*s) return; } } /* ================== Info_Validate Some characters are illegal in info strings because they can mess up the server's parsing ================== */ qboolean Info_Validate( const char *s ) { if ( strchr( s, '\"' ) ) { return qfalse; } if ( strchr( s, ';' ) ) { return qfalse; } return qtrue; } /* ================== Info_SetValueForKey Changes or adds a key/value pair MME: fixes a bug when infostring doesn't begin with backslash ================== */ void Info_SetValueForKey( char *s, const char *key, const char *value ) { char newi[MAX_INFO_STRING]; int needbackslash = 0; if ( strlen( s ) >= MAX_INFO_STRING ) { Com_Error( ERR_DROP, "Info_SetValueForKey: oversize infostring" ); } if (strchr (key, '\\') || strchr (value, '\\')) { Com_Printf ("Can't use keys or values with a \\\n"); return; } if (strchr (key, ';') || strchr (value, ';')) { Com_Printf ("Can't use keys or values with a semicolon\n"); return; } if (strchr (key, '\"') || strchr (value, '\"')) { Com_Printf ("Can't use keys or values with a \"\n"); return; } Info_RemoveKey (s, key); if (!value || !strlen(value)) return; Com_sprintf (newi, sizeof(newi), "\\%s\\%s", key, value); if (s[0] != '\\') needbackslash = 1; if (strlen(newi) + strlen(s) + needbackslash > MAX_INFO_STRING) { Com_Printf ("Info string length exceeded\n"); return; } if (needbackslash) strcat (newi, "\\"); strcat (newi, s); strcpy (s, newi); } /* ================== Info_SetValueForKey_Big Changes or adds a key/value pair ================== */ void Info_SetValueForKey_Big( char *s, const char *key, const char *value ) { char newi[BIG_INFO_STRING]; if ( strlen( s ) >= BIG_INFO_STRING ) { Com_Error( ERR_DROP, "Info_SetValueForKey: oversize infostring" ); } if (strchr (key, '\\') || strchr (value, '\\')) { Com_Printf ("Can't use keys or values with a \\\n"); return; } if (strchr (key, ';') || strchr (value, ';')) { Com_Printf ("Can't use keys or values with a semicolon\n"); return; } if (strchr (key, '\"') || strchr (value, '\"')) { Com_Printf ("Can't use keys or values with a \"\n"); return; } Info_RemoveKey_Big (s, key); if (!value || !strlen(value)) return; Com_sprintf (newi, sizeof(newi), "\\%s\\%s", key, value); if (strlen(newi) + strlen(s) >= BIG_INFO_STRING) { Com_Printf ("BIG Info string length exceeded\n"); return; } strcat (s, newi); } //====================================================================
mightycow/q3mme
code/game/q_shared.c
C
gpl-2.0
24,787
/* G E T _ I N P . C * * Copyright (C) 2019 Duncan Roe */ /* Implement ^<INP> and ^<INPF> run machine opcodes */ /* Headers */ #include <errno.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include "alu.h" bool get_inp(double *fval, long *val, long *len, char **err) { char *endptr; /* 1st char after number */ uint8_t lastch; /* Dump for char we nullify */ int i; /* Skip whitespace (including tabs) */ for (i = last_Curr->bcurs; i < last_Curr->bchars; i++) if (!isspace(last_Curr->bdata[i])) break; if (i == last_Curr->bchars) { *err = "No number before eol"; return false; } /* if (i == last_Curr->bchars) */ if (!(isdigit(last_Curr->bdata[i]) || last_Curr->bdata[i] == '+' || last_Curr->bdata[i] == '-' || (fval && last_Curr->bdata[i] == '.'))) { *err = "Next item on line is not a number"; return false; } /* if (!(isdigit(last_Curr->bdata[i] ... */ last_Curr->bcurs = i; /* Force null termination so strtol() will stop at end */ lastch = last_Curr->bdata[last_Curr->bchars]; last_Curr->bdata[last_Curr->bchars] = 0; /* Get the value (cast is to conform with strtol prototype) */ errno = 0; if (val) *val = strtol((char *)last_Curr->bdata + i, &endptr, 0); else *fval = strtod((char *)last_Curr->bdata + i, &endptr); /* Reinstate zeroed char */ last_Curr->bdata[last_Curr->bchars] = lastch; /* Check for overflow. Only check errno (previously zeroed) */ /* since LONG_MAX or LONG_MIN might be returned legitimately */ if (errno) { *err = strerror(errno); return false; } /* if (errno) */ /* All OK. Return length and finish */ *len = endptr - (char *)last_Curr->bdata - i; return true; } /* get_inp() */
duncan-roe/q
q/get_inp.c
C
gpl-2.0
1,889
/* main_menubar.c * Menu routines * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" #include <gtk/gtk.h> #include <stdlib.h> #include <string.h> #include <wsutil/u3.h> #include <epan/packet.h> #include <epan/prefs.h> #include <epan/prefs-int.h> #include <epan/dissector_filters.h> #include <epan/color_dissector_filters.h> #include <epan/epan_dissect.h> #include <epan/column.h> #include <epan/stats_tree_priv.h> #include <epan/ext_menubar.h> #include "globals.h" #include "color_filters.h" #include "ui/main_statusbar.h" #include "ui/preference_utils.h" #include "ui/recent.h" #include "ui/recent_utils.h" #include "ui/simple_dialog.h" #include "ui/software_update.h" #include "ui/utf8_entities.h" #include "ui/gtk/gui_stat_menu.h" #include "ui/gtk/about_dlg.h" #include "ui/gtk/capture_dlg.h" #include "ui/gtk/capture_if_dlg.h" #include "ui/gtk/color_dlg.h" #include "ui/gtk/export_object_dlg.h" #include "ui/gtk/filter_dlg.h" #include "ui/gtk/profile_dlg.h" #include "ui/gtk/dlg_utils.h" #include "ui/gtk/capture_file_dlg.h" #include "ui/gtk/fileset_dlg.h" #include "ui/gtk/file_import_dlg.h" #include "ui/gtk/find_dlg.h" #include "ui/gtk/goto_dlg.h" #include "ui/gtk/summary_dlg.h" #include "ui/gtk/prefs_dlg.h" #include "ui/gtk/packet_win.h" #include "ui/gtk/follow_tcp.h" #include "ui/gtk/follow_udp.h" #include "ui/gtk/follow_ssl.h" #include "ui/gtk/decode_as_dlg.h" #include "ui/gtk/help_dlg.h" #include "ui/gtk/supported_protos_dlg.h" #include "ui/gtk/proto_dlg.h" #include "ui/gtk/proto_hier_stats_dlg.h" #include "ui/gtk/keys.h" #include "ui/gtk/stock_icons.h" #include "ui/gtk/gtkglobals.h" #include "ui/gtk/packet_panes.h" #include "ui/gtk/conversations_table.h" #include "ui/gtk/hostlist_table.h" #include "ui/gtk/packet_history.h" #include "ui/gtk/sctp_stat_gtk.h" #include "ui/gtk/firewall_dlg.h" #include "ui/gtk/macros_dlg.h" #include "ui/gtk/export_sslkeys.h" #include "ui/gtk/gui_stat_menu.h" #include "ui/gtk/main.h" #include "ui/gtk/menus.h" #include "ui/gtk/main_menubar_private.h" #include "ui/gtk/main_toolbar.h" #include "ui/gtk/main_welcome.h" #include "ui/gtk/uat_gui.h" #include "ui/gtk/gui_utils.h" #include "ui/gtk/manual_addr_resolv.h" #include "ui/gtk/dissector_tables_dlg.h" #include "ui/gtk/expert_comp_dlg.h" #include "ui/gtk/time_shift_dlg.h" #include "ui/gtk/edit_packet_comment_dlg.h" #include "ui/gtk/addr_resolution_dlg.h" #include "ui/gtk/export_pdu_dlg.h" #include "ui/gtk/conversation_hastables_dlg.h" #include "ui/gtk/webbrowser.h" #include "ui/gtk/packet_list.h" #include "ui/gtk/lbm_stream_dlg.h" #include "ui/gtk/lbm_uimflow_dlg.h" #ifdef HAVE_LIBPCAP #include "capture_opts.h" #include "ui/capture_globals.h" #endif #ifdef HAVE_IGE_MAC_INTEGRATION #include <ige-mac-menu.h> #endif #ifdef HAVE_GTKOSXAPPLICATION #include <gtkmacintegration/gtkosxapplication.h> #endif static int initialize = TRUE; GtkActionGroup *main_menu_bar_action_group; static GtkUIManager *ui_manager_main_menubar = NULL; static GtkUIManager *ui_manager_packet_list_heading = NULL; static GtkUIManager *ui_manager_packet_list_menu = NULL; static GtkUIManager *ui_manager_tree_view_menu = NULL; static GtkUIManager *ui_manager_bytes_menu = NULL; static GtkUIManager *ui_manager_statusbar_profiles_menu = NULL; static GSList *popup_menu_list = NULL; static GtkAccelGroup *grp; static GList *merge_menu_items_list = NULL; static GList *build_menubar_items_callback_list = NULL; GtkWidget *popup_menu_object; static void menu_open_recent_file_cmd_cb(GtkAction *action, gpointer data _U_ ); static void add_recent_items (guint merge_id, GtkUIManager *ui_manager); static void add_tap_plugins (guint merge_id, GtkUIManager *ui_manager); static void menus_init(void); static void merge_menu_items(GList *node); static void ws_menubar_external_menus(void); static void ws_menubar_build_external_menus(void); static void set_menu_sensitivity (GtkUIManager *ui_manager, const gchar *, gint); static void menu_name_resolution_update_cb(GtkAction *action, gpointer data); static void name_resolution_cb(GtkWidget *w, gpointer d, gboolean* res_flag); static void colorize_cb(GtkWidget *w, gpointer d); static void rebuild_protocol_prefs_menu (module_t *prefs_module_p, gboolean preferences, GtkUIManager *ui_menu, const char *path); /* As a general GUI guideline, we try to follow the Gnome Human Interface Guidelines, which can be found at: http://developer.gnome.org/projects/gup/hig/1.0/index.html Please note: there are some differences between the Gnome HIG menu suggestions and our implementation: File/Open Recent: the Gnome HIG suggests putting the list of recently used files as elements into the File menuitem. As this is ok for only a few items, this will become unhandy for 10 or even more list entries. For this reason, we use a submenu for this. File/Close: the Gnome HIG suggests putting this item just above the Quit item. This results in unintuitive behaviour as both Close and Quit items are very near together. By putting the Close item near the open item(s), it better suggests that it will close the currently opened/captured file only. */ static void new_window_cb(GtkWidget *widget) { new_packet_window(widget, FALSE, FALSE); } static void new_window_cb_ref(GtkWidget *widget) { new_packet_window(widget, TRUE, FALSE); } #ifdef WANT_PACKET_EDITOR static void edit_window_cb(GtkWidget *widget _U_) { new_packet_window(widget, FALSE, TRUE); } #endif static void colorize_conversation_cb(color_conversation_filter_t* color_filter, int action_num) { gchar *filter = NULL; packet_info *pi = &cfile.edt->pi; if (action_num == 255) { color_filters_reset_tmp(); packet_list_colorize_packets(); } else if (cfile.current_frame) { if (color_filter == NULL) { /* colorize_conversation_cb was called from the window-menu * or through an accelerator key. Try to build a conversation * filter in the order TCP, UDP, IP, Ethernet and apply the * coloring */ color_filter = find_color_conversation_filter("tcp"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); if (filter == NULL) { color_filter = find_color_conversation_filter("udp"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); } if (filter == NULL) { color_filter = find_color_conversation_filter("ip"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); } if (filter == NULL) { color_filter = find_color_conversation_filter("ipv6"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); } if (filter == NULL) { color_filter = find_color_conversation_filter("eth"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); } if( filter == NULL ) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Unable to build conversation filter."); return; } } else { filter = color_filter->build_filter_string(pi); } if (action_num == 0) { /* Open the "new coloring filter" dialog with the filter */ color_display_with_filter(filter); } else { /* Set one of the temporary coloring filters */ color_filters_set_tmp(action_num, filter, FALSE); packet_list_colorize_packets(); } g_free(filter); } } static void goto_conversation_frame(gboolean dir) { gchar *filter = NULL; dfilter_t *dfcode = NULL; gboolean found_packet = FALSE; packet_info *pi = &cfile.edt->pi; color_conversation_filter_t* color_filter; /* Try to build a conversation * filter in the order TCP, UDP, IP, Ethernet and apply the * coloring */ color_filter = find_color_conversation_filter("tcp"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); color_filter = find_color_conversation_filter("udp"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); color_filter = find_color_conversation_filter("ip"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); color_filter = find_color_conversation_filter("ipv6"); if ((color_filter != NULL) && (color_filter->is_filter_valid(pi))) filter = color_filter->build_filter_string(pi); if( filter == NULL ) { statusbar_push_temporary_msg("Unable to build conversation filter."); g_free(filter); return; } if (!dfilter_compile(filter, &dfcode, NULL)) { /* The attempt failed; report an error. */ statusbar_push_temporary_msg("Error compiling filter for this conversation."); g_free(filter); return; } found_packet = cf_find_packet_dfilter(&cfile, dfcode, dir?SD_BACKWARD:SD_FORWARD); if (!found_packet) { /* We didn't find a packet */ statusbar_push_temporary_msg("No previous/next packet in conversation."); } dfilter_free(dfcode); g_free(filter); } static void goto_next_frame_conversation_cb(GtkAction *action _U_, gpointer user_data _U_) { goto_conversation_frame(FALSE); } static void goto_previous_frame_conversation_cb(GtkAction *action _U_, gpointer user_data _U_) { goto_conversation_frame(TRUE); } static void copy_description_cb(GtkAction *action _U_, gpointer user_data) { copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_DESCRIPTION); } static void copy_fieldname_cb(GtkAction *action _U_, gpointer user_data) { copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_FIELDNAME); } static void copy_value_cb(GtkAction *action _U_, gpointer user_data) { copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_VALUE); } static void copy_as_filter_cb(GtkAction *action _U_, gpointer user_data _U_) { /* match_selected_ptree_cb needs the popup_menu_object to get the right object E_DFILTER_TE_KEY */ match_selected_ptree_cb( popup_menu_object, (MATCH_SELECTED_E)(MATCH_SELECTED_REPLACE|MATCH_SELECTED_COPY_ONLY)); } static void set_reftime_cb(GtkAction *action _U_, gpointer user_data) { reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_TOGGLE); } static void find_next_ref_time_cb(GtkAction *action _U_, gpointer user_data) { reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_FIND_NEXT); } static void find_previous_ref_time_cb(GtkAction *action _U_, gpointer user_data) { reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_FIND_PREV); } static void menus_prefs_cb(GtkAction *action _U_, gpointer user_data) { prefs_page_cb( NULL /* widget _U_ */ , user_data, PREFS_PAGE_USER_INTERFACE); } static void main_toolbar_show_hide_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/MainToolbar"); recent.main_toolbar_show = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); main_widgets_show_or_hide(); } static void filter_toolbar_show_hide_cb(GtkAction * action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/FilterToolbar"); recent.filter_toolbar_show = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); main_widgets_show_or_hide(); } static void wireless_toolbar_show_hide_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/WirelessToolbar"); if(widget) { recent.wireless_toolbar_show = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); } else { recent.wireless_toolbar_show = FALSE; } main_widgets_show_or_hide(); } static void status_bar_show_hide_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/StatusBar"); recent.statusbar_show = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); main_widgets_show_or_hide(); } static void packet_list_show_hide_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketList"); recent.packet_list_show = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); main_widgets_show_or_hide(); } static void packet_details_show_hide_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketDetails"); recent.tree_view_show = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); main_widgets_show_or_hide(); } static void packet_bytes_show_hide_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketBytes"); recent.byte_view_show = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); main_widgets_show_or_hide(); } static void timestamp_seconds_time_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes"); if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { recent.gui_seconds_format = TS_SECONDS_HOUR_MIN_SEC; } else { recent.gui_seconds_format = TS_SECONDS_DEFAULT; } timestamp_set_seconds_type (recent.gui_seconds_format); /* This call adjusts column width */ cf_timestamp_auto_precision(&cfile); packet_list_queue_draw(); } static void timestamp_format_new_cb (GtkRadioAction *action, GtkRadioAction *current _U_, gpointer user_data _U_) { ts_type value; value = (ts_type) gtk_radio_action_get_current_value (action); if (recent.gui_time_format != value) { timestamp_set_type(value); recent.gui_time_format = value; /* This call adjusts column width */ cf_timestamp_auto_precision(&cfile); packet_list_queue_draw(); } } static void timestamp_precision_new_cb (GtkRadioAction *action, GtkRadioAction *current _U_, gpointer user_data _U_) { gint value; value = gtk_radio_action_get_current_value (action); if (recent.gui_time_precision != value) { /* the actual precision will be set in packet_list_queue_draw() below */ timestamp_set_precision(value); recent.gui_time_precision = value; /* This call adjusts column width */ cf_timestamp_auto_precision(&cfile); packet_list_queue_draw(); } } static void view_menu_en_for_MAC_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforMACLayer"); if (!widget){ g_warning("view_menu_en_for_MAC_cb: No widget found"); }else{ name_resolution_cb( widget , user_data, &gbl_resolv_flags.mac_name); } } static void view_menu_en_for_network_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforNetworkLayer"); if (!widget){ g_warning("view_menu_en_for_network_cb: No widget found"); }else{ name_resolution_cb( widget , user_data, &gbl_resolv_flags.network_name); } } static void view_menu_en_for_transport_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforTransportLayer"); if (!widget){ g_warning("view_menu_en_for_transport_cb: No widget found"); }else{ name_resolution_cb( widget , user_data, &gbl_resolv_flags.transport_name); } } static void view_menu_en_use_external_resolver_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/UseExternalNetworkNameResolver"); if (!widget){ g_warning("view_menu_en_use_external_resolver_cb: No widget found"); }else{ name_resolution_cb( widget , user_data, &gbl_resolv_flags.use_external_net_name_resolver); } } static void view_menu_colorize_pkt_lst_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/ColorizePacketList"); if (!widget){ g_warning("view_menu_colorize_pkt_lst_cb: No widget found"); }else{ colorize_cb( widget , user_data); } } #ifdef HAVE_LIBPCAP static void view_menu_auto_scroll_live_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/AutoScrollinLiveCapture"); if (!widget){ g_warning("view_menu_auto_scroll_live_cb: No widget found"); }else{ main_auto_scroll_live_changed(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))); } } #endif static void view_menu_color_conv_color1_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 1); } static void view_menu_color_conv_color2_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 2); } static void view_menu_color_conv_color3_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 3); } static void view_menu_color_conv_color4_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 4); } static void view_menu_color_conv_color5_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 5); } static void view_menu_color_conv_color6_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 6); } static void view_menu_color_conv_color7_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 7); } static void view_menu_color_conv_color8_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 8); } static void view_menu_color_conv_color9_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 9); } static void view_menu_color_conv_color10_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 10); } static void view_menu_color_conv_new_rule_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 0); } static void view_menu_reset_coloring_cb(GtkAction *action _U_, gpointer user_data _U_) { colorize_conversation_cb(NULL, 255); } /* * TODO Move this menu to capture_if_dlg.c ? */ #ifdef HAVE_LIBPCAP static void capture_if_action_cb(GtkAction *action _U_, gpointer user_data) { capture_if_cb(NULL /* GtkWidget *w _U_ */, user_data); } static void capture_prep_action_cb(GtkAction *action _U_, gpointer user_data) { capture_prep_cb(NULL /* GtkWidget *w _U_ */, user_data); } static void capture_start_action_cb(GtkAction *action _U_, gpointer user_data) { capture_start_cb(NULL /* GtkWidget *w _U_ */, user_data); } static void capture_stop_action_cb(GtkAction *action _U_, gpointer user_data) { capture_stop_cb(NULL /* GtkWidget *w _U_ */, user_data); } static void capture_restart_action_cb(GtkAction *action _U_, gpointer user_data) { capture_restart_cb(NULL /* GtkWidget *w _U_ */, user_data); } static void capture_filters_action_cb(GtkAction *action _U_, gpointer user_data _U_) { cfilter_dialog_cb(NULL /* GtkWidget *w _U_ */); } /* * We've been asked to rescan the system looking for interfaces. */ static void refresh_interfaces_action_cb(GtkAction *action _U_, gpointer user_data _U_) { refresh_local_interface_lists(); } #endif /* HAVE_LIBPCAP */ static void help_menu_cont_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(HELP_CONTENT)); } static void help_menu_faq_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_FAQ)); } static void help_menu_ask_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_ASK)); } static void help_menu_wireshark_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_WIRESHARK)); } static void help_menu_wireshark_flt_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_WIRESHARK_FILTER)); } static void help_menu_Capinfos_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_CAPINFOS)); } static void help_menu_Dumpcap_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_DUMPCAP)); } static void help_menu_Editcap_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_EDITCAP)); } static void help_menu_Mergecap_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_MERGECAP)); } static void help_menu_RawShark_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_RAWSHARK)); } static void help_menu_Reorder_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_REORDERCAP)); } static void help_menu_Text2pcap_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_TEXT2PCAP)); } static void help_menu_TShark_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/*widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(LOCALPAGE_MAN_TSHARK)); } static void help_menu_Website_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_HOME)); } static void help_menu_Wiki_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_WIKI)); } static void help_menu_Downloads_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb(NULL/* widget _U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_DOWNLOAD)); } static void help_menu_SampleCaptures_cb(GtkAction *action _U_, gpointer user_data _U_) { topic_menu_cb( NULL/* widget_U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_SAMPLE_FILES)); } #ifdef HAVE_SOFTWARE_UPDATE static void check_for_updates_cb(GtkAction *action _U_, gpointer user_data _U_) { software_update_check(); } #endif /* HAVE_SOFTWARE_UPDATE */ static const char *ui_desc_menubar = "<ui>\n" " <menubar name ='Menubar'>\n" " <menu name= 'FileMenu' action='/File'>\n" " <menuitem name='Open' action='/File/Open'/>\n" " <menu name='OpenRecent' action='/File/OpenRecent'>\n" " <placeholder name='RecentFiles'/>\n" " </menu>\n" " <menuitem name='Merge' action='/File/Merge'/>\n" " <menuitem name='ImportFromHexDump' action='/File/ImportFromHexDump'/>\n" " <menuitem name='Close' action='/File/Close'/>\n" " <separator/>\n" " <menuitem name='Save' action='/File/Save'/>\n" " <menuitem name='SaveAs' action='/File/SaveAs'/>\n" " <separator/>\n" " <menu name= 'Set' action='/File/Set'>\n" " <menuitem name='ListFiles' action='/File/Set/ListFiles'/>\n" " <menuitem name='NextFile' action='/File/Set/NextFile'/>\n" " <menuitem name='PreviousFile' action='/File/Set/PreviousFile'/>\n" " </menu>\n" " <separator/>\n" " <menuitem name='ExportSpecifiedPackets' action='/File/ExportSpecifiedPackets'/>\n" " <menu name= 'ExportPacketDissections' action='/File/ExportPacketDissections'>\n" " <menuitem name='AsTxt' action='/File/ExportPacketDissections/Text'/>\n" " <menuitem name='AsPostScript' action='/File/ExportPacketDissections/PostScript'/>\n" " <menuitem name='AsCSV' action='/File/ExportPacketDissections/CSV'/>\n" " <menuitem name='AsCArrays' action='/File/ExportPacketDissections/CArrays'/>\n" " <separator/>\n" " <menuitem name='AsPSML' action='/File/ExportPacketDissections/PSML'/>\n" " <menuitem name='AsPDML' action='/File/ExportPacketDissections/PDML'/>\n" " <separator/>\n" " </menu>\n" " <menuitem name='ExportSelectedPacketBytes' action='/File/ExportSelectedPacketBytes'/>\n" " <menuitem name='ExportPDUs' action='/File/ExportPDUs'/>\n" " <menuitem name='ExportSSLSessionKeys' action='/File/ExportSSLSessionKeys'/>\n" " <menu name= 'ExportObjects' action='/File/ExportObjects'>\n" " <menuitem name='HTTP' action='/File/ExportObjects/HTTP'/>\n" " <menuitem name='DICOM' action='/File/ExportObjects/DICOM'/>\n" " <menuitem name='SMB' action='/File/ExportObjects/SMB'/>\n" " <menuitem name='TFTP' action='/File/ExportObjects/TFTP'/>\n" " </menu>\n" " <separator/>\n" " <menuitem name='Print' action='/File/Print'/>\n" " <separator/>\n" " <menuitem name='Quit' action='/File/Quit'/>\n" " </menu>\n" " <menu name= 'EditMenu' action='/Edit'>\n" " <menu name= 'Copy' action='/Edit/Copy'>\n" " <menuitem name='Description' action='/Edit/Copy/Description'/>\n" " <menuitem name='Fieldname' action='/Edit/Copy/Fieldname'/>\n" " <menuitem name='Value' action='/Edit/Copy/Value'/>\n" " <separator/>\n" " <menuitem name='AsFilter' action='/Edit/Copy/AsFilter'/>\n" " </menu>\n" " <menuitem name='FindPacket' action='/Edit/FindPacket'/>\n" " <menuitem name='FindNext' action='/Edit/FindNext'/>\n" " <menuitem name='FindPrevious' action='/Edit/FindPrevious'/>\n" " <separator/>\n" " <menuitem name='MarkPacket' action='/Edit/MarkPacket'/>\n" " <menuitem name='MarkAllDisplayedPackets' action='/Edit/MarkAllDisplayedPackets'/>\n" " <menuitem name='UnmarkAllDisplayedPackets' action='/Edit/UnmarkAllDisplayedPackets'/>\n" " <menuitem name='FindNextMark' action='/Edit/FindNextMark'/>\n" " <menuitem name='FindPreviousMark' action='/Edit/FindPreviousMark'/>\n" " <separator/>\n" " <menuitem name='IgnorePacket' action='/Edit/IgnorePacket'/>\n" " <menuitem name='IgnoreAllDisplayedPackets' action='/Edit/IgnoreAllDisplayedPackets'/>\n" " <menuitem name='Un-IgnoreAllPackets' action='/Edit/Un-IgnoreAllPackets'/>\n" " <separator/>\n" " <menuitem name='SetTimeReference' action='/Edit/SetTimeReference'/>\n" " <menuitem name='Un-TimeReferenceAllPackets' action='/Edit/Un-TimeReferenceAllPackets'/>\n" " <menuitem name='FindNextTimeReference' action='/Edit/FindNextTimeReference'/>\n" " <menuitem name='FindPreviousTimeReference' action='/Edit/FindPreviousTimeReference'/>\n" " <separator/>\n" " <menuitem name='TimeShift' action='/Edit/TimeShift'/>\n" " <separator/>\n" #ifdef WANT_PACKET_EDITOR " <menuitem name='EditPacket' action='/Edit/EditPacket'/>\n" #endif " <menuitem name='AddEditPktComment' action='/Edit/AddEditPktComment'/>\n" " <separator/>\n" " <menuitem name='ConfigurationProfiles' action='/Edit/ConfigurationProfiles'/>\n" " <menuitem name='Preferences' action='/Edit/Preferences'/>\n" " </menu>\n" " <menu name= 'ViewMenu' action='/View'>\n" " <menuitem name='MainToolbar' action='/View/MainToolbar'/>\n" " <menuitem name='FilterToolbar' action='/View/FilterToolbar'/>\n" " <menuitem name='WirelessToolbar' action='/View/WirelessToolbar'/>\n" " <menuitem name='StatusBar' action='/View/StatusBar'/>\n" " <separator/>\n" " <menuitem name='PacketList' action='/View/PacketList'/>\n" " <menuitem name='PacketDetails' action='/View/PacketDetails'/>\n" " <menuitem name='PacketBytes' action='/View/PacketBytes'/>\n" " <separator/>\n" " <menu name= 'TimeDisplayFormat' action='/View/TimeDisplayFormat'>\n" " <menuitem name='DateYMDandTimeofDay' action='/View/TimeDisplayFormat/DateYMDandTimeofDay'/>\n" " <menuitem name='DateYDOYandTimeofDay' action='/View/TimeDisplayFormat/DateYDOYandTimeofDay'/>\n" " <menuitem name='TimeofDay' action='/View/TimeDisplayFormat/TimeofDay'/>\n" " <menuitem name='SecondsSinceEpoch' action='/View/TimeDisplayFormat/SecondsSinceEpoch'/>\n" " <menuitem name='SecondsSinceBeginningofCapture' action='/View/TimeDisplayFormat/SecondsSinceBeginningofCapture'/>\n" " <menuitem name='SecondsSincePreviousCapturedPacket' action='/View/TimeDisplayFormat/SecondsSincePreviousCapturedPacket'/>\n" " <menuitem name='SecondsSincePreviousDisplayedPacket' action='/View/TimeDisplayFormat/SecondsSincePreviousDisplayedPacket'/>\n" " <menuitem name='UTCDateYMDandTimeofDay' action='/View/TimeDisplayFormat/UTCDateYMDandTimeofDay'/>\n" " <menuitem name='UTCDateYDOYandTimeofDay' action='/View/TimeDisplayFormat/UTCDateYDOYandTimeofDay'/>\n" " <menuitem name='UTCTimeofDay' action='/View/TimeDisplayFormat/UTCTimeofDay'/>\n" " <separator/>\n" " <menuitem name='FileFormatPrecision-Automatic' action='/View/TimeDisplayFormat/FileFormatPrecision-Automatic'/>\n" " <menuitem name='FileFormatPrecision-Seconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Seconds'/>\n" " <menuitem name='FileFormatPrecision-Deciseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Deciseconds'/>\n" " <menuitem name='FileFormatPrecision-Centiseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Centiseconds'/>\n" " <menuitem name='FileFormatPrecision-Milliseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Milliseconds'/>\n" " <menuitem name='FileFormatPrecision-Microseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Microseconds'/>\n" " <menuitem name='FileFormatPrecision-Nanoseconds' action='/View/TimeDisplayFormat/FileFormatPrecision-Nanoseconds'/>\n" " <separator/>\n" " <menuitem name='DisplaySecondsWithHoursAndMinutes' action='/View/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes'/>\n" " </menu>\n" " <menu name= 'NameResolution' action='/View/NameResolution'>\n" " <menuitem name='ResolveName' action='/View/NameResolution/ResolveName'/>\n" " <menuitem name='ManuallyResolveName' action='/View/NameResolution/ManuallyResolveName'/>\n" " <separator/>\n" " <menuitem name='EnableforMACLayer' action='/View/NameResolution/EnableforMACLayer'/>\n" " <menuitem name='EnableforTransportLayer' action='/View/NameResolution/EnableforTransportLayer'/>\n" " <menuitem name='EnableforNetworkLayer' action='/View/NameResolution/EnableforNetworkLayer'/>\n" " <menuitem name='UseExternalNetworkNameResolver' action='/View/NameResolution/UseExternalNetworkNameResolver'/>\n" " </menu>\n" " <menuitem name='ColorizePacketList' action='/View/ColorizePacketList'/>\n" #ifdef HAVE_LIBPCAP " <menuitem name='AutoScrollinLiveCapture' action='/View/AutoScrollinLiveCapture'/>\n" #endif " <separator/>\n" " <menuitem name='ZoomIn' action='/View/ZoomIn'/>\n" " <menuitem name='ZoomOut' action='/View/ZoomOut'/>\n" " <menuitem name='NormalSize' action='/View/NormalSize'/>\n" " <separator/>\n" " <menuitem name='ResizeAllColumns' action='/View/ResizeAllColumns'/>\n" " <menuitem name='DisplayedColumns' action='/View/DisplayedColumns'/>\n" " <separator/>\n" " <menuitem name='ExpandSubtrees' action='/View/ExpandSubtrees'/>\n" " <menuitem name='CollapseSubtrees' action='/View/CollapseSubtrees'/>\n" " <menuitem name='ExpandAll' action='/View/ExpandAll'/>\n" " <menuitem name='CollapseAll' action='/View/CollapseAll'/>\n" " <separator/>\n" " <menu name= 'ColorizeConversation' action='/View/ColorizeConversation'>\n" " <menuitem name='Color1' action='/View/ColorizeConversation/Color 1'/>\n" " <menuitem name='Color2' action='/View/ColorizeConversation/Color 2'/>\n" " <menuitem name='Color3' action='/View/ColorizeConversation/Color 3'/>\n" " <menuitem name='Color4' action='/View/ColorizeConversation/Color 4'/>\n" " <menuitem name='Color5' action='/View/ColorizeConversation/Color 5'/>\n" " <menuitem name='Color6' action='/View/ColorizeConversation/Color 6'/>\n" " <menuitem name='Color7' action='/View/ColorizeConversation/Color 7'/>\n" " <menuitem name='Color8' action='/View/ColorizeConversation/Color 8'/>\n" " <menuitem name='Color9' action='/View/ColorizeConversation/Color 9'/>\n" " <menuitem name='Color10' action='/View/ColorizeConversation/Color 10'/>\n" " <menuitem name='NewColoringRule' action='/View/ColorizeConversation/NewColoringRule'/>\n" " </menu>\n" " <separator/>\n" " <menuitem name='ResetColoring1-10' action='/View/ResetColoring1-10'/>\n" " <menuitem name='ColoringRules' action='/View/ColoringRules'/>\n" " <separator/>\n" " <menuitem name='ShowPacketinNewWindow' action='/View/ShowPacketinNewWindow'/>\n" " <menuitem name='Reload' action='/View/Reload'/>\n" " </menu>\n" " <menu name= 'GoMenu' action='/Go'>\n" " <menuitem name='Back' action='/Go/Back'/>\n" " <menuitem name='Forward' action='/Go/Forward'/>\n" " <menuitem name='Goto' action='/Go/Goto'/>\n" " <menuitem name='GotoCorrespondingPacket' action='/Go/GotoCorrespondingPacket'/>\n" " <separator/>\n" " <menuitem name='PreviousPacket' action='/Go/PreviousPacket'/>\n" " <menuitem name='NextPacket' action='/Go/NextPacket'/>\n" " <menuitem name='FirstPacket' action='/Go/FirstPacket'/>\n" " <menuitem name='LastPacket' action='/Go/LastPacket'/>\n" " <menuitem name='PreviousPacketInConversation' action='/Go/PreviousPacketInConversation'/>\n" " <menuitem name='NextPacketInConversation' action='/Go/NextPacketInConversation'/>\n" " </menu>\n" #ifdef HAVE_LIBPCAP " <menu name= 'CaptureMenu' action='/Capture'>\n" " <menuitem name='Interfaces' action='/Capture/Interfaces'/>\n" " <menuitem name='Options' action='/Capture/Options'/>\n" " <menuitem name='Start' action='/Capture/Start'/>\n" " <menuitem name='Stop' action='/Capture/Stop'/>\n" " <menuitem name='Restart' action='/Capture/Restart'/>\n" " <menuitem name='CaptureFilters' action='/Capture/CaptureFilters'/>\n" " <menuitem name='RefreshInterfaces' action='/Capture/RefreshInterfaces'/>\n" " </menu>\n" #endif " <menu name= 'AnalyzeMenu' action='/Analyze'>\n" " <menuitem name='DisplayFilters' action='/Analyze/DisplayFilters'/>\n" " <menuitem name='DisplayFilterMacros' action='/Analyze/DisplayFilterMacros'/>\n" " <separator/>\n" " <menuitem name='ApplyasColumn' action='/Analyze/ApplyasColumn'/>\n" " <menu name= 'ApplyAsFilter' action='/ApplyasFilter'>\n" " <menuitem name='Selected' action='/ApplyasFilter/Selected'/>\n" " <menuitem name='NotSelected' action='/ApplyasFilter/Not Selected'/>\n" " <menuitem name='AndSelected' action='/ApplyasFilter/AndSelected'/>\n" " <menuitem name='OrSelected' action='/ApplyasFilter/OrSelected'/>\n" " <menuitem name='AndNotSelected' action='/ApplyasFilter/AndNotSelected'/>\n" " <menuitem name='OrNotSelected' action='/ApplyasFilter/OrNotSelected'/>\n" " </menu>\n" " <menu name= 'PrepareaFilter' action='/PrepareaFilter'>\n" " <menuitem name='Selected' action='/PrepareaFilter/Selected'/>\n" " <menuitem name='NotSelected' action='/PrepareaFilter/Not Selected'/>\n" " <menuitem name='AndSelected' action='/PrepareaFilter/AndSelected'/>\n" " <menuitem name='OrSelected' action='/PrepareaFilter/OrSelected'/>\n" " <menuitem name='AndNotSelected' action='/PrepareaFilter/AndNotSelected'/>\n" " <menuitem name='OrNotSelected' action='/PrepareaFilter/OrNotSelected'/>\n" " </menu>\n" " <separator/>\n" " <menuitem name='EnabledProtocols' action='/Analyze/EnabledProtocols'/>\n" " <menuitem name='DecodeAs' action='/Analyze/DecodeAs'/>\n" " <menuitem name='UserSpecifiedDecodes' action='/Analyze/UserSpecifiedDecodes'/>\n" " <separator/>\n" " <menuitem name='FollowTCPStream' action='/Analyze/FollowTCPStream'/>\n" " <menuitem name='FollowUDPStream' action='/Analyze/FollowUDPStream'/>\n" " <menuitem name='FollowSSLStream' action='/Analyze/FollowSSLStream'/>\n" " <menuitem name='ExpertInfo' action='/Analyze/ExpertInfo'/>\n" " <menu name= 'ConversationFilterMenu' action='/Analyze/ConversationFilter'>\n" " <placeholder name='Filters'/>\n" " </menu>\n" " </menu>\n" " <menu name= 'StatisticsMenu' action='/Statistics'>\n" " <menuitem name='Summary' action='/Statistics/Summary'/>\n" " <menuitem name='ShowCommentsSummary' action='/Statistics/CommentsSummary'/>\n" " <menuitem name='ShowAddreRes' action='/Statistics/ShowAddreRes'/>\n" " <menuitem name='ProtocolHierarchy' action='/Statistics/ProtocolHierarchy'/>\n" " <menuitem name='Conversations' action='/Statistics/Conversations'/>\n" " <menuitem name='Endpoints' action='/Statistics/Endpoints'/>\n" " <menuitem name='PacketLengths' action='/Statistics/plen'/>\n" " <menuitem name='IOGraphs' action='/Statistics/IOGraphs'/>\n" " <separator/>\n" " <menu name= 'ConversationListMenu' action='/Statistics/ConversationList'>\n" " <placeholder name='Conversations'/>\n" " </menu>\n" " <menu name= 'EndpointListMenu' action='/Statistics/EndpointList'>\n" " <placeholder name='Endpoints'/>\n" " </menu>\n" " <menu name='ServiceResponseTimeMenu' action='/Statistics/ServiceResponseTime'>\n" " <menuitem name='DCE-RPC' action='/Statistics/ServiceResponseTime/DCE-RPC'/>\n" " <menuitem name='ONC-RPC' action='/Statistics/ServiceResponseTime/ONC-RPC'/>\n" " </menu>\n" " <separator/>\n" " <menu name= '29West' action='/Statistics/29West'>\n" " <menu name= '29WestTopicMenu' action='/Statistics/29West/Topics'>\n" " <menuitem name='29WestTopicAdsTopic' action='/Statistics/29West/Topics/lbmr_topic_ads_topic'/>\n" " <menuitem name='29WestTopicAdsSource' action='/Statistics/29West/Topics/lbmr_topic_ads_source'/>\n" " <menuitem name='29WestTopicAdsTransport' action='/Statistics/29West/Topics/lbmr_topic_ads_transport'/>\n" " <menuitem name='29WestTopicQueriesTopic' action='/Statistics/29West/Topics/lbmr_topic_queries_topic'/>\n" " <menuitem name='29WestTopicQueriesReceiver' action='/Statistics/29West/Topics/lbmr_topic_queries_receiver'/>\n" " <menuitem name='29WestTopicQueriesPattern' action='/Statistics/29West/Topics/lbmr_topic_queries_pattern'/>\n" " <menuitem name='29WestTopicQueriesPatternReceiver' action='/Statistics/29West/Topics/lbmr_topic_queries_pattern_receiver'/>\n" " </menu>\n" " <menu name= '29WestQueueMenu' action='/Statistics/29West/Queues'>\n" " <menuitem name='29WestQueueAdsQueue' action='/Statistics/29West/Queues/lbmr_queue_ads_queue'/>\n" " <menuitem name='29WestQueueAdsSource' action='/Statistics/29West/Queues/lbmr_queue_ads_source'/>\n" " <menuitem name='29WestQueueQueriesQueue' action='/Statistics/29West/Queues/lbmr_queue_queries_queue'/>\n" " <menuitem name='29WestQueueQueriesReceiver' action='/Statistics/29West/Queues/lbmr_queue_queries_receiver'/>\n" " </menu>\n" " <menu name= '29WestUIMMenu' action='/Statistics/29West/UIM'>\n" " <menuitem name='29WestUIMStreams' action='/Statistics/29West/UIM/Streams' />\n" " <menuitem name='29WestUIMStreamFlowGraph' action='/Statistics/29West/UIM/StreamFlowGraph' />\n" " </menu>\n" " </menu>\n" " <menuitem name='ANCP' action='/Statistics/ancp'/>\n" " <menu name= 'BACnetMenu' action='/Statistics/BACnet'>\n" " <menuitem name='bacapp_instanceid' action='/Statistics/BACnet/bacapp_instanceid'/>\n" " <menuitem name='bacapp_ip' action='/Statistics/BACnet/bacapp_ip'/>\n" " <menuitem name='bacapp_objectid' action='/Statistics/BACnet/bacapp_objectid'/>\n" " <menuitem name='bacapp_service' action='/Statistics/BACnet/bacapp_service'/>\n" " </menu>\n" " <menuitem name='Collectd' action='/Statistics/collectd'/>\n" " <menuitem name='Compare' action='/Statistics/compare'/>\n" " <menuitem name= 'DNS' action='/Statistics/dns'/>\n" " <menuitem name='FlowGraph' action='/Statistics/FlowGraph'/>\n" " <menuitem name='HART-IP' action='/Statistics/hart_ip'/>\n" " <menuitem name= 'Hpfeeds' action='/Statistics/hpfeeds'/>\n" " <menu name= 'HTTPMenu' action='/Statistics/HTTP'>\n" " <menuitem name='http' action='/Statistics/HTTP/http'/>\n" " <menuitem name='http_req' action='/Statistics/HTTP/http_req'/>\n" " <menuitem name='http_srv' action='/Statistics/HTTP/http_srv'/>\n" " </menu>\n" " <menuitem name='HTTP2' action='/Statistics/http2'/>\n" " <menuitem name='ONC-RPC-Programs' action='/Statistics/ONC-RPC-Programs'/>\n" " <menu name= 'SametimeMenu' action='/Statistics/Sametime'>\n" " <menuitem name='sametime' action='/Statistics/Sametime/sametime'/>\n" " </menu>\n" " <menu name= 'TCPStreamGraphMenu' action='/Statistics/TCPStreamGraphMenu'>\n" " <menuitem name='Sequence-Graph-Stevens' action='/Statistics/TCPStreamGraphMenu/Time-Sequence-Graph-Stevens'/>\n" " <menuitem name='Sequence-Graph-tcptrace' action='/Statistics/TCPStreamGraphMenu/Time-Sequence-Graph-tcptrace'/>\n" " <menuitem name='Throughput-Graph' action='/Statistics/TCPStreamGraphMenu/Throughput-Graph'/>\n" " <menuitem name='RTT-Graph' action='/Statistics/TCPStreamGraphMenu/RTT-Graph'/>\n" " <menuitem name='Window-Scaling-Graph' action='/Statistics/TCPStreamGraphMenu/Window-Scaling-Graph'/>\n" " </menu>\n" " <menuitem name='UDPMulticastStreams' action='/Statistics/UDPMulticastStreams'/>\n" " <menuitem name='WLANTraffic' action='/Statistics/WLANTraffic'/>\n" " <separator/>\n" " </menu>\n" " <menu name= 'TelephonyMenu' action='/Telephony'>\n" " <menu name= 'ANSI' action='/Telephony/ANSI'>\n" " <menuitem name='BSMAP' action='/Telephony/ANSI/BSMAP'/>\n" " <menuitem name='DTAP' action='/Telephony/ANSI/DTAP'/>\n" " <menuitem name='MAP-OP' action='/Telephony/ANSI/MAP-OP'/>\n" " </menu>\n" " <menu name= 'GSM' action='/Telephony/GSM'>\n" " <menuitem name='BSSMAP' action='/Telephony/GSM/BSSMAP'/>\n" " <menu name='GSM-DTAP' action='/Telephony/GSM/DTAP'>\n" " <menuitem name='CallControl' action='/Telephony/GSM/DTAP/CC'/>\n" " <menuitem name='GPRS-MM' action='/Telephony/GSM/DTAP/GMM'/>\n" " <menuitem name='GPRS-SM' action='/Telephony/GSM/DTAP/SM'/>\n" " <menuitem name='MM' action='/Telephony/GSM/DTAP/MM'/>\n" " <menuitem name='RR' action='/Telephony/GSM/DTAP/RR'/>\n" " <menuitem name='SMS' action='/Telephony/GSM/DTAP/SMS'/>\n" " <menuitem name='TP' action='/Telephony/GSM/DTAP/TP'/>\n" " <menuitem name='SS' action='/Telephony/GSM/DTAP/SS'/>\n" " </menu>\n" " <menuitem name='SACCH' action='/Telephony/GSM/SACCH'/>\n" " <menuitem name='MAP-OP' action='/Telephony/GSM/MAP-OP'/>\n" " <menuitem name='MAP-Summary' action='/Telephony/GSM/MAPSummary'/>\n" " </menu>\n" " <menu name= 'IAX2menu' action='/Telephony/IAX2'>\n" " <menuitem name='StreamAnalysis' action='/Telephony/IAX2/StreamAnalysis'/>\n" " </menu>\n" " <menuitem name='ISUP' action='/Telephony/isup_msg'/>\n" " <menu name= 'LTEmenu' action='/Telephony/LTE'>\n" " <menuitem name='LTE_RLC_Graph' action='/Telephony/LTE/RLCGraph'/>\n" " </menu>\n" " <menu name= 'MTP3menu' action='/Telephony/MTP3'>\n" " <menuitem name='MSUs' action='/Telephony/MTP3/MSUs'/>\n" " <menuitem name='MSUSummary' action='/Telephony/MTP3/MSUSummary'/>\n" " </menu>\n" " <menu name= 'RTPmenu' action='/Telephony/RTP'>\n" " <menuitem name='ShowAllStreams' action='/Telephony/RTP/ShowAllStreams'/>\n" " <menuitem name='StreamAnalysis' action='/Telephony/RTP/StreamAnalysis'/>\n" " </menu>\n" " <menu name= 'RTSPmenu' action='/Telephony/RTSP'>\n" " <menuitem name='rtsp' action='/Telephony/RTSP/rtsp'/>\n" " </menu>\n" " <menu name= 'SCTPmenu' action='/Telephony/SCTP'>\n" " <menuitem name='AnalysethisAssociation' action='/Telephony/SCTP/AnalysethisAssociation'/>\n" " <menuitem name='ShowAllAssociations' action='/Telephony/SCTP/ShowAllAssociations'/>\n" " </menu>\n" " <menuitem name='SMPP' action='/Telephony/smpp_commands'/>\n" " <menuitem name='UCP' action='/Telephony/ucp_messages'/>\n" " <menuitem name='VoIPCalls' action='/Telephony/VoIPCalls'/>\n" " <menuitem name='VoIPFlows' action='/Telephony/VoIPFlows'/>\n" " </menu>\n" " <menu name= 'ToolsMenu' action='/Tools'>\n" " <menuitem name='FirewallACLRules' action='/Tools/FirewallACLRules'/>\n" " </menu>\n" " <menu name= 'InternalsMenu' action='/Internals'>\n" " <menuitem name='Dissectortables' action='/Internals/Dissectortables'/>\n" " <menuitem name='Conversations' action='/Internals/Conversations'/>\n" " <menuitem name='SupportedProtocols' action='/Internals/SupportedProtocols'/>\n" " </menu>\n" " <menu name= 'HelpMenu' action='/Help'>\n" " <menuitem name='Contents' action='/Help/Contents'/>\n" " <menu name= 'ManualPages' action='/Help/ManualPages'>\n" " <menuitem name='Wireshark' action='/Help/ManualPages/Wireshark'/>\n" " <menuitem name='WiresharkFilter' action='/Help/ManualPages/WiresharkFilter'/>\n" " <separator/>\n" " <menuitem name='Capinfos' action='/Help/ManualPages/Capinfos'/>\n" " <menuitem name='Dumpcap' action='/Help/ManualPages/Dumpcap'/>\n" " <menuitem name='Editcap' action='/Help/ManualPages/Editcap'/>\n" " <menuitem name='Mergecap' action='/Help/ManualPages/Mergecap'/>\n" " <menuitem name='RawShark' action='/Help/ManualPages/RawShark'/>\n" " <menuitem name='Reordercap' action='/Help/ManualPages/Reordercap'/>\n" " <menuitem name='Text2pcap' action='/Help/ManualPages/Text2pcap'/>\n" " <menuitem name='TShark' action='/Help/ManualPages/TShark'/>\n" " </menu>\n" " <separator/>\n" " <menuitem name='Website' action='/Help/Website'/>\n" " <menuitem name='FAQs' action='/Help/FAQs'/>\n" " <menuitem name='Ask' action='/Help/ASK'/>\n" " <menuitem name='Downloads' action='/Help/Downloads'/>\n" " <separator/>\n" " <menuitem name='Wiki' action='/Help/Wiki'/>\n" " <menuitem name='SampleCaptures' action='/Help/SampleCaptures'/>\n" #ifdef HAVE_SOFTWARE_UPDATE " <separator/>\n" " <menuitem name='CheckForUpdates' action='/Help/CheckForUpdates'/>\n" #endif /* HAVE_SOFTWARE_UPDATE */ " <separator/>\n" " <menuitem name='AboutWireshark' action='/Help/AboutWireshark'/>\n" " </menu>\n" " </menubar>\n" "</ui>\n"; /* * Main menu. * * Please do not use keystrokes that are used as "universal" shortcuts in * various desktop environments: * * Windows: * http://support.microsoft.com/kb/126449 * * GNOME: * http://library.gnome.org/users/user-guide/nightly/keyboard-skills.html.en * * KDE: * http://developer.kde.org/documentation/standards/kde/style/keys/shortcuts.html * * In particular, do not use the following <control> sequences for anything * other than their standard purposes: * * <control>O File->Open * <control>S File->Save * <control>P File->Print * <control>W File->Close * <control>Q File->Quit * <control>Z Edit->Undo (which we don't currently have) * <control>X Edit->Cut (which we don't currently have) * <control>C Edit->Copy (which we don't currently have) * <control>V Edit->Paste (which we don't currently have) * <control>A Edit->Select All (which we don't currently have) * * Note that some if not all of the Edit keys above already perform those * functions in text boxes, such as the Filter box. Do no, under any * circumstances, make a change that keeps them from doing so. */ /* * GtkActionEntry * typedef struct { * const gchar *name; * const gchar *stock_id; * const gchar *label; * const gchar *accelerator; * const gchar *tooltip; * GCallback callback; * } GtkActionEntry; * const gchar *name; The name of the action. * const gchar *stock_id; The stock id for the action, or the name of an icon from the icon theme. * const gchar *label; The label for the action. This field should typically be marked for translation, * see gtk_action_group_set_translation_domain(). * If label is NULL, the label of the stock item with id stock_id is used. * const gchar *accelerator; The accelerator for the action, in the format understood by gtk_accelerator_parse(). * const gchar *tooltip; The tooltip for the action. This field should typically be marked for translation, * see gtk_action_group_set_translation_domain(). * GCallback callback; The function to call when the action is activated. * */ #ifdef HAVE_LIBPCAP /* * TODO Move this menu to capture_if_dlg.c * eg put a "place holder" in the UI description and * make a call from main_menubar.c i.e build_capture_menu() * ad do the UI stuff there. */ static const GtkActionEntry capture_menu_entries[] = { { "/Capture", NULL, "_Capture", NULL, NULL, NULL }, { "/Capture/Interfaces", WIRESHARK_STOCK_CAPTURE_INTERFACES, "_Interfaces...", "<control>I", NULL, G_CALLBACK(capture_if_action_cb) }, { "/Capture/Options", WIRESHARK_STOCK_CAPTURE_OPTIONS, "_Options...", "<control>K", NULL, G_CALLBACK(capture_prep_action_cb) }, { "/Capture/Start", WIRESHARK_STOCK_CAPTURE_START, "_Start", "<control>E", NULL, G_CALLBACK(capture_start_action_cb) }, { "/Capture/Stop", WIRESHARK_STOCK_CAPTURE_STOP, "S_top", "<control>E", NULL, G_CALLBACK(capture_stop_action_cb) }, { "/Capture/Restart", WIRESHARK_STOCK_CAPTURE_RESTART, "_Restart", "<control>R", NULL, G_CALLBACK(capture_restart_action_cb) }, { "/Capture/CaptureFilters", WIRESHARK_STOCK_CAPTURE_FILTER, "Capture _Filters...", NULL, NULL, G_CALLBACK(capture_filters_action_cb) }, { "/Capture/RefreshInterfaces", GTK_STOCK_REFRESH, "Refresh Interfaces", NULL, NULL, G_CALLBACK(refresh_interfaces_action_cb) }, }; #endif static const GtkActionEntry main_menu_bar_entries[] = { /* Top level */ { "/File", NULL, "_File", NULL, NULL, NULL }, { "/Edit", NULL, "_Edit", NULL, NULL, NULL }, { "/View", NULL, "_View", NULL, NULL, NULL }, { "/Go", NULL, "_Go", NULL, NULL, NULL }, { "/Analyze", NULL, "_Analyze", NULL, NULL, NULL }, { "/Statistics", NULL, "_Statistics", NULL, NULL, NULL }, { "/Telephony", NULL, "Telephon_y", NULL, NULL, NULL }, { "/Tools", NULL, "_Tools", NULL, NULL, NULL }, { "/Internals", NULL, "_Internals", NULL, NULL, NULL }, { "/Help", NULL, "_Help", NULL, NULL, NULL }, { "/File/Open", GTK_STOCK_OPEN, "_Open...", "<control>O", "Open a file", G_CALLBACK(file_open_cmd_cb) }, { "/File/OpenRecent", NULL, "Open _Recent", NULL, NULL, NULL }, { "/File/Merge", NULL, "_Merge...", NULL, NULL, G_CALLBACK(file_merge_cmd_cb) }, { "/File/ImportFromHexDump", NULL, "_Import from Hex Dump...", NULL, NULL, G_CALLBACK(file_import_cmd_cb) }, { "/File/Close", GTK_STOCK_CLOSE, "_Close", "<control>W", NULL, G_CALLBACK(file_close_cmd_cb) }, { "/File/Save", WIRESHARK_STOCK_SAVE, "_Save", "<control>S", NULL, G_CALLBACK(file_save_cmd_cb) }, { "/File/SaveAs", WIRESHARK_STOCK_SAVE, "Save _As...", "<shift><control>S", NULL, G_CALLBACK(file_save_as_cmd_cb) }, { "/File/Set", NULL, "File Set", NULL, NULL, NULL }, { "/File/ExportSpecifiedPackets", NULL, "Export Specified Packets...", NULL, NULL, G_CALLBACK(file_export_specified_packets_cmd_cb) }, { "/File/ExportPacketDissections", NULL, "Export Packet Dissections", NULL, NULL, NULL }, { "/File/ExportSelectedPacketBytes", NULL, "Export Selected Packet _Bytes...", "<control>H", NULL, G_CALLBACK(savehex_cb) }, { "/File/ExportPDUs", NULL, "Export PDUs to File...", NULL, NULL, G_CALLBACK(export_pdu_show_cb) }, { "/File/ExportSSLSessionKeys", NULL, "Export SSL Session Keys...", NULL, NULL, G_CALLBACK(savesslkeys_cb) }, { "/File/ExportObjects", NULL, "Export Objects", NULL, NULL, NULL }, { "/File/Print", GTK_STOCK_PRINT, "_Print...", "<control>P", NULL, G_CALLBACK(file_print_cmd_cb) }, { "/File/Quit", GTK_STOCK_QUIT, "_Quit", "<control>Q", NULL, G_CALLBACK(file_quit_cmd_cb) }, { "/File/Set/ListFiles", WIRESHARK_STOCK_FILE_SET_LIST, "List Files", NULL, NULL, G_CALLBACK(fileset_cb) }, { "/File/Set/NextFile", WIRESHARK_STOCK_FILE_SET_NEXT, "Next File", NULL, NULL, G_CALLBACK(fileset_next_cb) }, { "/File/Set/PreviousFile", WIRESHARK_STOCK_FILE_SET_PREVIOUS, "Previous File", NULL, NULL, G_CALLBACK(fileset_previous_cb) }, { "/File/ExportPacketDissections/Text", NULL, "as \"Plain _Text\" file...", NULL, NULL, G_CALLBACK(export_text_cmd_cb) }, { "/File/ExportPacketDissections/PostScript", NULL, "as \"_PostScript\" file...", NULL, NULL, G_CALLBACK(export_ps_cmd_cb) }, { "/File/ExportPacketDissections/CSV", NULL, "as \"_CSV\" (Comma Separated Values packet summary) file...", NULL, NULL, G_CALLBACK(export_csv_cmd_cb) }, { "/File/ExportPacketDissections/CArrays", NULL, "as \"C _Arrays\" (packet bytes) file...", NULL, NULL, G_CALLBACK(export_carrays_cmd_cb) }, { "/File/ExportPacketDissections/PSML", NULL, "as XML - \"P_SML\" (packet summary) file...", NULL, NULL, G_CALLBACK(export_psml_cmd_cb) }, { "/File/ExportPacketDissections/PDML", NULL, "as XML - \"P_DML\" (packet details) file...", NULL, NULL, G_CALLBACK(export_pdml_cmd_cb) }, { "/File/ExportObjects/HTTP", NULL, "_HTTP", NULL, NULL, G_CALLBACK(eo_http_cb) }, { "/File/ExportObjects/DICOM", NULL, "_DICOM", NULL, NULL, G_CALLBACK(eo_dicom_cb) }, { "/File/ExportObjects/SMB", NULL, "_SMB/SMB2", NULL, NULL, G_CALLBACK(eo_smb_cb) }, { "/File/ExportObjects/TFTP", NULL, "_TFTP", NULL, NULL, G_CALLBACK(eo_tftp_cb) }, { "/Edit/Copy", NULL, "Copy", NULL, NULL, NULL }, { "/Edit/Copy/Description", NULL, "Description", "<shift><control>D", NULL, G_CALLBACK(copy_description_cb) }, { "/Edit/Copy/Fieldname", NULL, "Fieldname", "<shift><control>F", NULL, G_CALLBACK(copy_fieldname_cb) }, { "/Edit/Copy/Value", NULL, "Value", "<shift><control>V", NULL, G_CALLBACK(copy_value_cb) }, { "/Edit/Copy/AsFilter", NULL, "As Filter", "<shift><control>C", NULL, G_CALLBACK(copy_as_filter_cb) }, #if 0 /* * Un-#if this when we actually implement Cut/Copy/Paste for the * packet list and packet detail windows. * * Note: when we implement Cut/Copy/Paste in those windows, we * will almost certainly want to allow multiple packets to be * selected in the packet list pane and multiple packet detail * items to be selected in the packet detail pane, so that * the user can, for example, copy the summaries of multiple * packets to the clipboard from the packet list pane and multiple * packet detail items - perhaps *all* packet detail items - from * the packet detail pane. Given that, we'll also want to * implement Select All. * * If multiple packets are selected, we would probably display nothing * in the packet detail pane, just as we do if no packet is selected, * and any menu items etc. that would pertain only to a single packet * would be disabled. * * If multiple packet detail items are selected, we would probably * disable all items that pertain only to a single packet detail * item, such as some items in the status bar. * * XXX - the actions for these will be different depending on what * widget we're in; ^C should copy from the filter text widget if * we're in that widget, the packet list if we're in that widget * (presumably copying the summaries of selected packets to the * clipboard, e.g. the text copy would be the text of the columns), * the packet detail if we're in that widget (presumably copying * the contents of selected protocol tree items to the clipboard, * e.g. the text copy would be the text displayed for those items), * etc.. * * Given that those menu items should also affect text widgets * such as the filter box, we would again want Select All, and, * at least for the filter box, we would also want Undo and Redo. * We would only want Cut, Paste, Undo, and Redo for the packet * list and packet detail panes if we support modifying them. */ {"/Edit/_Undo", "<control>Z", NULL, 0, "<StockItem>", GTK_STOCK_UNDO,}, {"/Edit/_Redo", "<shift><control>Z", NULL, 0, "<StockItem>", GTK_STOCK_REDO,}, {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,}, {"/Edit/Cu_t", "<control>X", NULL, 0, "<StockItem>", GTK_STOCK_CUT,}, {"/Edit/_Copy", "<control>C", NULL, 0, "<StockItem>", GTK_STOCK_COPY,}, {"/Edit/_Paste", "<control>V", NULL, 0, "<StockItem>", GTK_STOCK_PASTE,}, {"/Edit/<separator>", NULL, NULL, 0, "<Separator>", NULL,}, {"/Edit/Select _All", "<control>A", NULL, 0, "<StockItem>", GTK_STOCK_SELECT_ALL,}, #endif /* 0 */ { "/Edit/FindPacket", GTK_STOCK_FIND, "_Find Packet...", "<control>F", NULL, G_CALLBACK(find_frame_cb) }, { "/Edit/FindNext", NULL, "Find Ne_xt", "<control>N", NULL, G_CALLBACK(find_next_cb) }, { "/Edit/FindPrevious", NULL, "Find Pre_vious", "<control>B", NULL, G_CALLBACK(find_previous_cb) }, { "/Edit/MarkPacket", NULL, "_Mark/Unmark Packet", "<control>M", NULL, G_CALLBACK(packet_list_mark_frame_cb) }, /* XXX - Unused. Should this and its associated code be removed? */ { "/Edit/ToggleMarkingOfAllDisplayedPackets", NULL, "Toggle Marking of All Displayed Packets", "<shift><alt><control>M", NULL, G_CALLBACK(packet_list_toggle_mark_all_displayed_frames_cb) }, { "/Edit/MarkAllDisplayedPackets", NULL, "Mark All Displayed Packets", "<shift><control>M", NULL, G_CALLBACK(packet_list_mark_all_displayed_frames_cb) }, { "/Edit/UnmarkAllDisplayedPackets", NULL, "_Unmark All Displayed Packets", "<alt><control>M", NULL, G_CALLBACK(packet_list_unmark_all_displayed_frames_cb) }, { "/Edit/FindNextMark", NULL, "Next Mark", "<shift><control>N", NULL, G_CALLBACK(find_next_mark_cb) }, { "/Edit/FindPreviousMark", NULL, "Previous Mark", "<shift><control>B", NULL, G_CALLBACK(find_prev_mark_cb) }, { "/Edit/IgnorePacket", NULL, "_Ignore/Unignore Packet", "<control>D", NULL, G_CALLBACK(packet_list_ignore_frame_cb) }, /* * XXX - this next one overrides /Edit/Copy/Description */ { "/Edit/IgnoreAllDisplayedPackets", NULL, "Ignore All Displayed Packets", "<shift><control>D", NULL, G_CALLBACK(packet_list_ignore_all_displayed_frames_cb) }, { "/Edit/Un-IgnoreAllPackets", NULL, "U_nignore All Packets", "<alt><control>D", NULL, G_CALLBACK(packet_list_unignore_all_frames_cb) }, { "/Edit/SetTimeReference", WIRESHARK_STOCK_TIME, "Set/Unset Time Reference", "<control>T", NULL, G_CALLBACK(set_reftime_cb) }, { "/Edit/Un-TimeReferenceAllPackets",NULL, "Unset All Time References", "<alt><control>T", NULL, G_CALLBACK(packet_list_untime_reference_all_frames_cb) }, { "/Edit/FindNextTimeReference", NULL, "Next Time Reference", "<alt><control>N", NULL, G_CALLBACK(find_next_ref_time_cb) }, { "/Edit/FindPreviousTimeReference", NULL, "Previous Time Reference", "<alt><control>B", NULL, G_CALLBACK(find_previous_ref_time_cb) }, { "/Edit/TimeShift", WIRESHARK_STOCK_TIME, "Time Shift...", "<shift><control>T", NULL, G_CALLBACK(time_shift_cb) }, { "/Edit/ConfigurationProfiles", NULL, "_Configuration Profiles...", "<shift><control>A", NULL, G_CALLBACK(profile_dialog_cb) }, { "/Edit/Preferences", GTK_STOCK_PREFERENCES, "_Preferences...", "<shift><control>P", NULL, G_CALLBACK(menus_prefs_cb) }, #ifdef WANT_PACKET_EDITOR { "/Edit/EditPacket", NULL, "_Edit Packet", NULL, NULL, G_CALLBACK(edit_window_cb) }, #endif { "/Edit/AddEditPktComment", WIRESHARK_STOCK_EDIT, "Packet Comment...", NULL, NULL, G_CALLBACK(edit_packet_comment_dlg) }, { "/View/TimeDisplayFormat", NULL, "_Time Display Format", NULL, NULL, NULL }, { "/View/NameResolution", NULL, "Name Resol_ution", NULL, NULL, NULL }, { "/View/NameResolution/ResolveName", NULL, "_Resolve Name", NULL, NULL, G_CALLBACK(resolve_name_cb) }, { "/View/NameResolution/ManuallyResolveName",NULL, "Manually Resolve Name", NULL, NULL, G_CALLBACK(manual_addr_resolv_dlg) }, { "/View/ZoomIn", GTK_STOCK_ZOOM_IN, "_Zoom In", "<control>plus", NULL, G_CALLBACK(view_zoom_in_cb) }, { "/View/ZoomOut", GTK_STOCK_ZOOM_OUT, "Zoom _Out", "<control>minus", NULL, G_CALLBACK(view_zoom_out_cb) }, { "/View/NormalSize", GTK_STOCK_ZOOM_100, "_Normal Size", "<control>equal", NULL, G_CALLBACK(view_zoom_100_cb) }, { "/View/ResizeAllColumns", WIRESHARK_STOCK_RESIZE_COLUMNS, "Resize All Columns", "<shift><control>R", NULL, G_CALLBACK(packet_list_resize_columns_cb) }, { "/View/DisplayedColumns", NULL, "Displayed Columns", NULL, NULL, NULL }, { "/View/ExpandSubtrees", NULL, "E_xpand Subtrees", "<shift>Right", NULL, G_CALLBACK(expand_tree_cb) }, { "/View/CollapseSubtrees", NULL, "Collapse Subtrees", "<shift>Left", NULL, G_CALLBACK(collapse_tree_cb) }, { "/View/ExpandAll", NULL, "_Expand All", "<control>Right", NULL, G_CALLBACK(expand_all_cb) }, { "/View/CollapseAll", NULL, "Collapse _All", "<control>Left", NULL, G_CALLBACK(collapse_all_cb) }, { "/View/ColorizeConversation", NULL, "Colorize Conversation",NULL, NULL, NULL }, { "/View/ColorizeConversation/Color 1", WIRESHARK_STOCK_COLOR1, "Color 1", "<control>1", NULL, G_CALLBACK(view_menu_color_conv_color1_cb) }, { "/View/ColorizeConversation/Color 2", WIRESHARK_STOCK_COLOR2, "Color 2", "<control>2", NULL, G_CALLBACK(view_menu_color_conv_color2_cb) }, { "/View/ColorizeConversation/Color 3", WIRESHARK_STOCK_COLOR3, "Color 3", "<control>3", NULL, G_CALLBACK(view_menu_color_conv_color3_cb) }, { "/View/ColorizeConversation/Color 4", WIRESHARK_STOCK_COLOR4, "Color 4", "<control>4", NULL, G_CALLBACK(view_menu_color_conv_color4_cb) }, { "/View/ColorizeConversation/Color 5", WIRESHARK_STOCK_COLOR5, "Color 5", "<control>5", NULL, G_CALLBACK(view_menu_color_conv_color5_cb) }, { "/View/ColorizeConversation/Color 6", WIRESHARK_STOCK_COLOR6, "Color 6", "<control>6", NULL, G_CALLBACK(view_menu_color_conv_color6_cb) }, { "/View/ColorizeConversation/Color 7", WIRESHARK_STOCK_COLOR7, "Color 7", "<control>7", NULL, G_CALLBACK(view_menu_color_conv_color7_cb) }, { "/View/ColorizeConversation/Color 8", WIRESHARK_STOCK_COLOR8, "Color 8", "<control>8", NULL, G_CALLBACK(view_menu_color_conv_color8_cb) }, { "/View/ColorizeConversation/Color 9", WIRESHARK_STOCK_COLOR9, "Color 9", "<control>9", NULL, G_CALLBACK(view_menu_color_conv_color9_cb) }, { "/View/ColorizeConversation/Color 10", WIRESHARK_STOCK_COLOR0, "Color 10", "<control>0", NULL, G_CALLBACK(view_menu_color_conv_color10_cb) }, { "/View/ColorizeConversation/NewColoringRule", NULL, "New Coloring Rule...", NULL, NULL, G_CALLBACK(view_menu_color_conv_new_rule_cb) }, { "/View/ResetColoring1-10", NULL, "Reset Coloring 1-10", "<control>space", NULL, G_CALLBACK(view_menu_reset_coloring_cb) }, { "/View/ColoringRules", GTK_STOCK_SELECT_COLOR, "_Coloring Rules...", NULL, NULL, G_CALLBACK(color_display_cb) }, { "/View/ShowPacketinNewWindow", NULL, "Show Packet in New _Window", NULL, NULL, G_CALLBACK(new_window_cb) }, { "/View/Reload", GTK_STOCK_REFRESH, "_Reload", "<control>R", NULL, G_CALLBACK(file_reload_cmd_cb) }, { "/Go/Back", GTK_STOCK_GO_BACK, "_Back", "<alt>Left", NULL, G_CALLBACK(history_back_cb) }, { "/Go/Forward", GTK_STOCK_GO_FORWARD, "_Forward", "<alt>Right", NULL, G_CALLBACK(history_forward_cb) }, { "/Go/Goto", GTK_STOCK_JUMP_TO, "_Go to Packet...", "<control>G", NULL, G_CALLBACK(goto_frame_cb) }, { "/Go/GotoCorrespondingPacket", NULL, "Go to _Corresponding Packet", NULL, NULL, G_CALLBACK(goto_framenum_cb) }, { "/Go/PreviousPacket", GTK_STOCK_GO_UP, "Previous Packet", "<control>Up", NULL, G_CALLBACK(goto_previous_frame_cb) }, { "/Go/NextPacket", GTK_STOCK_GO_DOWN, "Next Packet", "<control>Down", NULL, G_CALLBACK(goto_next_frame_cb) }, { "/Go/FirstPacket", GTK_STOCK_GOTO_TOP, "F_irst Packet", "<control>Home", NULL, G_CALLBACK(goto_top_frame_cb) }, { "/Go/LastPacket", GTK_STOCK_GOTO_BOTTOM, "_Last Packet", "<control>End", NULL, G_CALLBACK(goto_bottom_frame_cb) }, { "/Go/PreviousPacketInConversation", GTK_STOCK_GO_UP, "Previous Packet In Conversation", "<control>comma", NULL, G_CALLBACK(goto_previous_frame_conversation_cb) }, { "/Go/NextPacketInConversation", GTK_STOCK_GO_DOWN, "Next Packet In Conversation", "<control>period", NULL, G_CALLBACK(goto_next_frame_conversation_cb) }, { "/Analyze/DisplayFilters", WIRESHARK_STOCK_DISPLAY_FILTER, "_Display Filters...", NULL, NULL, G_CALLBACK(dfilter_dialog_cb) }, { "/Analyze/DisplayFilterMacros", NULL, "Display Filter _Macros...", NULL, NULL, G_CALLBACK(macros_dialog_cb) }, { "/Analyze/ApplyasColumn", NULL, "Apply as Column", NULL, NULL, G_CALLBACK(apply_as_custom_column_cb) }, { "/Analyze/EnabledProtocols", WIRESHARK_STOCK_CHECKBOX, "_Enabled Protocols...", "<shift><control>E", NULL, G_CALLBACK(proto_cb) }, { "/Analyze/DecodeAs", WIRESHARK_STOCK_DECODE_AS, "Decode _As...", NULL, NULL, G_CALLBACK(decode_as_cb) }, { "/Analyze/UserSpecifiedDecodes", WIRESHARK_STOCK_DECODE_AS, "_User Specified Decodes...", NULL, NULL, G_CALLBACK(decode_show_cb) }, { "/Analyze/FollowTCPStream", NULL, "Follow TCP Stream", NULL, NULL, G_CALLBACK(follow_tcp_stream_cb) }, { "/Analyze/FollowUDPStream", NULL, "Follow UDP Stream", NULL, NULL, G_CALLBACK(follow_udp_stream_cb) }, { "/Analyze/FollowSSLStream", NULL, "Follow SSL Stream", NULL, NULL, G_CALLBACK(follow_ssl_stream_cb) }, { "/Analyze/ExpertInfo", WIRESHARK_STOCK_EXPERT_INFO, "Expert _Info", NULL, NULL, G_CALLBACK(expert_comp_dlg_launch) }, { "/Analyze/ConversationFilter", NULL, "Conversation Filter", NULL, NULL, NULL }, { "/Statistics/ConversationList", NULL, "_Conversation List", NULL, NULL, NULL }, { "/Statistics/EndpointList", NULL, "_Endpoint List", NULL, NULL, NULL }, { "/Statistics/ServiceResponseTime", NULL, "Service _Response Time", NULL, NULL, NULL }, { "/Statistics/ServiceResponseTime/DCE-RPC", WIRESHARK_STOCK_TIME, "DCE-RPC...", NULL, NULL, G_CALLBACK(gtk_dcerpcstat_cb) }, { "/Statistics/ServiceResponseTime/ONC-RPC", WIRESHARK_STOCK_TIME, "ONC-RPC...", NULL, NULL, G_CALLBACK(gtk_rpcstat_cb) }, { "/Statistics/29West", NULL, "29West", NULL, NULL, NULL }, { "/Statistics/29West/Topics", NULL, "Topics", NULL, NULL, NULL }, { "/Statistics/29West/Topics/lbmr_topic_ads_topic", NULL, "Advertisements by Topic", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Topics/lbmr_topic_ads_source", NULL, "Advertisements by Source", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Topics/lbmr_topic_ads_transport", NULL, "Advertisements by Transport", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Topics/lbmr_topic_queries_topic", NULL, "Queries by Topic", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Topics/lbmr_topic_queries_receiver", NULL, "Queries by Receiver", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Topics/lbmr_topic_queries_pattern", NULL, "Wildcard Queries by Pattern", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Topics/lbmr_topic_queries_pattern_receiver", NULL, "Wildcard Queries by Receiver", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Queues", NULL, "Queues", NULL, NULL, NULL }, { "/Statistics/29West/Queues/lbmr_queue_ads_queue", NULL, "Advertisements by Queue", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Queues/lbmr_queue_ads_source", NULL, "Advertisements by Source", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Queues/lbmr_queue_queries_queue", NULL, "Queries by Queue", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/Queues/lbmr_queue_queries_receiver", NULL, "Queries by Receiver", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/29West/UIM", NULL, "UIM", NULL, NULL, NULL }, { "/Statistics/29West/UIM/Streams", NULL, "Streams", NULL, NULL, G_CALLBACK(lbmc_stream_dlg_stream_menu_cb) }, { "/Statistics/29West/UIM/StreamFlowGraph", WIRESHARK_STOCK_FLOW_GRAPH, "Stream Flow Graph", NULL, NULL, G_CALLBACK(lbmc_uim_flow_menu_cb) }, { "/Statistics/ancp", NULL, "ANCP", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/BACnet", NULL, "BACnet", NULL, NULL, NULL }, { "/Statistics/BACnet/bacapp_instanceid", NULL, "Packets sorted by Instance ID", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/BACnet/bacapp_ip", NULL, "Packets sorted by IP", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/BACnet/bacapp_objectid", NULL, "Packets sorted by Object Type", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/BACnet/bacapp_service", NULL, "Packets sorted by Service", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/collectd", NULL, "Collectd...", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/compare", NULL, "Compare...", NULL, NULL, G_CALLBACK(gtk_comparestat_cb) }, { "/Statistics/dns", NULL, "DNS", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/FlowGraph", WIRESHARK_STOCK_FLOW_GRAPH, "Flo_w Graph...", NULL, NULL, G_CALLBACK(flow_graph_launch) }, { "/Statistics/hart_ip", NULL, "HART-IP", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/hpfeeds", NULL, "HPFEEDS", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/HTTP", NULL, "HTTP", NULL, NULL, NULL }, { "/Statistics/HTTP/http", NULL, "Packet Counter", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/HTTP/http_req", NULL, "Requests", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/HTTP/http_srv", NULL, "Load Distribution", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/http2", NULL, "HTTP2", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/ONC-RPC-Programs", NULL, "ONC-RPC Programs", NULL, NULL, G_CALLBACK(gtk_rpcprogs_cb) }, { "/Statistics/Sametime", NULL, "Sametime", NULL, NULL, NULL }, { "/Statistics/Sametime/sametime", NULL, "Messages", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Statistics/TCPStreamGraphMenu", NULL, "TCP StreamGraph", NULL, NULL, NULL }, { "/Statistics/TCPStreamGraphMenu/Time-Sequence-Graph-Stevens", NULL, "Time-Sequence Graph (Stevens)", NULL, NULL, G_CALLBACK(tcp_graph_cb) }, { "/Statistics/TCPStreamGraphMenu/Time-Sequence-Graph-tcptrace", NULL, "Time-Sequence Graph (tcptrace)", NULL, NULL, G_CALLBACK(tcp_graph_cb) }, { "/Statistics/TCPStreamGraphMenu/Throughput-Graph", NULL, "Throughput Graph", NULL, NULL, G_CALLBACK(tcp_graph_cb) }, { "/Statistics/TCPStreamGraphMenu/RTT-Graph", NULL, "Round Trip Time Graph", NULL, NULL, G_CALLBACK(tcp_graph_cb) }, { "/Statistics/TCPStreamGraphMenu/Window-Scaling-Graph", NULL, "Window Scaling Graph", NULL, NULL, G_CALLBACK(tcp_graph_cb) }, { "/Statistics/UDPMulticastStreams", NULL, "UDP Multicast Streams", NULL, NULL, G_CALLBACK(mcaststream_launch) }, { "/Statistics/WLANTraffic", NULL, "WLAN Traffic", NULL, NULL, G_CALLBACK(wlanstat_launch) }, { "/Statistics/Summary", GTK_STOCK_PROPERTIES, "_Summary", NULL, NULL, G_CALLBACK(summary_open_cb) }, { "/Statistics/CommentsSummary", NULL, "Comments Summary", NULL, NULL, G_CALLBACK(show_packet_comment_summary_dlg) }, { "/Statistics/ShowAddreRes", NULL, "Show address resolution", NULL, NULL, G_CALLBACK(addr_resolution_dlg) }, { "/Statistics/ProtocolHierarchy", NULL, "_Protocol Hierarchy", NULL, NULL, G_CALLBACK(proto_hier_stats_cb) }, { "/Statistics/Conversations", WIRESHARK_STOCK_CONVERSATIONS, "Conversations", NULL, NULL, G_CALLBACK(init_conversation_notebook_cb) }, { "/Statistics/Endpoints", WIRESHARK_STOCK_ENDPOINTS, "Endpoints", NULL, NULL, G_CALLBACK(init_hostlist_notebook_cb) }, { "/Statistics/IOGraphs", WIRESHARK_STOCK_GRAPHS, "_IO Graph", NULL, NULL, G_CALLBACK(gui_iostat_cb) }, { "/Statistics/plen", NULL, "Packet Lengths...", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Telephony/ANSI", NULL, "_ANSI", NULL, NULL, NULL }, { "/Telephony/ANSI/BSMAP", NULL, "A-Interface BSMAP", NULL, NULL, G_CALLBACK(ansi_a_stat_gtk_bsmap_cb) }, { "/Telephony/ANSI/DTAP", NULL, "A-Interface DTAP", NULL, NULL, G_CALLBACK(ansi_a_stat_gtk_dtap_cb) }, { "/Telephony/ANSI/MAP-OP", NULL, "MAP Operation", NULL, NULL, G_CALLBACK(ansi_map_stat_gtk_cb) }, { "/Telephony/GSM", NULL, "_GSM", NULL, NULL, NULL }, { "/Telephony/GSM/BSSMAP", NULL, "A-Interface BSSMAP", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_bssmap_cb) }, { "/Telephony/GSM/DTAP", NULL, "A-Interface DTAP", NULL, NULL, NULL }, { "/Telephony/GSM/DTAP/CC", NULL, "Call Control", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_cc_cb) }, { "/Telephony/GSM/DTAP/GMM", NULL, "GPRS Mobility Management", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_gmm_cb) }, { "/Telephony/GSM/DTAP/SM", NULL, "GPRS Session Management", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_sm_cb) }, { "/Telephony/GSM/DTAP/MM", NULL, "Mobility Management", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_mm_cb) }, { "/Telephony/GSM/DTAP/RR", NULL, "Radio Resource Management",NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_rr_cb) }, { "/Telephony/GSM/DTAP/SMS", NULL, "Short Message Service", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_sms_cb) }, { "/Telephony/GSM/DTAP/TP", NULL, "Special Conformance Testing Functions", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_tp_cb) }, { "/Telephony/GSM/DTAP/SS", NULL, "Supplementary Services", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_dtap_ss_cb) }, { "/Telephony/GSM/SACCH", NULL, "A-Interface SACCH", NULL, NULL, G_CALLBACK(gsm_a_stat_gtk_sacch_rr_cb) }, { "/Telephony/GSM/MAP-OP", NULL, "MAP Operation", NULL, NULL, G_CALLBACK(gsm_map_stat_gtk_cb) }, { "/Telephony/GSM/MAPSummary", NULL, "MAP Summary", NULL, NULL, G_CALLBACK(gsm_map_stat_gtk_sum_cb) }, { "/Telephony/IAX2", NULL, "IA_X2", NULL, NULL, NULL }, { "/Telephony/IAX2/StreamAnalysis", NULL, "Stream Analysis...", NULL, NULL, G_CALLBACK(iax2_analysis_cb) }, { "/Telephony/isup_msg", NULL, "_ISUP Messages", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Telephony/LTE", NULL, "_LTE", NULL, NULL, NULL }, { "/Telephony/LTE/RLCGraph", NULL, "RLC _Graph...", NULL, NULL, G_CALLBACK(rlc_lte_graph_cb) }, { "/Telephony/MTP3", NULL, "_MTP3", NULL, NULL, NULL }, { "/Telephony/MTP3/MSUs", NULL, "MSUs", NULL, NULL, G_CALLBACK(mtp3_stat_gtk_cb) }, { "/Telephony/MTP3/MSUSummary", NULL, "MSU Summary", NULL, NULL, G_CALLBACK(mtp3_sum_gtk_sum_cb) }, { "/Telephony/RTP", NULL, "_RTP", NULL, NULL, NULL }, { "/Telephony/RTP/StreamAnalysis", NULL, "Stream Analysis...", NULL, NULL, G_CALLBACK(rtp_analysis_cb) }, { "/Telephony/RTP/ShowAllStreams", NULL, "Show All Streams", NULL, NULL, G_CALLBACK(rtpstream_launch) }, { "/Telephony/RTSP", NULL, "RTSP", NULL, NULL, NULL }, { "/Telephony/RTSP/rtsp", NULL, "Packet Counter", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Telephony/SCTP", NULL, "S_CTP", NULL, NULL, NULL }, { "/Telephony/SCTP/AnalysethisAssociation", NULL, "Analyse this Association", NULL, NULL, G_CALLBACK(sctp_analyse_start) }, { "/Telephony/SCTP/ShowAllAssociations", NULL, "Show All Associations...", NULL, NULL, G_CALLBACK(sctp_stat_start) }, { "/Telephony/smpp_commands", NULL, "SM_PPOperations", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Telephony/ucp_messages", NULL, "_UCP Messages", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, { "/Telephony/VoIPCalls", WIRESHARK_STOCK_TELEPHONE, "_VoIP Calls", NULL, NULL, G_CALLBACK(voip_calls_launch) }, { "/Telephony/VoIPFlows", WIRESHARK_STOCK_TELEPHONE, "SIP _Flows", NULL, NULL, G_CALLBACK(voip_flows_launch) }, { "/Tools/FirewallACLRules", NULL, "Firewall ACL Rules", NULL, NULL, G_CALLBACK(firewall_rule_cb) }, { "/Internals/Dissectortables", NULL, "_Dissector tables", NULL, NULL, G_CALLBACK(dissector_tables_dlg_cb) }, { "/Internals/Conversations", NULL, "_Conversation hash tables",NULL, NULL, G_CALLBACK(conversation_hastables_dlg) }, { "/Internals/SupportedProtocols", NULL, "_Supported Protocols (slow!)", NULL, NULL, G_CALLBACK(supported_cb) }, { "/Help/Contents", GTK_STOCK_HELP, "_Contents", "F1", NULL, G_CALLBACK(help_menu_cont_cb) }, { "/Help/ManualPages", NULL, "ManualPages", NULL, NULL, NULL }, { "/Help/ManualPages/Wireshark", NULL, "Wireshark", NULL, NULL, G_CALLBACK(help_menu_wireshark_cb) }, { "/Help/ManualPages/WiresharkFilter", NULL, "Wireshark Filter", NULL, NULL, G_CALLBACK(help_menu_wireshark_flt_cb) }, { "/Help/ManualPages/Capinfos", NULL, "Capinfos", NULL, NULL, G_CALLBACK(help_menu_Capinfos_cb) }, { "/Help/ManualPages/Dumpcap", NULL, "Dumpcap", NULL, NULL, G_CALLBACK(help_menu_Dumpcap_cb) }, { "/Help/ManualPages/Editcap", NULL, "Editcap", NULL, NULL, G_CALLBACK(help_menu_Editcap_cb) }, { "/Help/ManualPages/Mergecap", NULL, "Mergecap", NULL, NULL, G_CALLBACK(help_menu_Mergecap_cb) }, { "/Help/ManualPages/RawShark", NULL, "RawShark", NULL, NULL, G_CALLBACK(help_menu_RawShark_cb) }, { "/Help/ManualPages/Reordercap", NULL, "Reordercap", NULL, NULL, G_CALLBACK(help_menu_Reorder_cb) }, { "/Help/ManualPages/Text2pcap", NULL, "Text2pcap", NULL, NULL, G_CALLBACK(help_menu_Text2pcap_cb) }, { "/Help/ManualPages/TShark", NULL, "TShark", NULL, NULL, G_CALLBACK(help_menu_TShark_cb) }, { "/Help/Website", GTK_STOCK_HOME, "Website", NULL, NULL, G_CALLBACK(help_menu_Website_cb) }, { "/Help/FAQs", NULL, "FAQ's", NULL, NULL, G_CALLBACK(help_menu_faq_cb) }, { "/Help/ASK", NULL, "Ask (Q&A)", NULL, NULL, G_CALLBACK(help_menu_ask_cb) }, { "/Help/Downloads", NULL, "Downloads", NULL, NULL, G_CALLBACK(help_menu_Downloads_cb) }, { "/Help/Wiki", WIRESHARK_STOCK_WIKI, "Wiki", NULL, NULL, G_CALLBACK(help_menu_Wiki_cb) }, { "/Help/SampleCaptures", NULL, "Sample Captures", NULL, NULL, G_CALLBACK(help_menu_SampleCaptures_cb) }, #ifdef HAVE_SOFTWARE_UPDATE { "/Help/CheckForUpdates", NULL, "Check for Updates...", NULL, NULL, G_CALLBACK(check_for_updates_cb) }, #endif /* HAVE_SOFTWARE_UPDATE */ { "/Help/AboutWireshark", WIRESHARK_STOCK_ABOUT, "_About Wireshark", NULL, NULL, G_CALLBACK(about_wireshark_cb) }, }; static const GtkToggleActionEntry main_menu_bar_toggle_action_entries[] = { /* name, stock id, label, accel, tooltip, callback, is_active */ {"/View/MainToolbar", NULL, "_Main Toolbar", NULL, NULL, G_CALLBACK(main_toolbar_show_hide_cb), TRUE}, {"/View/FilterToolbar", NULL, "_Filter Toolbar", NULL, NULL, G_CALLBACK(filter_toolbar_show_hide_cb), TRUE}, {"/View/WirelessToolbar", NULL, "Wire_less Toolbar", NULL, NULL, G_CALLBACK(wireless_toolbar_show_hide_cb), FALSE}, {"/View/StatusBar", NULL, "_Status Bar", NULL, NULL, G_CALLBACK(status_bar_show_hide_cb), TRUE}, {"/View/PacketList", NULL, "Packet _List", NULL, NULL, G_CALLBACK(packet_list_show_hide_cb), TRUE}, {"/View/PacketDetails", NULL, "Packet _Details", NULL, NULL, G_CALLBACK(packet_details_show_hide_cb), TRUE}, {"/View/PacketBytes", NULL, "Packet _Bytes", NULL, NULL, G_CALLBACK(packet_bytes_show_hide_cb), TRUE}, {"/View/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes", NULL, "Display Seconds with hours and minutes", NULL, NULL, G_CALLBACK(timestamp_seconds_time_cb), FALSE}, {"/View/NameResolution/EnableforMACLayer", NULL, "Enable for _MAC Layer", NULL, NULL, G_CALLBACK(view_menu_en_for_MAC_cb), TRUE}, {"/View/NameResolution/EnableforTransportLayer", NULL, "Enable for _Transport Layer", NULL, NULL, G_CALLBACK(view_menu_en_for_transport_cb), TRUE }, {"/View/NameResolution/EnableforNetworkLayer", NULL, "Enable for _Network Layer", NULL, NULL, G_CALLBACK(view_menu_en_for_network_cb), TRUE }, {"/View/NameResolution/UseExternalNetworkNameResolver", NULL, "Use _External Network Name Resolver", NULL, NULL, G_CALLBACK(view_menu_en_use_external_resolver_cb), TRUE }, {"/View/ColorizePacketList", NULL, "Colorize Packet List", NULL, NULL, G_CALLBACK(view_menu_colorize_pkt_lst_cb), TRUE }, #ifdef HAVE_LIBPCAP {"/View/AutoScrollinLiveCapture", NULL, "Auto Scroll in Li_ve Capture", NULL, NULL, G_CALLBACK(view_menu_auto_scroll_live_cb), TRUE }, #endif }; static const GtkRadioActionEntry main_menu_bar_radio_view_time_entries [] = { /* name, stock id, label, accel, tooltip, value */ { "/View/TimeDisplayFormat/DateYMDandTimeofDay", NULL, "Date and Time of Day: 1970-01-01 01:02:03.123456", "<alt><control>1", NULL, TS_ABSOLUTE_WITH_YMD }, { "/View/TimeDisplayFormat/DateYDOYandTimeofDay", NULL, "Date (with day of year) and Time of Day: 1970/001 01:02:03.123456", NULL, NULL, TS_ABSOLUTE_WITH_YDOY }, { "/View/TimeDisplayFormat/TimeofDay", NULL, "Time of Day: 01:02:03.123456", "<alt><control>2", NULL, TS_ABSOLUTE }, { "/View/TimeDisplayFormat/SecondsSinceEpoch", NULL, "Seconds Since Epoch (1970-01-01): 1234567890.123456", "<alt><control>3", NULL, TS_EPOCH }, { "/View/TimeDisplayFormat/SecondsSinceBeginningofCapture", NULL, "Seconds Since Beginning of Capture: 123.123456", "<alt><control>4", NULL, TS_RELATIVE }, { "/View/TimeDisplayFormat/SecondsSincePreviousCapturedPacket", NULL, "Seconds Since Previous Captured Packet: 1.123456", "<alt><control>5", NULL, TS_DELTA }, { "/View/TimeDisplayFormat/SecondsSincePreviousDisplayedPacket",NULL, "Seconds Since Previous Displayed Packet: 1.123456", "<alt><control>6", NULL, TS_DELTA_DIS }, { "/View/TimeDisplayFormat/UTCDateYMDandTimeofDay", NULL, "UTC Date and Time of Day: 1970-01-01 01:02:03.123456", "<alt><control>7", NULL, TS_UTC_WITH_YMD }, { "/View/TimeDisplayFormat/UTCDateYDOYandTimeofDay", NULL, "UTC Date (with day of year) and Time of Day: 1970/001 01:02:03.123456", NULL, NULL, TS_UTC_WITH_YDOY }, { "/View/TimeDisplayFormat/UTCTimeofDay", NULL, "UTC Time of Day: 01:02:03.123456", "<alt><control>8", NULL, TS_UTC }, }; static const GtkRadioActionEntry main_menu_bar_radio_view_time_fileformat_prec_entries [] = { /* name, stock id, label, accel, tooltip, value */ { "/View/TimeDisplayFormat/FileFormatPrecision-Automatic", NULL, "Automatic (use precision indicated in the file)", NULL, NULL, TS_PREC_AUTO }, { "/View/TimeDisplayFormat/FileFormatPrecision-Seconds", NULL, "Seconds: 0", NULL, NULL, TS_PREC_FIXED_SEC }, { "/View/TimeDisplayFormat/FileFormatPrecision-Deciseconds", NULL, "Deciseconds: 0.1", NULL, NULL, TS_PREC_FIXED_DSEC }, { "/View/TimeDisplayFormat/FileFormatPrecision-Centiseconds", NULL, "Centiseconds: 0.12", NULL, NULL, TS_PREC_FIXED_CSEC }, { "/View/TimeDisplayFormat/FileFormatPrecision-Milliseconds", NULL, "Milliseconds: 0.123", NULL, NULL, TS_PREC_FIXED_MSEC }, { "/View/TimeDisplayFormat/FileFormatPrecision-Microseconds", NULL, "Microseconds: 0.123456", NULL, NULL, TS_PREC_FIXED_USEC }, { "/View/TimeDisplayFormat/FileFormatPrecision-Nanoseconds", NULL, "Nanoseconds: 0.123456789", NULL, NULL, TS_PREC_FIXED_NSEC }, }; static void select_bytes_view_cb (GtkRadioAction *action, GtkRadioAction *current _U_, gpointer user_data _U_) { gint value; value = gtk_radio_action_get_current_value (action); /* Fix me */ select_bytes_view( NULL, NULL, value); } static void sort_ascending_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/SortAscending"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_SORT_ASCENDING); } static void sort_descending_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/SortDescending"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_SORT_DESCENDING); } static void no_sorting_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/NoSorting"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_SORT_NONE); } static void packet_list_heading_show_resolved_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ShowResolved"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_TOGGLE_RESOLVED); } static void packet_list_heading_align_left_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/AlignLeft"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_ALIGN_LEFT); } static void packet_list_heading_align_center_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/AlignCenter"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_ALIGN_CENTER); } static void packet_list_heading_align_right_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/AlignRight"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_ALIGN_RIGHT); } static void packet_list_heading_col_pref_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ColumnPreferences"); prefs_page_cb( widget , user_data, PREFS_PAGE_COLUMNS); } static void packet_list_heading_resize_col_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ResizeColumn"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_RESIZE); } static void packet_list_heading_change_col_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/EditColumnDetails"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_CHANGE); } static void packet_list_heading_activate_all_columns_cb(GtkAction *action _U_, gpointer user_data _U_) { packet_list_set_all_columns_visible (); } static void packet_list_heading_hide_col_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/HideColumn"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_HIDE); } static void packet_list_heading_remove_col_cb(GtkAction *action _U_, gpointer user_data) { GtkWidget *widget = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/RemoveColumn"); packet_list_column_menu_cb( widget , user_data, COLUMN_SELECTED_REMOVE); } static void packet_list_menu_set_ref_time_cb(GtkAction *action _U_, gpointer user_data) { reftime_frame_cb( NULL /* widget _U_ */ , user_data, REFTIME_TOGGLE); } static void apply_selected_filter_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /*g_warning("Accelerator path %s",path+9);*/ /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_REPLACE|MATCH_SELECTED_APPLY_NOW)); } else { match_selected_ptree_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_REPLACE|MATCH_SELECTED_APPLY_NOW)); } } static void apply_not_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_NOT|MATCH_SELECTED_APPLY_NOW)); } else { match_selected_ptree_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_NOT|MATCH_SELECTED_APPLY_NOW)); } } static void apply_and_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_AND|MATCH_SELECTED_APPLY_NOW)); } else { match_selected_ptree_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_AND|MATCH_SELECTED_APPLY_NOW)); } } static void apply_or_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_OR|MATCH_SELECTED_APPLY_NOW)); } else { match_selected_ptree_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_OR|MATCH_SELECTED_APPLY_NOW)); } } static void apply_and_not_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_AND_NOT|MATCH_SELECTED_APPLY_NOW)); } else { match_selected_ptree_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_AND_NOT|MATCH_SELECTED_APPLY_NOW)); } } static void apply_or_not_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data,(MATCH_SELECTED_E)(MATCH_SELECTED_OR_NOT|MATCH_SELECTED_APPLY_NOW)); } else { match_selected_ptree_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_OR_NOT|MATCH_SELECTED_APPLY_NOW)); } } /* Prepare a filter */ static void prepare_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, MATCH_SELECTED_REPLACE); } else { match_selected_ptree_cb(user_data, MATCH_SELECTED_REPLACE); } } static void prepare_not_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, MATCH_SELECTED_NOT); } else { match_selected_ptree_cb(user_data, MATCH_SELECTED_NOT); } } static void prepare_and_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, MATCH_SELECTED_AND); } else { match_selected_ptree_cb(user_data, MATCH_SELECTED_AND); } } static void prepare_or_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, MATCH_SELECTED_OR); } else { match_selected_ptree_cb(user_data, MATCH_SELECTED_OR); } } static void prepare_and_not_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, MATCH_SELECTED_AND_NOT); } else { match_selected_ptree_cb(user_data, MATCH_SELECTED_AND_NOT); } } static void prepare_or_not_selected_cb(GtkAction *action, gpointer user_data) { const gchar *path = gtk_action_get_accel_path(action); /* path starts with "<Actions>" */ if (strncmp (path+9,"/PacketListPopUpMenuActionGroup",31) == 0){ /* Use different callbacks depending action path */ match_selected_plist_cb(user_data, MATCH_SELECTED_OR_NOT); } else { match_selected_ptree_cb(user_data, MATCH_SELECTED_OR_NOT); } } typedef void (*packet_list_menu_color_conv_color_cb_t)(GtkAction *action, gpointer user_data); static void packet_list_menu_color_conv_color1_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 1); } static void packet_list_menu_color_conv_color2_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 2); } static void packet_list_menu_color_conv_color3_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 3); } static void packet_list_menu_color_conv_color4_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 4); } static void packet_list_menu_color_conv_color5_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 5); } static void packet_list_menu_color_conv_color6_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 6); } static void packet_list_menu_color_conv_color7_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 7); } static void packet_list_menu_color_conv_color8_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 8); } static void packet_list_menu_color_conv_color9_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 9); } static void packet_list_menu_color_conv_color10_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 10); } static void packet_list_menu_color_conv_new_rule_cb(GtkAction *action _U_, gpointer user_data) { color_conversation_filter_t* color_filter = (color_conversation_filter_t*)user_data; colorize_conversation_cb(color_filter, 0); } static void packet_list_menu_copy_sum_txt(GtkAction *action _U_, gpointer user_data) { packet_list_copy_summary_cb(user_data, CS_TEXT); } static void packet_list_menu_copy_sum_csv(GtkAction *action _U_, gpointer user_data) { packet_list_copy_summary_cb(user_data, CS_CSV); } static void packet_list_menu_copy_as_flt(GtkAction *action _U_, gpointer user_data) { match_selected_plist_cb(user_data, (MATCH_SELECTED_E)(MATCH_SELECTED_REPLACE|MATCH_SELECTED_COPY_ONLY)); } static void packet_list_menu_copy_bytes_oht_cb(GtkAction *action _U_, gpointer user_data) { copy_hex_cb( NULL /* widget _U_ */ , user_data, (copy_data_type)(CD_ALLINFO | CD_FLAGS_SELECTEDONLY)); } static void packet_list_menu_copy_bytes_oh_cb(GtkAction *action _U_, gpointer user_data) { copy_hex_cb( NULL /* widget _U_ */ , user_data, (copy_data_type)(CD_HEXCOLUMNS | CD_FLAGS_SELECTEDONLY)); } static void packet_list_menu_copy_bytes_text_cb(GtkAction *action _U_, gpointer user_data) { copy_hex_cb( NULL /* widget _U_ */ , user_data, (copy_data_type)(CD_TEXTONLY | CD_FLAGS_SELECTEDONLY)); } static void packet_list_menu_copy_bytes_hex_strm_cb(GtkAction *action _U_, gpointer user_data) { copy_hex_cb( NULL /* widget _U_ */ , user_data, (copy_data_type)(CD_HEX | CD_FLAGS_SELECTEDONLY)); } static void packet_list_menu_copy_bytes_bin_strm_cb(GtkAction *action _U_, gpointer user_data) { copy_hex_cb( NULL /* widget _U_ */ , user_data, (copy_data_type)(CD_BINARY | CD_FLAGS_SELECTEDONLY)); } /* tree */ static void tree_view_menu_color_with_flt_color1_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 1); } static void tree_view_menu_color_with_flt_color2_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 2); } static void tree_view_menu_color_with_flt_color3_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 3); } static void tree_view_menu_color_with_flt_color4_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 4); } static void tree_view_menu_color_with_flt_color5_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 5); } static void tree_view_menu_color_with_flt_color6_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 6); } static void tree_view_menu_color_with_flt_color7_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 7); } static void tree_view_menu_color_with_flt_color8_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 8); } static void tree_view_menu_color_with_flt_color9_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 9); } static void tree_view_menu_color_with_flt_color10_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 10); } static void tree_view_menu_color_with_flt_new_rule_cb(GtkAction *action _U_, gpointer user_data) { colorize_selected_ptree_cb( NULL /* widget _U_ */ , user_data, 0); } static void tree_view_menu_copy_desc(GtkAction *action _U_, gpointer user_data) { copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_DESCRIPTION); } static void tree_view_menu_copy_field(GtkAction *action _U_, gpointer user_data) { copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_FIELDNAME); } static void tree_view_menu_copy_value(GtkAction *action _U_, gpointer user_data) { copy_selected_plist_cb( NULL /* widget _U_ */ , user_data, COPY_SELECTED_VALUE); } static void tree_view_menu_copy_as_flt(GtkAction *action _U_, gpointer user_data _U_) { /* match_selected_ptree_cb needs the popup_menu_object to get the right object E_DFILTER_TE_KEY */ match_selected_ptree_cb( popup_menu_object, (MATCH_SELECTED_E)(MATCH_SELECTED_REPLACE|MATCH_SELECTED_COPY_ONLY)); } static const char *ui_desc_packet_list_heading_menu_popup = "<ui>\n" " <popup name='PacketListHeadingPopup' action='PopupAction'>\n" " <menuitem name='SortAscending' action='/Sort Ascending'/>\n" " <menuitem name='SortDescending' action='/Sort Descending'/>\n" " <menuitem name='NoSorting' action='/No Sorting'/>\n" " <separator/>\n" " <menuitem name='ShowResolved' action='/Show Resolved'/>\n" " <separator/>\n" " <menuitem name='AlignLeft' action='/Align Left'/>\n" " <menuitem name='AlignCenter' action='/Align Center'/>\n" " <menuitem name='AlignRight' action='/Align Right'/>\n" " <separator/>\n" " <menuitem name='ColumnPreferences' action='/Column Preferences'/>\n" " <menuitem name='EditColumnDetails' action='/Edit Column Details'/>\n" " <menuitem name='ResizeColumn' action='/Resize Column'/>\n" " <separator/>\n" " <menu name='DisplayedColumns' action='/Displayed Columns'>\n" " <menuitem name='Display All' action='/Displayed Columns/Display All'/>\n" " </menu>\n" " <menuitem name='HideColumn' action='/Hide Column'/>\n" " <menuitem name='RemoveColumn' action='/Remove Column'/>\n" " </popup>\n" "</ui>\n"; static const GtkActionEntry packet_list_heading_menu_popup_action_entries[] = { { "/Sort Ascending", GTK_STOCK_SORT_ASCENDING, "Sort Ascending", NULL, NULL, G_CALLBACK(sort_ascending_cb) }, { "/Sort Descending", GTK_STOCK_SORT_DESCENDING, "Sort Descending", NULL, NULL, G_CALLBACK(sort_descending_cb) }, { "/No Sorting", NULL, "No Sorting", NULL, NULL, G_CALLBACK(no_sorting_cb) }, { "/Align Left", GTK_STOCK_JUSTIFY_LEFT, "Align Left", NULL, NULL, G_CALLBACK(packet_list_heading_align_left_cb) }, { "/Align Center", GTK_STOCK_JUSTIFY_CENTER, "Align Center", NULL, NULL, G_CALLBACK(packet_list_heading_align_center_cb) }, { "/Align Right", GTK_STOCK_JUSTIFY_RIGHT, "Align Right", NULL, NULL, G_CALLBACK(packet_list_heading_align_right_cb) }, { "/Column Preferences", GTK_STOCK_PREFERENCES, "Column Preferences...", NULL, NULL, G_CALLBACK(packet_list_heading_col_pref_cb) }, { "/Edit Column Details", WIRESHARK_STOCK_EDIT, "Edit Column Details...", NULL, NULL, G_CALLBACK(packet_list_heading_change_col_cb) }, { "/Resize Column", WIRESHARK_STOCK_RESIZE_COLUMNS, "Resize Column", NULL, NULL, G_CALLBACK(packet_list_heading_resize_col_cb) }, { "/Displayed Columns", NULL, "Displayed Columns", NULL, NULL, NULL }, { "/Displayed Columns/Display All", NULL, "Display All", NULL, NULL, G_CALLBACK(packet_list_heading_activate_all_columns_cb) }, { "/Hide Column", NULL, "Hide Column", NULL, NULL, G_CALLBACK(packet_list_heading_hide_col_cb) }, { "/Remove Column", GTK_STOCK_DELETE, "Remove Column", NULL, NULL, G_CALLBACK(packet_list_heading_remove_col_cb) }, }; static const GtkToggleActionEntry packet_list_heading_menu_toggle_action_entries[] = { /* name, stock id, label, accel, tooltip, callback, is_active */ {"/Show Resolved", NULL, "Show Resolved", NULL, NULL, G_CALLBACK(packet_list_heading_show_resolved_cb), FALSE}, }; static const char *ui_desc_packet_list_menu_popup = "<ui>\n" " <popup name='PacketListMenuPopup' action='PopupAction'>\n" " <menuitem name='MarkPacket' action='/MarkPacket'/>\n" " <menuitem name='IgnorePacket' action='/IgnorePacket'/>\n" " <menuitem name='SetTimeReference' action='/Set Time Reference'/>\n" " <menuitem name='TimeShift' action='/TimeShift'/>\n" #ifdef WANT_PACKET_EDITOR " <menuitem name='EditPacket' action='/Edit/EditPacket'/>\n" #endif " <menuitem name='AddEditPktComment' action='/Edit/AddEditPktComment'/>\n" " <separator/>\n" " <menuitem name='ManuallyResolveAddress' action='/ManuallyResolveAddress'/>\n" " <separator/>\n" " <menu name= 'ApplyAsFilter' action='/ApplyasFilter'>\n" " <menuitem name='Selected' action='/ApplyasFilter/Selected'/>\n" " <menuitem name='NotSelected' action='/ApplyasFilter/Not Selected'/>\n" " <menuitem name='AndSelected' action='/ApplyasFilter/AndSelected'/>\n" " <menuitem name='OrSelected' action='/ApplyasFilter/OrSelected'/>\n" " <menuitem name='AndNotSelected' action='/ApplyasFilter/AndNotSelected'/>\n" " <menuitem name='OrNotSelected' action='/ApplyasFilter/OrNotSelected'/>\n" " </menu>\n" " <menu name= 'PrepareaFilter' action='/PrepareaFilter'>\n" " <menuitem name='Selected' action='/PrepareaFilter/Selected'/>\n" " <menuitem name='NotSelected' action='/PrepareaFilter/Not Selected'/>\n" " <menuitem name='AndSelected' action='/PrepareaFilter/AndSelected'/>\n" " <menuitem name='OrSelected' action='/PrepareaFilter/OrSelected'/>\n" " <menuitem name='AndNotSelected' action='/PrepareaFilter/AndNotSelected'/>\n" " <menuitem name='OrNotSelected' action='/PrepareaFilter/OrNotSelected'/>\n" " </menu>\n" " <menu name= 'ConversationFilter' action='/Conversation Filter'>\n" " <placeholder name='Conversations'/>\n" " </menu>\n" " <menu name= 'ColorizeConversation' action='/Colorize Conversation'>\n" " <placeholder name='Colorize'/>\n" " </menu>\n" " <menu name= 'SCTP' action='/SCTP'>\n" " <menuitem name='AnalysethisAssociation' action='/SCTP/Analyse this Association'/>\n" " <menuitem name='PrepareFilterforthisAssociation' action='/SCTP/Prepare Filter for this Association'/>\n" " </menu>\n" " <menuitem name='FollowTCPStream' action='/Follow TCP Stream'/>\n" " <menuitem name='FollowUDPStream' action='/Follow UDP Stream'/>\n" " <menuitem name='FollowSSLStream' action='/Follow SSL Stream'/>\n" " <separator/>\n" " <menu name= 'Copy' action='/Copy'>\n" " <menuitem name='SummaryTxt' action='/Copy/SummaryTxt'/>\n" " <menuitem name='SummaryCSV' action='/Copy/SummaryCSV'/>\n" " <menuitem name='AsFilter' action='/Copy/AsFilter'/>\n" " <separator/>\n" " <menu name= 'Bytes' action='/Copy/Bytes'>\n" " <menuitem name='OffsetHexText' action='/Copy/Bytes/OffsetHexText'/>\n" " <menuitem name='OffsetHex' action='/Copy/Bytes/OffsetHex'/>\n" " <menuitem name='PrintableTextOnly' action='/Copy/Bytes/PrintableTextOnly'/>\n" " <separator/>\n" " <menuitem name='HexStream' action='/Copy/Bytes/HexStream'/>\n" " <menuitem name='BinaryStream' action='/Copy/Bytes/BinaryStream'/>\n" " </menu>\n" " </menu>\n" " <separator/>\n" " <menuitem name='ProtocolPreferences' action='/ProtocolPreferences'/>\n" " <menuitem name='DecodeAs' action='/DecodeAs'/>\n" " <menuitem name='Print' action='/Print'/>\n" " <menuitem name='ShowPacketinNewWindow' action='/ShowPacketinNewWindow'/>\n" " </popup>\n" "</ui>\n"; static const GtkActionEntry apply_prepare_filter_action_entries[] = { { "/ApplyasFilter", NULL, "Apply as Filter", NULL, NULL, NULL }, { "/ApplyasFilter/Selected", NULL, "_Selected" , NULL, NULL, G_CALLBACK(apply_selected_filter_cb) }, { "/ApplyasFilter/Not Selected", NULL, "_Not Selected", NULL, NULL, G_CALLBACK(apply_not_selected_cb) }, { "/ApplyasFilter/AndSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " _and Selected", NULL, NULL, G_CALLBACK(apply_and_selected_cb) }, { "/ApplyasFilter/OrSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " _or Selected", NULL, NULL, G_CALLBACK(apply_or_selected_cb) }, { "/ApplyasFilter/AndNotSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " a_nd not Selected", NULL, NULL, G_CALLBACK(apply_and_not_selected_cb) }, { "/ApplyasFilter/OrNotSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " o_r not Selected", NULL, NULL, G_CALLBACK(apply_or_not_selected_cb) }, { "/PrepareaFilter", NULL, "Prepare a Filter", NULL, NULL, NULL }, { "/PrepareaFilter/Selected", NULL, "_Selected" , NULL, NULL, G_CALLBACK(prepare_selected_cb) }, { "/PrepareaFilter/Not Selected", NULL, "_Not Selected", NULL, NULL, G_CALLBACK(prepare_not_selected_cb) }, { "/PrepareaFilter/AndSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " _and Selected", NULL, NULL, G_CALLBACK(prepare_and_selected_cb) }, { "/PrepareaFilter/OrSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " _or Selected", NULL, NULL, G_CALLBACK(prepare_or_selected_cb) }, { "/PrepareaFilter/AndNotSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " a_nd not Selected", NULL, NULL, G_CALLBACK(prepare_and_not_selected_cb) }, { "/PrepareaFilter/OrNotSelected", NULL, UTF8_HORIZONTAL_ELLIPSIS " o_r not Selected", NULL, NULL, G_CALLBACK(prepare_or_not_selected_cb) }, }; static const GtkActionEntry packet_list_menu_popup_action_entries[] = { { "/MarkPacket", NULL, "Mark Packet (toggle)", NULL, NULL, G_CALLBACK(packet_list_mark_frame_cb) }, { "/IgnorePacket", NULL, "Ignore Packet (toggle)", NULL, NULL, G_CALLBACK(packet_list_ignore_frame_cb) }, { "/Set Time Reference", WIRESHARK_STOCK_TIME, "Set Time Reference (toggle)", NULL, NULL, G_CALLBACK(packet_list_menu_set_ref_time_cb) }, { "/TimeShift", WIRESHARK_STOCK_TIME, "Time Shift...", NULL, NULL, G_CALLBACK(time_shift_cb) }, { "/ManuallyResolveAddress", NULL, "Manually Resolve Address", NULL, NULL, G_CALLBACK(manual_addr_resolv_dlg) }, #ifdef WANT_PACKET_EDITOR { "/Edit/EditPacket", NULL, "_Edit Packet", NULL, NULL, G_CALLBACK(edit_window_cb) },//AL #endif { "/Edit/AddEditPktComment", WIRESHARK_STOCK_EDIT, "Packet Comment...", NULL, NULL, G_CALLBACK(edit_packet_comment_dlg) }, { "/Conversation Filter", NULL, "Conversation Filter", NULL, NULL, NULL }, { "/Colorize Conversation", NULL, "Colorize Conversation", NULL, NULL, NULL }, { "/SCTP", NULL, "SCTP", NULL, NULL, NULL }, { "/SCTP/Analyse this Association", NULL, "Analyse this Association", NULL, NULL, G_CALLBACK(sctp_analyse_start) }, { "/SCTP/Prepare Filter for this Association", NULL, "Prepare Filter for this Association", NULL, NULL, G_CALLBACK(sctp_set_assoc_filter) }, { "/Follow TCP Stream", NULL, "Follow TCP Stream", NULL, NULL, G_CALLBACK(follow_tcp_stream_cb) }, { "/Follow UDP Stream", NULL, "Follow UDP Stream", NULL, NULL, G_CALLBACK(follow_udp_stream_cb) }, { "/Follow SSL Stream", NULL, "Follow SSL Stream", NULL, NULL, G_CALLBACK(follow_ssl_stream_cb) }, { "/Copy", NULL, "Copy", NULL, NULL, NULL }, { "/Copy/SummaryTxt", NULL, "Summary (Text)", NULL, NULL, G_CALLBACK(packet_list_menu_copy_sum_txt) }, { "/Copy/SummaryCSV", NULL, "Summary (CSV)", NULL, NULL, G_CALLBACK(packet_list_menu_copy_sum_csv) }, { "/Copy/AsFilter", NULL, "As Filter", NULL, NULL, G_CALLBACK(packet_list_menu_copy_as_flt) }, { "/Copy/Bytes", NULL, "Bytes", NULL, NULL, NULL }, { "/Copy/Bytes/OffsetHexText", NULL, "Offset Hex Text", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_oht_cb) }, { "/Copy/Bytes/OffsetHex", NULL, "Offset Hex", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_oh_cb) }, { "/Copy/Bytes/PrintableTextOnly", NULL, "Printable Text Only", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_text_cb) }, { "/Copy/Bytes/HexStream", NULL, "Hex Stream", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_hex_strm_cb) }, { "/Copy/Bytes/BinaryStream", NULL, "Binary Stream", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_bin_strm_cb) }, { "/ProtocolPreferences", NULL, "Protocol Preferences", NULL, NULL, NULL }, { "/DecodeAs", WIRESHARK_STOCK_DECODE_AS, "Decode As...", NULL, NULL, G_CALLBACK(decode_as_cb) }, { "/Print", GTK_STOCK_PRINT, "Print...", NULL, NULL, G_CALLBACK(file_print_selected_cmd_cb) }, { "/ShowPacketinNewWindow", NULL, "Show Packet in New Window", NULL, NULL, G_CALLBACK(new_window_cb) }, }; static const char *ui_desc_tree_view_menu_popup = "<ui>\n" " <popup name='TreeViewPopup' action='PopupAction'>\n" " <menuitem name='ExpandSubtrees' action='/ExpandSubtrees'/>\n" " <menuitem name='CollapseSubtrees' action='/CollapseSubtrees'/>\n" " <menuitem name='ExpandAll' action='/ExpandAll'/>\n" " <menuitem name='CollapseAll' action='/CollapseAll'/>\n" " <separator/>\n" " <menuitem name='ApplyasColumn' action='/Apply as Column'/>\n" " <separator/>\n" " <menu name= 'ApplyAsFilter' action='/ApplyasFilter'>\n" " <menuitem name='Selected' action='/ApplyasFilter/Selected'/>\n" " <menuitem name='NotSelected' action='/ApplyasFilter/Not Selected'/>\n" " <menuitem name='AndSelected' action='/ApplyasFilter/AndSelected'/>\n" " <menuitem name='OrSelected' action='/ApplyasFilter/OrSelected'/>\n" " <menuitem name='AndNotSelected' action='/ApplyasFilter/AndNotSelected'/>\n" " <menuitem name='OrNotSelected' action='/ApplyasFilter/OrNotSelected'/>\n" " </menu>\n" " <menu name= 'PrepareaFilter' action='/PrepareaFilter'>\n" " <menuitem name='Selected' action='/PrepareaFilter/Selected'/>\n" " <menuitem name='NotSelected' action='/PrepareaFilter/Not Selected'/>\n" " <menuitem name='AndSelected' action='/PrepareaFilter/AndSelected'/>\n" " <menuitem name='OrSelected' action='/PrepareaFilter/OrSelected'/>\n" " <menuitem name='AndNotSelected' action='/PrepareaFilter/AndNotSelected'/>\n" " <menuitem name='OrNotSelected' action='/PrepareaFilter/OrNotSelected'/>\n" " </menu>\n" " <menu name= 'ColorizewithFilter' action='/Colorize with Filter'>\n" " <menuitem name='Color1' action='/Colorize with Filter/Color 1'/>\n" " <menuitem name='Color2' action='/Colorize with Filter/Color 2'/>\n" " <menuitem name='Color3' action='/Colorize with Filter/Color 3'/>\n" " <menuitem name='Color4' action='/Colorize with Filter/Color 4'/>\n" " <menuitem name='Color5' action='/Colorize with Filter/Color 5'/>\n" " <menuitem name='Color6' action='/Colorize with Filter/Color 6'/>\n" " <menuitem name='Color7' action='/Colorize with Filter/Color 7'/>\n" " <menuitem name='Color8' action='/Colorize with Filter/Color 8'/>\n" " <menuitem name='Color9' action='/Colorize with Filter/Color 9'/>\n" " <menuitem name='Color10' action='/Colorize with Filter/Color 10'/>\n" " <menuitem name='NewColoringRule' action='/Colorize with Filter/New Coloring Rule'/>\n" " </menu>\n" " <menuitem name='FollowTCPStream' action='/Follow TCP Stream'/>\n" " <menuitem name='FollowUDPStream' action='/Follow UDP Stream'/>\n" " <menuitem name='FollowSSLStream' action='/Follow SSL Stream'/>\n" " <separator/>\n" " <menu name= 'Copy' action='/Copy'>\n" " <menuitem name='Description' action='/Copy/Description'/>\n" " <menuitem name='Fieldname' action='/Copy/Fieldname'/>\n" " <menuitem name='Value' action='/Copy/Value'/>\n" " <separator/>\n" " <menuitem name='AsFilter' action='/Copy/AsFilter'/>\n" " <separator/>\n" " <menu name= 'Bytes' action='/Copy/Bytes'>\n" " <menuitem name='OffsetHexText' action='/Copy/Bytes/OffsetHexText'/>\n" " <menuitem name='OffsetHex' action='/Copy/Bytes/OffsetHex'/>\n" " <menuitem name='PrintableTextOnly' action='/Copy/Bytes/PrintableTextOnly'/>\n" " <separator/>\n" " <menuitem name='HexStream' action='/Copy/Bytes/HexStream'/>\n" " <menuitem name='BinaryStream' action='/Copy/Bytes/BinaryStream'/>\n" " </menu>\n" " </menu>\n" " <menuitem name='ExportSelectedPacketBytes' action='/ExportSelectedPacketBytes'/>\n" #ifdef WANT_PACKET_EDITOR " <menuitem name='EditPacket' action='/Edit/EditPacket'/>\n" #endif " <separator/>\n" " <menuitem name='WikiProtocolPage' action='/WikiProtocolPage'/>\n" " <menuitem name='FilterFieldReference' action='/FilterFieldReference'/>\n" " <menuitem name='ProtocolHelp' action='/ProtocolHelp'/>\n" " <menuitem name='ProtocolPreferences' action='/ProtocolPreferences'/>\n" " <separator/>\n" " <menuitem name='DecodeAs' action='/DecodeAs'/>\n" " <menuitem name='DisableProtocol' action='/DisableProtocol'/>\n" " <menuitem name='ResolveName' action='/ResolveName'/>\n" " <menuitem name='GotoCorrespondingPacket' action='/GotoCorrespondingPacket'/>\n" " <menuitem name='ShowPacketRefinNewWindow' action='/ShowPacketRefinNewWindow'/>\n" " </popup>\n" "</ui>\n"; static const GtkActionEntry tree_view_menu_popup_action_entries[] = { { "/ExpandSubtrees", NULL, "Expand Subtrees", NULL, NULL, G_CALLBACK(expand_tree_cb) }, { "/CollapseSubtrees", NULL, "Collapse Subtrees", NULL, NULL, G_CALLBACK(collapse_tree_cb) }, { "/ExpandAll", NULL, "Expand All", NULL, NULL, G_CALLBACK(expand_all_cb) }, { "/CollapseAll", NULL, "Collapse All", NULL, NULL, G_CALLBACK(collapse_all_cb) }, { "/Apply as Column", NULL, "Apply as Column", NULL, NULL, G_CALLBACK(apply_as_custom_column_cb) }, { "/Colorize with Filter", NULL, "Colorize with Filter", NULL, NULL, NULL }, { "/Colorize with Filter/Color 1", WIRESHARK_STOCK_COLOR1, "Color 1", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color1_cb) }, { "/Colorize with Filter/Color 2", WIRESHARK_STOCK_COLOR2, "Color 2", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color2_cb) }, { "/Colorize with Filter/Color 3", WIRESHARK_STOCK_COLOR3, "Color 3", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color3_cb) }, { "/Colorize with Filter/Color 4", WIRESHARK_STOCK_COLOR4, "Color 4", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color4_cb) }, { "/Colorize with Filter/Color 5", WIRESHARK_STOCK_COLOR5, "Color 5", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color5_cb) }, { "/Colorize with Filter/Color 6", WIRESHARK_STOCK_COLOR6, "Color 6", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color6_cb) }, { "/Colorize with Filter/Color 7", WIRESHARK_STOCK_COLOR7, "Color 7", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color7_cb) }, { "/Colorize with Filter/Color 8", WIRESHARK_STOCK_COLOR8, "Color 8", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color8_cb) }, { "/Colorize with Filter/Color 9", WIRESHARK_STOCK_COLOR9, "Color 9", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color9_cb) }, { "/Colorize with Filter/Color 10", WIRESHARK_STOCK_COLOR0, "Color 10", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_color10_cb) }, { "/Colorize with Filter/New Coloring Rule", NULL, "New Coloring Rule...", NULL, NULL, G_CALLBACK(tree_view_menu_color_with_flt_new_rule_cb) }, { "/Follow TCP Stream", NULL, "Follow TCP Stream", NULL, NULL, G_CALLBACK(follow_tcp_stream_cb) }, { "/Follow UDP Stream", NULL, "Follow UDP Stream", NULL, NULL, G_CALLBACK(follow_udp_stream_cb) }, { "/Follow SSL Stream", NULL, "Follow SSL Stream", NULL, NULL, G_CALLBACK(follow_ssl_stream_cb) }, { "/Copy", NULL, "Copy", NULL, NULL, NULL }, { "/Copy/Description", NULL, "Description", NULL, NULL, G_CALLBACK(tree_view_menu_copy_desc) }, { "/Copy/Fieldname", NULL, "Fieldname", NULL, NULL, G_CALLBACK(tree_view_menu_copy_field) }, { "/Copy/Value", NULL, "Value", NULL, NULL, G_CALLBACK(tree_view_menu_copy_value) }, { "/Copy/AsFilter", NULL, "As Filter", NULL, NULL, G_CALLBACK(tree_view_menu_copy_as_flt) }, { "/Copy/Bytes", NULL, "Bytes", NULL, NULL, NULL }, { "/Copy/Bytes/OffsetHexText", NULL, "Offset Hex Text", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_oht_cb) }, { "/Copy/Bytes/OffsetHex", NULL, "Offset Hex", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_oh_cb) }, { "/Copy/Bytes/PrintableTextOnly", NULL, "Printable Text Only", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_text_cb) }, { "/Copy/Bytes/HexStream", NULL, "Hex Stream", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_hex_strm_cb) }, { "/Copy/Bytes/BinaryStream", NULL, "Binary Stream", NULL, NULL, G_CALLBACK(packet_list_menu_copy_bytes_bin_strm_cb) }, { "/ExportSelectedPacketBytes", NULL, "Export Selected Packet Bytes...", NULL, NULL, G_CALLBACK(savehex_cb) }, #ifdef WANT_PACKET_EDITOR { "/Edit/EditPacket", NULL, "_Edit Packet", NULL, NULL, G_CALLBACK(edit_window_cb) }, #endif { "/WikiProtocolPage", WIRESHARK_STOCK_WIKI, "Wiki Protocol Page", NULL, NULL, G_CALLBACK(selected_ptree_info_cb) }, { "/FilterFieldReference", WIRESHARK_STOCK_INTERNET, "Filter Field Reference", NULL, NULL, G_CALLBACK(selected_ptree_ref_cb) }, { "/ProtocolHelp", NULL, "Protocol Help", NULL, NULL, NULL }, { "/ProtocolPreferences", NULL, "Protocol Preferences", NULL, NULL, NULL }, { "/DecodeAs", WIRESHARK_STOCK_DECODE_AS, "Decode As...", NULL, NULL, G_CALLBACK(decode_as_cb) }, { "/DisableProtocol", WIRESHARK_STOCK_CHECKBOX, "Disable Protocol...", NULL, NULL, G_CALLBACK(proto_disable_cb) }, { "/ResolveName", NULL, "_Resolve Name", NULL, NULL, G_CALLBACK(resolve_name_cb) }, { "/GotoCorrespondingPacket", NULL, "_Go to Corresponding Packet", NULL, NULL, G_CALLBACK(goto_framenum_cb) }, { "/ShowPacketRefinNewWindow", NULL, "Show Packet Reference in New Window", NULL, NULL, G_CALLBACK(new_window_cb_ref) }, }; static const char *ui_desc_bytes_menu_popup = "<ui>\n" " <popup name='BytesMenuPopup' action='PopupAction'>\n" " <menuitem name='HexView' action='/HexView'/>\n" " <menuitem name='BitsView' action='/BitsView'/>\n" " </popup>\n" "</ui>\n"; static const GtkRadioActionEntry bytes_menu_radio_action_entries [] = { /* name, stock id, label, accel, tooltip, value */ { "/HexView", NULL, "Hex View", NULL, NULL, BYTES_HEX }, { "/BitsView", NULL, "Bits View", NULL, NULL, BYTES_BITS }, }; static const char *ui_statusbar_profiles_menu_popup = "<ui>\n" " <popup name='ProfilesMenuPopup' action='PopupAction'>\n" " <menuitem name='Profiles' action='/Profiles'/>\n" " <separator/>\n" " <menuitem name='New' action='/New'/>\n" " <menuitem name='Rename' action='/Rename'/>\n" " <menuitem name='Delete' action='/Delete'/>\n" " <separator/>\n" " <menu name='Change' action='/Change'>\n" " <menuitem name='Default' action='/Change/Default'/>\n" " </menu>\n" " </popup>\n" "</ui>\n"; static const GtkActionEntry statusbar_profiles_menu_action_entries [] = { { "/Profiles", GTK_STOCK_INDEX, "Manage Profiles...", NULL, NULL, G_CALLBACK(profile_dialog_cb) }, { "/New", GTK_STOCK_NEW, "New...", NULL, NULL, G_CALLBACK(profile_new_cb) }, { "/Rename", GTK_STOCK_EDIT, "Rename...", NULL, NULL, G_CALLBACK(profile_rename_cb) }, { "/Delete", GTK_STOCK_DELETE, "Delete", NULL, NULL, G_CALLBACK(profile_delete_cb) }, { "/Change", GTK_STOCK_JUMP_TO, "Switch to", NULL, NULL, NULL }, { "/Change/Default", NULL, "Default", NULL, NULL, NULL }, }; GtkWidget * main_menu_new(GtkAccelGroup ** table) { GtkWidget *menubar; #ifdef HAVE_IGE_MAC_INTEGRATION GtkWidget *quit_item, *about_item, *preferences_item; IgeMacMenuGroup *group; #endif #ifdef HAVE_GTKOSXAPPLICATION GtkosxApplication *theApp; GtkWidget * item; GtkWidget * dock_menu; #endif grp = gtk_accel_group_new(); if (initialize) menus_init(); menubar = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar"); #ifdef HAVE_IGE_MAC_INTEGRATION if(prefs.gui_macosx_style) { ige_mac_menu_set_menu_bar(GTK_MENU_SHELL(menubar)); ige_mac_menu_set_global_key_handler_enabled(TRUE); /* Create menu items to populate the application menu with. We have to * do this because we are still using the old GtkItemFactory API for * the main menu. */ group = ige_mac_menu_add_app_menu_group(); about_item = gtk_menu_item_new_with_label("About"); g_signal_connect(about_item, "activate", G_CALLBACK(about_wireshark_cb), NULL); ige_mac_menu_add_app_menu_item(group, GTK_MENU_ITEM(about_item), NULL); group = ige_mac_menu_add_app_menu_group(); preferences_item = gtk_menu_item_new_with_label("Preferences"); g_signal_connect(preferences_item, "activate", G_CALLBACK(prefs_cb), NULL); ige_mac_menu_add_app_menu_item(group, GTK_MENU_ITEM(preferences_item), NULL); } /* The quit item in the application menu shows up whenever ige mac * integration is enabled, even if the OS X UI style in Wireshark isn't * turned on. */ quit_item = gtk_menu_item_new_with_label("Quit"); g_signal_connect(quit_item, "activate", G_CALLBACK(file_quit_cmd_cb), NULL); ige_mac_menu_set_quit_menu_item(GTK_MENU_ITEM(quit_item)); #endif #ifdef HAVE_GTKOSXAPPLICATION theApp = (GtkosxApplication *)g_object_new(GTKOSX_TYPE_APPLICATION, NULL); if(prefs.gui_macosx_style) { gtk_widget_hide(menubar); gtkosx_application_set_menu_bar(theApp, GTK_MENU_SHELL(menubar)); gtkosx_application_set_use_quartz_accelerators(theApp, TRUE); /* Construct a conventional looking OSX App menu */ item = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/HelpMenu/AboutWireshark"); gtkosx_application_insert_app_menu_item(theApp, item, 0); gtkosx_application_insert_app_menu_item(theApp, gtk_separator_menu_item_new(), 1); item = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/EditMenu/Preferences"); gtkosx_application_insert_app_menu_item(theApp, item, 2); /* Set OSX help menu */ item = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/HelpMenu"); gtkosx_application_set_help_menu(theApp,GTK_MENU_ITEM(item)); /* Hide the File menu Quit item (a Quit item is automagically placed within the OSX App menu) */ item = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/FileMenu/Quit"); gtk_widget_hide(item); } /* generate dock menu */ dock_menu = gtk_menu_new(); item = gtk_menu_item_new_with_label("Start"); g_signal_connect(item, "activate", G_CALLBACK (capture_start_cb), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(dock_menu), item); item = gtk_menu_item_new_with_label("Stop"); g_signal_connect(item, "activate", G_CALLBACK (capture_stop_cb), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(dock_menu), item); item = gtk_menu_item_new_with_label("Restart"); g_signal_connect(item, "activate", G_CALLBACK (capture_restart_cb), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(dock_menu), item); gtkosx_application_set_dock_menu(theApp, GTK_MENU_SHELL(dock_menu)); #endif if (table) *table = grp; return menubar; } static void menu_dissector_filter_cb(GtkAction *action _U_, gpointer callback_data) { dissector_filter_t *filter_entry = (dissector_filter_t *)callback_data; GtkWidget *filter_te; const char *buf; filter_te = gtk_bin_get_child(GTK_BIN(g_object_get_data(G_OBJECT(top_level), E_DFILTER_CM_KEY))); /* XXX - this gets the packet_info of the last dissected packet, */ /* which is not necessarily the last selected packet */ /* e.g. "Update list of packets in real time" won't work correct */ buf = filter_entry->build_filter_string(&cfile.edt->pi); gtk_entry_set_text(GTK_ENTRY(filter_te), buf); /* Run the display filter so it goes in effect - even if it's the same as the previous display filter. */ main_filter_packets(&cfile, buf, TRUE); g_free( (void *) buf); } static gboolean menu_dissector_filter_spe_cb(frame_data *fd _U_, epan_dissect_t *edt, gpointer callback_data) { dissector_filter_t *filter_entry = (dissector_filter_t *)callback_data; /* XXX - this gets the packet_info of the last dissected packet, */ /* which is not necessarily the last selected packet */ /* e.g. "Update list of packets in real time" won't work correct */ return (edt != NULL) ? filter_entry->is_filter_valid(&edt->pi) : FALSE; } static void menu_dissector_filter(capture_file *cf) { GList *list_entry = dissector_filter_list; dissector_filter_t *filter_entry; guint merge_id; GtkActionGroup *action_group; GtkAction *action; GtkWidget *submenu_dissector_filters; gchar *action_name; guint i = 0; merge_id = gtk_ui_manager_new_merge_id (ui_manager_main_menubar); action_group = gtk_action_group_new ("dissector-filters-group"); submenu_dissector_filters = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/ConversationFilterMenu"); if(!submenu_dissector_filters){ g_warning("menu_dissector_filter: No submenu_dissector_filters found, path= /Menubar/AnalyzeMenu/ConversationFilterMenu"); } gtk_ui_manager_insert_action_group (ui_manager_main_menubar, action_group, 0); g_object_set_data (G_OBJECT (ui_manager_main_menubar), "dissector-filters-merge-id", GUINT_TO_POINTER (merge_id)); /* no items */ if (!list_entry){ action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", "filter-list-empty", "label", "No filters", "sensitive", FALSE, NULL); gtk_action_group_add_action (action_group, action); gtk_action_set_sensitive(action, FALSE); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager_main_menubar, merge_id, "/Menubar/AnalyzeMenu/ConversationFilterMenu/Filters", "filter-list-empty", "filter-list-empty", GTK_UI_MANAGER_MENUITEM, FALSE); return; } while (list_entry != NULL) { filter_entry = (dissector_filter_t *)list_entry->data; action_name = g_strdup_printf ("filter-%u", i); /*g_warning("action_name %s, filter_entry->name %s",action_name,filter_entry->name);*/ action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", action_name, "label", filter_entry->name, "sensitive", menu_dissector_filter_spe_cb(/* frame_data *fd _U_*/ NULL, cf->edt, filter_entry), NULL); g_signal_connect (action, "activate", G_CALLBACK (menu_dissector_filter_cb), filter_entry); gtk_action_group_add_action (action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager_main_menubar, merge_id, "/Menubar/AnalyzeMenu/ConversationFilterMenu/Filters", action_name, action_name, GTK_UI_MANAGER_MENUITEM, FALSE); g_free(action_name); i++; list_entry = g_list_next(list_entry); } } static void menu_endpoints_cb(GtkAction *action _U_, gpointer user_data) { register_ct_t *table = (register_ct_t*)user_data; conversation_endpoint_cb(table); } typedef struct { capture_file *cf; guint merge_id; GtkActionGroup *action_group; int counter; } conv_menu_t; static void add_conversation_menuitem(gpointer data, gpointer user_data) { register_ct_t *table = (register_ct_t*)data; conv_menu_t *conv = (conv_menu_t*)user_data; gchar *action_name; GtkAction *action; action_name = g_strdup_printf ("conversation-%u", conv->counter); /*g_warning("action_name %s, filter_entry->name %s",action_name,filter_entry->name);*/ action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", action_name, "label", proto_get_protocol_short_name(find_protocol_by_id(get_conversation_proto_id(table))), "sensitive", TRUE, NULL); g_signal_connect (action, "activate", G_CALLBACK (menu_endpoints_cb), table); gtk_action_group_add_action (conv->action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager_main_menubar, conv->merge_id, "/Menubar/StatisticsMenu/ConversationListMenu/Conversations", action_name, action_name, GTK_UI_MANAGER_MENUITEM, FALSE); g_free(action_name); conv->counter++; } static void menu_conversation_list(capture_file *cf) { GtkWidget *submenu_conversation_list; conv_menu_t conv_data; conv_data.merge_id = gtk_ui_manager_new_merge_id (ui_manager_main_menubar); conv_data.action_group = gtk_action_group_new ("conversation-list-group"); submenu_conversation_list = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/StatisticsMenu/ConversationListMenu"); if(!submenu_conversation_list){ g_warning("menu_conversation_list: No submenu_conversation_list found, path= /Menubar/StatisticsMenu/ConversationListMenu"); } gtk_ui_manager_insert_action_group (ui_manager_main_menubar, conv_data.action_group, 0); g_object_set_data (G_OBJECT (ui_manager_main_menubar), "conversation-list-merge-id", GUINT_TO_POINTER (conv_data.merge_id)); conv_data.cf = cf; conv_data.counter = 0; conversation_table_iterate_tables(add_conversation_menuitem, &conv_data); } static void menu_hostlist_cb(GtkAction *action _U_, gpointer user_data) { register_ct_t *table = (register_ct_t*)user_data; hostlist_endpoint_cb(table); } static void add_hostlist_menuitem(gpointer data, gpointer user_data) { register_ct_t *table = (register_ct_t*)data; conv_menu_t *conv = (conv_menu_t*)user_data; gchar *action_name; GtkAction *action; action_name = g_strdup_printf ("hostlist-%u", conv->counter); /*g_warning("action_name %s, filter_entry->name %s",action_name,filter_entry->name);*/ action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", action_name, "label", proto_get_protocol_short_name(find_protocol_by_id(get_conversation_proto_id(table))), "sensitive", TRUE, NULL); g_signal_connect (action, "activate", G_CALLBACK (menu_hostlist_cb), table); gtk_action_group_add_action (conv->action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager_main_menubar, conv->merge_id, "/Menubar/StatisticsMenu/EndpointListMenu/Endpoints", action_name, action_name, GTK_UI_MANAGER_MENUITEM, FALSE); g_free(action_name); conv->counter++; } static void menu_hostlist_list(capture_file *cf) { GtkWidget *submenu_hostlist; conv_menu_t conv_data; conv_data.merge_id = gtk_ui_manager_new_merge_id (ui_manager_main_menubar); conv_data.action_group = gtk_action_group_new ("endpoint-list-group"); submenu_hostlist = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/StatisticsMenu/EndpointListMenu"); if(!submenu_hostlist){ g_warning("menu_hostlist_list: No submenu_conversation_list found, path= /Menubar/StatisticsMenu/EndpointListMenu"); } gtk_ui_manager_insert_action_group (ui_manager_main_menubar, conv_data.action_group, 0); g_object_set_data (G_OBJECT (ui_manager_main_menubar), "endpoint-list-merge-id", GUINT_TO_POINTER (conv_data.merge_id)); conv_data.cf = cf; conv_data.counter = 0; conversation_table_iterate_tables(add_hostlist_menuitem, &conv_data); } static void menu_color_conversation_filter_cb(GtkAction *action _U_, gpointer data) { color_conversation_filter_t *filter_entry = (color_conversation_filter_t *)data; gchar *filter; GtkWidget *filter_te; if (cfile.current_frame) { /* create a filter-string based on the selected packet and action */ filter = filter_entry->build_filter_string(&cfile.edt->pi); /* Run the display filter so it goes in effect - even if it's the same as the previous display filter. */ filter_te = gtk_bin_get_child(GTK_BIN(g_object_get_data(G_OBJECT(top_level), E_DFILTER_CM_KEY))); gtk_entry_set_text(GTK_ENTRY(filter_te), filter); main_filter_packets(&cfile, filter, TRUE); g_free(filter); } } static gboolean menu_color_dissector_filter_spe_cb(frame_data *fd _U_, epan_dissect_t *edt, gpointer callback_data) { color_conversation_filter_t *filter_entry = (color_conversation_filter_t *)callback_data; /* XXX - this gets the packet_info of the last dissected packet, */ /* which is not necessarily the last selected packet */ /* e.g. "Update list of packets in real time" won't work correct */ return (edt != NULL) ? filter_entry->is_filter_valid(&edt->pi) : FALSE; } static void menu_color_conversation_filter(capture_file *cf) { GtkWidget *submenu_conv_filters, *submenu_color_conv_filters; guint merge_id, color_merge_id; GtkActionGroup *action_group, *color_action_group; GList *list_entry = color_conv_filter_list; color_conversation_filter_t* color_filter; static packet_list_menu_color_conv_color_cb_t callbacks[MAX_NUM_COLOR_CONVERSATION_COLORS] = { packet_list_menu_color_conv_color1_cb, packet_list_menu_color_conv_color2_cb, packet_list_menu_color_conv_color3_cb, packet_list_menu_color_conv_color4_cb, packet_list_menu_color_conv_color5_cb, packet_list_menu_color_conv_color6_cb, packet_list_menu_color_conv_color7_cb, packet_list_menu_color_conv_color8_cb, packet_list_menu_color_conv_color9_cb, packet_list_menu_color_conv_color10_cb, }; static const gchar *icons[MAX_NUM_COLOR_CONVERSATION_COLORS] = { WIRESHARK_STOCK_COLOR1, WIRESHARK_STOCK_COLOR2, WIRESHARK_STOCK_COLOR3, WIRESHARK_STOCK_COLOR4, WIRESHARK_STOCK_COLOR5, WIRESHARK_STOCK_COLOR6, WIRESHARK_STOCK_COLOR7, WIRESHARK_STOCK_COLOR8, WIRESHARK_STOCK_COLOR9, WIRESHARK_STOCK_COLOR0, }; merge_id = gtk_ui_manager_new_merge_id (ui_manager_packet_list_menu); action_group = gtk_action_group_new ("popup-conversation-filters-group"); color_merge_id = gtk_ui_manager_new_merge_id (ui_manager_packet_list_menu); color_action_group = gtk_action_group_new ("popup-conv-color-filters-group"); submenu_conv_filters = gtk_ui_manager_get_widget(ui_manager_packet_list_menu, "/PacketListMenuPopup/ConversationFilter"); if(!submenu_conv_filters){ g_warning("menu_color_conversation_filter: No submenu_conversation_filters found, path= /PacketListMenuPopup/ConversationFilter"); } submenu_color_conv_filters = gtk_ui_manager_get_widget(ui_manager_packet_list_menu, "/PacketListMenuPopup/ColorizeConversation"); if(!submenu_color_conv_filters){ g_warning("menu_color_conversation_filter: No submenu_color_conversation_filters found, path= /PacketListMenuPopup/ColorizeConversation"); } gtk_ui_manager_insert_action_group (ui_manager_packet_list_menu, action_group, 0); g_object_set_data (G_OBJECT (ui_manager_packet_list_menu), "popup-conversation-filters-merge-id", GUINT_TO_POINTER (merge_id)); gtk_ui_manager_insert_action_group (ui_manager_packet_list_menu, color_action_group, 0); g_object_set_data (G_OBJECT (ui_manager_packet_list_menu), "popup-conv-color-filters-merge-id", GUINT_TO_POINTER (color_merge_id)); while (list_entry != NULL) { gchar *color_num_path_name; GtkAction *action, *color_action; GtkWidget *color_conv_filter_menuitem, *color_conv_filter_submenu, *color_conv_widget; color_filter = (color_conversation_filter_t*)list_entry->data; /* Create conversation filter menu item for each registered protocol */ action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", color_filter->display_name, "label", color_filter->display_name, "sensitive", menu_color_dissector_filter_spe_cb(NULL, cf->edt, color_filter), NULL); g_signal_connect (action, "activate", G_CALLBACK (menu_color_conversation_filter_cb), color_filter); gtk_action_group_add_action (action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager_packet_list_menu, merge_id, "/PacketListMenuPopup/ConversationFilter/Conversations", color_filter->display_name, color_filter->display_name, GTK_UI_MANAGER_MENUITEM, FALSE); /* Create color filter menu item for each registered protocol */ color_action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", color_filter->display_name, "label", color_filter->display_name, "sensitive", menu_color_dissector_filter_spe_cb(NULL, cf->edt, color_filter), NULL); gtk_action_group_add_action (color_action_group, color_action); g_object_unref (color_action); gtk_ui_manager_add_ui (ui_manager_packet_list_menu, color_merge_id, "/PacketListMenuPopup/ColorizeConversation/Colorize", color_filter->display_name, color_filter->display_name, GTK_UI_MANAGER_MENUITEM, FALSE); /* Create each "numbered" color filter menu item for each registered protocol */ color_num_path_name = g_strdup_printf ("/PacketListMenuPopup/ColorizeConversation/Colorize/%s", color_filter->display_name); color_conv_widget = gtk_ui_manager_get_widget(ui_manager_packet_list_menu, color_num_path_name); if (color_conv_widget != NULL) { guint i; gchar *color_num_name; color_conv_filter_submenu = gtk_menu_new(); for (i = 0; i < MAX_NUM_COLOR_CONVERSATION_COLORS; i++) { color_num_name = g_strdup_printf ("Color %d", i+1); color_conv_filter_menuitem = gtk_image_menu_item_new_with_label(color_num_name); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(color_conv_filter_menuitem), ws_gtk_image_new_from_stock(icons[i], GTK_ICON_SIZE_MENU)); g_signal_connect(color_conv_filter_menuitem, "activate", G_CALLBACK(callbacks[i]), color_filter); gtk_menu_shell_append(GTK_MENU_SHELL(color_conv_filter_submenu), color_conv_filter_menuitem); gtk_widget_show (color_conv_filter_menuitem); g_free(color_num_name); } /* Create New Coloring Rule... menu item */ color_conv_filter_menuitem = gtk_menu_item_new_with_label("New Coloring Rule..."); g_signal_connect(color_conv_filter_menuitem, "activate", G_CALLBACK(packet_list_menu_color_conv_new_rule_cb), color_filter); gtk_menu_shell_append(GTK_MENU_SHELL(color_conv_filter_submenu), color_conv_filter_menuitem); gtk_widget_show (color_conv_filter_menuitem); gtk_menu_item_set_submenu (GTK_MENU_ITEM(color_conv_widget), color_conv_filter_submenu); } else { g_warning("menu_color_conversation_filter: No submenu_color_conv_filters found, path= %s", color_num_path_name); } g_free(color_num_path_name); list_entry = g_list_next(list_entry); } } static void menus_init(void) { GtkActionGroup *packet_list_heading_action_group, *packet_list_action_group, *packet_list_details_action_group, *packet_list_byte_menu_action_group, *statusbar_profiles_action_group; GtkAction *name_res_action; GError *error = NULL; guint merge_id; if (initialize) { initialize = FALSE; popup_menu_object = gtk_menu_new(); /* packet list heading pop-up menu */ packet_list_heading_action_group = gtk_action_group_new ("PacketListHeadingPopUpMenuActionGroup"); gtk_action_group_add_actions (packet_list_heading_action_group, /* the action group */ packet_list_heading_menu_popup_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(packet_list_heading_menu_popup_action_entries), /* the number of entries */ popup_menu_object); /* data to pass to the action callbacks */ gtk_action_group_add_toggle_actions(packet_list_heading_action_group, /* the action group */ (GtkToggleActionEntry *)packet_list_heading_menu_toggle_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(packet_list_heading_menu_toggle_action_entries), /* the number of entries */ NULL); /* data to pass to the action callbacks */ ui_manager_packet_list_heading = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager_packet_list_heading, packet_list_heading_action_group, 0); /* the position at which the group will be inserted. */ gtk_ui_manager_add_ui_from_string (ui_manager_packet_list_heading,ui_desc_packet_list_heading_menu_popup, -1, &error); if (error != NULL) { fprintf (stderr, "Warning: building Packet List Heading Pop-Up failed: %s\n", error->message); g_error_free (error); error = NULL; } g_object_set_data(G_OBJECT(popup_menu_object), PM_PACKET_LIST_COL_KEY, gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup")); popup_menu_list = g_slist_append((GSList *)popup_menu_list, ui_manager_packet_list_heading); /* packet list pop-up menu */ packet_list_action_group = gtk_action_group_new ("PacketListPopUpMenuActionGroup"); gtk_action_group_add_actions (packet_list_action_group, /* the action group */ (GtkActionEntry *)packet_list_menu_popup_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(packet_list_menu_popup_action_entries), /* the number of entries */ popup_menu_object); /* data to pass to the action callbacks */ /* Add the filter menu items */ gtk_action_group_add_actions (packet_list_action_group, /* the action group */ (GtkActionEntry *)apply_prepare_filter_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(apply_prepare_filter_action_entries), /* the number of entries */ popup_menu_object); /* data to pass to the action callbacks */ ui_manager_packet_list_menu = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager_packet_list_menu, packet_list_action_group, 0); /* the position at which the group will be inserted. */ gtk_ui_manager_add_ui_from_string (ui_manager_packet_list_menu, ui_desc_packet_list_menu_popup, -1, &error); if (error != NULL) { fprintf (stderr, "Warning: building Packet List Pop-Up menu failed: %s\n", error->message); g_error_free (error); error = NULL; } g_object_set_data(G_OBJECT(popup_menu_object), PM_PACKET_LIST_KEY, gtk_ui_manager_get_widget(ui_manager_packet_list_menu, "/PacketListMenuPopup")); popup_menu_list = g_slist_append((GSList *)popup_menu_list, ui_manager_packet_list_menu); menu_color_conversation_filter(&cfile); /* packet detail pop-up menu */ packet_list_details_action_group = gtk_action_group_new ("PacketListDetailsMenuPopUpActionGroup"); gtk_action_group_add_actions (packet_list_details_action_group, /* the action group */ (GtkActionEntry *)tree_view_menu_popup_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(tree_view_menu_popup_action_entries), /* the number of entries */ popup_menu_object); /* data to pass to the action callbacks */ /* Add the filter menu items */ gtk_action_group_add_actions (packet_list_details_action_group, /* the action group */ (GtkActionEntry *)apply_prepare_filter_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(apply_prepare_filter_action_entries), /* the number of entries */ popup_menu_object); /* data to pass to the action callbacks */ ui_manager_tree_view_menu = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager_tree_view_menu, packet_list_details_action_group, 0); /* the position at which the group will be inserted. */ gtk_ui_manager_add_ui_from_string (ui_manager_tree_view_menu, ui_desc_tree_view_menu_popup, -1, &error); #if 0 /* If we want to load the treewiew popup UI description from file */ gui_desc_file_name_and_path = get_ui_file_path("tree-view-ui.xml"); gtk_ui_manager_add_ui_from_file ( ui_manager_tree_view_menu, gui_desc_file_name_and_path, &error); g_free (gui_desc_file_name_and_path); #endif if (error != NULL) { fprintf (stderr, "Warning: building TreeView Pop-Up menu failed: %s\n", error->message); g_error_free (error); error = NULL; } g_object_set_data(G_OBJECT(popup_menu_object), PM_TREE_VIEW_KEY, gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup")); popup_menu_list = g_slist_append((GSList *)popup_menu_list, ui_manager_tree_view_menu); /* * Hex dump pop-up menu. * We provide our own empty menu to suppress the default pop-up menu * for text widgets. */ packet_list_byte_menu_action_group = gtk_action_group_new ("PacketListByteMenuPopUpActionGroup"); gtk_action_group_add_radio_actions (packet_list_byte_menu_action_group, /* the action group */ (GtkRadioActionEntry *)bytes_menu_radio_action_entries, /* an array of radio action descriptions */ G_N_ELEMENTS(bytes_menu_radio_action_entries), /* the number of entries */ recent.gui_bytes_view, /* the value of the action to activate initially, or -1 if no action should be activated */ G_CALLBACK(select_bytes_view_cb), /* the callback to connect to the changed signal */ popup_menu_object); /* data to pass to the action callbacks */ ui_manager_bytes_menu = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager_bytes_menu, packet_list_byte_menu_action_group, 0); /* the position at which the group will be inserted. */ gtk_ui_manager_add_ui_from_string (ui_manager_bytes_menu, ui_desc_bytes_menu_popup, -1, &error); #if 0 /* If we want to load the bytesview poupup UI description from file */ gui_desc_file_name_and_path = get_ui_file_path("bytes-view-ui.xml"); gtk_ui_manager_add_ui_from_file ( ui_manager_bytes_menu, gui_desc_file_name_and_path, &error); g_free (gui_desc_file_name_and_path); #endif if (error != NULL) { fprintf (stderr, "Warning: building Bytes Pop-Up menu failed: %s\n", error->message); g_error_free (error); error = NULL; } g_object_unref(packet_list_byte_menu_action_group); g_object_set_data(G_OBJECT(popup_menu_object), PM_BYTES_VIEW_KEY, gtk_ui_manager_get_widget(ui_manager_bytes_menu, "/BytesMenuPopup")); popup_menu_list = g_slist_append((GSList *)popup_menu_list, ui_manager_bytes_menu); /* main */ main_menu_bar_action_group = gtk_action_group_new ("MenuActionGroup"); gtk_action_group_add_actions (main_menu_bar_action_group, /* the action group */ main_menu_bar_entries, /* an array of action descriptions */ G_N_ELEMENTS(main_menu_bar_entries), /* the number of entries */ NULL); /* data to pass to the action callbacks */ #ifdef HAVE_LIBPCAP /* Add the capture menu actions */ gtk_action_group_add_actions (main_menu_bar_action_group, /* the action group */ capture_menu_entries, /* an array of action descriptions */ G_N_ELEMENTS(capture_menu_entries), /* the number of entries */ NULL); /* data to pass to the action callbacks */ #endif /* Add the filter menu actions */ gtk_action_group_add_actions (main_menu_bar_action_group, /* the action group */ (GtkActionEntry *)apply_prepare_filter_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(apply_prepare_filter_action_entries), /* the number of entries */ popup_menu_object); /* data to pass to the action callbacks */ gtk_action_group_add_toggle_actions(main_menu_bar_action_group, /* the action group */ main_menu_bar_toggle_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(main_menu_bar_toggle_action_entries), /* the number of entries */ NULL); /* data to pass to the action callbacks */ gtk_action_group_add_radio_actions (main_menu_bar_action_group, /* the action group */ main_menu_bar_radio_view_time_entries, /* an array of radio action descriptions */ G_N_ELEMENTS(main_menu_bar_radio_view_time_entries), /* the number of entries */ recent.gui_time_format, /* the value of the action to activate initially, or -1 if no action should be activated */ G_CALLBACK(timestamp_format_new_cb), /* the callback to connect to the changed signal */ NULL); /* data to pass to the action callbacks */ gtk_action_group_add_radio_actions (main_menu_bar_action_group, /* the action group */ main_menu_bar_radio_view_time_fileformat_prec_entries, /* an array of radio action descriptions */ G_N_ELEMENTS(main_menu_bar_radio_view_time_fileformat_prec_entries), /* the number of entries */ recent.gui_time_precision, /* the value of the action to activate initially, or -1 if no action should be activated */ G_CALLBACK(timestamp_precision_new_cb), /* the callback to connect to the changed signal */ NULL); /* data to pass to the action callbacks */ ui_manager_main_menubar = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager_main_menubar, main_menu_bar_action_group, 0); gtk_ui_manager_add_ui_from_string (ui_manager_main_menubar,ui_desc_menubar, -1, &error); if (error != NULL) { fprintf (stderr, "Warning: building main menubar failed: %s\n", error->message); g_error_free (error); error = NULL; } g_object_unref(main_menu_bar_action_group); gtk_window_add_accel_group (GTK_WINDOW(top_level), gtk_ui_manager_get_accel_group(ui_manager_main_menubar)); /* Add the recent files items to the menu * use place holders and * gtk_ui_manager_add_ui(). */ merge_id = gtk_ui_manager_new_merge_id (ui_manager_main_menubar); add_recent_items (merge_id, ui_manager_main_menubar); /* Add statistics tap plug-in to the menu */ merge_id = gtk_ui_manager_new_merge_id (ui_manager_main_menubar); add_tap_plugins (merge_id, ui_manager_main_menubar); statusbar_profiles_action_group = gtk_action_group_new ("StatusBarProfilesPopUpMenuActionGroup"); gtk_action_group_add_actions (statusbar_profiles_action_group, /* the action group */ (GtkActionEntry *)statusbar_profiles_menu_action_entries, /* an array of action descriptions */ G_N_ELEMENTS(statusbar_profiles_menu_action_entries), /* the number of entries */ popup_menu_object); /* data to pass to the action callbacks */ ui_manager_statusbar_profiles_menu = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager_statusbar_profiles_menu, statusbar_profiles_action_group, 0); /* the position at which the group will be inserted. */ gtk_ui_manager_add_ui_from_string (ui_manager_statusbar_profiles_menu,ui_statusbar_profiles_menu_popup, -1, &error); if (error != NULL) { fprintf (stderr, "Warning: building StatusBar Profiles Pop-Up failed: %s\n", error->message); g_error_free (error); error = NULL; } g_object_unref(statusbar_profiles_action_group); g_object_set_data(G_OBJECT(popup_menu_object), PM_STATUSBAR_PROFILES_KEY, gtk_ui_manager_get_widget(ui_manager_statusbar_profiles_menu, "/ProfilesMenuPopup")); popup_menu_list = g_slist_append((GSList *)popup_menu_list, ui_manager_statusbar_profiles_menu); menu_dissector_filter(&cfile); menu_conversation_list(&cfile); menu_hostlist_list(&cfile); /* Add additional entries which may have been introduced by dissectors and/or plugins */ ws_menubar_external_menus(); merge_menu_items(merge_menu_items_list); /* Add external menus and items */ ws_menubar_build_external_menus(); /* Initialize enabled/disabled state of menu items */ set_menus_for_capture_file(NULL); #if 0 /* Un-#if this when we actually implement Cut/Copy/Paste. Then make sure you enable them when they can be done. */ set_menu_sensitivity_old("/Edit/Cut", FALSE); set_menu_sensitivity_old("/Edit/Copy", FALSE); set_menu_sensitivity_old("/Edit/Paste", FALSE); #endif /* Hide not usable menus */ set_menus_for_captured_packets(FALSE); set_menus_for_selected_packet(&cfile); set_menus_for_selected_tree_row(&cfile); set_menus_for_capture_in_progress(FALSE); set_menus_for_file_set(/* dialog */TRUE, /* previous file */ FALSE, /* next_file */ FALSE); /* Set callback to update name resolution settings when activated */ name_res_action = gtk_action_group_get_action(main_menu_bar_action_group, "/View/NameResolution"); g_signal_connect (name_res_action, "activate", G_CALLBACK (menu_name_resolution_update_cb), NULL); } } /* Get a merge id for the menubar */ void ws_add_build_menubar_items_callback(gpointer callback) { build_menubar_items_callback_list = g_list_append(build_menubar_items_callback_list, callback); } static void ws_menubar_build_external_menus(void) { void (*callback)(gpointer); while (build_menubar_items_callback_list != NULL) { callback = (void (*)(gpointer))build_menubar_items_callback_list->data; callback(ui_manager_main_menubar); build_menubar_items_callback_list = g_list_next(build_menubar_items_callback_list); } } typedef struct _menu_item { const char *gui_path; const char *name; const char *stock_id; const char *label; const char *accelerator; const gchar *tooltip; GCallback callback; gpointer callback_data; gboolean enabled; gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data); gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data); } menu_item_t; static gint insert_sorted_by_label(gconstpointer aparam, gconstpointer bparam) { const menu_item_t *a = (menu_item_t *)aparam; const menu_item_t *b = (menu_item_t *)bparam; return g_ascii_strcasecmp(a->label, b->label); } void register_menu_bar_menu_items( const char *gui_path, const char *name, const gchar *stock_id, const char *label, const char *accelerator, const gchar *tooltip, gpointer callback, gpointer callback_data, gboolean enabled, gboolean (*selected_packet_enabled)(frame_data *, epan_dissect_t *, gpointer callback_data), gboolean (*selected_tree_row_enabled)(field_info *, gpointer callback_data)) { menu_item_t *menu_item_data; menu_item_data = g_new0(menu_item_t,1); menu_item_data->gui_path = gui_path; menu_item_data->name = name; menu_item_data->label = label; menu_item_data->stock_id = stock_id; menu_item_data->accelerator = accelerator; menu_item_data->tooltip = tooltip; menu_item_data->callback = (GCallback)callback; menu_item_data->callback_data = callback_data; menu_item_data->enabled = enabled; menu_item_data->selected_packet_enabled = selected_packet_enabled; menu_item_data->selected_tree_row_enabled = selected_tree_row_enabled; merge_menu_items_list = g_list_insert_sorted(merge_menu_items_list, menu_item_data, insert_sorted_by_label); } #define XMENU_MAX_DEPTH (1 + 32) /* max number of menus in an xpath (+1 for Menubar) */ #define XMENU_HEADER "<ui><menubar name='Menubar'>\n" #define XMENU_FOOTER "</menubar></ui>\n" /** * Creates an XML string, containing a UI definition that can be merged * with Wireshark's menu bar using gtk_ui_manager_add_ui_from_string(). * Free the returned string with g_free() when no longer needed. * * The last item in the path is treated as the menu item; all preceding path * elements are the names of parent menus. Path elements are stripped of * leading/trailing spaces. * * |'s separate an existing menu's name from its action. * If the action has a / in it, it must have been "escaped" into a # before * entering this function; this function will translate it back to a /. * There must be an easier way! * * Examples: * make_menu_xml("/Foo/Bar|/BarAction/I_tem"); * --> * "<ui><menubar name='Menubar'> * <menu action='Foo'> * <menu name='Bar' action='/BarAction'> * <menuitem action='I_tem'/> <!-- puts shortcut on 't' --> * </menu> * </menu> * <menubar></ui>" * * make_menu_xml("/Foo/Bar|BarAction/-/Baz|BarAction#BazAction/Item"); * --> * "<ui><menubar name='Menubar'> * <menu action='Foo'> * <menu name='Bar' action='/BarAction'> * <separator/> * <menu name='Baz' action='BarAction/BazAction'> * <menuitem action='Item'/> * </menu> * </menu> * </menu> * <menubar></ui>" * * http://developer.gnome.org/gtk/2.24/GtkUIManager.html#XML-UI * http://developer.gnome.org/gtk/2.24/GtkUIManager.html#gtk-ui-manager-add-ui-from-string */ static const gchar* make_menu_xml(const char *path) { GString *xml; char **p; char **tokens, **name_action_tokens; const char *tok = path; gchar *markup; guint num_menus; size_t len; int i; if (path == NULL) return NULL; xml = g_string_new(XMENU_HEADER); /* no need to specify menu bar...skip it */ len = strlen("/Menubar"); if (g_ascii_strncasecmp(path, "/Menubar", len) == 0) { path += len; } /* open nested menu tag for each path token */ num_menus = 0; tokens = g_strsplit(path, "/", XMENU_MAX_DEPTH); for (p = tokens; (p != NULL) && (*p != NULL); p++) { tok = g_strstrip(*p); if (tok[0] == '\0') continue; /* reserve last token for menu-item processing */ if (*(p+1) == NULL) break; if (g_strcmp0(tok, "-") == 0) { xml = g_string_append(xml, "<separator/>\n"); } else { /* Split the name of the menu from its action (if any) */ name_action_tokens = g_strsplit(tok, "|", 2); if (name_action_tokens[1]) { i = -1; /* Replace #'s with /'s. * Necessary for menus whose action includes a "/". * There MUST be an easier way... */ while (name_action_tokens[1][++i]) if (name_action_tokens[1][i] == '#') name_action_tokens[1][i] = '/'; } if (name_action_tokens[1]) markup = g_markup_printf_escaped("<menu name='%s' action='/%s'>\n", name_action_tokens[0], name_action_tokens[1]); else markup = g_markup_printf_escaped("<menu action='%s'>\n", tok); xml = g_string_append(xml, markup); g_free(markup); g_strfreev(name_action_tokens); num_menus++; } } /* Use the last path element as the name of the menu item. Allow blank * menu name or else the menu is hidden (and thus useless). Showing a * blank menu allows the developer to see the problem and fix it. */ if ( (tok != NULL) /* && (tok[0] != '\0') */ ) { if (g_strcmp0(tok, "-") == 0) { xml = g_string_append(xml, "<separator/>\n"); } else { /* append self-closing menu-item tag */ markup = g_markup_printf_escaped("<menuitem action='%s'/>\n", tok); xml = g_string_append(xml, markup); g_free(markup); } } /* we just processed the last token, so free the list */ g_strfreev(tokens); /* close all menu tags, and then append the footer */ for (; num_menus > 0; num_menus--) { xml = g_string_append(xml, "</menu>"); } xml = g_string_append(xml, XMENU_FOOTER); /* free the GString object, return the allocated char buf which must be g_freed */ return g_string_free(xml, FALSE); } /** * Creates an action group for the menu items in xpath, and returns it. The caller should * use g_object_unref() on the returned pointer if transferring scope. */ static GtkActionGroup* make_menu_actions(char *path, const menu_item_t *menu_item_data) { GtkActionGroup *action_group; GtkAction *action; char **p; char **tokens; char *tok = path, *lbl; action_group = gtk_action_group_new (path); tokens = g_strsplit(path, "/", XMENU_MAX_DEPTH); for (p = tokens; (p != NULL) && (*p != NULL); p++) { tok = g_strstrip(*p); if (tok[0] == '\0') continue; /* reserve last token for item name */ if ( *(p+1) == NULL ) break; if (g_strcmp0(tok, "-") != 0) { /* parse label from token */ lbl = strchr(tok, '|'); if (lbl != NULL) { *lbl++ = '\0'; } if ((lbl == NULL) || (*lbl == '\0')) { lbl = tok; } action = (GtkAction *)g_object_new ( GTK_TYPE_ACTION, "name", tok, "label", lbl, NULL ); gtk_action_group_add_action (action_group, action); g_object_unref (action); } } /* handle menu item (blank names ok) */ if ( (tok != NULL) /* && (tok[0] != '\0') */ && (menu_item_data != NULL) ) { action = (GtkAction *)g_object_new ( GTK_TYPE_ACTION, "name", tok, "label", menu_item_data->label, "stock-id", menu_item_data->stock_id, "tooltip", menu_item_data->tooltip, "sensitive", menu_item_data->enabled, NULL ); if (menu_item_data->callback != NULL) { g_signal_connect ( action, "activate", G_CALLBACK (menu_item_data->callback), menu_item_data->callback_data ); } gtk_action_group_add_action (action_group, action); g_object_unref (action); } /* we just processed the last token, so free the list */ g_strfreev(tokens); return action_group; } static void merge_menu_items(GList *lcl_merge_menu_items_list) { guint merge_id; GtkActionGroup *action_group; menu_item_t *menu_item_data; GError *err; const gchar *xml; gchar *xpath; while (lcl_merge_menu_items_list != NULL) { menu_item_data = (menu_item_t *)lcl_merge_menu_items_list->data; xpath = g_strdup_printf("%s/%s", menu_item_data->gui_path, menu_item_data->name); xml = make_menu_xml(xpath); if (xml != NULL) { /* create action group for menu elements */ action_group = make_menu_actions(xpath, menu_item_data); gtk_ui_manager_insert_action_group (ui_manager_main_menubar, action_group, 0); /* add menu elements to menu bar */ err = NULL; merge_id = gtk_ui_manager_add_ui_from_string (ui_manager_main_menubar, xml, -1, &err); if (err != NULL) { fprintf (stderr, "Warning: building menus failed: %s\n", err->message); g_error_free (err); /* undo the mess */ gtk_ui_manager_remove_ui (ui_manager_main_menubar, merge_id); gtk_ui_manager_remove_action_group (ui_manager_main_menubar, action_group); } g_free ((gchar*)xml); g_object_unref (action_group); } g_free(xpath); lcl_merge_menu_items_list = g_list_next(lcl_merge_menu_items_list); } } const char * stat_group_name(register_stat_group_t group) { /* See make_menu_xml() for an explanation of the string format */ static const value_string group_name_vals[] = { {REGISTER_ANALYZE_GROUP_UNSORTED, "/Menubar/AnalyzeMenu|Analyze"}, /* unsorted analyze stuff */ {REGISTER_ANALYZE_GROUP_CONVERSATION_FILTER, "/Menubar/AnalyzeMenu|Analyze/ConversationFilterMenu|Analyze#ConversationFilter"}, /* conversation filters */ {REGISTER_STAT_GROUP_UNSORTED, "/Menubar/StatisticsMenu|Statistics"}, /* unsorted statistic function */ {REGISTER_STAT_GROUP_GENERIC, "/Menubar/StatisticsMenu|Statistics"}, /* generic statistic function, not specific to a protocol */ {REGISTER_STAT_GROUP_CONVERSATION_LIST, "/Menubar/StatisticsMenu|Statistics/ConversationListMenu|Statistics#ConversationList"}, /* member of the conversation list */ {REGISTER_STAT_GROUP_ENDPOINT_LIST, "/Menubar/StatisticsMenu|Statistics/EndpointListMenu|Statistics#EndpointList"}, /* member of the endpoint list */ {REGISTER_STAT_GROUP_RESPONSE_TIME, "/Menubar/StatisticsMenu|Statistics/ServiceResponseTimeMenu|Statistics#ServiceResponseTime"}, /* member of the service response time list */ {REGISTER_STAT_GROUP_TELEPHONY, "/Menubar/TelephonyMenu|Telephony"}, /* telephony specific */ {REGISTER_STAT_GROUP_TELEPHONY_GSM, "/Menubar/TelephonyMenu|Telephony/GSM|Telephony#GSM"}, /* GSM-specific */ {REGISTER_STAT_GROUP_TELEPHONY_LTE, "/Menubar/TelephonyMenu|Telephony/LTEmenu|Telephony#LTE"}, /* LTE-specific */ {REGISTER_STAT_GROUP_TELEPHONY_SCTP, "/Menubar/TelephonyMenu|Telephony/SCTPmenu|Telephony#SCTP"}, /* SCTP-specific */ {REGISTER_TOOLS_GROUP_UNSORTED, "/Menubar/ToolsMenu|Tools"}, /* unsorted tools */ {0, NULL} }; return val_to_str_const(group, group_name_vals, "/Menubar/ToolsMenu|Tools"); } /* * Enable/disable menu sensitivity. */ static void set_menu_sensitivity(GtkUIManager *ui_manager, const gchar *path, gint val) { GtkAction *action; action = gtk_ui_manager_get_action(ui_manager, path); if(!action){ fprintf (stderr, "Warning: set_menu_sensitivity couldn't find action path= %s\n", path); return; } gtk_action_set_sensitive (action, val); /* TRUE to make the action sensitive */ } static void set_menu_object_data_meat(GtkUIManager *ui_manager, const gchar *path, const gchar *key, gpointer data) { GtkWidget *menu = NULL; if ((menu = gtk_ui_manager_get_widget(ui_manager, path)) != NULL){ g_object_set_data(G_OBJECT(menu), key, data); }else{ #if 0 g_warning("set_menu_object_data_meat: no menu, path: %s",path); #endif } } void set_menu_object_data (const gchar *path, const gchar *key, gpointer data) { if (strncmp (path,"/Menubar",8) == 0){ set_menu_object_data_meat(ui_manager_main_menubar, path, key, data); }else if (strncmp (path,"/PacketListMenuPopup",20) == 0){ set_menu_object_data_meat(ui_manager_packet_list_menu, path, key, data); }else if (strncmp (path,"/TreeViewPopup",14) == 0){ set_menu_object_data_meat(ui_manager_tree_view_menu, path, key, data); }else if (strncmp (path,"/BytesMenuPopup",15) == 0){ set_menu_object_data_meat(ui_manager_bytes_menu, path, key, data); }else if (strncmp (path,"/ProfilesMenuPopup",18) == 0){ set_menu_object_data_meat(ui_manager_statusbar_profiles_menu, path, key, data); } } /* Recently used capture files submenu: * Submenu containing the recently used capture files. * The capture filenames are always kept with the absolute path to be independent * of the current path. * They are only stored inside the labels of the submenu (no separate list). */ #define MENU_RECENT_FILES_PATH "/Menubar/FileMenu/OpenRecent" #define MENU_RECENT_FILES_KEY "Recent File Name" /* Add a file name to the top of the list; if it's already present remove it first */ static GList * remove_present_file_name(GList *recent_files_list, const gchar *cf_name) { GList *li; gchar *widget_cf_name; for (li = g_list_first(recent_files_list); li; li = li->next) { widget_cf_name = (gchar *)li->data; if ( #ifdef _WIN32 /* do a case insensitive compare on win32 */ g_ascii_strncasecmp(widget_cf_name, cf_name, 1000) == 0){ #else /* _WIN32 */ /* do a case sensitive compare on unix */ strncmp(widget_cf_name, cf_name, 1000) == 0 ){ #endif recent_files_list = g_list_remove(recent_files_list,widget_cf_name); } } return recent_files_list; } static void recent_changed_cb (GtkUIManager *ui_manager, gpointer user_data _U_) { guint merge_id; GList *action_groups, *l; merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (ui_manager), "recent-files-merge-id")); /* remove the UI */ gtk_ui_manager_remove_ui (ui_manager, merge_id); /* remove the action group; gtk_ui_manager_remove_action_group() * should really take the action group's name instead of its * pointer. */ action_groups = gtk_ui_manager_get_action_groups (ui_manager); for (l = action_groups; l != NULL; l = l->next) { GtkActionGroup *group = (GtkActionGroup *)l->data; if (strcmp (gtk_action_group_get_name (group), "recent-files-group") == 0){ /* this unrefs the action group and all of its actions */ gtk_ui_manager_remove_action_group (ui_manager, group); break; } } /* generate a new merge id and re-add everything */ merge_id = gtk_ui_manager_new_merge_id (ui_manager); add_recent_items (merge_id, ui_manager); } static void recent_clear_cb(GtkAction *action _U_, gpointer user_data _U_) { GtkWidget *submenu_recent_files; GList *recent_files_list; /* Get the list of recent files, free the list and store the empty list with the widget */ submenu_recent_files = gtk_ui_manager_get_widget(ui_manager_main_menubar, MENU_RECENT_FILES_PATH); recent_files_list = (GList *)g_object_get_data(G_OBJECT(submenu_recent_files), "recent-files-list"); /* Free the name strings ?? */ g_list_free(recent_files_list); recent_files_list = NULL; g_object_set_data(G_OBJECT(submenu_recent_files), "recent-files-list", recent_files_list); /* Calling recent_changed_cb will rebuild the GUI call add_recent_items which will in turn call * main_welcome_reset_recent_capture_files */ recent_changed_cb(ui_manager_main_menubar, NULL); } static void add_recent_items (guint merge_id, GtkUIManager *ui_manager) { GtkActionGroup *action_group; GtkAction *action; GtkWidget *submenu_recent_files; GList *items, *l; gchar *action_name; guint i; /* Reset the recent files list in the welcome screen */ main_welcome_reset_recent_capture_files(); action_group = gtk_action_group_new ("recent-files-group"); submenu_recent_files = gtk_ui_manager_get_widget(ui_manager, MENU_RECENT_FILES_PATH); if(!submenu_recent_files){ g_warning("add_recent_items: No submenu_recent_files found, path= MENU_RECENT_FILES_PATH"); } items = (GList *)g_object_get_data(G_OBJECT(submenu_recent_files), "recent-files-list"); gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); g_object_set_data (G_OBJECT (ui_manager), "recent-files-merge-id", GUINT_TO_POINTER (merge_id)); /* no items */ if (!items){ action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", "recent-info-empty", "label", "No recently used files", "sensitive", FALSE, NULL); gtk_action_group_add_action (action_group, action); gtk_action_set_sensitive(action, FALSE); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager, merge_id, "/Menubar/FileMenu/OpenRecent/RecentFiles", "recent-info-empty", "recent-info-empty", GTK_UI_MANAGER_MENUITEM, FALSE); return; } for (i = 0, l = items; i < prefs.gui_recent_files_count_max && l != NULL; i +=1, l = l->next) { gchar *item_name = (gchar *)l->data; action_name = g_strdup_printf ("recent-info-%u", i); action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", action_name, "label", item_name, "stock_id", WIRESHARK_STOCK_SAVE, NULL); g_signal_connect (action, "activate", G_CALLBACK (menu_open_recent_file_cmd_cb), NULL); #if !GTK_CHECK_VERSION(2,16,0) g_object_set_data (G_OBJECT (action), "FileName", item_name); #endif gtk_action_group_add_action (action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager, merge_id, "/Menubar/FileMenu/OpenRecent/RecentFiles", action_name, action_name, GTK_UI_MANAGER_MENUITEM, FALSE); /* Add the file name to the recent files list on the Welcome screen */ main_welcome_add_recent_capture_file(item_name, G_OBJECT(action)); g_free (action_name); } /* Add a Separator */ gtk_ui_manager_add_ui (ui_manager, merge_id, "/Menubar/FileMenu/OpenRecent/RecentFiles", "separator-recent-info", NULL, GTK_UI_MANAGER_SEPARATOR, FALSE); /* Add a clear Icon */ action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", "clear-recent-info", "label", "Clear the recent files list", "stock_id", GTK_STOCK_CLEAR, NULL); g_signal_connect (action, "activate", G_CALLBACK (recent_clear_cb), NULL); gtk_action_group_add_action (action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager, merge_id, "/Menubar/FileMenu/OpenRecent/RecentFiles", "clear-recent-info", "clear-recent-info", GTK_UI_MANAGER_MENUITEM, FALSE); } #define MENU_STATISTICS_PATH "/Menubar/StatisticsMenu" static void add_tap_plugins (guint merge_id, GtkUIManager *ui_manager) { GtkActionGroup *action_group; GtkAction *action; GtkWidget *submenu_statistics; GList *cfg_list; GList *iter; gchar *action_name; gchar *submenu_path; gsize submenu_path_size; gchar *stat_name_buf; gchar *stat_name; gchar *sep; action_group = gtk_action_group_new ("tap-plugins-group"); submenu_statistics = gtk_ui_manager_get_widget(ui_manager_main_menubar, MENU_STATISTICS_PATH); if(!submenu_statistics){ g_warning("add_tap_plugins: No submenu_statistics found, path= MENU_STATISTICS_PATH"); return; } gtk_ui_manager_insert_action_group (ui_manager_main_menubar, action_group, 0); g_object_set_data (G_OBJECT (ui_manager_main_menubar), "tap-plugins-merge-id", GUINT_TO_POINTER (merge_id)); cfg_list = stats_tree_get_cfg_list(); iter = g_list_first(cfg_list); while (iter) { stats_tree_cfg *cfg = (stats_tree_cfg*)iter->data; if (cfg->plugin) { stat_name_buf = g_strdup(cfg->name); submenu_path_size = (gsize)(strlen(MENU_STATISTICS_PATH)+strlen(cfg->name)+strlen(cfg->abbr)+1); /* worst case length */ submenu_path = (gchar *)g_malloc(submenu_path_size); g_strlcpy(submenu_path, MENU_STATISTICS_PATH, submenu_path_size); sep = stat_name= stat_name_buf; while ((sep = strchr(sep,'/')) != NULL) { if (*(++sep)=='/') { /* escapeded slash - two slash characters after each other */ memmove(sep,sep+1,strlen(sep)); } else { /* we got a new submenu name - ignore the edge case where there is no text following this slash */ *(sep-1)= 0; action_name = g_strdup_printf("%s/%s", submenu_path,stat_name); if (!gtk_ui_manager_get_widget(ui_manager, action_name)) { action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", action_name, "label", stat_name, NULL); gtk_action_group_add_action (action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager, merge_id, submenu_path, stat_name, action_name, GTK_UI_MANAGER_MENU, FALSE); } g_free (action_name); g_strlcat(submenu_path,"/",submenu_path_size); g_strlcat(submenu_path,stat_name,submenu_path_size); stat_name= sep; } } action_name = g_strdup_printf("%s/%s", submenu_path, cfg->abbr); action = (GtkAction *)g_object_new (GTK_TYPE_ACTION, "name", action_name, "label", stat_name, NULL); g_signal_connect (action, "activate", G_CALLBACK (gtk_stats_tree_cb), NULL); gtk_action_group_add_action (action_group, action); g_object_unref (action); gtk_ui_manager_add_ui (ui_manager, merge_id, submenu_path, action_name, action_name, GTK_UI_MANAGER_MENUITEM, FALSE); g_free (action_name); g_free (stat_name_buf); g_free (submenu_path); } iter = g_list_next(iter); } g_list_free(cfg_list); } /* Open a file by its name (Beware: will not ask to close existing capture file!) */ void menu_open_filename(gchar *cf_name) { GtkWidget *submenu_recent_files; int err; GList *recent_files_list; submenu_recent_files = gtk_ui_manager_get_widget(ui_manager_main_menubar, MENU_RECENT_FILES_PATH); if(!submenu_recent_files){ g_warning("menu_open_filename: No submenu_recent_files found, path= MENU_RECENT_FILES_PATH"); } recent_files_list = (GList *)g_object_get_data(G_OBJECT(submenu_recent_files), "recent-files-list"); /* XXX: ask user to remove item, it's maybe only a temporary problem */ /* open and read the capture file (this will close an existing file) */ if (cf_open(&cfile, cf_name, WTAP_TYPE_AUTO, FALSE, &err) == CF_OK) { cf_read(&cfile, FALSE); }else{ recent_files_list = remove_present_file_name(recent_files_list, cf_name); g_object_set_data(G_OBJECT(submenu_recent_files), "recent-files-list", recent_files_list); /* Calling recent_changed_cb will rebuild the GUI call add_recent_items which will in turn call * main_welcome_reset_recent_capture_files */ recent_changed_cb(ui_manager_main_menubar, NULL); } } /* callback, if the user pushed a recent file submenu item */ static void menu_open_recent_file_cmd(GtkAction *action) { GtkWidget *submenu_recent_files; GList *recent_files_list; const gchar *cf_name; int err; #if GTK_CHECK_VERSION(2,16,0) cf_name = gtk_action_get_label(action); #else cf_name = (const gchar *)g_object_get_data(G_OBJECT(action), "FileName"); #endif /* open and read the capture file (this will close an existing file) */ if (cf_open(&cfile, cf_name, WTAP_TYPE_AUTO, FALSE, &err) == CF_OK) { cf_read(&cfile, FALSE); } else { submenu_recent_files = gtk_ui_manager_get_widget(ui_manager_main_menubar, MENU_RECENT_FILES_PATH); recent_files_list = (GList *)g_object_get_data(G_OBJECT(submenu_recent_files), "recent-files-list"); recent_files_list = remove_present_file_name(recent_files_list, cf_name); g_object_set_data(G_OBJECT(submenu_recent_files), "recent-files-list", recent_files_list); /* Calling recent_changed_cb will rebuild the GUI call add_recent_items which will in turn call * main_welcome_reset_recent_capture_files */ recent_changed_cb(ui_manager_main_menubar, NULL); } } static void menu_open_recent_file_cmd_cb(GtkAction *action, gpointer data _U_) { /* If there's unsaved data, let the user save it first. If they cancel out of it, don't open the file. */ if (do_file_close(&cfile, FALSE, " before opening a new capture file")) menu_open_recent_file_cmd(action); } static void add_menu_recent_capture_file_absolute(const gchar *cf_name) { GtkWidget *submenu_recent_files; GList *li; gchar *widget_cf_name; gchar *normalized_cf_name; guint cnt; GList *recent_files_list; normalized_cf_name = g_strdup(cf_name); #ifdef _WIN32 /* replace all slashes by backslashes */ g_strdelimit(normalized_cf_name, "/", '\\'); #endif /* get the submenu container item */ submenu_recent_files = gtk_ui_manager_get_widget(ui_manager_main_menubar, MENU_RECENT_FILES_PATH); if(!submenu_recent_files){ g_warning("add_menu_recent_capture_file_absolute: No submenu_recent_files found, path= MENU_RECENT_FILES_PATH"); g_free(normalized_cf_name); return; } recent_files_list = (GList *)g_object_get_data(G_OBJECT(submenu_recent_files), "recent-files-list"); cnt = 1; for (li = g_list_first(recent_files_list); li; cnt++) { widget_cf_name = (gchar *)li->data; /* Find the next element BEFORE we (possibly) free the current one below */ li = li->next; if ( #ifdef _WIN32 /* do a case insensitive compare on win32 */ g_ascii_strncasecmp(widget_cf_name, normalized_cf_name, 1000) == 0 || #else /* _WIN32 */ /* do a case sensitive compare on unix */ strncmp(widget_cf_name, normalized_cf_name, 1000) == 0 || #endif cnt >= prefs.gui_recent_files_count_max) { recent_files_list = g_list_remove(recent_files_list,widget_cf_name); cnt--; } } recent_files_list = g_list_prepend(recent_files_list, normalized_cf_name); g_object_set_data(G_OBJECT(submenu_recent_files), "recent-files-list", recent_files_list); recent_changed_cb( ui_manager_main_menubar, NULL); } /* add the capture filename to the "Recent Files" menu */ /* (will change nothing, if this filename is already in the menu) */ /* * XXX - We might want to call SHAddToRecentDocs under Windows 7: * http: //stackoverflow.com/questions/437212/how-do-you-register-a-most-recently-used-list-with-windows-in-preparation-for-win */ void add_menu_recent_capture_file(const gchar *cf_name) { gchar *curr; gchar *absolute; /* if this filename is an absolute path, we can use it directly */ if (g_path_is_absolute(cf_name)) { add_menu_recent_capture_file_absolute(cf_name); return; } /* this filename is not an absolute path, prepend the current dir */ curr = g_get_current_dir(); absolute = g_strdup_printf("%s%s%s", curr, G_DIR_SEPARATOR_S, cf_name); add_menu_recent_capture_file_absolute(absolute); g_free(curr); g_free(absolute); } /* write all capture filenames of the menu to the user's recent file */ void menu_recent_file_write_all(FILE *rf) { GtkWidget *submenu_recent_files; gchar *cf_name; GList *recent_files_list, *list; submenu_recent_files = gtk_ui_manager_get_widget(ui_manager_main_menubar, MENU_RECENT_FILES_PATH); if(!submenu_recent_files){ g_warning("menu_recent_file_write_all: No submenu_recent_files found, path= MENU_RECENT_FILES_PATH"); } recent_files_list = (GList *)g_object_get_data(G_OBJECT(submenu_recent_files), "recent-files-list"); list = g_list_last(recent_files_list); while (list != NULL) { cf_name = (gchar *)list->data; if (cf_name) { if(u3_active()) fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", u3_contract_device_path(cf_name)); else fprintf (rf, RECENT_KEY_CAPTURE_FILE ": %s\n", cf_name); } list = g_list_previous(list); } g_list_free(recent_files_list); } void menu_name_resolution_changed(void) { GtkWidget *menu; menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforMACLayer"); if(!menu){ g_warning("menu_name_resolution_changed: No menu found, path= /Menubar/ViewMenu/NameResolution/EnableforMACLayer"); } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), gbl_resolv_flags.mac_name); menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforNetworkLayer"); if(!menu){ g_warning("menu_name_resolution_changed: No menu found, path= /Menubar/ViewMenu/NameResolution/EnableforNetworkLayer"); } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), gbl_resolv_flags.network_name); menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/EnableforTransportLayer"); if(!menu){ g_warning("menu_name_resolution_changed: No menu found, path= /Menubar/ViewMenu/NameResolution/EnableforTransportLayer"); } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), gbl_resolv_flags.transport_name); menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/UseExternalNetworkNameResolver"); if(!menu){ g_warning("menu_name_resolution_changed: No menu found, path= /Menubar/ViewMenu/NameResolution/UseExternalNetworkNameResolver"); } gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), gbl_resolv_flags.use_external_net_name_resolver); } static void menu_name_resolution_update_cb(GtkAction *action _U_, gpointer data _U_) { menu_name_resolution_changed(); } static void name_resolution_cb(GtkWidget *w, gpointer d _U_, gboolean* res_flag) { if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))) { *res_flag = TRUE; } else { *res_flag = FALSE; } packet_list_recreate(); redraw_packet_bytes_all(); } #ifdef HAVE_LIBPCAP void menu_auto_scroll_live_changed(gboolean auto_scroll_live_in) { GtkWidget *menu; /* tell menu about it */ menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/AutoScrollinLiveCapture"); if(!menu){ g_warning("menu_auto_scroll_live_changed: No menu found, path= /Menubar/ViewMenu/AutoScrollinLiveCapture"); } if( ((gboolean) gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu)) != auto_scroll_live_in) ) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), auto_scroll_live_in); } } #endif /*HAVE_LIBPCAP */ void menu_colorize_changed(gboolean packet_list_colorize) { GtkWidget *menu; /* tell menu about it */ menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/ColorizePacketList"); if(!menu){ g_warning("menu_colorize_changed: No menu found, path= /Menubar/ViewMenu/ColorizePacketList"); } if( (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu)) != packet_list_colorize) ) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), packet_list_colorize); } } static void colorize_cb(GtkWidget *w, gpointer d _U_) { main_colorize_changed(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w))); } /* the recent file read has finished, update the menu corresponding */ void menu_recent_read_finished(void) { GtkWidget *menu; menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/MainToolbar"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/MainToolbar"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.main_toolbar_show); } menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/FilterToolbar"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/FilterToolbar"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.filter_toolbar_show); }; menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/WirelessToolbar"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/WirelessToolbar"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.wireless_toolbar_show); } /* Fix me? */ menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/StatusBar"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/StatusBar"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.statusbar_show); } menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketList"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/PacketList"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.packet_list_show); } menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketDetails"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/PacketDetails"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.tree_view_show); } menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/PacketBytes"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/PacketBytes"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.byte_view_show); } menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/ColorizePacketList"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/ColorizePacketList"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), recent.packet_list_colorize); } menu_name_resolution_changed(); #ifdef HAVE_LIBPCAP menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/AutoScrollinLiveCapture"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/AutoScrollinLiveCapture"); }else{ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), auto_scroll_live); } #endif main_widgets_rearrange(); /* don't change the time format, if we had a command line value */ if (timestamp_get_type() != TS_NOT_SET) { recent.gui_time_format = timestamp_get_type(); } /* XXX Fix me */ timestamp_set_type(recent.gui_time_format); /* This call adjusts column width */ cf_timestamp_auto_precision(&cfile); packet_list_queue_draw(); /* the actual precision will be set in packet_list_queue_draw() below */ if (recent.gui_time_precision > TS_PREC_FIXED_NSEC) { timestamp_set_precision(TS_PREC_AUTO); } else { timestamp_set_precision(recent.gui_time_precision); } /* This call adjusts column width */ cf_timestamp_auto_precision(&cfile); packet_list_queue_draw(); /* don't change the seconds format, if we had a command line value */ if (timestamp_get_seconds_type() != TS_SECONDS_NOT_SET) { recent.gui_seconds_format = timestamp_get_seconds_type(); } menu = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes"); if(!menu){ g_warning("menu_recent_read_finished: No menu found, path= /Menubar/ViewMenu/TimeDisplayFormat/DisplaySecondsWithHoursAndMinutes"); } switch (recent.gui_seconds_format) { case TS_SECONDS_DEFAULT: recent.gui_seconds_format = (ts_seconds_type)-1; /* set_active will not trigger the callback when deactivating an inactive item! */ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), FALSE); break; case TS_SECONDS_HOUR_MIN_SEC: recent.gui_seconds_format = (ts_seconds_type)-1; /* set_active will not trigger the callback when activating an active item! */ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), FALSE); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), TRUE); break; default: g_assert_not_reached(); } main_colorize_changed(recent.packet_list_colorize); } gboolean popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data) { GtkWidget *menu = (GtkWidget *)data; GdkEventButton *event_button = NULL; gint row, column; if(widget == NULL || event == NULL || data == NULL) { return FALSE; } /* * If we ever want to make the menu differ based on what row * and/or column we're above, we'd use "eth_clist_get_selection_info()" * to find the row and column number for the coordinates; a CTree is, * I guess, like a CList with one column(?) and the expander widget * as a pixmap. */ /* Check if we are on packet_list object */ if (widget == g_object_get_data(G_OBJECT(popup_menu_object), E_MPACKET_LIST_KEY) && ((GdkEventButton *)event)->button != 1) { gint physical_row; if (packet_list_get_event_row_column((GdkEventButton *)event, &physical_row, &row, &column)) { g_object_set_data(G_OBJECT(popup_menu_object), E_MPACKET_LIST_ROW_KEY, GINT_TO_POINTER(row)); g_object_set_data(G_OBJECT(popup_menu_object), E_MPACKET_LIST_COL_KEY, GINT_TO_POINTER(column)); packet_list_set_selected_row(row); } } /* Check if we are on tree_view object */ if (widget == tree_view_gbl) { tree_view_select(widget, (GdkEventButton *) event); } /* context menu handler */ if(event->type == GDK_BUTTON_PRESS) { event_button = (GdkEventButton *) event; /* To quote the "Gdk Event Structures" doc: * "Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button" */ if(event_button->button == 3) { gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event_button->button, event_button->time); g_signal_stop_emission_by_name(widget, "button_press_event"); return TRUE; } } /* Check if we are on byte_view object */ if(widget == get_notebook_bv_ptr(byte_nb_ptr_gbl)) { byte_view_select(widget, (GdkEventButton *) event); } /* GDK_2BUTTON_PRESS is a doubleclick -> expand/collapse tree row */ /* GTK version 1 seems to be doing this automatically */ if (widget == tree_view_gbl && event->type == GDK_2BUTTON_PRESS) { GtkTreePath *path; if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), (gint) (((GdkEventButton *)event)->x), (gint) (((GdkEventButton *)event)->y), &path, NULL, NULL, NULL)) { if (gtk_tree_view_row_expanded(GTK_TREE_VIEW(widget), path)) gtk_tree_view_collapse_row(GTK_TREE_VIEW(widget), path); else gtk_tree_view_expand_row(GTK_TREE_VIEW(widget), path, FALSE); gtk_tree_path_free(path); } } return FALSE; } /* Enable or disable menu items based on whether you have a capture file you've finished reading and, if you have one, whether it's been saved and whether it could be saved except by copying the raw packet data. */ void set_menus_for_capture_file(capture_file *cf) { if (cf == NULL || cf->state == FILE_READ_IN_PROGRESS) { /* We have no capture file or we're currently reading a file */ set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Merge", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Close", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Save", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/SaveAs", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSpecifiedPackets", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportPacketDissections", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSelectedPacketBytes", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSSLSessionKeys", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportObjects", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportPDUs", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/Reload", FALSE); } else { set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Merge", cf_can_write_with_wiretap(cf)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Close", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Save", cf_can_save(cf)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/SaveAs", cf_can_save_as(cf)); /* * "Export Specified Packets..." should be available only if * we can write the file out in at least one format. */ set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSpecifiedPackets", cf_can_write_with_wiretap(cf)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportPacketDissections", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSelectedPacketBytes", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSSLSessionKeys", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportObjects", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportPDUs", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/Reload", TRUE); } } /* Enable or disable menu items based on whether there's a capture in progress. */ void set_menus_for_capture_in_progress(gboolean capture_in_progress) { /* Either a capture was started or stopped; in either case, it's not in the process of stopping, so allow quitting. */ set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Quit", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Open", !capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/OpenRecent", !capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportPacketDissections", capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSelectedPacketBytes", capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSSLSessionKeys", capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportObjects", capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Set", !capture_in_progress); set_menu_sensitivity(ui_manager_packet_list_heading, "/PacketListHeadingPopup/SortAscending", !capture_in_progress); set_menu_sensitivity(ui_manager_packet_list_heading, "/PacketListHeadingPopup/SortDescending", !capture_in_progress); set_menu_sensitivity(ui_manager_packet_list_heading, "/PacketListHeadingPopup/NoSorting", !capture_in_progress); #ifdef HAVE_LIBPCAP set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/CaptureMenu/Options", !capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/CaptureMenu/Start", !capture_in_progress && global_capture_opts.num_selected > 0); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/CaptureMenu/Stop", capture_in_progress); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/CaptureMenu/Restart", capture_in_progress); #endif /* HAVE_LIBPCAP */ } #ifdef HAVE_LIBPCAP void set_menus_capture_start_sensitivity(gboolean enable) { set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/CaptureMenu/Start", enable); } #endif /* Disable menu items while we're waiting for the capture child to finish. We disallow quitting until it finishes, and also disallow stopping or restarting the capture. */ void set_menus_for_capture_stopping(void) { set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Quit", FALSE); #ifdef HAVE_LIBPCAP set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/CaptureMenu/Stop", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/CaptureMenu/Restart", FALSE); #endif /* HAVE_LIBPCAP */ } void set_menus_for_captured_packets(gboolean have_captured_packets) { set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Print", have_captured_packets); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/Print", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/FindPacket", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/FindNext", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/FindPrevious", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ZoomIn", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ZoomOut", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/NormalSize", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/Goto", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/PreviousPacket", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/NextPacket", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/FirstPacket", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/LastPacket", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/PreviousPacketInConversation", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/NextPacketInConversation", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/StatisticsMenu/Summary", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/StatisticsMenu/ShowCommentsSummary", have_captured_packets); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/StatisticsMenu/ProtocolHierarchy", have_captured_packets); } void set_menus_for_selected_packet(capture_file *cf) { GList *list_entry = dissector_filter_list; GList *color_list_entry = color_conv_filter_list; guint i = 0; gboolean properties = FALSE; const char *abbrev = NULL; char *prev_abbrev; gboolean is_ip = FALSE, is_tcp = FALSE, is_udp = FALSE, is_sctp = FALSE, is_ssl = FALSE; /* Making the menu context-sensitive allows for easier selection of the desired item and has the added benefit, with large captures, of avoiding needless looping through huge lists for marked, ignored, or time-referenced packets. */ gboolean frame_selected = cf->current_frame != NULL; /* A frame is selected */ gboolean have_marked = frame_selected && cf->marked_count > 0; /* We have marked frames. (XXX - why check frame_selected?) */ gboolean another_is_marked = have_marked && !(cf->marked_count == 1 && cf->current_frame->flags.marked); /* We have a marked frame other than the current frame (i.e., we have at least one marked frame, and either there's more than one marked frame or the current frame isn't marked). */ gboolean have_time_ref = cf->ref_time_count > 0; gboolean another_is_time_ref = frame_selected && have_time_ref && !(cf->ref_time_count == 1 && cf->current_frame->flags.ref_time); /* We have a time reference frame other than the current frame (i.e., we have at least one time reference frame, and either there's more than one time reference frame or the current frame isn't a time reference frame). (XXX - why check frame_selected?) */ if (cf->edt) proto_get_frame_protocols(cf->edt->pi.layers, &is_ip, &is_tcp, &is_udp, &is_sctp, &is_ssl); if (cf->edt && cf->edt->tree) { GPtrArray *ga; header_field_info *hfinfo; field_info *v; guint ii; ga = proto_all_finfos(cf->edt->tree); for (ii = ga->len - 1; ii > 0 ; ii -= 1) { v = (field_info *)g_ptr_array_index (ga, ii); hfinfo = v->hfinfo; if (!g_str_has_prefix(hfinfo->abbrev, "text") && !g_str_has_prefix(hfinfo->abbrev, "_ws.expert") && !g_str_has_prefix(hfinfo->abbrev, "_ws.malformed")) { if (hfinfo->parent == -1) { abbrev = hfinfo->abbrev; } else { abbrev = proto_registrar_get_abbrev(hfinfo->parent); } properties = prefs_is_registered_protocol(abbrev); break; } } } set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/MarkPacket", frame_selected); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/MarkPacket", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/MarkAllDisplayedPackets", cf->displayed_count > 0); /* Unlike un-ignore, do not allow unmark of all frames when no frames are displayed */ set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/UnmarkAllDisplayedPackets", have_marked); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/FindNextMark", another_is_marked); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/FindPreviousMark", another_is_marked); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/IgnorePacket", frame_selected); #ifdef WANT_PACKET_EDITOR set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/EditPacket", prefs.gui_packet_editor ? frame_selected : FALSE); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/EditPacket", prefs.gui_packet_editor ? frame_selected : FALSE); #endif /* WANT_PACKET_EDITOR */ set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/AddEditPktComment", frame_selected && wtap_dump_can_write(cf->linktypes, WTAP_COMMENT_PER_PACKET)); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/IgnorePacket", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/IgnoreAllDisplayedPackets", cf->displayed_count > 0 && cf->displayed_count != cf->count); /* Allow un-ignore of all frames even with no frames currently displayed */ set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Un-IgnoreAllPackets", cf->ignored_count > 0); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/SetTimeReference", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Un-TimeReferenceAllPackets", have_time_ref); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/TimeShift", cf->count > 0); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/SetTimeReference", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/FindNextTimeReference", another_is_time_ref); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/FindPreviousTimeReference", another_is_time_ref); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ResizeAllColumns", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/CollapseAll", frame_selected); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/CollapseAll", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ExpandAll", frame_selected); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ExpandAll", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ColorizeConversation", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ResetColoring1-10", tmp_color_filters_used()); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ShowPacketinNewWindow", frame_selected); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/ShowPacketinNewWindow", frame_selected); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/ManuallyResolveAddress", frame_selected ? is_ip : FALSE); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/SCTP", frame_selected ? is_sctp : FALSE); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/FollowTCPStream", is_tcp); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/FollowTCPStream", is_tcp); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/FollowUDPStream", frame_selected ? is_udp : FALSE); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/FollowSSLStream", frame_selected ? is_ssl : FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/FollowSSLStream", frame_selected ? is_ssl : FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/FollowUDPStream", frame_selected ? is_udp : FALSE); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/ColorizeConversation", frame_selected); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/DecodeAs", frame_selected && decode_as_ok()); if (properties) { prev_abbrev = (char *)g_object_get_data(G_OBJECT(ui_manager_packet_list_menu), "menu_abbrev"); if (!prev_abbrev || (strcmp(prev_abbrev, abbrev) != 0)) { /*No previous protocol or protocol changed - update Protocol Preferences menu*/ module_t *prefs_module_p = prefs_find_module(abbrev); rebuild_protocol_prefs_menu(prefs_module_p, properties, ui_manager_packet_list_menu, "/PacketListMenuPopup/ProtocolPreferences"); g_object_set_data(G_OBJECT(ui_manager_packet_list_menu), "menu_abbrev", g_strdup(abbrev)); g_free (prev_abbrev); } } set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/ProtocolPreferences", properties); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/DecodeAs", frame_selected && decode_as_ok()); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/Copy", frame_selected); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/ApplyAsFilter", frame_selected); set_menu_sensitivity(ui_manager_packet_list_menu, "/PacketListMenuPopup/PrepareaFilter", frame_selected); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ResolveName", frame_selected && (gbl_resolv_flags.mac_name || gbl_resolv_flags.network_name || gbl_resolv_flags.transport_name || gbl_resolv_flags.concurrent_dns)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/FollowTCPStream", is_tcp); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/FollowUDPStream", frame_selected ? is_udp : FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/FollowSSLStream", frame_selected ? is_ssl : FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/DecodeAs", frame_selected && decode_as_ok()); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/NameResolution/ResolveName", frame_selected && (gbl_resolv_flags.mac_name || gbl_resolv_flags.network_name || gbl_resolv_flags.transport_name || gbl_resolv_flags.concurrent_dns)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ToolsMenu/FirewallACLRules", frame_selected); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/StatisticsMenu/TCPStreamGraphMenu", is_tcp); while (list_entry != NULL) { dissector_filter_t *filter_entry; gchar *path; filter_entry = (dissector_filter_t *)list_entry->data; path = g_strdup_printf("/Menubar/AnalyzeMenu/ConversationFilterMenu/Filters/filter-%u", i); set_menu_sensitivity(ui_manager_main_menubar, path, menu_dissector_filter_spe_cb(/* frame_data *fd _U_*/ NULL, cf->edt, filter_entry)); g_free(path); i++; list_entry = g_list_next(list_entry); } while (color_list_entry != NULL) { color_conversation_filter_t* color_filter; gchar *path; color_filter = (color_conversation_filter_t *)color_list_entry->data; path = g_strdup_printf("/PacketListMenuPopup/ConversationFilter/Conversations/%s", color_filter->display_name); set_menu_sensitivity(ui_manager_packet_list_menu, path, menu_color_dissector_filter_spe_cb(NULL, cf->edt, color_filter)); g_free(path); path = g_strdup_printf("/PacketListMenuPopup/ColorizeConversation/Colorize/%s", color_filter->display_name); set_menu_sensitivity(ui_manager_packet_list_menu, path, menu_color_dissector_filter_spe_cb(NULL, cf->edt, color_filter)); g_free(path); color_list_entry = g_list_next(color_list_entry); } } static void menu_prefs_toggle_bool (GtkWidget *w, gpointer data) { gboolean *value = (gboolean *)data; module_t *module = (module_t *)g_object_get_data (G_OBJECT(w), "module"); module->prefs_changed = TRUE; *value = !(*value); prefs_apply (module); if (!prefs.gui_use_pref_save) { prefs_main_write(); } redissect_packets(); redissect_all_packet_windows(); } static void menu_prefs_change_enum (GtkWidget *w, gpointer data) { gint *value = (gint *)data; module_t *module = (module_t *)g_object_get_data (G_OBJECT(w), "module"); gint new_value = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(w), "enumval")); if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(w))) return; if (*value != new_value) { module->prefs_changed = TRUE; *value = new_value; prefs_apply (module); if (!prefs.gui_use_pref_save) { prefs_main_write(); } redissect_packets(); redissect_all_packet_windows(); } } void menu_prefs_reset(void) { g_free (g_object_get_data(G_OBJECT(ui_manager_tree_view_menu), "menu_abbrev")); g_object_set_data(G_OBJECT(ui_manager_tree_view_menu), "menu_abbrev", NULL); } static void menu_prefs_change_ok (GtkWidget *w, gpointer parent_w) { GtkWidget *entry = (GtkWidget *)g_object_get_data (G_OBJECT(w), "entry"); module_t *module = (module_t *)g_object_get_data (G_OBJECT(w), "module"); pref_t *pref = (pref_t *)g_object_get_data (G_OBJECT(w), "pref"); const gchar *new_value = gtk_entry_get_text(GTK_ENTRY(entry)); range_t *newrange; gchar *p; guint uval; switch (pref->type) { case PREF_UINT: uval = (guint)strtoul(new_value, &p, pref->info.base); if (p == new_value || *p != '\0') { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "The value \"%s\" isn't a valid number.", new_value); return; } if (*pref->varp.uint != uval) { module->prefs_changed = TRUE; *pref->varp.uint = uval; } break; case PREF_STRING: if (strcmp (*pref->varp.string, new_value) != 0) { module->prefs_changed = TRUE; g_free((void*)*pref->varp.string); *pref->varp.string = g_strdup(new_value); } break; case PREF_RANGE: if (range_convert_str(&newrange, new_value, pref->info.max_value) != CVT_NO_ERROR) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "The value \"%s\" isn't a valid range.", new_value); return; } if (!ranges_are_equal(*pref->varp.range, newrange)) { module->prefs_changed = TRUE; g_free(*pref->varp.range); *pref->varp.range = newrange; } else { g_free (newrange); } break; default: g_assert_not_reached(); break; } if (module->prefs_changed) { /* Ensure we reload the sub menu */ menu_prefs_reset(); prefs_apply (module); if (!prefs.gui_use_pref_save) { prefs_main_write(); } redissect_packets(); redissect_all_packet_windows(); } window_destroy(GTK_WIDGET(parent_w)); } static void menu_prefs_change_cancel (GtkWidget *w _U_, gpointer parent_w) { window_destroy(GTK_WIDGET(parent_w)); } static void menu_prefs_edit_dlg (GtkWidget *w, gpointer data) { pref_t *pref = (pref_t *)data; module_t *module = (module_t *)g_object_get_data (G_OBJECT(w), "module"); gchar *value = NULL, *tmp_value, *label_str; GtkWidget *win, *main_grid, *main_vb, *bbox, *cancel_bt, *ok_bt; GtkWidget *entry, *label; switch (pref->type) { case PREF_UINT: switch (pref->info.base) { case 8: value = g_strdup_printf("%o", *pref->varp.uint); break; case 10: value = g_strdup_printf("%u", *pref->varp.uint); break; case 16: value = g_strdup_printf("%x", *pref->varp.uint); break; default: g_assert_not_reached(); break; } break; case PREF_STRING: value = g_strdup(*pref->varp.string); break; case PREF_RANGE: /* Convert wmem to g_alloc memory */ tmp_value = range_convert_range(NULL, *pref->varp.range); value = g_strdup(tmp_value); wmem_free(NULL, tmp_value); break; default: g_assert_not_reached(); break; } win = dlg_window_new(module->description); gtk_window_set_resizable(GTK_WINDOW(win),FALSE); gtk_window_resize(GTK_WINDOW(win), 400, 100); main_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 5, FALSE); gtk_container_add(GTK_CONTAINER(win), main_vb); gtk_container_set_border_width(GTK_CONTAINER(main_vb), 6); main_grid = ws_gtk_grid_new(); gtk_box_pack_start(GTK_BOX(main_vb), main_grid, FALSE, FALSE, 0); ws_gtk_grid_set_column_spacing(GTK_GRID(main_grid), 10); label_str = g_strdup_printf("%s:", pref->title); label = gtk_label_new(label_str); g_free(label_str); ws_gtk_grid_attach_defaults(GTK_GRID(main_grid), label, 0, 1, 1, 1); gtk_misc_set_alignment(GTK_MISC(label), 1.0f, 0.5f); if (pref->description) gtk_widget_set_tooltip_text(label, pref->description); entry = gtk_entry_new(); ws_gtk_grid_attach_defaults(GTK_GRID(main_grid), entry, 1, 1, 1, 1); gtk_entry_set_text(GTK_ENTRY(entry), value); if (pref->description) gtk_widget_set_tooltip_text(entry, pref->description); bbox = dlg_button_row_new(GTK_STOCK_CANCEL,GTK_STOCK_OK, NULL); gtk_box_pack_end(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); ok_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK); g_object_set_data (G_OBJECT(ok_bt), "module", module); g_object_set_data (G_OBJECT(ok_bt), "entry", entry); g_object_set_data (G_OBJECT(ok_bt), "pref", pref); g_signal_connect(ok_bt, "clicked", G_CALLBACK(menu_prefs_change_ok), win); dlg_set_activate(entry, ok_bt); cancel_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); g_signal_connect(cancel_bt, "clicked", G_CALLBACK(menu_prefs_change_cancel), win); window_set_cancel_button(win, cancel_bt, NULL); gtk_widget_grab_default(ok_bt); gtk_widget_show_all(win); g_free(value); } static guint add_protocol_prefs_generic_menu(pref_t *pref, gpointer data, GtkUIManager *ui_menu, const char *path) { GtkWidget *menu_preferences; GtkWidget *menu_item, *menu_sub_item, *sub_menu; GSList *group = NULL; module_t *module = (module_t *)data; const enum_val_t *enum_valp; gchar *label = NULL, *tmp_str; switch (pref->type) { case PREF_UINT: switch (pref->info.base) { case 8: label = g_strdup_printf ("%s: %o", pref->title, *pref->varp.uint); break; case 10: label = g_strdup_printf ("%s: %u", pref->title, *pref->varp.uint); break; case 16: label = g_strdup_printf ("%s: %x", pref->title, *pref->varp.uint); break; default: g_assert_not_reached(); break; } menu_item = gtk_menu_item_new_with_label(label); g_object_set_data (G_OBJECT(menu_item), "module", module); g_signal_connect(menu_item, "activate", G_CALLBACK(menu_prefs_edit_dlg), pref); g_free (label); break; case PREF_BOOL: menu_item = gtk_check_menu_item_new_with_label(pref->title); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menu_item), *pref->varp.boolp); g_object_set_data (G_OBJECT(menu_item), "module", module); g_signal_connect(menu_item, "activate", G_CALLBACK(menu_prefs_toggle_bool), pref->varp.boolp); break; case PREF_ENUM: menu_item = gtk_menu_item_new_with_label(pref->title); sub_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM(menu_item), sub_menu); enum_valp = pref->info.enum_info.enumvals; while (enum_valp->name != NULL) { menu_sub_item = gtk_radio_menu_item_new_with_label(group, enum_valp->description); group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_sub_item)); if (enum_valp->value == *pref->varp.enump) { gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menu_sub_item), TRUE); } g_object_set_data (G_OBJECT(menu_sub_item), "module", module); g_object_set_data (G_OBJECT(menu_sub_item), "enumval", GINT_TO_POINTER(enum_valp->value)); g_signal_connect(menu_sub_item, "activate", G_CALLBACK(menu_prefs_change_enum), pref->varp.enump); gtk_menu_shell_append (GTK_MENU_SHELL(sub_menu), menu_sub_item); gtk_widget_show (menu_sub_item); enum_valp++; } break; case PREF_STRING: label = g_strdup_printf ("%s: %s", pref->title, *pref->varp.string); menu_item = gtk_menu_item_new_with_label(label); g_object_set_data (G_OBJECT(menu_item), "module", module); g_signal_connect(menu_item, "activate", G_CALLBACK(menu_prefs_edit_dlg), pref); g_free (label); break; case PREF_RANGE: tmp_str = range_convert_range (NULL, *pref->varp.range); label = g_strdup_printf ("%s: %s", pref->title, tmp_str); wmem_free(NULL, tmp_str); menu_item = gtk_menu_item_new_with_label(label); g_object_set_data (G_OBJECT(menu_item), "module", module); g_signal_connect(menu_item, "activate", G_CALLBACK(menu_prefs_edit_dlg), pref); g_free (label); break; case PREF_UAT: label = g_strdup_printf ("%s...", pref->title); menu_item = gtk_menu_item_new_with_label(label); g_signal_connect (menu_item, "activate", G_CALLBACK(uat_window_cb), pref->varp.uat); g_free (label); break; case PREF_COLOR: case PREF_CUSTOM: /* currently not supported */ case PREF_STATIC_TEXT: case PREF_OBSOLETE: default: /* Nothing to add */ return 0; } menu_preferences = gtk_ui_manager_get_widget(ui_menu, path); if(!menu_preferences) g_warning("menu_preferences Not found path"); sub_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM(menu_preferences)); gtk_menu_shell_append (GTK_MENU_SHELL(sub_menu), menu_item); gtk_widget_show (menu_item); return 0; } static guint add_protocol_prefs_menu(pref_t *pref, gpointer data) { return add_protocol_prefs_generic_menu(pref, data, ui_manager_tree_view_menu, "/TreeViewPopup/ProtocolPreferences"); } static guint add_protocol_prefs_packet_list_menu(pref_t *pref, gpointer data) { return add_protocol_prefs_generic_menu(pref, data, ui_manager_packet_list_menu, "/PacketListMenuPopup/ProtocolPreferences"); } static void rebuild_protocol_prefs_menu(module_t *prefs_module_p, gboolean preferences, GtkUIManager *ui_menu, const char *path) { GtkWidget *menu_preferences, *menu_item; GtkWidget *sub_menu; gchar *label; menu_preferences = gtk_ui_manager_get_widget(ui_menu, path); if (prefs_module_p && preferences) { sub_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM(menu_preferences), sub_menu); label = g_strdup_printf ("%s Preferences...", prefs_module_p->description); menu_item = gtk_image_menu_item_new_with_label(label); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(menu_item), ws_gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU)); gtk_menu_shell_append(GTK_MENU_SHELL(sub_menu), menu_item); g_signal_connect_swapped(G_OBJECT(menu_item), "activate", G_CALLBACK(properties_cb), (GObject *) menu_item); gtk_widget_show(menu_item); g_free(label); menu_item = gtk_menu_item_new(); gtk_menu_shell_append(GTK_MENU_SHELL(sub_menu), menu_item); gtk_widget_show(menu_item); if (ui_menu == ui_manager_tree_view_menu) { prefs_pref_foreach(prefs_module_p, add_protocol_prefs_menu, prefs_module_p); } else { prefs_pref_foreach(prefs_module_p, add_protocol_prefs_packet_list_menu, prefs_module_p); } } else { /* No preferences, remove sub menu */ gtk_menu_item_set_submenu (GTK_MENU_ITEM(menu_preferences), NULL); } } static void menu_visible_column_toggle (GtkWidget *w _U_, gpointer data) { packet_list_toggle_visible_column (GPOINTER_TO_INT(data)); } void rebuild_visible_columns_menu (void) { GtkWidget *menu_columns[2], *menu_item; GtkWidget *sub_menu; GList *clp; fmt_data *cfmt; gchar *title; gint i, col_id; menu_columns[0] = gtk_ui_manager_get_widget(ui_manager_main_menubar, "/Menubar/ViewMenu/DisplayedColumns"); if(! menu_columns[0]){ fprintf (stderr, "Warning: couldn't find menu_columns[0] path=/Menubar/ViewMenu/DisplayedColumns"); } menu_columns[1] = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/DisplayedColumns"); /* Debug */ if(! menu_columns[1]){ fprintf (stderr, "Warning: couldn't find menu_columns[1] path=/PacketListHeadingPopup/DisplayedColumns"); } for (i = 0; i < 2; i++) { sub_menu = gtk_menu_new(); gtk_menu_item_set_submenu (GTK_MENU_ITEM(menu_columns[i]), sub_menu); clp = g_list_first (prefs.col_list); col_id = 0; while (clp) { cfmt = (fmt_data *) clp->data; if (cfmt->title[0]) { if (cfmt->fmt == COL_CUSTOM) { title = g_strdup_printf ("%s (%s)", cfmt->title, cfmt->custom_field); } else { title = g_strdup_printf ("%s (%s)", cfmt->title, col_format_desc (cfmt->fmt)); } } else { if (cfmt->fmt == COL_CUSTOM) { title = g_strdup_printf ("(%s)", cfmt->custom_field); } else { title = g_strdup_printf ("(%s)", col_format_desc (cfmt->fmt)); } } menu_item = gtk_check_menu_item_new_with_label(title); g_free (title); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menu_item), cfmt->visible); g_signal_connect(menu_item, "activate", G_CALLBACK(menu_visible_column_toggle), GINT_TO_POINTER(col_id)); gtk_menu_shell_append (GTK_MENU_SHELL(sub_menu), menu_item); gtk_widget_show (menu_item); clp = g_list_next (clp); col_id++; } menu_item = gtk_separator_menu_item_new(); gtk_menu_shell_append (GTK_MENU_SHELL(sub_menu), menu_item); gtk_widget_show (menu_item); menu_item = gtk_menu_item_new_with_label ("Display All"); gtk_menu_shell_append (GTK_MENU_SHELL(sub_menu), menu_item); g_signal_connect(menu_item, "activate", G_CALLBACK(packet_list_heading_activate_all_columns_cb), NULL); gtk_widget_show (menu_item); } } void menus_set_column_resolved (gboolean resolved, gboolean can_resolve) { GtkWidget *menu; menu = gtk_ui_manager_get_widget(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ShowResolved"); if(!menu){ fprintf (stderr, "Warning: couldn't find menu path=/PacketListHeadingPopup/ShowResolved"); } g_object_set_data(G_OBJECT(menu), "skip-update", (void *)1); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu), resolved && can_resolve); set_menu_sensitivity(ui_manager_packet_list_heading, "/PacketListHeadingPopup/ShowResolved", can_resolve); g_object_set_data(G_OBJECT(menu), "skip-update", NULL); } void menus_set_column_align_default (gboolean right_justify) { GtkWidget *submenu, *menu_item_child; GList *child_list, *child_list_item; const gchar *menu_item_name; size_t menu_item_len; /* get the submenu container item */ submenu = gtk_ui_manager_get_widget (ui_manager_packet_list_heading, "/PacketListHeadingPopup"); if(!submenu){ fprintf (stderr, "Warning: couldn't find submenu path=/PacketListHeadingPopup"); } /* find the corresponding menu items to update */ child_list = gtk_container_get_children(GTK_CONTAINER(submenu)); child_list_item = child_list; while (child_list_item) { menu_item_child = gtk_bin_get_child(GTK_BIN(child_list_item->data)); if (menu_item_child != NULL) { menu_item_name = gtk_label_get_text(GTK_LABEL(menu_item_child)); menu_item_len = strlen (menu_item_name); if(strncmp(menu_item_name, "Align Left", 10) == 0) { if (!right_justify && menu_item_len == 10) { gtk_label_set_text(GTK_LABEL(menu_item_child), "Align Left\t(default)"); } else if (right_justify && menu_item_len > 10) { gtk_label_set_text(GTK_LABEL(menu_item_child), "Align Left"); } } else if (strncmp (menu_item_name, "Align Right", 11) == 0) { if (right_justify && menu_item_len == 11) { gtk_label_set_text(GTK_LABEL(menu_item_child), "Align Right\t(default)"); } else if (!right_justify && menu_item_len > 11) { gtk_label_set_text(GTK_LABEL(menu_item_child), "Align Right"); } } } child_list_item = g_list_next(child_list_item); } g_list_free(child_list); } void set_menus_for_selected_tree_row(capture_file *cf) { gboolean properties; gint id; if (cf->finfo_selected != NULL) { header_field_info *hfinfo = cf->finfo_selected->hfinfo; const char *abbrev; char *prev_abbrev; if (hfinfo->parent == -1) { abbrev = hfinfo->abbrev; id = (hfinfo->type == FT_PROTOCOL) ? proto_get_id((protocol_t *)hfinfo->strings) : -1; } else { abbrev = proto_registrar_get_abbrev(hfinfo->parent); id = hfinfo->parent; } properties = prefs_is_registered_protocol(abbrev); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/GotoCorrespondingPacket", hfinfo->type == FT_FRAMENUM); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ShowPacketRefinNewWindow", hfinfo->type == FT_FRAMENUM); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/Copy", TRUE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/Copy/AsFilter", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyasColumn", hfinfo->type != FT_NONE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ColorizewithFilter", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ProtocolPreferences", properties); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/DisableProtocol", (id == -1) ? FALSE : proto_can_toggle_protocol(id)); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ExpandSubtrees", cf->finfo_selected->tree_type != -1); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/CollapseSubtrees", cf->finfo_selected->tree_type != -1); #ifdef WANT_PACKET_EDITOR set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/EditPacket", prefs.gui_packet_editor ? TRUE : FALSE); #endif set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/WikiProtocolPage", (id == -1) ? FALSE : TRUE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/FilterFieldReference", (id == -1) ? FALSE : TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSelectedPacketBytes", TRUE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/GotoCorrespondingPacket", hfinfo->type == FT_FRAMENUM); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/Description", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/Fieldname", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/Value", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/AsFilter", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/ApplyasColumn", hfinfo->type != FT_NONE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/ApplyAsFilter", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/PrepareaFilter", proto_can_match_selected(cf->finfo_selected, cf->edt)); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ExpandSubtrees", cf->finfo_selected->tree_type != -1); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/CollapseSubtrees", cf->finfo_selected->tree_type != -1); prev_abbrev = (char *)g_object_get_data(G_OBJECT(ui_manager_tree_view_menu), "menu_abbrev"); if (!prev_abbrev || (strcmp (prev_abbrev, abbrev) != 0)) { /* No previous protocol or protocol changed - update Protocol Preferences menu */ module_t *prefs_module_p = prefs_find_module(abbrev); rebuild_protocol_prefs_menu(prefs_module_p, properties, ui_manager_tree_view_menu, "/TreeViewPopup/ProtocolPreferences"); g_object_set_data(G_OBJECT(ui_manager_tree_view_menu), "menu_abbrev", g_strdup(abbrev)); g_free (prev_abbrev); } } else { set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/GotoCorrespondingPacket", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/Copy", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyasColumn", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ApplyAsFilter", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/PrepareaFilter", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ColorizewithFilter", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ProtocolPreferences", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/DisableProtocol", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/ExpandSubtrees", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/CollapseSubtrees", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/WikiProtocolPage", FALSE); set_menu_sensitivity(ui_manager_tree_view_menu, "/TreeViewPopup/FilterFieldReference", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/ExportSelectedPacketBytes", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/GotoCorrespondingPacket", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/Description", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/Fieldname", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/Value", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/EditMenu/Copy/AsFilter", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/ApplyasColumn", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/ApplyAsFilter", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/AnalyzeMenu/PrepareaFilter", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/ExpandSubtrees", FALSE); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/ViewMenu/CollapseSubtrees", FALSE); } } void set_menus_for_packet_history(gboolean back_history, gboolean forward_history) { set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/Back", back_history); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/GoMenu/Forward", forward_history); } void set_menus_for_file_set(gboolean file_set, gboolean previous_file, gboolean next_file) { set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Set/ListFiles", file_set); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Set/PreviousFile", previous_file); set_menu_sensitivity(ui_manager_main_menubar, "/Menubar/FileMenu/Set/NextFile", next_file); } GtkWidget *menus_get_profiles_rename_menu (void) { return gtk_ui_manager_get_widget(ui_manager_statusbar_profiles_menu, "/ProfilesMenuPopup/Rename"); } GtkWidget *menus_get_profiles_delete_menu (void) { return gtk_ui_manager_get_widget(ui_manager_statusbar_profiles_menu, "/ProfilesMenuPopup/Delete"); } GtkWidget *menus_get_profiles_change_menu (void) { return gtk_ui_manager_get_widget(ui_manager_statusbar_profiles_menu, "/ProfilesMenuPopup/Change"); } void set_menus_for_profiles(gboolean default_profile) { set_menu_sensitivity(ui_manager_statusbar_profiles_menu, "/ProfilesMenuPopup/Rename", !default_profile); set_menu_sensitivity(ui_manager_statusbar_profiles_menu, "/ProfilesMenuPopup/Delete", !default_profile); } #ifndef __APPLE__ static void ws_menubar_external_cb(GtkAction *action _U_, gpointer data _U_) { ext_menubar_t *entry = NULL; gchar *url = NULL; if ( data != NULL ) { entry = (ext_menubar_t *)data; if ( entry->type == EXT_MENUBAR_ITEM ) { entry->callback(EXT_MENUBAR_GTK_GUI, (gpointer) ((void *)GTK_WINDOW(top_level)), entry->user_data); } else if ( entry->type == EXT_MENUBAR_URL ) { url = (gchar *)entry->user_data; if(url != NULL) browser_open_url(url); } } } static void ws_menubar_create_ui(ext_menu_t * menu, const char * xpath_parent, GtkActionGroup * action_group, gint depth) { ext_menubar_t * item = NULL; GList * children = NULL; gchar * xpath, * submenu_xpath, *ac_xpath; const gchar *xml; gchar ** paths = NULL; GError *err = NULL; guint merge_id = 0; /* There must exists an xpath parent */ g_assert(xpath_parent != NULL && strlen(xpath_parent) > 0); /* If the depth counter exceeds, something must have gone wrong */ g_assert(depth < EXT_MENUBAR_MAX_DEPTH); /* Create a correct xpath, and just keep the necessary action ref [which will be paths [1]] */ xpath = g_strconcat(xpath_parent, menu->name, NULL); children = menu->children; /* Iterate the child entries */ while ( children != NULL && children->data != NULL ) { item = (ext_menubar_t *) children->data; if ( item->type == EXT_MENUBAR_MENU ) { /* Handle Submenu entry */ submenu_xpath = g_strconcat(xpath, "/", NULL); ws_menubar_create_ui(item, submenu_xpath, action_group, depth++); g_free(submenu_xpath); } else if ( item->type != EXT_MENUBAR_SEPARATOR ) { /* Create the correct action path */ paths = g_strsplit(xpath, "|", -1); /* Ensures that the above operation has not failed. If this fails, it is a major issue, * so an assertion is appropriate here */ g_assert(paths != NULL && paths[1] != NULL && strlen(paths[1]) > 0); /* Handle a menu bar item. This cannot be done by register_menu_bar_menu_items, as it * will create it's own action group, assuming that the menu actions and submenu actions * have been pre-registered and globally defined names. This is not the case here. Also * register_menu_bar_menu_items adds a sorted list, completely destroying any sorting, * a plugin might have intended */ #if 0 /* Left here as a reminder, that the code below does basically the same */ register_menu_bar_menu_items( g_strdup(paths[1]), item->name, NULL, item->label, NULL, item->tooltip, ws_menubar_external_cb, item, TRUE, NULL, NULL); #endif /* Creating menu from entry */ ac_xpath = g_strdup_printf("%s/%s", g_strdup(paths[1]), item->name); xml = make_menu_xml(ac_xpath); /* Adding the menu to the UI if possible (code has been derived from merge_menu_items) */ err = NULL; merge_id = gtk_ui_manager_add_ui_from_string(ui_manager_main_menubar, xml, -1, &err); if ( err != NULL ) { fprintf (stderr, "Warning: building menu for [%s] failed: %s\n", item->name, err->message); g_error_free (err); /* undo the mess */ gtk_ui_manager_remove_ui (ui_manager_main_menubar, merge_id); g_free ((gchar*)xml); } g_strfreev(paths); g_free(ac_xpath); } /* Iterate Loop */ children = g_list_next(children); } /* Cleanup */ g_free(xpath); } static void ws_menubar_create_action_group(ext_menu_t * menu, const char * xpath_parent, GtkActionGroup *action_group, gint depth) { ext_menubar_t * item = NULL; GList * children = NULL; GtkAction * menu_item; gchar * xpath, *submenu_xpath; g_assert(xpath_parent != NULL && strlen(xpath_parent) > 0); /* If the depth counter exceeds, something must have gone wrong */ g_assert(depth < EXT_MENUBAR_MAX_DEPTH); xpath = g_strconcat(xpath_parent, menu->name, NULL); /* Create the action for the menu item and add it to the action group */ menu_item = (GtkAction *)g_object_new ( GTK_TYPE_ACTION, "name", menu->name, "label", menu->label, NULL ); gtk_action_group_add_action(action_group, menu_item); children = menu->children; /* Iterate children to create submenus */ while ( children != NULL && children->data != NULL ) { item = (ext_menubar_t *) children->data; /* Handle only menues, not individual items */ if ( item->type == EXT_MENUBAR_MENU ) { submenu_xpath = g_strconcat(xpath, "/", NULL); ws_menubar_create_action_group(item, submenu_xpath, action_group, depth++); g_free(submenu_xpath); } else if ( item->type != EXT_MENUBAR_SEPARATOR ) { menu_item = (GtkAction*) g_object_new( GTK_TYPE_ACTION, "name", item->name, "label", item->label, "tooltip", item->tooltip, NULL); g_signal_connect(menu_item, "activate", G_CALLBACK(ws_menubar_external_cb), item ); gtk_action_group_add_action(action_group, menu_item); } children = g_list_next(children); } /* Cleanup */ g_free(xpath); } #endif static void ws_menubar_external_menus(void) { #ifndef __APPLE__ GList * user_menu = NULL; ext_menu_t * menu = NULL; GtkActionGroup *action_group = NULL; gchar groupdef[20], * xpath; guint8 cnt = 1; user_menu = ext_menubar_get_entries(); while ( ( user_menu != NULL ) && ( user_menu->data != NULL ) ) { menu = (ext_menu_t *) user_menu->data; /* On this level only menu items should exist. Not doing an assert here, * as it could be an honest mistake */ if ( menu->type != EXT_MENUBAR_MENU ) { user_menu = g_list_next(user_menu); continue; } /* Create unique main actiongroup name */ g_snprintf(groupdef, 20, "UserDefined%02d", cnt); xpath = g_strconcat( "/MenuBar/", groupdef, "Menu|", NULL ); /* Create an action group per menu */ action_group = gtk_action_group_new(groupdef); /* This will generate the action structure for each menu and it's items. It is recursive, * therefore a sub-routine, and we have a depth counter to prevent endless loops. */ ws_menubar_create_action_group(menu, xpath, action_group, 0); /* Register action structure for each menu */ gtk_ui_manager_insert_action_group(ui_manager_main_menubar, action_group, 0); /* Now we iterate over the items and add them to the UI. This has to be done after the action * group for this menu has been added, otherwise the actions will not be found */ ws_menubar_create_ui(menu, xpath, action_group, 0 ); /* Cleanup */ g_free(xpath); g_object_unref(action_group); /* Iterate Loop */ user_menu = g_list_next (user_menu); cnt++; } #endif } /* * Editor modelines * * Local Variables: * c-basic-offset: 4 * tab-width: 8 * indent-tabs-mode: nil * End: * * ex: set shiftwidth=4 tabstop=8 expandtab: * :indentSize=4:tabSize=8:noTabs=true: */
dameiss/wireshark-aeron
ui/gtk/main_menubar.c
C
gpl-2.0
282,969
package com.example.eli.loginapp; /** * Created by Eli on 1/18/2015. */ import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; public class EntryDataBaseAdapter { static final String DATABASE_NAME = "login.db"; static final int DATABASE_VERSION = 1; public static final int NAME_COLUMN = 1; static final String DATABASE_CREATE = "create table "+"ENTRY"+"( "+"ID"+" integer primary key autoincrement, "+ "GAMEID integer, HITS integer, MISSES integer, FOREIGN KEY(GAMEID) REFERENCES GAMES(ID)); "; public SQLiteDatabase db; private final Context context; private DataBaseHelper dbHelper; public EntryDataBaseAdapter(Context _context) { context = _context; dbHelper = new DataBaseHelper(context, DATABASE_NAME, null, DATABASE_VERSION); } public EntryDataBaseAdapter open() throws SQLException { db = dbHelper.getWritableDatabase(); return this; } public void close() { db.close(); } public SQLiteDatabase getDatabaseInstance() { return db; } public void insertEntry(int gameID, int hits, int misses) { db = dbHelper.getWritableDatabase(); ContentValues newValues = new ContentValues(); newValues.put("GAMEID", gameID); newValues.put("HITS", hits); newValues.put("MISSES", misses); db.insert("ENTRY", null, newValues); this.close(); } public int deleteEntry(String id) { db = dbHelper.getWritableDatabase(); String where = "ID=?"; int x = db.delete("ENTRY", where, new String[]{id}); db.close(); return x; } public Cursor getEntry(int EntryNumber) { db = dbHelper.getReadableDatabase(); Cursor cursor = db.rawQuery("SELECT * FROM ENTRY WHERE GAMEID=?", new String[]{String.valueOf(EntryNumber)}); if(cursor.getCount()<1) { cursor.close(); return null; } db.close(); return cursor; } public Cursor getEntries() { db = dbHelper.getReadableDatabase(); Cursor cursor = db.rawQuery("SELECT * FROM ENTRY", null); if(cursor.getCount()<1) { cursor.close(); return null; } db.close(); return cursor; } /*public int getHits() { Cursor cursor = db.query("ENTRY", null, " HITS=?", new String[]{gameName}, null, null, null); if(cursor.getCount()<1) { cursor.close(); return -1; } cursor.moveToFirst(); String playername = cursor.getString(cursor.getColumnIndex("PLAYERNAME")); cursor.close(); return playername; }*/ /*public int getHits() { Cursor cursor = db.query("ENTRY", null, " GAMENAME=?", new String[]{gameName}, null, null, null); if(cursor.getCount()<1) { cursor.close(); return "NOT EXIST"; } cursor.moveToFirst(); String playername = cursor.getString(cursor.getColumnIndex("PLAYERNAME")); cursor.close(); return playername; }*/ public void updateEntry(String gameName, int playerID) { db = dbHelper.getWritableDatabase(); ContentValues updatedValues = new ContentValues(); updatedValues.put("GAMENAME", gameName); updatedValues.put("PLAYERNAME", playerID); String where = "GAMENAME = ?"; db.update("GAMES", updatedValues, where, new String[]{gameName}); db.close(); } }
Eli-SP/BetterThrowers
LoginApp/app/src/main/java/com/example/eli/loginapp/EntryDataBaseAdapter.java
Java
gpl-2.0
3,699
{% extends 'base.html' %} {% load staticfiles %} {% block body_block %} <h3>{{ molecule.name }} charges:</h3> {% for pc in charges %} <li>{{pc.name}}: {{pc.value}}</li> {% endfor %} </li><a href="{% url 'q:download_charges' molecule.filename %}">Download mol2 file</a></li> {% endblock %}
maxivanoff/fftoolbox-app
q/templates/q/results.html
HTML
gpl-2.0
316
if(NOT CFITSIO_INCLUDEDIR) if(NOT kst_cross) include(FindPkgConfig) pkg_check_modules(cfitsio QUIET cfitsio) endif() if(CFITSIO_INCLUDEDIR AND CFITSIO_LIBRARIES) set(CFITSIO_LIBRARY -L${CFITSIO_LIBRARY_DIRS} ${CFITSIO_LIBRARIES}) else() set(CFITSIO_INCLUDEDIR CFITSIO_INCLUDEDIR-NOTFOUND CACHE STRING "" FORCE) FIND_PATH(CFITSIO_INCLUDEDIR fitsio.h HINTS ENV CFITSIO_DIR PATH_SUFFIXES include include/cfitsio include/libcfitsio0 PATHS ${kst_3rdparty_dir} ) FIND_LIBRARY(CFITSIO_LIBRARIES cfitsio HINTS ENV CFITSIO_DIR PATH_SUFFIXES lib PATHS ${kst_3rdparty_dir} ) endif() endif() #message(STATUS "CFITSIO: ${CFITSIO_INCLUDEDIR}") #message(STATUS "CFITSIO: ${CFITSIO_LIBRARIES}") IF(CFITSIO_INCLUDEDIR AND CFITSIO_LIBRARIES) SET(CFITSIO_INCLUDE_DIR ${CFITSIO_INCLUDEDIR} ${CFITSIO_INCLUDEDIR}/..) if (UNIX) SET(CFITSIO_LIBRARIES ${CFITSIO_LIBRARIES} m) endif() SET(CFITSIO 1) SET(cfitsio 1) message(STATUS "Found CFITSIO:") message(STATUS " includes : ${CFITSIO_INCLUDE_DIR}") message(STATUS " libraries: ${CFITSIO_LIBRARIES}") ELSE() MESSAGE(STATUS "Not found: CFITSIO, set CFITSIO_DIR") ENDIF() message(STATUS "")
RossWilliamson/kst_old
cmake/modules/FindCFITSIO.cmake
CMake
gpl-2.0
1,167
package com.kezhenxu.wechat6; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import com.kezhenxu.study.activity00.R; public class Main extends Activity { @Override protected void onCreate ( Bundle savedInstanceState ) { super.onCreate ( savedInstanceState ); setContentView ( R.layout.main ); } @Override public boolean onCreateOptionsMenu ( Menu menu ) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater ().inflate ( R.menu.main, menu ); return true; } @Override public boolean onOptionsItemSelected ( MenuItem item ) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId (); //noinspection SimplifiableIfStatement if ( id == R.id.action_group_chat ) { return true; } return super.onOptionsItemSelected ( item ); } }
course-design/test
app/src/main/java/com/kezhenxu/wechat6/Main.java
Java
gpl-2.0
1,022
<?php declare(strict_types=1); namespace oat\tao\migrations; use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\Exception\IrreversibleMigration; use oat\tao\scripts\tools\AddRtlLocale; use oat\tao\scripts\tools\TextDirectionRegistry; use oat\tao\scripts\SyncModels; use oat\tao\scripts\tools\migrations\AbstractMigration; /** * Auto-generated Migration: Please modify to your needs! */ final class Version202110191349112234_tao extends AbstractMigration { public function getDescription(): string { return 'This migration will add ckb-IR locale to RTL map'; } public function up(Schema $schema): void { $this->runAction( new AddRtlLocale(), [ '-rtl' , 'ckb-IR' ] ); $this->addReport( $this->propagate(new SyncModels())([]) ); } public function down(Schema $schema): void { throw new IrreversibleMigration( 'You cannot remove locales from configuration' ); } }
oat-sa/tao-core
migrations/Version202110191349112234_tao.php
PHP
gpl-2.0
1,059
# This file should be used with EPICS base 3.15.4 and mrfioc2 2.7.13 # With current EEE 1.8.2, the proper command is # $ iocsh cpci-evg-230_0.cmd # or # $ iocsh -3.15.4 cpci-evg-230_0.cmd require mrfioc2,2.7.13 epicsEnvSet("SYS" "ICS-CPCIEVG-230") epicsEnvSet("EVG" "EVG0") epicsEnvSet("EVG_PCIBUS" "0x16") epicsEnvSet("EVG_PCIDEVICE" "0x09") epicsEnvSet("EVG_PCIFUNCTION" "0x0") mrmEvgSetupPCI($(EVG), $(EVG_PCIBUS), $(EVG_PCIDEVICE), $(EVG_PCIFUNCTION)) dbLoadRecords("evg-cpci.db", "DEVICE=$(EVG), SYS=$(SYS)") dbLoadRecords("evgSoftSeq.template", "DEVICE=$(EVG), SYS=$(SYS), SEQNUM=1, NELM=3")
icshwi/icsem_scripts
cpci-evg-230/cpci-evg-230b_2.cmd
Batchfile
gpl-2.0
635
var RiverValleyGoldBar = { "type": "FeatureCollection", "features": [ { "geometry": { "type": "Polygon", "coordinates": [ [ [ -113.40145458936446, 53.55763251534859 ], [ -113.40147257819106, 53.55609385085491 ], [ -113.40148220206095, 53.5547373988822 ], [ -113.40149840209293, 53.55235808892106 ], [ -113.40157454581572, 53.54185260261831 ], [ -113.4015726670091, 53.54136401418185 ], [ -113.40157951530409, 53.54116845136462 ], [ -113.4113764820249, 53.54115044395937 ], [ -113.41137767991789, 53.54137663840556 ], [ -113.41137545983679, 53.54222870856817 ], [ -113.41134635951526, 53.5422446969538 ], [ -113.41134570601099, 53.542245065154475 ], [ -113.4113177796288, 53.54226120672211 ], [ -113.41131682013348, 53.542261768724735 ], [ -113.40923855749763, 53.543494355941384 ], [ -113.40924045495902, 53.542873130236906 ], [ -113.40751756874302, 53.54287118826321 ], [ -113.4073939610766, 53.54390928989409 ], [ -113.4074390528669, 53.54390936523036 ], [ -113.40717703672931, 53.54612452392648 ], [ -113.4071701681723, 53.54784600327692 ], [ -113.4063936263499, 53.54784497102708 ], [ -113.4059611065803, 53.5483342685193 ], [ -113.40496558148585, 53.54946512934348 ], [ -113.4046430728196, 53.55212120116978 ], [ -113.40459411465487, 53.552144395591895 ], [ -113.40457070425023, 53.552335692062385 ], [ -113.40515867129524, 53.55253840784157 ], [ -113.40526498319204, 53.55251247301422 ], [ -113.4053887351933, 53.55245219278488 ], [ -113.40544098037837, 53.552523994663275 ], [ -113.40550380718967, 53.55258620997111 ], [ -113.40557460507013, 53.55264182759415 ], [ -113.40569518389457, 53.55271099874207 ], [ -113.40584082532956, 53.55276641382393 ], [ -113.4057687047319, 53.5528444091035 ], [ -113.40566284244665, 53.55295753890316 ], [ -113.40601535804905, 53.55322784092108 ], [ -113.40804682535301, 53.55331545995036 ], [ -113.40804830624114, 53.552959330160526 ], [ -113.40804826381081, 53.55286415304385 ], [ -113.40806893330759, 53.552860407960935 ], [ -113.40814030681949, 53.552843020934716 ], [ -113.4082090967473, 53.552822267494506 ], [ -113.40827485575088, 53.552798281659854 ], [ -113.40833715671872, 53.552771218758245 ], [ -113.40839559397482, 53.55274125543096 ], [ -113.40844978815801, 53.55270858606233 ], [ -113.40849938621673, 53.552673423139176 ], [ -113.40854406626768, 53.55263599511805 ], [ -113.40858353761574, 53.55259654498715 ], [ -113.40861754438008, 53.55255532992468 ], [ -113.40864586494553, 53.55251261734241 ], [ -113.40866831497483, 53.55246868525946 ], [ -113.40868474926893, 53.55242381871716 ], [ -113.40869506056457, 53.55237830941354 ], [ -113.40869918257629, 53.552332453921075 ], [ -113.40869708703814, 53.5522865493587 ], [ -113.40855429532333, 53.55102631400716 ], [ -113.4092089520462, 53.55102728331677 ], [ -113.40920207422913, 53.55243717711483 ], [ -113.41060949677964, 53.55243868716274 ], [ -113.41061261036751, 53.55288759584133 ], [ -113.41429628463207, 53.552886856494254 ], [ -113.41474160210092, 53.552968183419985 ], [ -113.41483805540582, 53.55307745688839 ], [ -113.41477917150824, 53.55322987046482 ], [ -113.41474786532233, 53.55339441725301 ], [ -113.41474325605692, 53.55366616997174 ], [ -113.41469669481673, 53.55366455787115 ], [ -113.41082547658444, 53.553539131440225 ], [ -113.41008466279013, 53.55351498609814 ], [ -113.40922897201314, 53.55373363771611 ], [ -113.40808303202783, 53.55456488852625 ], [ -113.40803400823232, 53.55532295060398 ], [ -113.40798683918338, 53.55535656154832 ], [ -113.40797209867937, 53.555596830461795 ], [ -113.40899996494693, 53.5555981463587 ], [ -113.40975512975673, 53.55667226278233 ], [ -113.40997783852683, 53.556970153157536 ], [ -113.41004773215859, 53.55704808687284 ], [ -113.41018059085997, 53.55717152322305 ], [ -113.41033373278027, 53.55728632715306 ], [ -113.41050549789146, 53.557391370745194 ], [ -113.41069414494412, 53.55748558894332 ], [ -113.41194326312616, 53.55804810433954 ], [ -113.41184338539465, 53.55812455181394 ], [ -113.41151704045345, 53.55838142797979 ], [ -113.41268475285106, 53.558908422955625 ], [ -113.4127311298962, 53.558916613637976 ], [ -113.41767556726357, 53.55892126649075 ], [ -113.41772148500118, 53.55894861091774 ], [ -113.41822740040311, 53.55894907995206 ], [ -113.4183824166426, 53.558948796595345 ], [ -113.41838398823381, 53.55859603486254 ], [ -113.4185236754714, 53.55850333221476 ], [ -113.42311387779365, 53.55850792311487 ], [ -113.4231120350707, 53.55903671345003 ], [ -113.42311377957142, 53.55949307360121 ], [ -113.42312314555807, 53.559595606469536 ], [ -113.42316477205863, 53.5596952544038 ], [ -113.42323717015219, 53.55978845280595 ], [ -113.42333774899673, 53.559871866819066 ], [ -113.4234205659073, 53.55991902173548 ], [ -113.42351257318973, 53.55995969200601 ], [ -113.42361234740484, 53.55999324783968 ], [ -113.4237183458569, 53.56001917101982 ], [ -113.42382892885806, 53.560037060403836 ], [ -113.42394238619545, 53.56004663924076 ], [ -113.42405696304007, 53.560047759250885 ], [ -113.42417088707704, 53.560040403632016 ], [ -113.42432449406212, 53.560029154568646 ], [ -113.42464995873662, 53.55999901889762 ], [ -113.4249726478381, 53.559959703980525 ], [ -113.42529183309766, 53.559911299076525 ], [ -113.42560679142188, 53.55985391324675 ], [ -113.42591681091668, 53.55978767646038 ], [ -113.42622118969201, 53.5597127388702 ], [ -113.42651924010391, 53.55962926975414 ], [ -113.42681028754384, 53.559537457868046 ], [ -113.42709002565022, 53.559442581511675 ], [ -113.42730189355326, 53.55936256895412 ], [ -113.42750307256706, 53.55928597904912 ], [ -113.42771075739044, 53.559198070721216 ], [ -113.42791219006313, 53.55910256598954 ], [ -113.42812643055184, 53.55899955601201 ], [ -113.42833126749987, 53.558887043032904 ], [ -113.42853527371713, 53.55877002124633 ], [ -113.42872434973997, 53.558644649309855 ], [ -113.42879190888785, 53.55859255148087 ], [ -113.42885007422528, 53.5585365799968 ], [ -113.42889822498785, 53.55847733253289 ], [ -113.42893584680169, 53.55841544177699 ], [ -113.42896253719258, 53.55835156970438 ], [ -113.42897801235425, 53.558286397904865 ], [ -113.42898210539315, 53.55822062326011 ], [ -113.42897477309162, 53.55815494863109 ], [ -113.42895844490997, 53.55809644107585 ], [ -113.42893304483006, 53.55803909253553 ], [ -113.42889879378238, 53.55798339972801 ], [ -113.42885598893942, 53.55792984571523 ], [ -113.42880500136312, 53.55787889521958 ], [ -113.42874627425088, 53.55783099030284 ], [ -113.42868031573907, 53.55778654673739 ], [ -113.4286076989615, 53.55774594969433 ], [ -113.4285290752362, 53.557709560635715 ], [ -113.4284451081168, 53.55767768357233 ], [ -113.42835652429982, 53.55765059514118 ], [ -113.4282640754412, 53.557628555924865 ], [ -113.42816867434351, 53.55761155985471 ], [ -113.42807103274187, 53.5575999172894 ], [ -113.42797199619473, 53.557593728597176 ], [ -113.42787242295583, 53.557593047842346 ], [ -113.42718739193023, 53.55759101221539 ], [ -113.4272048035954, 53.55708040817243 ], [ -113.42856608818535, 53.5570381110969 ], [ -113.42913867775488, 53.55702499640881 ], [ -113.42955528173047, 53.55700441017494 ], [ -113.42996353753234, 53.556961541697106 ], [ -113.43029354827846, 53.55690709547544 ], [ -113.43066156361061, 53.556824819997274 ], [ -113.43101304527829, 53.55672276120324 ], [ -113.43133965700937, 53.556608963464626 ], [ -113.43171360500932, 53.556438123306165 ], [ -113.43201352743888, 53.556264527051106 ], [ -113.43233375948012, 53.55603596006035 ], [ -113.43299063613843, 53.5555118711233 ], [ -113.43449832084005, 53.55433828625943 ], [ -113.43465426292366, 53.5542097682829 ], [ -113.43480159105131, 53.55408461084986 ], [ -113.43493185096234, 53.55395427042252 ], [ -113.43506503390479, 53.553818841480776 ], [ -113.43519266278727, 53.55367148108142 ], [ -113.43528871784923, 53.55353587655826 ], [ -113.43538490812834, 53.55339006823888 ], [ -113.43548112037807, 53.55324255921771 ], [ -113.435554530591, 53.55309154106071 ], [ -113.43561937282311, 53.552940482427104 ], [ -113.43567845772027, 53.55279279804398 ], [ -113.43573185323015, 53.55264338606209 ], [ -113.43577465359837, 53.55249329812321 ], [ -113.435808768845, 53.55233571970756 ], [ -113.43582267080895, 53.55216591213866 ], [ -113.43579108993609, 53.55151004780178 ], [ -113.4358378817371, 53.5493163594302 ], [ -113.43652250884917, 53.54844935855839 ], [ -113.43663707623604, 53.5480837599677 ], [ -113.43664310071908, 53.54742820229822 ], [ -113.43664628750344, 53.54687067916736 ], [ -113.43663152054111, 53.54675130671153 ], [ -113.4365947409905, 53.54662431589607 ], [ -113.43653717747593, 53.54651354164603 ], [ -113.43646369887513, 53.54639059512044 ], [ -113.43636047074072, 53.546281686148205 ], [ -113.43622083688025, 53.54617260547473 ], [ -113.43609162034332, 53.54608952084445 ], [ -113.43425426108746, 53.54505617844497 ], [ -113.43249365642593, 53.54405314443144 ], [ -113.43145342599774, 53.5436044578734 ], [ -113.43112256599915, 53.54349027467095 ], [ -113.43083992683702, 53.54339970500718 ], [ -113.43053493269375, 53.543323198884586 ], [ -113.43029569632553, 53.543270902883194 ], [ -113.42996041953582, 53.543209667520635 ], [ -113.42935187343227, 53.543126233139006 ], [ -113.42935211121139, 53.54232296720524 ], [ -113.43004972649284, 53.542325712216034 ], [ -113.43004999462431, 53.542303434415984 ], [ -113.43010125663255, 53.54230328122999 ], [ -113.43090611551601, 53.54230342964345 ], [ -113.43090654419106, 53.54145823160389 ], [ -113.43090484507599, 53.54118714848598 ], [ -113.4322915904427, 53.54119112268269 ], [ -113.43229032904692, 53.54251332870229 ], [ -113.43225155773791, 53.542655047985356 ], [ -113.43224626587994, 53.54305027323664 ], [ -113.4345061733879, 53.54304945054282 ], [ -113.43450555813108, 53.54391223873677 ], [ -113.43522749031125, 53.54412991928209 ], [ -113.43546616196569, 53.54422078466229 ], [ -113.43618771074793, 53.54472299896044 ], [ -113.43618620631615, 53.54481441614262 ], [ -113.4361859241964, 53.545082774851565 ], [ -113.43727479900379, 53.545195310320416 ], [ -113.43794714883258, 53.54515618654953 ], [ -113.43912232701285, 53.54568130291414 ], [ -113.43978489614663, 53.54583335650493 ], [ -113.43994225147406, 53.5457746538565 ], [ -113.44006239607421, 53.545832828189226 ], [ -113.4402600368361, 53.5459741820446 ], [ -113.44041495817257, 53.546145941949035 ], [ -113.44052439766826, 53.5462080939516 ], [ -113.44045832203777, 53.546310376250055 ], [ -113.44061490816469, 53.546651467219654 ], [ -113.44112032718732, 53.54663982335041 ], [ -113.44198813331508, 53.54662068463171 ], [ -113.44252064293299, 53.546240609983954 ], [ -113.44274204871567, 53.54608198829306 ], [ -113.44295526693591, 53.54590332698189 ], [ -113.44312598906532, 53.545684828257 ], [ -113.44328502373963, 53.545383748777965 ], [ -113.44333813430927, 53.54495083633403 ], [ -113.44332424417499, 53.54378164970962 ], [ -113.44384671432755, 53.54377366236266 ], [ -113.44456295371455, 53.54377337797912 ], [ -113.44456460157284, 53.54360252632505 ], [ -113.44532171982706, 53.54360288856925 ], [ -113.44532125992232, 53.54320544859143 ], [ -113.44532140380403, 53.54311499755339 ], [ -113.44645247031072, 53.54311535840838 ], [ -113.44645353903947, 53.542124098567506 ], [ -113.44714284891317, 53.54212464844844 ], [ -113.44714326881356, 53.541713898411615 ], [ -113.44720356339408, 53.541678353713586 ], [ -113.44771179134491, 53.541678757903604 ], [ -113.44771263886867, 53.54130897874315 ], [ -113.44773107507243, 53.54121829412014 ], [ -113.44930184688576, 53.54121896731 ], [ -113.44930120336265, 53.54177477857271 ], [ -113.44856268870896, 53.5417740386866 ], [ -113.44817166882946, 53.541850288477704 ], [ -113.44816980910215, 53.54254061859451 ], [ -113.4484685791029, 53.54254085845775 ], [ -113.44787921896886, 53.54289662854705 ], [ -113.44787866987511, 53.54311583846731 ], [ -113.44787661911325, 53.543269028672185 ], [ -113.44772617997903, 53.54328064091499 ], [ -113.44715179923676, 53.54332602102728 ], [ -113.44688978310806, 53.543373524066475 ], [ -113.4466579352461, 53.543444090610016 ], [ -113.44645623049905, 53.54353963109079 ], [ -113.44631207236927, 53.54364063974672 ], [ -113.44614986365782, 53.54379038208054 ], [ -113.44615177103279, 53.54413764456313 ], [ -113.44583135204837, 53.544202040812976 ], [ -113.44542275630039, 53.544326803660496 ], [ -113.44505400026704, 53.54448887354414 ], [ -113.44482472720712, 53.54463848742818 ], [ -113.44464606447372, 53.54484292936418 ], [ -113.44458168114278, 53.54499985955693 ], [ -113.44442447383045, 53.54499944604113 ], [ -113.44383536153133, 53.544999240438486 ], [ -113.44383499142117, 53.54511969502231 ], [ -113.4437430765658, 53.54511966257875 ], [ -113.44373963598802, 53.54623967253286 ], [ -113.44373891409427, 53.54632280819282 ], [ -113.44316524149436, 53.54632103979965 ], [ -113.44299969358734, 53.54643504374567 ], [ -113.44299746909066, 53.54735123965246 ], [ -113.44256722201243, 53.547351905192436 ], [ -113.44120815887999, 53.54808411810149 ], [ -113.44116256508237, 53.54815126727021 ], [ -113.44029322018079, 53.54813968978706 ], [ -113.4406786602197, 53.54842227863307 ], [ -113.44095204979858, 53.5487173787384 ], [ -113.44099047005454, 53.548842188712754 ], [ -113.44117488003249, 53.5489644085447 ], [ -113.44168380006039, 53.549209368483346 ], [ -113.44168223012848, 53.549340801301575 ], [ -113.44152686083673, 53.54934094566663 ], [ -113.44152776021784, 53.549566680566734 ], [ -113.44007597787487, 53.54974629538655 ], [ -113.44007659964772, 53.550136072743165 ], [ -113.43947187446331, 53.550135345589624 ], [ -113.4393797120124, 53.55018998823586 ], [ -113.4393731200631, 53.55198717866815 ], [ -113.43922025995985, 53.552837748494454 ], [ -113.4387863099974, 53.553324958480324 ], [ -113.43877789737613, 53.553335212649834 ], [ -113.43877761150809, 53.55333559964756 ], [ -113.43877732295597, 53.5533359526435 ], [ -113.4387737634591, 53.55334080899607 ], [ -113.43877018076016, 53.55334565912339 ], [ -113.4387699304119, 53.553346038563426 ], [ -113.43876965654233, 53.55334641221378 ], [ -113.4387664263044, 53.553351349560224 ], [ -113.43876317251853, 53.55335628115713 ], [ -113.43876295708544, 53.55335665218363 ], [ -113.43876269934307, 53.55335704613703 ], [ -113.43875646250802, 53.5533678373732 ], [ -113.43875283821374, 53.55337484962114 ], [ -113.43875264288484, 53.553375265306585 ], [ -113.4387524542496, 53.55337563214115 ], [ -113.43875099385423, 53.55337877465912 ], [ -113.43874951817608, 53.55338191509477 ], [ -113.4387493507254, 53.55338231038763 ], [ -113.43874916815784, 53.55338270324138 ], [ -113.43874784407406, 53.55338586706792 ], [ -113.43874650459647, 53.55338902910913 ], [ -113.43874636402252, 53.553389403571096 ], [ -113.43874618875623, 53.553389822360366 ], [ -113.43874486208998, 53.55339340442994 ], [ -113.43874351802219, 53.5533969847673 ], [ -113.4387433791538, 53.5533974084364 ], [ -113.43874324040195, 53.55339778307379 ], [ -113.43874220684054, 53.5534009850094 ], [ -113.43874115771753, 53.55340418574525 ], [ -113.43874105150222, 53.55340456420562 ], [ -113.43874091469041, 53.553404988043475 ], [ -113.43873890113852, 53.55341222626035 ], [ -113.43873703158343, 53.55342030190397 ], [ -113.4387356811584, 53.55342759456706 ], [ -113.43873455089586, 53.55343571875559 ], [ -113.43873386758636, 53.55344304432987 ], [ -113.43873350110405, 53.55345037794971 ], [ -113.43873346577737, 53.55345852994337 ], [ -113.43873376869675, 53.553465864606025 ], [ -113.43873380410736, 53.553466271653754 ], [ -113.43873382191765, 53.55346667919087 ], [ -113.43873447691912, 53.55347400569622 ], [ -113.43873544834314, 53.5534813197225 ], [ -113.4387368980284, 53.55348942590622 ], [ -113.43873853509194, 53.55349669772022 ], [ -113.43874048589795, 53.55350394205442 ], [ -113.4387406190247, 53.553504366273835 ], [ -113.43874072195375, 53.553504745037074 ], [ -113.4387417433504, 53.55350794903219 ], [ -113.43874274914319, 53.553511154075174 ], [ -113.43874288463614, 53.55351152910425 ], [ -113.43874301982436, 53.55351195317294 ], [ -113.43874562846877, 53.553519123724115 ], [ -113.43874888932444, 53.55352704110349 ], [ -113.43875214809947, 53.55353411668619 ], [ -113.43875571159377, 53.55354113998307 ], [ -113.43876002554066, 53.55354887666565 ], [ -113.43876422433557, 53.553555774348254 ], [ -113.43876923754044, 53.55356336009282 ], [ -113.4387740592424, 53.55357011180001 ], [ -113.43877975690732, 53.55357752421452 ], [ -113.43878518726376, 53.55358410999266 ], [ -113.43878550559525, 53.553584470927944 ], [ -113.43878580820581, 53.553584836602454 ], [ -113.43879155259087, 53.55359132721992 ], [ -113.43879757561268, 53.553597727675196 ], [ -113.4388045897726, 53.55360472836403 ], [ -113.43785294412312, 53.553946176714156 ], [ -113.43799809266785, 53.55438003810364 ], [ -113.43824032102417, 53.55502138779654 ], [ -113.43838893422378, 53.555357127517546 ], [ -113.43857619567999, 53.5556994436934 ], [ -113.43646866874889, 53.55646264871205 ], [ -113.434875380175, 53.55715312460406 ], [ -113.4334718724598, 53.55786334299341 ], [ -113.42988271490518, 53.5597532220297 ], [ -113.42644631151879, 53.56152641133273 ], [ -113.42547987307334, 53.561956587278615 ], [ -113.42355259441509, 53.56255628707022 ], [ -113.42145694493216, 53.563031348725836 ], [ -113.41920372219816, 53.56328453517151 ], [ -113.41755455994118, 53.56338970460361 ], [ -113.41543193672781, 53.563360485792856 ], [ -113.41378589234657, 53.56323924240979 ], [ -113.41217337286302, 53.5629860883487 ], [ -113.41034877580833, 53.56252256525821 ], [ -113.40788219683526, 53.56168212536205 ], [ -113.4067165059717, 53.56120473218665 ], [ -113.40536286104106, 53.56057547579939 ], [ -113.40416793232349, 53.559928129945405 ], [ -113.40322702451805, 53.55924431021345 ], [ -113.40219323102296, 53.558409101117704 ], [ -113.40145458936446, 53.55763251534859 ] ] ] }, "type": "Feature", "properties": { "name": "River Valley Gold Bar", "number": "6620", "coordinate": "-1.13418e+002", "coords": "53.5535 , -113.418", "otherCoord": "5.35535e+001", "area_km2": "2.07069819171585" } }, { "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -113.43877975690732, 53.55357752421452 ], [ -113.43878550559525, 53.553584470927944 ], [ -113.43878518726376, 53.55358410999266 ], [ -113.43877975690732, 53.55357752421452 ] ] ], [ [ [ -113.43874288463614, 53.55351152910425 ], [ -113.43874562846877, 53.553519123724115 ], [ -113.43874301982436, 53.55351195317294 ], [ -113.43874288463614, 53.55351152910425 ] ] ], [ [ [ -113.4387406190247, 53.553504366273835 ], [ -113.4387417433504, 53.55350794903219 ], [ -113.43874072195375, 53.553504745037074 ], [ -113.4387406190247, 53.553504366273835 ] ] ], [ [ [ -113.43873380410736, 53.553466271653754 ], [ -113.43873447691912, 53.55347400569622 ], [ -113.43873382191765, 53.55346667919087 ], [ -113.43873380410736, 53.553466271653754 ] ] ], [ [ [ -113.43874220684054, 53.5534009850094 ], [ -113.43874105150222, 53.55340456420562 ], [ -113.43874115771753, 53.55340418574525 ], [ -113.43874220684054, 53.5534009850094 ] ] ], [ [ [ -113.43874486208998, 53.55339340442994 ], [ -113.4387433791538, 53.5533974084364 ], [ -113.43874351802219, 53.5533969847673 ], [ -113.43874486208998, 53.55339340442994 ] ] ], [ [ [ -113.43874784407406, 53.55338586706792 ], [ -113.43874636402252, 53.553389403571096 ], [ -113.43874650459647, 53.55338902910913 ], [ -113.43874784407406, 53.55338586706792 ] ] ], [ [ [ -113.43875099385423, 53.55337877465912 ], [ -113.4387493507254, 53.55338231038763 ], [ -113.43874951817608, 53.55338191509477 ], [ -113.43875099385423, 53.55337877465912 ] ] ], [ [ [ -113.43875646250802, 53.5533678373732 ], [ -113.43875264288484, 53.553375265306585 ], [ -113.43875283821374, 53.55337484962114 ], [ -113.43875646250802, 53.5533678373732 ] ] ], [ [ [ -113.43876295708544, 53.55335665218363 ], [ -113.43875646250802, 53.5533678373732 ], [ -113.43876269934307, 53.55335704613703 ], [ -113.43876295708544, 53.55335665218363 ] ] ], [ [ [ -113.4387699304119, 53.553346038563426 ], [ -113.4387664263044, 53.553351349560224 ], [ -113.43876965654233, 53.55334641221378 ], [ -113.4387699304119, 53.553346038563426 ] ] ], [ [ [ -113.43877761150809, 53.55333559964756 ], [ -113.4387737634591, 53.55334080899607 ], [ -113.43877732295597, 53.5533359526435 ], [ -113.43877761150809, 53.55333559964756 ] ] ] ] }, "type": "Feature", "properties": { "name": "River Valley Gold Bar", "number": "6620", "coordinate": "-1.13418e+002", "coords": "53.5535 , -113.418", "otherCoord": "5.35535e+001", "area_km2": "2.07069819171585" } }, { "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -113.43877975690732, 53.55357752421452 ], [ -113.43878550559525, 53.553584470927944 ], [ -113.43878518726376, 53.55358410999266 ], [ -113.43877975690732, 53.55357752421452 ] ] ], [ [ [ -113.43874288463614, 53.55351152910425 ], [ -113.43874562846877, 53.553519123724115 ], [ -113.43874301982436, 53.55351195317294 ], [ -113.43874288463614, 53.55351152910425 ] ] ], [ [ [ -113.4387406190247, 53.553504366273835 ], [ -113.4387417433504, 53.55350794903219 ], [ -113.43874072195375, 53.553504745037074 ], [ -113.4387406190247, 53.553504366273835 ] ] ], [ [ [ -113.43873380410736, 53.553466271653754 ], [ -113.43873447691912, 53.55347400569622 ], [ -113.43873382191765, 53.55346667919087 ], [ -113.43873380410736, 53.553466271653754 ] ] ], [ [ [ -113.43874220684054, 53.5534009850094 ], [ -113.43874105150222, 53.55340456420562 ], [ -113.43874115771753, 53.55340418574525 ], [ -113.43874220684054, 53.5534009850094 ] ] ], [ [ [ -113.43874486208998, 53.55339340442994 ], [ -113.4387433791538, 53.5533974084364 ], [ -113.43874351802219, 53.5533969847673 ], [ -113.43874486208998, 53.55339340442994 ] ] ], [ [ [ -113.43874784407406, 53.55338586706792 ], [ -113.43874636402252, 53.553389403571096 ], [ -113.43874650459647, 53.55338902910913 ], [ -113.43874784407406, 53.55338586706792 ] ] ], [ [ [ -113.43875099385423, 53.55337877465912 ], [ -113.4387493507254, 53.55338231038763 ], [ -113.43874951817608, 53.55338191509477 ], [ -113.43875099385423, 53.55337877465912 ] ] ], [ [ [ -113.43875646250802, 53.5533678373732 ], [ -113.43875264288484, 53.553375265306585 ], [ -113.43875283821374, 53.55337484962114 ], [ -113.43875646250802, 53.5533678373732 ] ] ], [ [ [ -113.43876295708544, 53.55335665218363 ], [ -113.43875646250802, 53.5533678373732 ], [ -113.43876269934307, 53.55335704613703 ], [ -113.43876295708544, 53.55335665218363 ] ] ], [ [ [ -113.4387699304119, 53.553346038563426 ], [ -113.4387664263044, 53.553351349560224 ], [ -113.43876965654233, 53.55334641221378 ], [ -113.4387699304119, 53.553346038563426 ] ] ], [ [ [ -113.43877761150809, 53.55333559964756 ], [ -113.4387737634591, 53.55334080899607 ], [ -113.43877732295597, 53.5533359526435 ], [ -113.43877761150809, 53.55333559964756 ] ] ] ] }, "type": "Feature", "properties": { "name": "River Valley Riverside", "number": "6630", "coordinate": "-1.13458e+002", "coords": "53.5506 , -113.458", "otherCoord": "5.35506e+001", "area_km2": "1.24936027203016" } } ] };
EsriCanada-CE/ecce-app-challenge-2016
maraudersmApp/maraudersmApp/GeoJsonNeighbor/River Valley Gold Bar_neighbor.js
JavaScript
gpl-2.0
52,008
package com.gl.barbell.core class FalseRationality(rules: List[Rule]) { def keep(lottery: NumberBasedLottery): Boolean = rules.forall(_.satisfied(lottery)) }
ajaxchelsea/barbell
src/main/scala/com/gl/barbell/core/FalseRationality.scala
Scala
gpl-2.0
161
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* nm-platform.c - Handle runtime kernel networking configuration * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2015 Red Hat, Inc. */ #include "nmp-object.h" #include "nm-default.h" #include "nm-test-utils.h" struct { GList *udev_devices; } global; /******************************************************************/ static gboolean _nmp_object_id_equal (const NMPObject *a, const NMPObject *b) { gboolean a_b = nmp_object_id_equal (a, b); g_assert (NM_IN_SET (a_b, FALSE, TRUE) && a_b == nmp_object_id_equal (b, a)); return a_b; } #define nmp_object_id_equal _nmp_object_id_equal static gboolean _nmp_object_equal (const NMPObject *a, const NMPObject *b) { gboolean a_b = nmp_object_equal (a, b); g_assert (NM_IN_SET (a_b, FALSE, TRUE) && a_b == nmp_object_equal (b, a)); return a_b; } #define nmp_object_equal _nmp_object_equal /******************************************************************/ static void _assert_cache_multi_lookup_contains (const NMPCache *cache, const NMPCacheId *cache_id, const NMPObject *obj, gboolean contains) { const NMPlatformObject *const *objects; guint i, len; gboolean found; g_assert (cache_id); g_assert (NMP_OBJECT_IS_VALID (obj)); g_assert (nmp_cache_lookup_obj (cache, obj) == obj); objects = nmp_cache_lookup_multi (cache, cache_id, &len); g_assert ((len == 0 && !objects) || (len > 0 && objects && !objects[len])); found = FALSE; for (i = 0; i < len; i++) { NMPObject *o; g_assert (objects[i]); o = NMP_OBJECT_UP_CAST (objects[i]); g_assert (NMP_OBJECT_IS_VALID (o)); if (obj == o) { g_assert (!found); found = TRUE; } } g_assert (!!contains == found); } /******************************************************************/ typedef struct { NMPCache *cache; NMPCacheOpsType expected_ops_type; const NMPObject *obj_clone; NMPObject *new_clone; gboolean was_visible; gboolean called; } _NMPCacheUpdateData; static void _nmp_cache_update_hook (NMPCache *cache, const NMPObject *old, const NMPObject *new, NMPCacheOpsType ops_type, gpointer user_data) { _NMPCacheUpdateData *data = user_data; g_assert (data); g_assert (!data->called); g_assert (data->cache == cache); g_assert_cmpint (data->expected_ops_type, ==, ops_type); switch (ops_type) { case NMP_CACHE_OPS_ADDED: g_assert (!old); g_assert (NMP_OBJECT_IS_VALID (new)); g_assert (nmp_object_is_alive (new)); g_assert (nmp_object_id_equal (data->obj_clone, new)); g_assert (nmp_object_equal (data->obj_clone, new)); break; case NMP_CACHE_OPS_UPDATED: g_assert (NMP_OBJECT_IS_VALID (old)); g_assert (NMP_OBJECT_IS_VALID (new)); g_assert (nmp_object_is_alive (old)); g_assert (nmp_object_is_alive (new)); g_assert (nmp_object_id_equal (data->obj_clone, new)); g_assert (nmp_object_id_equal (data->obj_clone, old)); g_assert (nmp_object_id_equal (old, new)); g_assert (nmp_object_equal (data->obj_clone, new)); g_assert (!nmp_object_equal (data->obj_clone, old)); g_assert (!nmp_object_equal (old, new)); break; case NMP_CACHE_OPS_REMOVED: g_assert (!new); g_assert (NMP_OBJECT_IS_VALID (old)); g_assert (nmp_object_is_alive (old)); g_assert (nmp_object_id_equal (data->obj_clone, old)); break; default: g_assert_not_reached (); } data->was_visible = old ? nmp_object_is_visible (old) : FALSE; data->new_clone = new ? nmp_object_clone (new, FALSE) : NULL; data->called = TRUE; } static void _nmp_cache_update_netlink (NMPCache *cache, NMPObject *obj, NMPObject **out_obj, gboolean *out_was_visible, NMPCacheOpsType expected_ops_type) { NMPCacheOpsType ops_type; NMPObject *obj2; gboolean was_visible; auto_nmp_obj NMPObject *obj_clone = nmp_object_clone (obj, FALSE); auto_nmp_obj NMPObject *new_clone = NULL; const NMPObject *obj_old; _NMPCacheUpdateData data = { .cache = cache, .expected_ops_type = expected_ops_type, .obj_clone = obj_clone, }; obj_old = nmp_cache_lookup_link (cache, obj->object.ifindex); if (obj_old && obj_old->_link.udev.device) obj_clone->_link.udev.device = g_object_ref (obj_old->_link.udev.device); _nmp_object_fixup_link_udev_fields (obj_clone, nmp_cache_use_udev_get (cache)); g_assert (cache); g_assert (NMP_OBJECT_IS_VALID (obj)); ops_type = nmp_cache_update_netlink (cache, obj, &obj2, &was_visible, _nmp_cache_update_hook, &data); new_clone = data.new_clone; g_assert_cmpint (ops_type, ==, expected_ops_type); if (ops_type != NMP_CACHE_OPS_UNCHANGED) { g_assert (NMP_OBJECT_IS_VALID (obj2)); g_assert (data.called); g_assert_cmpint (data.was_visible, ==, was_visible); if (ops_type == NMP_CACHE_OPS_REMOVED) g_assert (!data.new_clone); else { g_assert (data.new_clone); g_assert (nmp_object_equal (obj2, data.new_clone)); } } else { g_assert (!data.called); g_assert (!obj2 || was_visible == nmp_object_is_visible (obj2)); } g_assert (!obj2 || nmp_object_id_equal (obj, obj2)); if (ops_type != NMP_CACHE_OPS_REMOVED && obj2) g_assert (nmp_object_equal (obj, obj2)); if (out_obj) *out_obj = obj2; else nmp_object_unref (obj2); if (out_was_visible) *out_was_visible = was_visible; } static const NMPlatformLink pl_link_2 = { .ifindex = 2, .name = "eth0", .type = NM_LINK_TYPE_ETHERNET, }; static const NMPlatformLink pl_link_3 = { .ifindex = 3, .name = "wlan0", .type = NM_LINK_TYPE_WIFI, }; static void test_cache_link (void) { NMPCache *cache; NMPObject *obj1, *obj2; NMPObject objs1; gboolean was_visible; NMPCacheId cache_id_storage; GUdevDevice *udev_device_2 = g_list_nth_data (global.udev_devices, 0); GUdevDevice *udev_device_3 = g_list_nth_data (global.udev_devices, 0); NMPCacheOpsType ops_type; cache = nmp_cache_new (); nmp_cache_use_udev_set (cache, g_rand_int_range (nmtst_get_rand (), 0, 2)); /* if we have a link, and don't set is_in_netlink, adding it has no effect. */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2); g_assert (NMP_OBJECT_UP_CAST (&obj1->object) == obj1); g_assert (!nmp_object_is_alive (obj1)); _nmp_cache_update_netlink (cache, obj1, &obj2, &was_visible, NMP_CACHE_OPS_UNCHANGED); ASSERT_nmp_cache_is_consistent (cache); g_assert (!obj2); g_assert (!was_visible); g_assert (!nmp_cache_lookup_obj (cache, obj1)); g_assert (!nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex))); nmp_object_unref (obj1); /* Only when setting @is_in_netlink the link is added. */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2); obj1->_link.netlink.is_in_netlink = TRUE; g_assert (nmp_object_is_alive (obj1)); _nmp_cache_update_netlink (cache, obj1, &obj2, &was_visible, NMP_CACHE_OPS_ADDED); ASSERT_nmp_cache_is_consistent (cache); g_assert (nmp_object_equal (obj1, obj2)); g_assert (!was_visible); g_assert (nmp_cache_lookup_obj (cache, obj1) == obj2); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex)) == obj2); g_assert (nmp_object_is_visible (obj2)); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, TRUE), obj2, TRUE); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, FALSE), obj2, TRUE); nmp_object_unref (obj1); nmp_object_unref (obj2); /* updating the same link with identical value, has no effect. */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2); obj1->_link.netlink.is_in_netlink = TRUE; g_assert (nmp_object_is_alive (obj1)); _nmp_cache_update_netlink (cache, obj1, &obj2, &was_visible, NMP_CACHE_OPS_UNCHANGED); ASSERT_nmp_cache_is_consistent (cache); g_assert (obj2 != obj1); g_assert (nmp_object_equal (obj1, obj2)); g_assert (was_visible); g_assert (nmp_cache_lookup_obj (cache, obj1) == obj2); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex)) == obj2); nmp_object_unref (obj1); nmp_object_unref (obj2); /* remove the link from netlink */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2); g_assert (!nmp_object_is_alive (obj1)); _nmp_cache_update_netlink (cache, obj1, &obj2, &was_visible, NMP_CACHE_OPS_REMOVED); ASSERT_nmp_cache_is_consistent (cache); g_assert (obj2 != obj1); g_assert (was_visible); g_assert (!nmp_cache_lookup_obj (cache, obj1)); g_assert (!nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex))); nmp_object_unref (obj1); nmp_object_unref (obj2); if (udev_device_2) { /* now add the link only with aspect UDEV. */ ops_type = nmp_cache_update_link_udev (cache, pl_link_2.ifindex, udev_device_2, &obj2, &was_visible, NULL, NULL); ASSERT_nmp_cache_is_consistent (cache); g_assert_cmpint (ops_type, ==, NMP_CACHE_OPS_ADDED); g_assert (!was_visible); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex)) == obj2); g_assert (!nmp_object_is_visible (obj2)); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, TRUE), obj2, FALSE); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, FALSE), obj2, TRUE); nmp_object_unref (obj2); } /* add it in netlink too. */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2); obj1->_link.netlink.is_in_netlink = TRUE; g_assert (nmp_object_is_alive (obj1)); _nmp_cache_update_netlink (cache, obj1, &obj2, &was_visible, udev_device_2 ? NMP_CACHE_OPS_UPDATED : NMP_CACHE_OPS_ADDED); ASSERT_nmp_cache_is_consistent (cache); g_assert (nmp_object_equal (obj1, obj2)); g_assert (!was_visible); g_assert (nmp_cache_lookup_obj (cache, obj1) == obj2); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex)) == obj2); g_assert (nmp_object_is_visible (obj2)); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, TRUE), obj2, TRUE); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, FALSE), obj2, TRUE); nmp_object_unref (obj1); nmp_object_unref (obj2); /* remove again from netlink. */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2); obj1->_link.netlink.is_in_netlink = FALSE; g_assert (!nmp_object_is_alive (obj1)); _nmp_cache_update_netlink (cache, obj1, &obj2, &was_visible, udev_device_2 ? NMP_CACHE_OPS_UPDATED : NMP_CACHE_OPS_REMOVED); ASSERT_nmp_cache_is_consistent (cache); g_assert (obj2 != obj1); g_assert (was_visible); if (udev_device_2) { g_assert (nmp_cache_lookup_obj (cache, obj1) == obj2); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex)) == obj2); g_assert (!nmp_object_is_visible (obj2)); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, TRUE), obj2, FALSE); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, FALSE), obj2, TRUE); } else { g_assert (nmp_cache_lookup_obj (cache, obj1) == NULL); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_2.ifindex)) == NULL); g_assert (nmp_object_is_visible (obj2)); } nmp_object_unref (obj1); nmp_object_unref (obj2); /* now another link only with aspect UDEV. */ if (udev_device_3) { /* now add the link only with aspect UDEV. */ ops_type = nmp_cache_update_link_udev (cache, pl_link_3.ifindex, udev_device_3, &obj2, &was_visible, NULL, NULL); g_assert_cmpint (ops_type, ==, NMP_CACHE_OPS_ADDED); ASSERT_nmp_cache_is_consistent (cache); g_assert (NMP_OBJECT_IS_VALID (obj2)); g_assert (!was_visible); g_assert (!nmp_object_is_visible (obj2)); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_3.ifindex)) == obj2); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, TRUE), obj2, FALSE); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, FALSE), obj2, TRUE); g_assert_cmpint (obj2->_link.netlink.is_in_netlink, ==, FALSE); g_assert_cmpint (obj2->link.initialized, ==, FALSE); nmp_object_unref (obj2); /* add it in netlink too. */ obj1 = nmp_object_new (NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_3); obj1->_link.netlink.is_in_netlink = TRUE; g_assert (nmp_object_is_alive (obj1)); _nmp_cache_update_netlink (cache, obj1, &obj2, &was_visible, NMP_CACHE_OPS_UPDATED); ASSERT_nmp_cache_is_consistent (cache); g_assert (obj2 != obj1); g_assert (nmp_object_equal (obj1, obj2)); g_assert (!was_visible); g_assert (nmp_cache_lookup_obj (cache, obj1) == obj2); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_3.ifindex)) == obj2); g_assert (nmp_object_is_visible (obj2)); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, TRUE), obj2, TRUE); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, FALSE), obj2, TRUE); g_assert_cmpint (obj2->_link.netlink.is_in_netlink, ==, TRUE); g_assert_cmpint (obj2->link.initialized, ==, TRUE); nmp_object_unref (obj1); nmp_object_unref (obj2); /* remove UDEV. */ ops_type = nmp_cache_update_link_udev (cache, pl_link_3.ifindex, NULL, &obj2, &was_visible, NULL, NULL); g_assert_cmpint (ops_type, ==, NMP_CACHE_OPS_UPDATED); ASSERT_nmp_cache_is_consistent (cache); g_assert (was_visible); g_assert (nmp_cache_lookup_obj (cache, nmp_object_stackinit_id_link (&objs1, pl_link_3.ifindex)) == obj2); g_assert (nmp_object_is_visible (obj2)); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, TRUE), obj2, TRUE); _assert_cache_multi_lookup_contains (cache, nmp_cache_id_init_object_type (&cache_id_storage, NMP_OBJECT_TYPE_LINK, FALSE), obj2, TRUE); g_assert_cmpint (obj2->_link.netlink.is_in_netlink, ==, TRUE); g_assert_cmpint (obj2->link.initialized, ==, !nmp_cache_use_udev_get (cache)); nmp_object_unref (obj2); } nmp_cache_free (cache); } /******************************************************************/ NMTST_DEFINE (); int main (int argc, char **argv) { int result; gs_unref_object GUdevClient *udev_client = NULL; nmtst_init_assert_logging (&argc, &argv, "INFO", "DEFAULT"); udev_client = g_udev_client_new ((const char *[]) { "net", NULL }); { gs_unref_object GUdevEnumerator *udev_enumerator = g_udev_enumerator_new (udev_client); g_udev_enumerator_add_match_subsystem (udev_enumerator, "net"); /* Demand that the device is initialized (udev rules ran, * device has a stable name now) in case udev is running * (not in a container). */ if (access ("/sys", W_OK) == 0) g_udev_enumerator_add_match_is_initialized (udev_enumerator); global.udev_devices = g_udev_enumerator_execute (udev_enumerator); } g_test_add_func ("/nmp-object/cache_link", test_cache_link); result = g_test_run (); while (global.udev_devices) { g_object_unref (global.udev_devices->data); global.udev_devices = g_list_remove (global.udev_devices, global.udev_devices->data); } return result; }
thom311/NetworkManager
src/platform/tests/test-nmp-object.c
C
gpl-2.0
16,244
/* * Wazuh app - Module for Agents/Osquery visualizations * Copyright (C) 2015-2021 Wazuh, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Find more information about this on the LICENSE file. */ export default [ { _id: 'Wazuh-App-Agents-Osquery-monst-common-rules-being-fired', _type: 'visualization', _source: { title: 'Most common rules being fired', visState: JSON.stringify({ title: 'Most common rules being fired', type: 'table', params: { perPage: 10, showPartialRows: false, showMetricsAtAllLevels: false, sort: { columnIndex: 2, direction: 'desc' }, showTotal: false, showToolbar: true, totalFunc: 'sum', }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'terms', schema: 'bucket', params: { field: 'rule.id', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', customLabel: 'Rule ID', }, }, { id: '3', enabled: true, type: 'terms', schema: 'bucket', params: { field: 'rule.description', size: 1, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', customLabel: 'Description', }, }, ], }), uiStateJSON: JSON.stringify({ vis: { params: { sort: { columnIndex: 2, direction: 'desc' } } }, }), description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [], }), }, }, }, { _id: 'Wazuh-App-Overview-Osquery-Top-5-added', _type: 'visualization', _source: { title: 'Top 5 added', visState: JSON.stringify({ title: 'Top 5 added', type: 'pie', params: { type: 'pie', addTooltip: true, addLegend: true, legendPosition: 'right', isDonut: true, labels: { show: false, values: true, last_level: true, truncate: 100 }, }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'terms', schema: 'segment', params: { field: 'data.osquery.name', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', }, }, ], }), uiStateJSON: '{}', description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [ { meta: { index: 'wazuh-alerts', negate: false, disabled: false, alias: null, type: 'phrase', key: 'data.osquery.action', value: 'added', params: { query: 'added', type: 'phrase' }, }, query: { match: { 'data.osquery.action': { query: 'added', type: 'phrase' } } }, $state: { store: 'appState' }, }, ], }), }, }, }, { _id: 'Wazuh-App-Overview-Osquery-Top-5-removed', _type: 'visualization', _source: { title: 'Top 5 removed', visState: JSON.stringify({ title: 'Top 5 removed', type: 'pie', params: { type: 'pie', addTooltip: true, addLegend: true, legendPosition: 'right', isDonut: true, labels: { show: false, values: true, last_level: true, truncate: 100 }, }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'terms', schema: 'segment', params: { field: 'data.osquery.name', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', }, }, ], }), uiStateJSON: '{}', description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [ { meta: { index: 'wazuh-alerts', negate: false, disabled: false, alias: null, type: 'phrase', key: 'data.osquery.action', value: 'removed', params: { query: 'removed', type: 'phrase' }, }, query: { match: { 'data.osquery.action': { query: 'removed', type: 'phrase' } } }, $state: { store: 'appState' }, }, ], }), }, }, }, { _id: 'Wazuh-App-Agents-Osquery-Evolution', _type: 'visualization', _source: { title: 'Evolution over time', visState: JSON.stringify({ title: 'Evolution over time', type: 'histogram', params: { type: 'histogram', grid: { categoryLines: true, style: { color: '#eee' }, valueAxis: 'ValueAxis-1' }, categoryAxes: [ { id: 'CategoryAxis-1', type: 'category', position: 'bottom', show: true, style: {}, scale: { type: 'linear' }, labels: { show: true, filter: true, truncate: 100 }, title: {}, }, ], valueAxes: [ { id: 'ValueAxis-1', name: 'LeftAxis-1', type: 'value', position: 'left', show: true, style: {}, scale: { type: 'linear', mode: 'normal' }, labels: { show: true, rotate: 0, filter: false, truncate: 100 }, title: { text: 'Count' }, }, ], seriesParams: [ { show: 'true', type: 'histogram', mode: 'stacked', data: { label: 'Count', id: '1' }, valueAxis: 'ValueAxis-1', drawLinesBetweenPoints: true, showCircles: true, }, ], addTooltip: true, addLegend: true, legendPosition: 'right', times: [], addTimeMarker: false, }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'date_histogram', schema: 'segment', params: { field: 'timestamp', timeRange: { from: 'now-1h', to: 'now', mode: 'quick' }, useNormalizedEsInterval: true, interval: 'auto', time_zone: 'Europe/Berlin', drop_partials: false, customInterval: '2h', min_doc_count: 1, extended_bounds: {}, }, }, { id: '3', enabled: true, type: 'terms', schema: 'group', params: { field: 'data.osquery.name', size: 10, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', }, }, ], }), uiStateJSON: '{}', description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [], }), }, }, }, { _id: 'Wazuh-App-Agents-Osquery-top-5-packs-being-used', _type: 'visualization', _source: { title: 'Top 5 packs being used', visState: JSON.stringify({ title: 'Top 5 packs being used', type: 'pie', params: { type: 'pie', addTooltip: true, addLegend: true, legendPosition: 'right', isDonut: true, labels: { show: false, values: true, last_level: true, truncate: 100 }, }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'terms', schema: 'segment', params: { field: 'data.osquery.pack', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', }, }, ], }), uiStateJSON: '{}', description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [], }), }, }, }, { _id: 'Wazuh-App-Agents-Osquery-most-common-osquery-actions', _type: 'visualization', _source: { title: 'Most common Osquery actions', visState: JSON.stringify({ title: 'Most common Osquery actions', type: 'pie', params: { type: 'pie', addTooltip: true, addLegend: true, legendPosition: 'right', isDonut: true, labels: { show: false, values: true, last_level: true, truncate: 100 }, }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'terms', schema: 'segment', params: { field: 'data.osquery.action', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', }, }, ], }), uiStateJSON: '{}', description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [], }), }, }, }, { _id: 'Wazuh-App-Agents-Osquery-events-per-pack-over-time', _type: 'visualization', _source: { title: 'Events per pack over time', visState: JSON.stringify({ title: 'Events per pack over time', type: 'line', params: { type: 'line', grid: { categoryLines: false, style: { color: '#eee' } }, categoryAxes: [ { id: 'CategoryAxis-1', type: 'category', position: 'bottom', show: true, style: {}, scale: { type: 'linear' }, labels: { show: true, filter: true, truncate: 100 }, title: {}, }, ], valueAxes: [ { id: 'ValueAxis-1', name: 'LeftAxis-1', type: 'value', position: 'left', show: true, style: {}, scale: { type: 'linear', mode: 'normal' }, labels: { show: true, rotate: 0, filter: false, truncate: 100 }, title: { text: 'Count' }, }, ], seriesParams: [ { show: 'true', type: 'line', mode: 'normal', data: { label: 'Count', id: '1' }, valueAxis: 'ValueAxis-1', drawLinesBetweenPoints: true, showCircles: true, }, ], addTooltip: true, addLegend: true, legendPosition: 'right', times: [], addTimeMarker: false, }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'terms', schema: 'group', params: { field: 'data.osquery.pack', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', }, }, { id: '3', enabled: true, type: 'date_histogram', schema: 'segment', params: { field: 'timestamp', interval: 'auto', customInterval: '2h', min_doc_count: 1, extended_bounds: {}, }, }, ], }), uiStateJSON: '{}', description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [], }), }, }, }, { _id: 'Wazuh-App-Agents-Osquery-events-over-time', _type: 'visualization', _source: { title: 'Osquery events over time', visState: JSON.stringify({ title: 'Osquery events over time', type: 'area', params: { type: 'area', grid: { categoryLines: false, style: { color: '#eee' } }, categoryAxes: [ { id: 'CategoryAxis-1', type: 'category', position: 'bottom', show: true, style: {}, scale: { type: 'linear' }, labels: { show: true, filter: true, truncate: 100 }, title: {}, }, ], valueAxes: [ { id: 'ValueAxis-1', name: 'LeftAxis-1', type: 'value', position: 'left', show: true, style: {}, scale: { type: 'linear', mode: 'normal' }, labels: { show: true, rotate: 0, filter: false, truncate: 100 }, title: { text: 'Count' }, }, ], seriesParams: [ { show: 'true', type: 'area', mode: 'stacked', data: { label: 'Count', id: '1' }, drawLinesBetweenPoints: true, showCircles: true, interpolate: 'linear', valueAxis: 'ValueAxis-1', }, ], addTooltip: true, addLegend: true, legendPosition: 'right', times: [], addTimeMarker: false, }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '2', enabled: true, type: 'date_histogram', schema: 'segment', params: { field: 'timestamp', interval: 'auto', customInterval: '2h', min_doc_count: 1, extended_bounds: {}, }, }, ], }), uiStateJSON: '{}', description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [], }), }, }, }, { _id: 'Wazuh-App-Overview-Osquery-Alerts-summary', _type: 'visualization', _source: { title: 'Alerts summary', visState: JSON.stringify({ title: 'table', type: 'table', params: { perPage: 10, showPartialRows: false, showMetricsAtAllLevels: false, sort: { columnIndex: 5, direction: 'desc' }, showTotal: false, showToolbar: true, totalFunc: 'sum', }, aggs: [ { id: '1', enabled: true, type: 'count', schema: 'metric', params: {} }, { id: '4', enabled: true, type: 'terms', schema: 'bucket', params: { field: 'data.osquery.name', size: 20, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', customLabel: 'Name', }, }, { id: '2', enabled: true, type: 'terms', schema: 'bucket', params: { field: 'data.osquery.action', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', customLabel: 'Action', }, }, { id: '3', enabled: true, type: 'terms', schema: 'bucket', params: { field: 'agent.name', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', customLabel: 'Agent', }, }, { id: '5', enabled: true, type: 'terms', schema: 'bucket', params: { field: 'data.osquery.pack', size: 5, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: true, missingBucketLabel: '-', customLabel: 'Pack', }, }, { id: '6', enabled: true, type: 'terms', schema: 'bucket', params: { field: 'data.osquery.calendarTime', size: 2, order: 'desc', orderBy: '1', otherBucket: false, otherBucketLabel: 'Other', missingBucket: false, missingBucketLabel: 'Missing', customLabel: 'Date', }, }, ], }), uiStateJSON: JSON.stringify({ vis: { params: { sort: { columnIndex: 5, direction: 'desc' } } }, }), description: '', version: 1, kibanaSavedObjectMeta: { searchSourceJSON: JSON.stringify({ index: 'wazuh-alerts', query: { query: '', language: 'lucene' }, filter: [], }), }, }, }, ];
wazuh/wazuh-kibana-app
server/integration-files/visualizations/agents/agents-osquery.ts
TypeScript
gpl-2.0
20,334
/* Copyright 1999-2016 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. You may not use this file except in compliance with the License. obtain a copy of the License at http://www.imagemagick.org/script/license.php Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. MagickCore string methods. */ #ifndef _MAGICKCORE_STRING_H_ #define _MAGICKCORE_STRING_H_ #include <stdarg.h> #include <time.h> #include "magick/exception.h" #if defined(__cplusplus) || defined(c_plusplus) extern "C" { #endif typedef struct _StringInfo { char path[MaxTextExtent]; unsigned char *datum; size_t length, signature; } StringInfo; extern MagickExport char *AcquireString(const char *), *CloneString(char **,const char *), *ConstantString(const char *), *DestroyString(char *), **DestroyStringList(char **), *EscapeString(const char *,const char), *FileToString(const char *,const size_t,ExceptionInfo *), *GetEnvironmentValue(const char *), *StringInfoToHexString(const StringInfo *), *StringInfoToString(const StringInfo *), **StringToArgv(const char *,int *), *StringToken(const char *,char **), **StringToList(const char *); extern MagickExport const char *GetStringInfoPath(const StringInfo *); extern MagickExport double InterpretSiPrefixValue(const char *magick_restrict,char **magick_restrict), *StringToArrayOfDoubles(const char *,ssize_t *, ExceptionInfo *); extern MagickExport int CompareStringInfo(const StringInfo *,const StringInfo *); extern MagickExport MagickBooleanType ConcatenateString(char **,const char *), IsStringTrue(const char *), IsStringNotFalse(const char *), SubstituteString(char **,const char *,const char *); extern MagickExport size_t ConcatenateMagickString(char *,const char *,const size_t) magick_attribute((__nonnull__)), CopyMagickString(char *,const char *,const size_t) magick_attribute((__nonnull__)), GetStringInfoLength(const StringInfo *); extern MagickExport ssize_t FormatMagickSize(const MagickSizeType,const MagickBooleanType,char *), FormatMagickTime(const time_t,const size_t,char *); extern MagickExport StringInfo *AcquireStringInfo(const size_t), *BlobToStringInfo(const void *,const size_t), *CloneStringInfo(const StringInfo *), *ConfigureFileToStringInfo(const char *), *DestroyStringInfo(StringInfo *), *FileToStringInfo(const char *,const size_t,ExceptionInfo *), *SplitStringInfo(StringInfo *,const size_t), *StringToStringInfo(const char *); extern MagickExport unsigned char *GetStringInfoDatum(const StringInfo *); extern MagickExport void ConcatenateStringInfo(StringInfo *,const StringInfo *) magick_attribute((__nonnull__)), PrintStringInfo(FILE *file,const char *,const StringInfo *), ResetStringInfo(StringInfo *), SetStringInfo(StringInfo *,const StringInfo *), SetStringInfoDatum(StringInfo *,const unsigned char *), SetStringInfoLength(StringInfo *,const size_t), SetStringInfoPath(StringInfo *,const char *), StripString(char *); #if defined(__cplusplus) || defined(c_plusplus) } #endif #endif
feiyuren233/OpenGLTest
Includes/magick/string_.h
C
gpl-2.0
3,436
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>General Type Properties</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.74.0"> <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.TypeTraits"> <link rel="up" href="../value_traits.html" title="Type Traits that Describe the Properties of a Type"> <link rel="prev" href="primary.html" title="Categorizing a Type"> <link rel="next" href="relate.html" title="Relationships Between Two Types"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="primary.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="relate.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section" lang="en"> <div class="titlepage"><div><div><h4 class="title"> <a name="boost_typetraits.category.value_traits.properties"></a><a class="link" href="properties.html" title="General Type Properties">General Type Properties</a> </h4></div></div></div> <p> The following templates describe the general properties of a type. </p> <p> <span class="bold"><strong>Synopsis:</strong></span> </p> <pre class="programlisting"><span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/alignment_of.html" title="alignment_of">alignment_of</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_new_operator.html" title="has_new_operator">has_new_operator</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_assign.html" title="has_nothrow_assign">has_nothrow_assign</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_constructor.html" title="has_nothrow_constructor">has_nothrow_constructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_constructor.html" title="has_nothrow_constructor">has_nothrow_default_constructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_nothrow_copy.html" title="has_nothrow_copy">has_nothrow_copy_constructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_trivial_assign.html" title="has_trivial_assign">has_trivial_assign</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_trivial_constructor.html" title="has_trivial_constructor">has_trivial_constructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_trivial_constructor.html" title="has_trivial_constructor">has_trivial_default_constructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_trivial_copy.html" title="has_trivial_copy">has_trivial_copy</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_trivial_copy.html" title="has_trivial_copy">has_trivial_copy_constructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_trivial_destructor.html" title="has_trivial_destructor">has_trivial_destructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/has_virtual_destructor.html" title="has_virtual_destructor">has_virtual_destructor</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_abstract.html" title="is_abstract">is_abstract</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_const.html" title="is_const">is_const</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_empty.html" title="is_empty">is_empty</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_stateless.html" title="is_stateless">is_stateless</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_pod.html" title="is_pod">is_pod</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_polymorphic.html" title="is_polymorphic">is_polymorphic</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_signed.html" title="is_signed">is_signed</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_unsigned.html" title="is_unsigned">is_unsigned</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/is_volatile.html" title="is_volatile">is_volatile</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">=</span> <span class="number">0</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/extent.html" title="extent">extent</a><span class="special">;</span> <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="keyword">struct</span> <a class="link" href="../../reference/rank.html" title="rank">rank</a><span class="special">;</span> </pre> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2000, 2006 Adobe Systems Inc, David Abrahams, Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="primary.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../value_traits.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="relate.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
geodynamics/gale
boost/libs/type_traits/doc/html/boost_typetraits/category/value_traits/properties.html
HTML
gpl-2.0
12,279
/* * CRRCsim - the Charles River Radio Control Club Flight Simulator Project * * Copyright (C) 2005, 2006, 2007, 2008 Jan Reucker (original author) * Copyright (C) 2005-2006, 2008-2009 Jens Wilhelm Wulf * Copyright (C) 2007 Tom Willis * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307, USA. * */ // implementation of class CGUIPlaneSelectDialog #include "../global.h" #include "../aircraft.h" #include "crrc_gui_main.h" #include "crrc_planesel.h" #include "../crrc_main.h" #include "../crrc_loadair.h" #include "../mod_misc/filesystools.h" #include "../mod_misc/lib_conversions.h" #include "../mod_fdm/fdm.h" #include "../crrc_graphics.h" #include "../mod_fdm/formats/airtoxml.h" #include "../mod_fdm/xmlmodelfile.h" #include "util.h" #include <iostream> #include <sys/types.h> #include <dirent.h> #include <string> static void CGUIPlaneSelCallback(puObject *obj); static void CGUIPlaneSelCategoryCallback(puObject *obj); static void CGUIPlaneSelPlaneListCallback(puObject *obj); static void CGUIPlaneSelGraphicsCallback(puObject *obj); #define LIST_WIDGET_HEIGHT (200) #define LIST_WIDGET_WIDTH (200) #define CONF_SEL_WIDTH (200) #define PREVIEW_HEIGHT (200) #define PREVIEW_WIDTH (200) #define DESCRIPTION_HEIGHT (75) #define BUTTON_BOX_HEIGHT (2*DLG_DEF_SPACE+DLG_DEF_BUTTON_HEIGHT) //#define DEBUG_GUI CGUIPlaneSelectDialog::CGUIPlaneSelectDialog() : CRRCDialog(), cat(NULL), catList(NULL), catListSize(0), planes(NULL), planeList(NULL), planeListSize(0), gbox(NULL), optsGraphics(NULL), nOptsGraphics(0), optsGrpGraphics(NULL), cbox(NULL), optsConfig(NULL), nOptsConfig(0), optsGrpConfig(NULL), location_label(NULL) { // height of a text label int msg_height = puGetDefaultLegendFont().getStringHeight("jX") + puGetDefaultLegendFont().getStringDescender() + PUSTR_TGAP + PUSTR_BGAP; // top of the list box int top_of_listbox = BUTTON_BOX_HEIGHT + msg_height + DESCRIPTION_HEIGHT + 3*DLG_DEF_SPACE + LIST_WIDGET_HEIGHT; // the file location text label location_label = new puText(DLG_DEF_SPACE, BUTTON_BOX_HEIGHT + DESCRIPTION_HEIGHT + 2*DLG_DEF_SPACE); location_label->setLabel("File: /path/to/my/airplane.xml"); // the description box description = new puaLargeInput( DLG_DEF_SPACE, BUTTON_BOX_HEIGHT + DLG_DEF_SPACE, 4*DLG_DEF_SPACE + LIST_WIDGET_WIDTH + CONF_SEL_WIDTH + PREVIEW_WIDTH, DESCRIPTION_HEIGHT, 1, // num of arrow pairs 16, // slider width 0); // wrap text description->disableInput(); description->setText("This is a short description of the selected model."); // Use launch default check box check_usedefault = new puButton(3*DLG_DEF_SPACE + LIST_WIDGET_WIDTH, top_of_listbox - 3*DLG_DEF_BUTTON_HEIGHT - DLG_CHECK_H - 4*DLG_DEF_SPACE, 3*DLG_DEF_SPACE + LIST_WIDGET_WIDTH + DLG_CHECK_W, top_of_listbox - 3*DLG_DEF_BUTTON_HEIGHT - 4*DLG_DEF_SPACE); check_usedefault->setButtonType(PUBUTTON_VCHECK); check_usedefault->setLabelPlace(PUPLACE_CENTERED_RIGHT); check_usedefault->setLabel("Load launch default"); check_usedefault->setValue((int)cfgfile->getInt("airplane.use_default_launch", 1)); check_usedefault->greyOut(); // Graphics selection box gbox = new puaComboBox(3*DLG_DEF_SPACE + LIST_WIDGET_WIDTH, top_of_listbox - DLG_DEF_BUTTON_HEIGHT, 3*DLG_DEF_SPACE + LIST_WIDGET_WIDTH + CONF_SEL_WIDTH, top_of_listbox, optsGraphics, false); gbox->setLabelPlace(PUPLACE_TOP_LEFT); gbox->setLabel("Select graphics:"); gbox->setCurrentItem(0); gbox->setUserData(this); gbox->setCallback(CGUIPlaneSelGraphicsCallback); // Configuration selection box cbox = new puaComboBox( 3*DLG_DEF_SPACE + LIST_WIDGET_WIDTH, top_of_listbox - 3*DLG_DEF_BUTTON_HEIGHT - DLG_DEF_SPACE, 3*DLG_DEF_SPACE + LIST_WIDGET_WIDTH + CONF_SEL_WIDTH, top_of_listbox - 2*DLG_DEF_BUTTON_HEIGHT - DLG_DEF_SPACE, optsConfig, false); cbox->setLabelPlace(PUPLACE_TOP_LEFT); cbox->setLabel("Select config:"); cbox->setCurrentItem(0); // Airplane selection list planes = new puaScrListBox (DLG_DEF_SPACE, BUTTON_BOX_HEIGHT + msg_height + DESCRIPTION_HEIGHT + 3*DLG_DEF_SPACE, LIST_WIDGET_WIDTH, LIST_WIDGET_HEIGHT, NULL); planes->setLabelPlace(PUPLACE_TOP_LEFT); planes->setLabel("Select airplane:"); planes->setUserData(this); planes->setCallback(CGUIPlaneSelPlaneListCallback); // preview widget preview = new puaGLPreview ( 5*DLG_DEF_SPACE + LIST_WIDGET_WIDTH + CONF_SEL_WIDTH, BUTTON_BOX_HEIGHT + msg_height + DESCRIPTION_HEIGHT + 3*DLG_DEF_SPACE, 5*DLG_DEF_SPACE + LIST_WIDGET_WIDTH + CONF_SEL_WIDTH + PREVIEW_WIDTH, BUTTON_BOX_HEIGHT + msg_height + DESCRIPTION_HEIGHT + 3*DLG_DEF_SPACE + PREVIEW_HEIGHT); preview->setLabelPlace(PUPLACE_TOP_LEFT); preview->setLabel("Preview:"); // Airplane category selection combo box updateCategories(); cat = new puaComboBox( DLG_DEF_SPACE, BUTTON_BOX_HEIGHT + 6*DLG_DEF_SPACE + LIST_WIDGET_HEIGHT + msg_height + DESCRIPTION_HEIGHT, LIST_WIDGET_WIDTH + 10, BUTTON_BOX_HEIGHT + 6*DLG_DEF_SPACE + LIST_WIDGET_HEIGHT + msg_height + DESCRIPTION_HEIGHT + DLG_DEF_BUTTON_HEIGHT, catList, false); cat->setLabelPlace(PUPLACE_TOP_LEFT); cat->setLabel("Select category:"); cat->setCallback(CGUIPlaneSelCategoryCallback); cat->setUserData(this); cat->setCurrentItem(0); // find and highlight the current airplane SimpleXMLTransfer* ap = cfgfile->getChild("airplane"); int iCurrentGraphics = ap->attributeAsInt("graphics", 0); int iCurrentConfig = ap->attributeAsInt("config", 0); std::string sCurrentPlane = ap->getString("file", ""); if (sCurrentPlane != "") { //std::cout << "Current plane: " << sCurrentPlane << std::endl; int index = -1; for (std::vector<std::string>::size_type i = 0; i < plane_paths.size(); i++) { if (plane_paths[i] == sCurrentPlane) { index = i; break; } } if (index >= 0) { planes->setValue(index); index -= 2; if (index < 0) { index = 0; } planes->setTopItem(index); /// slider has to be adjusted, too !!!!!! updateFileInfo(); updatePreview(); gbox->setCurrentItem(iCurrentGraphics); cbox->setCurrentItem(iCurrentConfig); } } // finalize the dialog close(); setSize(LIST_WIDGET_WIDTH + CONF_SEL_WIDTH + PREVIEW_WIDTH + 6*DLG_DEF_SPACE, BUTTON_BOX_HEIGHT + LIST_WIDGET_HEIGHT + 2*DLG_DEF_BUTTON_HEIGHT + 6*DLG_DEF_SPACE + msg_height + DESCRIPTION_HEIGHT); setCallback(CGUIPlaneSelCallback); // center the dialog on screen int wwidth, wheight; int current_width = getABox()->max[0] - getABox()->min[0]; int current_height = getABox()->max[1] - getABox()->min[1]; puGetWindowSize(&wwidth, &wheight); setPosition(wwidth/2 - current_width/2, (wheight - current_height)/2); reveal(); } /** * Destroy the dialog. */ CGUIPlaneSelectDialog::~CGUIPlaneSelectDialog() { T_GUI_Util::freenames(catList, catListSize); T_GUI_Util::freenames(planeList, planeListSize); cleanUpConfigAndGraphics(); } /** * Scans all model directories for .air and .xml files * and adds their complete paths to the mfiles vector. */ void CGUIPlaneSelectDialog::createMFileList(std::vector<std::string>& filelist) { std::vector<std::string> paths; DIR *dir; struct dirent *ent; std::vector<std::string> extlist; filelist.clear(); // allowed extensions: extlist.push_back("xml"); extlist.push_back("air"); T_Config::getModelDirs(paths); for (unsigned int i = 0; i < paths.size(); i++) { if ((dir = opendir(paths[i].c_str())) == NULL) { #ifdef DEBUG_GUI std::cerr << "createMFileList(): unable to open directory " << paths[i]; std::cerr << std::endl; #endif } else { while ((ent = readdir(dir)) != NULL) { std::string tmp; bool fMatch = false; tmp = ent->d_name; for (unsigned int n=0; n<extlist.size() && fMatch == false; n++) { if (T_GUI_Util::checkExtension(tmp, extlist[n])) fMatch = true; } if (fMatch) { std::string fullpath = paths[i] + "/" + tmp; //std::cout << fullpath << std::endl; filelist.push_back(fullpath); } } closedir(dir); } } } /** * Update the list for the category combo box * */ void CGUIPlaneSelectDialog::updateCategories() { std::vector<std::string> cats; std::vector<std::string> mfiles; createMFileList(mfiles); if (catList != NULL) { T_GUI_Util::freenames(catList, catListSize); catList = NULL; catListSize = 0; } cats.push_back("All models"); for (unsigned int i = 0; i < mfiles.size(); i++) { SimpleXMLTransfer *model = NULL; try { model = new SimpleXMLTransfer(mfiles[i]); SimpleXMLTransfer *xmlcateg = model->getChild("categories"); int numcats = xmlcateg->getChildCount(); for (int k = 0; k < numcats; k++) { std::string currcat = xmlcateg->getChildAt(k)->getContentString(); bool found = false; std::vector<std::string>::iterator it = cats.begin(); it++; // Allways start behind "All models" while ((it != cats.end()) && (!found)) { int c = currcat.compare(*it); if (c == 0) { // found a duplicate found = true; } else if (c < 0) { // next item is lexicographically greater, insert // current item right here cats.insert(it, currcat); found = true; } it++; } if (!found) { // new category, lexicographically greater than all // existing categories cats.push_back(currcat); } } } catch (XMLException e) { // don't worry if child does not exist or a file isn't XML } delete model; } catList = T_GUI_Util::loadnames(cats, catListSize); } /** * Get all planes of a given category. * \param planes list of planes with complete path * \param category the selected category */ void CGUIPlaneSelectDialog::getPlanesByCategory(std::vector<std::string>& planes, std::string category) { std::vector<std::string> mfiles; planes.clear(); createMFileList(mfiles); if (category == "All models") { planes = mfiles; } else { for (unsigned int i = 0; i < mfiles.size(); i++) { SimpleXMLTransfer *model = NULL; try { model = new SimpleXMLTransfer(mfiles[i]); SimpleXMLTransfer *xmlcateg = model->getChild("categories"); int numcats = xmlcateg->getChildCount(); for (int k = 0; k < numcats; k++) { std::string currcat = xmlcateg->getChildAt(k)->getContentString(); if (currcat == category) { planes.push_back(mfiles[i]); break; } } } catch (XMLException e) { // don't worry if child does not exist or a file isn't XML } delete model; } } } /** * Update the list of planes shown in the dialog, * depending on the selected category */ void CGUIPlaneSelectDialog::updatePlaneList() { std::vector<std::string> pnames; std::vector<std::string> paths_temp; plane_paths.clear(); if (planeList != NULL) { T_GUI_Util::freenames(planeList, planeListSize); planeList = NULL; planeListSize = 0; } // get a list of all planes in the category selected by the combo box getPlanesByCategory(paths_temp, cat->getStringValue()); // walk through temporary array and copy to pnames and plane_paths, // sorted by model names for (unsigned int i = 0; i < paths_temp.size(); i++) { std::string name = getModelName(paths_temp[i]); std::vector<std::string>::iterator name_it = pnames.begin(); std::vector<std::string>::iterator path_it = plane_paths.begin(); bool found = false; while ((name_it != pnames.end()) && !found) { int c = name.compare(*name_it); if (c <= 0) { // duplicate name or next element is lexicographically greater, // insert current item here pnames.insert(name_it, name); plane_paths.insert(path_it, paths_temp[i]); found = true; } name_it++; path_it++; } if (!found) { // current item goes to the end of the list pnames.push_back(name); plane_paths.push_back(paths_temp[i]); } } // create a list of all names that can be used by the PUI widget planeList = T_GUI_Util::loadnames(pnames, planeListSize); // update the PUI listbox planes->newList(planeList); planes->setValue((int)0); planes->invokeCallback(); } /** * Get the name of an airplane model. This should be specified * in the XML file. If not, the name will be derived from the * file name. * * \param path model file with full path * \return name of the model */ std::string CGUIPlaneSelectDialog::getModelName(std::string path) { std::string name = ""; SimpleXMLTransfer *model = NULL; // first we try to read the name from the XML file try { model = new SimpleXMLTransfer(path); name = model->getChild("name.en")->getContentString(); } catch (XMLException e) { #ifdef DEBUG_GUI std::cerr << "Caught XML exception in CGUIPlaneSelectDialog::getModelName:" << std::endl; std::cerr << " " << e.what() << std::endl; std::cerr << " file " << path << std::endl; #endif } delete model; // name still empty? then we had no luck with the XML file... if (name == "") { std::string::size_type dot_index; std::string::size_type slash_index; dot_index = path.find_last_of('.'); if (dot_index == std::string::npos) { // path did not contain a dot, take everything up to the end dot_index = path.length() - 1; } slash_index = path.find_last_of('/'); if (slash_index == std::string::npos) { // path did not contain a slash, take everything from the beginning slash_index = 0; } if (slash_index >= dot_index) { // something is terribly wrong, there is a slash after the last dot! // just take the whole path and let the caller decide what to do... slash_index = 0; dot_index = path.length() -1; } name = path.substr(slash_index + 1, (dot_index - slash_index) - 1); } return name; } /** * Free the configuration and graphics selection combo boxes * and their related lists. */ void CGUIPlaneSelectDialog::cleanUpConfigAndGraphics() { if (optsGraphics != NULL) { T_GUI_Util::freenames(optsGraphics, nOptsGraphics); optsGraphics = NULL; nOptsGraphics = 0; gbox->newList(optsGraphics); } if (optsConfig != NULL) { T_GUI_Util::freenames(optsConfig, nOptsConfig); optsConfig = NULL; nOptsGraphics = 0; cbox->newList(optsGraphics); } } /** * Update the dialog if a new file is selected. * */ void CGUIPlaneSelectDialog::updateFileInfo() { // Get the currently selected item and check if the value makes sense int entry = planes->getIntegerValue(); if ((entry >= 0) && (entry < planes->getNumItems())) { // Update the location label location_label_string = "File: "; location_label_string += plane_paths[entry]; location_label->setLabel(location_label_string.c_str()); // Update the description box and launch default checkbox description_string = ""; try { SimpleXMLTransfer *model = new SimpleXMLTransfer(plane_paths[entry]); description_string = model->getChild("description.en")->getContentString(); // The test for a "launch" child shouldn't throw an exception, // so we let it create the child if the test fails and then // test for its children to see if it was a real "launch" tag SimpleXMLTransfer *launch = model->getChild("launch", true); if (launch->getChildCount() > 0) { check_usedefault->setValue((int)cfgfile->getInt("airplane.use_default_launch", 1)); check_usedefault->activate(); } else { check_usedefault->setValue(1); // always use "default" if there are no options check_usedefault->greyOut(); } delete model; } catch (XMLException e) { #ifdef DEBUG_GUI std::cerr << "Caught XML exception in CGUIPlaneSelectDialog::updateFileInfo:" << std::endl; std::cerr << " " << e.what() << std::endl; std::cerr << " file " << plane_paths[entry] << std::endl; #endif } description_string = T_GUI_Util::trimWhitespace(description_string); description_string = T_GUI_Util::breakLines(description_string, 64); description->setText(description_string.c_str()); description->setTopLineInWindow(0); // clean up the configuration option boxes cleanUpConfigAndGraphics(); // Check if there are any configuration options try { SimpleXMLTransfer* xml = new SimpleXMLTransfer(plane_paths[entry]); if (XMLModelFile::ListOptions(xml)) { optsGrpGraphics = xml->getChild("options.graphics"); optsGrpConfig = xml->getChild("options.config"); optsGraphics = T_GUI_Util::loadnames(optsGrpGraphics, nOptsGraphics, false); optsConfig = T_GUI_Util::loadnames(optsGrpConfig, nOptsConfig, false); } else { optsGraphics = (char **) malloc(2 * sizeof(char *)); optsGraphics[0] = strdup("default"); optsGraphics[1] = NULL; nOptsGraphics = 1; optsConfig = (char **) malloc(2 * sizeof(char *)); optsConfig[0] = strdup("default"); optsConfig[1] = NULL; nOptsConfig = 1; // no options optsGrpGraphics = NULL; optsGrpConfig = NULL; } gbox->newList(optsGraphics); cbox->newList(optsConfig); delete xml; } catch (XMLException e) { #ifdef DEBUG_GUI std::string msg = "Error opening airplane specification file: "; msg += plane_paths[entry]; msg += ": "; msg += e.what(); #endif } } } /** * Update the contents of the GL preview when an "interesting" change to the * ui takes palce. This is typically called from a pui callback. */ void CGUIPlaneSelectDialog::updatePreview() { SimpleXMLTransfer *xml = NULL; int graphics = 0; int entry; std::string modelFile; std::string fname; entry = planes->getIntegerValue(); if ((entry >= 0) && (entry < planes->getNumItems())) { fname = plane_paths[entry]; } if (FileSysTools::fileExists(fname)) { graphics = gbox->getCurrentItem(); try { xml = new SimpleXMLTransfer(fname); for (int i = 0; i < xml->getChildCount(); i++) { SimpleXMLTransfer *child = xml->getChildAt(i); if (!child->getName().compare("graphics") && (graphics-- == 0)) { modelFile = child->getString("model"); break; } } delete xml; } catch (XMLException e) { if (xml) { delete xml; } #ifdef DEBUG_GUI std::string msg = "Error opening airplane specification file: "; msg += fname; msg += ": "; msg += e.what(); #endif } std::string objectFile = FileSysTools::getDataPath("objects/" + modelFile); std::string texturePath = objectFile.substr(0, objectFile.length() - modelFile.length() - 1 - 7) + "textures"; #ifdef DEBUG_GUI std::cout << "updatePreview(): graphics " << graphics << ", entry " << entry << ", file " << fname << std::endl; std::cout << " model File : " << modelFile << std::endl; std::cout << " object File : " << objectFile << std::endl; std::cout << " texture Path: " << texturePath << std::endl; #endif preview->loadGeometry(objectFile.c_str(), texturePath.c_str()); } } /** * Get the selected file name and options, and put them back * into the configuration file. * * \return true if the selected file exists */ bool CGUIPlaneSelectDialog::saveSelection() const { int graphics = 0; int config = 0; std::string fname; bool bRet = false; int entry; entry = planes->getIntegerValue(); if ((entry >= 0) && (entry < planes->getNumItems())) { fname = plane_paths[entry]; } if (FileSysTools::fileExists(fname)) { graphics = gbox->getCurrentItem(); config = cbox->getCurrentItem(); #ifdef DEBUG_GUI std::cout << "saveConfigOptions(): graphics " << graphics << ", config " << config << std::endl; #endif SimpleXMLTransfer* ap = cfgfile->getChild("airplane"); ap->setAttributeOverwrite("graphics", graphics); ap->setAttributeOverwrite("config", config); ap->setAttributeOverwrite("file", fname); bRet = true; } return bRet; } /** * This callback is invoked when a category is selected from * the combo box. */ void CGUIPlaneSelCategoryCallback(puObject *obj) { CGUIPlaneSelectDialog *dlg = (CGUIPlaneSelectDialog*)obj->getUserData(); dlg->updatePlaneList(); } /** * This callback is invoked when a new plane is selected from * the file list */ void CGUIPlaneSelPlaneListCallback(puObject *obj) { CGUIPlaneSelectDialog *dlg = (CGUIPlaneSelectDialog*)obj->getUserData(); dlg->updateFileInfo(); dlg->updatePreview(); } /** * This callback is invoked when a new plane is selected from * the file list */ void CGUIPlaneSelGraphicsCallback(puObject *obj) { CGUIPlaneSelectDialog *dlg = (CGUIPlaneSelectDialog*)obj->getUserData(); dlg->updatePreview(); } /** \brief The dialog's callback. * * Determine if a plane was selected and load the new model. */ void CGUIPlaneSelCallback(puObject *obj) { CGUIPlaneSelectDialog *dlg = (CGUIPlaneSelectDialog*)obj; if (obj->getIntegerValue() == CRRC_DIALOG_OK) { // Dialog left by clicking OK if (dlg->saveSelection()) { // User selected an existing airplane, load the new model //~ std::cout << "selected: " << fname << std::endl; Global::aircraft->setModel(NULL); cfgfile->setAttributeOverwrite("airplane.use_default_launch", (dlg->getLoadLaunchDefault() == 0) ? "0" : "1"); try { loadAirplane(); // check if the user wants to load the default launch settings // for this airplane if (dlg->getLoadLaunchDefault() == 1) { // first check if there's a default at all... SimpleXMLTransfer *presets; presets = Global::aircraft->getFDMInterface()->getLaunchPresets(); if (presets != NULL) { // o.k., take the values from the first preset SimpleXMLTransfer *def_launch = presets->getChildAt(0); cfgfile->setAttributeOverwrite("launch.altitude", def_launch->getString("altitude", "0.0")); cfgfile->setAttributeOverwrite("launch.velocity_rel", def_launch->getString("velocity_rel", "0.0")); cfgfile->setAttributeOverwrite("launch.angle", def_launch->getString("angle", "0.0")); cfgfile->setAttributeOverwrite("launch.sal", def_launch->getString("sal", "0")); cfgfile->setAttributeOverwrite("launch.rel_to_player", def_launch->getString("rel_to_player", "1")); cfgfile->setAttributeOverwrite("launch.rel_front", def_launch->getString("rel_front", doubleToString(MODELSTART_REL_FRONT))); cfgfile->setAttributeOverwrite("launch.rel_right", def_launch->getString("rel_right", doubleToString(MODELSTART_REL_RIGHT))); } } initialize_flight_model(); if (Global::soundserver != (CRRCAudioServer*)0) Global::soundserver->pause(false); } catch (std::runtime_error& e) { std::string s = "Unable to load airplane file:\n"; s += e.what(); fprintf(stderr, "%s\n", s.c_str()); crrc_exit(CRRC_EXIT_FAILURE, s.c_str()); } } } Global::gui->hide(); puDeleteObject(obj); }
ajakubek/crrcsim_extensions
src/GUI/crrc_planesel.cpp
C++
gpl-2.0
26,396
/** ****************************************************************************** * @file PWR/PWR_CurrentConsumption/Inc/stm32f4xx_hal_conf.h * @author MCD Application Team * @version V1.1.0 * @date 26-June-2014 * @brief HAL configuration file. ****************************************************************************** * @attention * * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2> * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __STM32F4xx_HAL_CONF_H #define __STM32F4xx_HAL_CONF_H #ifdef __cplusplus extern "C" { #endif /* Exported types ------------------------------------------------------------*/ /* Exported constants --------------------------------------------------------*/ /* ########################## Module Selection ############################## */ /** * @brief This is the list of modules to be used in the HAL driver */ #define HAL_MODULE_ENABLED /* #define HAL_ADC_MODULE_ENABLED */ /* #define HAL_CAN_MODULE_ENABLED */ /* #define HAL_CRC_MODULE_ENABLED */ /* #define HAL_CRYP_MODULE_ENABLED */ /* #define HAL_DAC_MODULE_ENABLED */ /* #define HAL_DCMI_MODULE_ENABLED */ #define HAL_DMA_MODULE_ENABLED /* #define HAL_DMA2D_MODULE_ENABLED */ /* #define HAL_ETH_MODULE_ENABLED */ #define HAL_FLASH_MODULE_ENABLED /* #define HAL_NAND_MODULE_ENABLED */ /* #define HAL_NOR_MODULE_ENABLED */ /* #define HAL_PCCARD_MODULE_ENABLED */ /* #define HAL_SRAM_MODULE_ENABLED */ /* #define HAL_SDRAM_MODULE_ENABLED */ /* #define HAL_HASH_MODULE_ENABLED */ #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED /* #define HAL_I2S_MODULE_ENABLED */ /* #define HAL_IWDG_MODULE_ENABLED */ /* #define HAL_LTDC_MODULE_ENABLED */ #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED /* #define HAL_RNG_MODULE_ENABLED */ #define HAL_RTC_MODULE_ENABLED /* #define HAL_SAI_MODULE_ENABLED */ /* #define HAL_SD_MODULE_ENABLED */ #define HAL_SPI_MODULE_ENABLED /* #define HAL_TIM_MODULE_ENABLED */ /* #define HAL_UART_MODULE_ENABLED */ /* #define HAL_USART_MODULE_ENABLED */ /* #define HAL_IRDA_MODULE_ENABLED */ /* #define HAL_SMARTCARD_MODULE_ENABLED */ /* #define HAL_WWDG_MODULE_ENABLED */ #define HAL_CORTEX_MODULE_ENABLED /*#define HAL_PCD_MODULE_ENABLED*/ /*#define HAL_HCD_MODULE_ENABLED*/ /* ########################## HSE/HSI Values adaptation ##################### */ /** * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. * This value is used by the RCC HAL module to compute the system frequency * (when HSE is used as system clock source, directly or through the PLL). */ #if !defined (HSE_VALUE) #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ #endif /* HSE_VALUE */ #if !defined (HSE_STARTUP_TIMEOUT) #define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ #endif /* HSE_STARTUP_TIMEOUT */ /** * @brief Internal High Speed oscillator (HSI) value. * This value is used by the RCC HAL module to compute the system frequency * (when HSI is used as system clock source, directly or through the PLL). */ #if !defined (HSI_VALUE) #define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/ #endif /* HSI_VALUE */ /** * @brief Internal Low Speed oscillator (LSI) value. */ #if !defined (LSI_VALUE) #define LSI_VALUE ((uint32_t)40000) #endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz The real value may vary depending on the variations in voltage and temperature. */ /** * @brief External Low Speed oscillator (LSE) value. */ #if !defined (LSE_VALUE) #define LSE_VALUE ((uint32_t)32768) /*!< Value of the External Low Speed oscillator in Hz */ #endif /* LSE_VALUE */ /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock source * frequency, this source is inserted directly through I2S_CKIN pad. */ #if !defined (EXTERNAL_CLOCK_VALUE) #define EXTERNAL_CLOCK_VALUE ((uint32_t)12288000) /*!< Value of the Internal oscillator in Hz*/ #endif /* EXTERNAL_CLOCK_VALUE */ /* Tip: To avoid modifying this file each time you need to use different HSE, === you can define the HSE value in your toolchain compiler preprocessor. */ /* ########################### System Configuration ######################### */ /** * @brief This is the HAL system configuration section */ #define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ #define TICK_INT_PRIORITY ((uint32_t)0x0F) /*!< tick interrupt priority */ #define USE_RTOS 0 #define PREFETCH_ENABLE 1 #define INSTRUCTION_CACHE_ENABLE 1 #define DATA_CACHE_ENABLE 1 /* ########################## Assert Selection ############################## */ /** * @brief Uncomment the line below to expanse the "assert_param" macro in the * HAL drivers code */ /* #define USE_FULL_ASSERT 1 */ /* ################## Ethernet peripheral configuration ##################### */ /* Section 1 : Ethernet peripheral configuration */ /* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ #define MAC_ADDR0 2 #define MAC_ADDR1 0 #define MAC_ADDR2 0 #define MAC_ADDR3 0 #define MAC_ADDR4 0 #define MAC_ADDR5 0 /* Definition of the Ethernet driver buffers size and count */ #define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ #define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ #define ETH_RXBUFNB ((uint32_t)4) /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ #define ETH_TXBUFNB ((uint32_t)4) /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ /* Section 2: PHY configuration section */ /* DP83848 PHY Address*/ #define DP83848_PHY_ADDRESS 0x01 /* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ #define PHY_RESET_DELAY ((uint32_t)0x000000FF) /* PHY Configuration delay */ #define PHY_CONFIG_DELAY ((uint32_t)0x00000FFF) #define PHY_READ_TO ((uint32_t)0x0000FFFF) #define PHY_WRITE_TO ((uint32_t)0x0000FFFF) /* Section 3: Common PHY Registers */ #define PHY_BCR ((uint16_t)0x00) /*!< Transceiver Basic Control Register */ #define PHY_BSR ((uint16_t)0x01) /*!< Transceiver Basic Status Register */ #define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ #define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ #define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ #define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ #define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ #define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ #define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ #define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ #define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ #define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ #define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ #define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ #define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ /* Section 4: Extended PHY Registers */ #define PHY_SR ((uint16_t)0x10) /*!< PHY status register Offset */ #define PHY_MICR ((uint16_t)0x11) /*!< MII Interrupt Control Register */ #define PHY_MISR ((uint16_t)0x12) /*!< MII Interrupt Status and Misc. Control Register */ #define PHY_LINK_STATUS ((uint16_t)0x0001) /*!< PHY Link mask */ #define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ #define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ #define PHY_MICR_INT_EN ((uint16_t)0x0002) /*!< PHY Enable interrupts */ #define PHY_MICR_INT_OE ((uint16_t)0x0001) /*!< PHY Enable output interrupt events */ #define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /*!< Enable Interrupt on change of link status */ #define PHY_LINK_INTERRUPT ((uint16_t)0x2000) /*!< PHY link status interrupt mask */ /* Includes ------------------------------------------------------------------*/ /** * @brief Include module's header file */ #ifdef HAL_RCC_MODULE_ENABLED #include "stm32f4xx_hal_rcc.h" #endif /* HAL_RCC_MODULE_ENABLED */ #ifdef HAL_GPIO_MODULE_ENABLED #include "stm32f4xx_hal_gpio.h" #endif /* HAL_GPIO_MODULE_ENABLED */ #ifdef HAL_DMA_MODULE_ENABLED #include "stm32f4xx_hal_dma.h" #endif /* HAL_DMA_MODULE_ENABLED */ #ifdef HAL_CORTEX_MODULE_ENABLED #include "stm32f4xx_hal_cortex.h" #endif /* HAL_CORTEX_MODULE_ENABLED */ #ifdef HAL_ADC_MODULE_ENABLED #include "stm32f4xx_hal_adc.h" #endif /* HAL_ADC_MODULE_ENABLED */ #ifdef HAL_CAN_MODULE_ENABLED #include "stm32f4xx_hal_can.h" #endif /* HAL_CAN_MODULE_ENABLED */ #ifdef HAL_CRC_MODULE_ENABLED #include "stm32f4xx_hal_crc.h" #endif /* HAL_CRC_MODULE_ENABLED */ #ifdef HAL_CRYP_MODULE_ENABLED #include "stm32f4xx_hal_cryp.h" #endif /* HAL_CRYP_MODULE_ENABLED */ #ifdef HAL_DMA2D_MODULE_ENABLED #include "stm32f4xx_hal_dma2d.h" #endif /* HAL_DMA2D_MODULE_ENABLED */ #ifdef HAL_DAC_MODULE_ENABLED #include "stm32f4xx_hal_dac.h" #endif /* HAL_DAC_MODULE_ENABLED */ #ifdef HAL_DCMI_MODULE_ENABLED #include "stm32f4xx_hal_dcmi.h" #endif /* HAL_DCMI_MODULE_ENABLED */ #ifdef HAL_ETH_MODULE_ENABLED #include "stm32f4xx_hal_eth.h" #endif /* HAL_ETH_MODULE_ENABLED */ #ifdef HAL_FLASH_MODULE_ENABLED #include "stm32f4xx_hal_flash.h" #endif /* HAL_FLASH_MODULE_ENABLED */ #ifdef HAL_SRAM_MODULE_ENABLED #include "stm32f4xx_hal_sram.h" #endif /* HAL_SRAM_MODULE_ENABLED */ #ifdef HAL_NOR_MODULE_ENABLED #include "stm32f4xx_hal_nor.h" #endif /* HAL_NOR_MODULE_ENABLED */ #ifdef HAL_NAND_MODULE_ENABLED #include "stm32f4xx_hal_nand.h" #endif /* HAL_NAND_MODULE_ENABLED */ #ifdef HAL_PCCARD_MODULE_ENABLED #include "stm32f4xx_hal_pccard.h" #endif /* HAL_PCCARD_MODULE_ENABLED */ #ifdef HAL_SDRAM_MODULE_ENABLED #include "stm32f4xx_hal_sdram.h" #endif /* HAL_SDRAM_MODULE_ENABLED */ #ifdef HAL_HASH_MODULE_ENABLED #include "stm32f4xx_hal_hash.h" #endif /* HAL_HASH_MODULE_ENABLED */ #ifdef HAL_I2C_MODULE_ENABLED #include "stm32f4xx_hal_i2c.h" #endif /* HAL_I2C_MODULE_ENABLED */ #ifdef HAL_I2S_MODULE_ENABLED #include "stm32f4xx_hal_i2s.h" #endif /* HAL_I2S_MODULE_ENABLED */ #ifdef HAL_IWDG_MODULE_ENABLED #include "stm32f4xx_hal_iwdg.h" #endif /* HAL_IWDG_MODULE_ENABLED */ #ifdef HAL_LTDC_MODULE_ENABLED #include "stm32f4xx_hal_ltdc.h" #endif /* HAL_LTDC_MODULE_ENABLED */ #ifdef HAL_PWR_MODULE_ENABLED #include "stm32f4xx_hal_pwr.h" #endif /* HAL_PWR_MODULE_ENABLED */ #ifdef HAL_RNG_MODULE_ENABLED #include "stm32f4xx_hal_rng.h" #endif /* HAL_RNG_MODULE_ENABLED */ #ifdef HAL_RTC_MODULE_ENABLED #include "stm32f4xx_hal_rtc.h" #endif /* HAL_RTC_MODULE_ENABLED */ #ifdef HAL_SAI_MODULE_ENABLED #include "stm32f4xx_hal_sai.h" #endif /* HAL_SAI_MODULE_ENABLED */ #ifdef HAL_SD_MODULE_ENABLED #include "stm32f4xx_hal_sd.h" #endif /* HAL_SD_MODULE_ENABLED */ #ifdef HAL_SPI_MODULE_ENABLED #include "stm32f4xx_hal_spi.h" #endif /* HAL_SPI_MODULE_ENABLED */ #ifdef HAL_TIM_MODULE_ENABLED #include "stm32f4xx_hal_tim.h" #endif /* HAL_TIM_MODULE_ENABLED */ #ifdef HAL_UART_MODULE_ENABLED #include "stm32f4xx_hal_uart.h" #endif /* HAL_UART_MODULE_ENABLED */ #ifdef HAL_USART_MODULE_ENABLED #include "stm32f4xx_hal_usart.h" #endif /* HAL_USART_MODULE_ENABLED */ #ifdef HAL_IRDA_MODULE_ENABLED #include "stm32f4xx_hal_irda.h" #endif /* HAL_IRDA_MODULE_ENABLED */ #ifdef HAL_SMARTCARD_MODULE_ENABLED #include "stm32f4xx_hal_smartcard.h" #endif /* HAL_SMARTCARD_MODULE_ENABLED */ #ifdef HAL_WWDG_MODULE_ENABLED #include "stm32f4xx_hal_wwdg.h" #endif /* HAL_WWDG_MODULE_ENABLED */ #ifdef HAL_PCD_MODULE_ENABLED #include "stm32f4xx_hal_pcd.h" #endif /* HAL_PCD_MODULE_ENABLED */ #ifdef HAL_HCD_MODULE_ENABLED #include "stm32f4xx_hal_hcd.h" #endif /* HAL_HCD_MODULE_ENABLED */ /* Exported macro ------------------------------------------------------------*/ #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. * @param expr: If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. * @retval None */ #define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ void assert_failed(uint8_t* file, uint32_t line); #else #define assert_param(expr) ((void)0) #endif /* USE_FULL_ASSERT */ #ifdef __cplusplus } #endif #endif /* __STM32F4xx_HAL_CONF_H */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
matianfu/stm32f4cube13
Projects/STM32F429I-Discovery/Examples/PWR/PWR_CurrentConsumption/Inc/stm32f4xx_hal_conf.h
C
gpl-2.0
16,375
/* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** * @author: nesterone * @version: $Id: ChartComponentModel.js 47331 2014-07-18 09:13:06Z kklein $ */ define(function (require) { "use strict"; var BaseComponentModel = require("./BaseComponentModel"), jiveTypes = require("../enum/jiveTypes"), interactiveComponentTypes = require("../enum/interactiveComponentTypes"), _ = require("underscore"), reportEvents = require("../../enum/reportEvents"), reportCreators = require("../../enum/reportCreators"); return BaseComponentModel.extend({ defaults: function() { return { charttype: undefined, datetimeSupported: false, hcinstancedata: undefined, id: undefined, interactive: true, module: "jive.highcharts", type: jiveTypes.CHART, uimodule: "jive.interactive.highchart" }; }, api: { changeType: {} }, actions: { "change:charttype": function() { return { actionName: 'changeChartType', changeChartTypeData: { chartComponentUuid: this.get("id"), chartType: this.get("charttype") } } } }, initialize: function(){ if (this.has("hcinstancedata")){ var hcinstancedata = this.get("hcinstancedata"), creator = this._detectCreator(hcinstancedata); if (reportCreators.AD_HOC_DESIGNER === creator){ //workaround to stretch adhoc's delete hcinstancedata.width; delete hcinstancedata.height; } } // JSON.parse(JSON.stringify(.... deep clone. // JR services are changing model by initialization, therefore deep clone is done to avoid data corruption // should be replaced with true deep clone if JRS-1450 implemented this.config = JSON.parse(JSON.stringify(this.toJSON())); }, showTypeError: function() { this.get("uiModuleType").showTypeError(); }, changeType: function(parms) { this.trigger(reportEvents.ACTION, { actionName: 'changeChartType', changeChartTypeData: { chartComponentUuid: this.config.id, chartType: parms.type } }); }, _detectCreator: function(hcInstance){ var services = hcInstance.services, isCreatedFromAdhoc = _.some(services, function (info) { return info.service.indexOf("adhoc") != -1; }), creator; if (isCreatedFromAdhoc) { creator = reportCreators.AD_HOC_DESIGNER; } if (creator){ this.set("creator", creator); } return creator; }, toReportComponentObject: function() { if (!this.get("interactive")) { return undefined; } return { id: this.get("id"), componentType: interactiveComponentTypes.CHART, chartType: this.get("charttype"), name: this.get("name") }; }, updateFromReportComponentObject: function(obj) { this.set({ charttype: obj.chartType }); } }); });
leocockroach/JasperServer5.6
jasperserver-war/src/main/webapp/scripts/report/jive/model/ChartComponentModel.js
JavaScript
gpl-2.0
4,508
<?php $GRAPH = array ('bar'); include 'begin.php'; $display->minimalHead (); $datay=array(20,30,50,80); $datay2=array(430,645,223,690); $datazero=array(0,0,0,0); // Create the graph. $graph = new Graph(450,200); $graph->title->Set('Example with 2 scale bars'); // Setup Y and Y2 scales with some "grace" $graph->SetScale("textlin"); $graph->SetY2Scale("lin"); $graph->yaxis->scale->SetGrace(30); $graph->y2axis->scale->SetGrace(30); // Setup graph colors $graph->SetMarginColor('white'); $graph->y2axis->SetColor('darkred'); // Create the "dummy" 0 bplot $bplotzero = new BarPlot($datazero); // Create the "Y" axis group $ybplot1 = new BarPlot($datay); $ybplot1->value->Show(); $ybplot = new GroupBarPlot(array($ybplot1,$bplotzero)); // Create the "Y2" axis group $ybplot2 = new BarPlot($datay2); $ybplot2->value->Show(); $ybplot2->value->SetColor('darkred'); $ybplot2->SetFillColor('darkred'); $y2bplot = new GroupBarPlot(array($bplotzero,$ybplot2)); // Add the grouped bar plots to the graph $graph->Add($ybplot); $graph->AddY2($y2bplot); // .. and finally stroke the image back to browser $graph->Stroke(); ?>
russellchadwick/phpBaseClasses
htdocs_includes/jpgraph_examples/bar2scalesex1.php
PHP
gpl-2.0
1,128
// Copyright 2013 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. // Modified for Ishiiruka By Tino #pragma once #include <memory> #include "VideoCommon/NativeVertexFormat.h" extern const float fractionTable[32]; struct VertexLoaderParameters { u8* source; u8* destination; const TVtxDesc *VtxDesc; const VAT *VtxAttr; size_t buf_size; int vtx_attr_group; int primitive; int count; bool skip_draw; bool needloaderrefresh; }; class VertexLoaderUID { u32 vid[4]; u64 hash; size_t platformhash; public: VertexLoaderUID(const TVtxDesc& VtxDesc, const VAT& vat); bool operator < (const VertexLoaderUID &other) const; bool operator == (const VertexLoaderUID& rh) const; u64 GetHash() const; size_t GetplatformHash() const; u32 GetElement(u32 idx) const; private: u64 CalculateHash(); }; namespace std { template <> struct hash<VertexLoaderUID> { size_t operator()(const VertexLoaderUID& uid) const { return uid.GetplatformHash(); } }; } class VertexLoaderBase { public: static std::unique_ptr<VertexLoaderBase> CreateVertexLoader(const TVtxDesc &vtx_desc, const VAT &vtx_attr); virtual ~VertexLoaderBase() { m_fallback.reset(); } void SetFallback(std::unique_ptr<VertexLoaderBase>& obj) { m_fallback = std::move(obj); } VertexLoaderBase* GetFallback() { return m_fallback.get(); } virtual bool EnvironmentIsSupported() { return true; } virtual bool IsPrecompiled() { return false; } virtual s32 RunVertices(const VertexLoaderParameters &parameters) = 0; virtual bool IsInitialized() = 0; // For debugging / profiling void AppendToString(std::string *dest) const; std::string GetName() const; // per loader public state s32 m_VertexSize; // number of bytes of a raw GC vertex s32 m_native_stride; PortableVertexDeclaration m_native_vtx_decl; u32 m_native_components; // used by VertexLoaderManager NativeVertexFormat* m_native_vertex_format; u64 m_numLoadedVertices; protected: VertexLoaderBase(const TVtxDesc &vtx_desc, const VAT &vtx_attr); void InitializeVertexData(); void SetVAT(const VAT &vtx_attr); // GC vertex format TVtxAttr m_VtxAttr; // VAT decoded into easy format TVtxDesc m_VtxDesc; // Not really used currently - or well it is, but could be easily avoided. VAT m_vat; std::unique_ptr<VertexLoaderBase> m_fallback; };
ntapiam/Ishiiruka
Source/Core/VideoCommon/VertexLoaderBase.h
C
gpl-2.0
2,362
import Vue from 'vue'; import Router from 'vue-router'; import StoryManager from './views/StoryManager.vue'; import StoryView from './views/StoryView.vue'; Vue.use(Router); export default new Router({ routes: [ { path: '/', name: 'home', component: StoryManager }, { path: '/story/:story', name: 'homeStory', component: StoryView }, { path: '/story/:story/:scene', name: 'story', component: StoryView }, { path: '/about', name: 'about', // route level code-splitting // this generates a separate chunk (about.[hash].js) for this route // which is lazy-loaded when the route is visited. component: () => import(/* webpackChunkName: "about" */ './views/About.vue') } ] });
jrmi/active-story
src/router.js
JavaScript
gpl-2.0
807
<?php /** * @package ZOO Category Module * @file changelog.php * @version 2.0.0 May 2010 * @author YOOtheme http://www.yootheme.com * @copyright Copyright (C) 2007 - 2010 YOOtheme GmbH * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only */ // no direct access defined('_JEXEC') or die('Restricted access'); ?> Changelog ------------ 2.0.0 + Initial Release * -> Security Fix # -> Bug Fix $ -> Language fix or change + -> Addition ^ -> Change - -> Removed ! -> Note
alecerosiete/webBancaria
modules/mod_zoocategory/changelog.php
PHP
gpl-2.0
521
/* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.sun.webkit.dom; import org.w3c.dom.html.HTMLBaseFontElement; public class HTMLBaseFontElementImpl extends HTMLElementImpl implements HTMLBaseFontElement { HTMLBaseFontElementImpl(long peer) { super(peer); } static HTMLBaseFontElement getImpl(long peer) { return (HTMLBaseFontElement)create(peer); } // Attributes public String getColor() { return getColorImpl(getPeer()); } native static String getColorImpl(long peer); public void setColor(String value) { setColorImpl(getPeer(), value); } native static void setColorImpl(long peer, String value); public String getFace() { return getFaceImpl(getPeer()); } native static String getFaceImpl(long peer); public void setFace(String value) { setFaceImpl(getPeer(), value); } native static void setFaceImpl(long peer, String value); public String getSize() { return getSizeImpl(getPeer())+""; } native static String getSizeImpl(long peer); public void setSize(String value) { setSizeImpl(getPeer(), value); } native static void setSizeImpl(long peer, String value); }
teamfx/openjfx-8u-dev-rt
modules/web/src/main/native/Source/WebCore/bindings/java/dom3/java/com/sun/webkit/dom/HTMLBaseFontElementImpl.java
Java
gpl-2.0
2,404
! This file contains most of the subroutines used in this ! implementation of CURVES. These are contained in a single file for ! easier compilation and use. ! These routines must be called by another program: this collection ! of routines cannot be run as a program by itself. ! ******************************************************************** ! Subroutines and functions in this file are contained below: ! a2i -- character string to integer ! a2f -- character string to real (KIND=4) ! clear_string.f -- change a string to blanks ! f5090.f -- F(50,90) propagation curves ! fltc_metric.f -- field strength calculations, given location & time variables ! fzq.f -- called by fltc_metric.f ! itplbv.f -- Bivariate Interpolation Algorithm ! leftjust.f -- Left-justify a character string ! length.f -- find length of a character string ! round.f -- round A to B precision: B=1 whole no, b=.1 to tenth ! round_power.f -- round ERP & TPO per 73.212 ! stop_new_back.f -- Analyze user keyboard responses ! tvfmfs_metric -- FM, VHF & UHF NTSC F(50,50), F(50,10) propagation curves ! upper.f -- character string to upper case ! ===================================================================== ! A2I.F ! This function changes a character string to an integer, via an internal unit Function a2i(string) ! This function converts a string to an integer, via an internal unit Character *(*) string integer a2i read(string, *, end=1) a2i 1 return end ! ===================================================================== ! A2F.F ! This function changes a character string to a real, via an internal unit Function a2f(string) ! This function converts a string to an real, via an internal unit Character *(*) string real a2f, anumber read(string, *, end=1) a2f 1 return end ! =============================================================== ! CLEAR_STRING.F subroutine clear_string(string) character *(*) string integer i do i=1, (length(string)), 1 string(i:i) = '' end do return end ! ===================================================================== ! F2A.F Function f2a(number) ! This function converts a real to a string, via an internal unit ! String is left-justified Real number Character *30 f2a !maximum number of digits possible write(f2a, * ) number read(f2a, *, end=1) f2a 1 call leftjust(f2a) return end !============================================================== !============================================================== ! F5090.F ! FCC F(50,90) Digital TV propagations curves calculations subroutine f5090( erpx, haatx, ichannel, field, distance, & ichoise, flag ) ! inputs : ichannel --- input channel ! ichoise --- 1 = field strength, given distance; ! 2 = distance, given field strength. ! erpx -------- proposed erp in kW ! haatx ------ proposed haat in meters ! field --- field strength in dBu ! distance---- distance to the contour in km. ! real fs(201) ! real fs(1000) real d(201) ! real d(1000) real h(201) ! real h(1000) character*2 flag real erpx,haatx,field,distance integer ichannel, ichoise range=100.0 n_points=201 ! n_points=1000 ! if(ichannel.le.6) freq=100.0 ! channels 2-6 if(ichannel.ge.7) freq=180.0 ! channels 7-13 if(ichannel.ge.14) freq=480.0 ! channels 14 and above erp_db = 10.0 * log10(erpx) !*********************************************************************** ! if(ichoise.eq.1) then ! field strength, given distance ! d(1)=distance h(1)=haatx call fltc_metric(freq,50.0,90.0,1,d,h,fs,2) field=erp_db+fs(1) else ! distance, given field strength ! do kk=1,n_points,1 h(kk)=haatx end do d_first=1.5 ! start at 1.5 kM d_last=300.0 ! end at 300 kM do kk=1,n_points,1 d(kk)=d_first+(kk-1)*0.5 ! end do 510 continue call fltc_metric(freq,50.0,90.0,n_points,d,h,fs,2) do kk=1,n_points,1 fs(kk)=fs(kk)+erp_db end do ! check the first point if(field.gt.fs(1)) then flag='A1' ! free space equation e_volts_meter=1.0E-6*10.0**(field/20.0) distance=7.014271E-3*sqrt(erpx*1000.) ! check the last point else if(field .lt. fs(n_points)) then do i=1,n_points,1 d(i)=d(i)+range end do if(d(1).lt.d_last) then go to 510 else flag='A2' distance=0.0 endif else ! field value lies within the range do i=2,n_points,1 if(field.le.fs(i-1).and. 2 field.gt.fs(i)) then distance=(field-fs(i-1))/(fs(i)-fs(i-1))* 2 (d(i)-d(i-1))+d(i-1) if(distance.gt.d_last)then flag='A2' ! A2 = distance exceeds the greatest end if ! curve value return end if end do end if end if return end ! ================================================================= ! FLTC_METRIC.F SUBROUTINE FLTC_METRIC ( FREQ, L, T, NP, D, H, FS, UNIT ) ! !********************************************************************** ! This subroutine will calculate a field strength vs distance * ! curve for any percent of locations ( L ) and time ( T ) using * ! the FM & TV propagation curves. * ! * ! The arguments are: * ! * ! freq -- The FM or TV frequency, in MHz, input, real. * ! * ! l -- The percent of locations, input, real. * ! * ! t -- The percent of time, input, real. * ! * ! np -- The number of points to be calculated for the field * ! strength vs distance curve, input, integer. * ! * ! d -- Array of np distances at which the field is to be * ! calculated, input, real, miles or kilometers. * ! * ! h -- Array of np antenna heights above average terrain * ! ( HAAT ) corresponding to the distance values in array * ! d at which the field is to be calculated, input, real, * ! feet or meters. * ! * ! fs -- Array of calculated field strength values corresponding * ! to the requested d and h value, output, real, in * ! db above one microvolt per meter for one kilowatt erp. * ! * ! unit -- Switch that tells what the distance units are; * ! 1 = english units of feet & miles, * ! 2 = metric units of meters & kilometers. * ! Internal subroutine units are metric, therefore english * ! units are changed to metric for the calculations. * ! * ! This subroutine is derived from the original english version * ! by changing the distances to metric in the data arrays. * ! * ! ... kalagian 9-28-87 ... * !********************************************************************** ! REAL L ! INTEGER UNIT DIMENSION D50(25), H50(13), D10(31), H10(13), F55LV(25,13), & F51LV(31,13), F55HV(25,13), F51HV(31,13), F55U(25,13), & F51U(31,13),DM(1000), HF(1000), FS(1000), D(1000), & H(1000), F5050(1000), F5010(1000) D50(1)= 1.609344 D50(2)= 3.218688 D50(3)= 4.828032 D50(4)= 6.437376 D50(5)= 8.046720 D50(6)= 16.09344 D50(7)= 32.18688 D50(8)= 48.28032 D50(9)= 64.37376 D50(10)= 80.46720 D50(11)= 96.56064 D50(12)= 112.65408 D50(13)= 128.74752 D50(14)= 144.84096 D50(15)= 160.93440 D50(16)= 177.02784 D50(17)= 193.12128 D50(18)= 209.21472 D50(19)= 225.30816 D50(20)= 241.40160 D50(21)= 257.49504 D50(22)= 273.58848 D50(23)= 289.68192 D50(24)= 305.77536 D50(25)= 321.86880 ! ! D10 IN TVFMFS D10(1)=16.09344 D10(2)=32.18688 D10(3)=48.28032 D10(4)=64.37376 D10(5)=80.46720 D10(6)=96.56064 D10(7)=112.65408 D10(8)=128.74752 D10(9)=144.84096 D10(10)=160.93440 D10(11)=177.02784 D10(12)=193.12128 D10(13)=209.21472 D10(14)=225.30816 D10(15)=241.40160 D10(16)=257.49504 D10(17)=273.58848 D10(18)=289.68192 D10(19)=305.77536 D10(20)=321.86880 D10(21)=337.96224 D10(22)=354.05568 D10(23)=370.14912 D10(24)=386.24256 D10(25)=402.33600 D10(26)=418.42944 D10(27)=434.52288 D10(28)=450.61632 D10(29)=466.70976 D10(30)=482.80320 ! Distance of D10(31) added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km D10(31)=498.89644 ! ! H10, H50 IN TVFMFS H10(1)=30.48 H10(2)=60.96 H10(3)=121.92 H10(4)=182.88 H10(5)=243.84 H10(6)=304.80 H10(7)=381.00 H10(8)=457.20 H10(9)=533.40 H10(10)=609.60 H10(11)=914.40 H10(12)=1219.20 H10(13)=1524.00 H50(1)=30.48 H50(2)=60.96 H50(3)=121.92 H50(4)=182.88 H50(5)=243.84 H50(6)=304.80 H50(7)=381.00 H50(8)=457.20 H50(9)=533.40 H50(10)=609.60 H50(11)=914.40 H50(12)=1219.20 H50(13)=1524.00 ! !*********************************************************************** ! * ! F(50,50) FIELD STRENGTH DATA FOR THE LOW VHF PROPAGATION ! CURVE. (FM AND TV CHANNELS 2 THRS 6 ) * !*********************************************************************** DATA ( F55LV(1,J), J = 1, 13 ) / & 92., 98., 100.6, 101.5, 101.9, 102., 102.1, 102.2, 102.3, & 102.4, 102.5, 102.5, 102.5 / DATA ( F55LV(2,J), J = 1, 13 ) / & 79.7, 85.9, 91., 93.4, 94.6, 95., 95.6, 95.9, 96., 96.1, & 96.3, 96.5, 96.5 / DATA ( F55LV(3,J), J = 1, 13 ) / & 72.7, 79., 84.8, 87.8, 89.4, 90.4, 91.2, 91.8, 92., 92.2, & 92.5, 92.5, 92.5 / DATA ( F55LV(4,J), J = 1, 13 ) / & 67.8, 73.8, 80., 83.3, 85.4, 86.8, 87.7, 88.3, 88.9, 89.2, & 89.9, 90.1, 90.2 / DATA ( F55LV(5,J), J = 1, 13 ) / & 64., 70., 76., 79.6, 82., 83.7, 85., 85.8, 86.3, 86.7, & 87.6, 88., 88.1 / DATA ( F55LV(6,J), J = 1, 13 ) / & 52., 58., 64., 67.6, 70., 72., 73.9, 75.4, 76.7, 77.9, & 80.2, 81.3, 81.9 / DATA ( F55LV(7,J), J = 1, 13 ) / & 39.4, 45.5, 51.5, 55., 57.6, 59.6, 61.7, 63.3, 64.9, 66.2, & 70., 72.4, 74.2 / DATA ( F55LV(8,J), J = 1, 13 ) / & 31., 37., 43., 46.7, 49., 51., 53.2, 55.1, 57., 58.5, & 62.6, 65., 66.5 / DATA ( F55LV(9,J), J = 1, 13 ) / & 25.3, 29.5, 35.5, 39., 41.5, 43.6, 45.9, 47.9, 50., 51.5, & 55.4, 57.8, 59.6 / DATA ( F55LV(10,J), J = 1, 13 ) / & 20.3, 23.5, 28.8, 32., 34.4, 36.7, 39.1, 41.5, 43.5, 45., & 48.9, 51.2, 53. / DATA ( F55LV(11,J), J = 1, 13 ) / & 16.2, 18.1, 22., 25.3, 27.7, 29.9, 32., 34.4, 36.7, 38.2, & 42.5, 44.9, 46.4 / DATA ( F55LV(12,J), J = 1, 13 ) / & 12.8, 14.5, 17.1, 19.8, 22., 23.9, 26., 28.3, 30.7, 32.4, & 36.9, 39.1, 40.8 / DATA ( F55LV(13,J), J = 1, 13 ) / & 9.8, 11., 13.4, 15.2, 17., 18.8, 21., 23.2, 25.2, 27., & 31., 33.2, 35. / DATA ( F55LV(14,J), J = 1, 13 ) / & 6.9, 8.2, 10.2, 11.8, 13.1, 14.7, 16.8, 18.8, 20.4, 22., & 25.7, 28.1, 30. / DATA ( F55LV(15,J), J = 1, 13 ) / & 4., 5.5, 7.4, 8.9, 10.1, 11.5, 13.1, 14.9, 16., 17.3, & 21., 23.5, 25.5 / DATA ( F55LV(16,J), J = 1, 13 ) / & 1.5, 2.9, 4.8, 6., 7.2, 8.4, 9.9, 11.1, 12.5, 13.7, & 17.1, 19.8, 21.8 / DATA ( F55LV(17,J), J = 1, 13 ) / & -1.1, .3, 2.2, 3.7, 4.8, 5.7, 7., 8., 9.1, 10.1, & 13.6, 16.1, 18.3 / DATA ( F55LV(18,J), J = 1, 13 ) / & -3.6, -2.2, -.3, 1., 2., 3., 4.1, 5.2, 6.2, 7.1, & 10.3, 13., 15. / DATA ( F55LV(19,J), J = 1, 13 ) / & -5.8, -4.8, -3., -1.4, -.3, .6, 1.7, 2.7, 3.8, 4.6, & 7.8, 10.4, 12.4 / DATA ( F55LV(20,J), J = 1, 13 ) / & -8.1, -7., -5.2, -3.9, -2.7, -1.8, -.7, .2, 1.1, 2., & 5.1, 8., 10. / DATA ( F55LV(21,J), J = 1, 13 ) / & -10.6, -9.4, -7.6, -6.1, -5.1, -4.2, -3.2, -2.2, -1.3, -.4, & 2.8, 5.5, 7.7 / DATA ( F55LV(22,J), J = 1, 13 ) / & -13., -11.7, -10., -8.7, -7.6, -6.6, -5.6, -4.6, -3.6, -2.7, & .5, 3.1, 5.1 / DATA ( F55LV(23,J), J = 1, 13 ) / & -15.1, -14., -12.2, -11., -10., -9., -8., -7., -6.1, -5.1, & -2.1, .6, 2.8 / DATA ( F55LV(24,J), J = 1, 13 ) / & -17.2, -16.1, -14.6, -13.2, -12.1, -11.2, -10.2, -9.2, -8.4, & -7.6, -4.5, -2., .2 / DATA ( F55LV(25,J), J = 1, 13 ) / & -19.2, -18.3, -16.9, -15.6, -14.6, -13.6, -12.5, -11.6, & -10.6, -10., -6.8, -4.1, -2. / ! ! !*********************************************************************** ! * ! F(50,10) FIELD STRENGTH DATA FOR THE LOW VHF PROPAGATION ! CURVE. (FM AND TV CHANNELS 2 THRS 6 ) * !*********************************************************************** ! DATA ( F51LV(1,J), J = 1, 13 ) / & 52.2, 58.4, 64.3, 68., 70.5, 72.3, 74.2, 75.9, 77., 78.2, & 80.8, 81.8, 82.2 / DATA ( F51LV(2,J), J = 1, 13 ) / & 41.4, 47., 53., 56.5, 59., 60.9, 63., 64.8, 66.2, 67.6, & 71.2, 73.8, 75.5 / DATA ( F51LV(3,J), J = 1, 13 ) / & 36.4, 40.9, 45.9, 49., 51.7, 53.7, 56., 57.9, 59.6, 60.9, & 64.5, 67., 69. / DATA ( F51LV(4,J), J = 1, 13 ) / & 33., 36., 39.9, 43., 45.4, 47.5, 50., 52., 54., 55.2, & 58.9, 61.4, 63.3 / DATA ( F51LV(5,J), J = 1, 13 ) / & 30., 31.9, 35., 37.7, 40., 41.9, 44.4, 46.7, 48.5, 50., & 53.9, 56.3, 58.4 / DATA ( F51LV(6,J), J = 1, 13 ) / & 26.7, 28., 30.5, 32.8, 34.9, 36.8, 39.2, 41.6, 43.5, 45., & 49., 51.7, 53.5 / DATA ( F51LV(7,J), J = 1, 13 ) / & 23.5, 24.9, 26.9, 28.8, 30.4, 32., 34.9, 37.1, 39.2, 40.7, & 44.2, 46.9, 48.8 / DATA ( F51LV(8,J), J = 1, 13 ) / & 20.4, 22., 24., 25.6, 27., 28.4, 30.8, 33., 35., 36.2, & 39.8, 42., 44. / DATA ( F51LV(9,J), J = 1, 13 ) / & 17.4, 19., 20.9, 22.5, 23.9, 25., 27., 29., 30.8, 32., & 35.4, 37.8, 39.7 / DATA ( F51LV(10,J), J = 1, 13 ) / & 14.5, 16.1, 18.2, 19.8, 21., 22., 23.9, 25.5, 26.9, 28., & 31.3, 33.8, 35.7 / DATA ( F51LV(11,J), J = 1, 13 ) / & 11.5, 13.1, 15.3, 16.9, 18.2, 19.2, 20.8, 22., 23.2, 24.1, & 27.6, 30., 32.1 / DATA ( F51LV(12,J), J = 1, 13 ) / & 8.5, 10.1, 12.4, 13.9, 15.1, 16.2, 17.8, 19., 20., 21., & 24.4, 27., 29.1 / DATA ( F51LV(13,J), J = 1, 13 ) / & 5.9, 7.7, 9.8, 11., 12.3, 13.4, 14.8, 16., 17.1, 18., & 21.6, 24.1, 26.1 / DATA ( F51LV(14,J), J = 1, 13 ) / & 3., 4.9, 6.9, 8.2, 9.7, 10.7, 12., 13.2, 14.2, 15.3, & 18.9, 21.5, 23.5 / DATA ( F51LV(15,J), J = 1, 13 ) / & .6, 2., 4.1, 5.7, 6.9, 8., 9.1, 10.3, 11.6, 12.5, & 16., 18.8, 20.9 / DATA ( F51LV(16,J), J = 1, 13 ) / & -2., -.4, 1.6, 2.9, 4.1, 5.3, 6.7, 7.9, 9., 10., & 13.6, 16.1, 18. / DATA ( F51LV(17,J), J = 1, 13 ) / & -4.3, -3., -1., .3, 1.6, 2.7, 3.9, 5., 6., 7., & 10.7, 13.6, 15.7 / DATA ( F51LV(18,J), J = 1, 13 ) / & -6.6, -5.1, -3.4, -2.2, -1., 0., 1.1, 2.2, 3.3, 4.4, & 8., 10.9, 13. / DATA ( F51LV(19,J), J = 1, 13 ) / & -8.7, -7.4, -5.8, -4.6, -3.4, -2.5, -1.4, -.2, .9, 1.8, & 5.2, 8.1, 10.2 / DATA ( F51LV(20,J), J = 1, 13 ) / & -10.5, -9.4, -8., -6.9, -5.7, -4.9, -3.9, -2.8, -1.8, -.8, & 2.8, 5.3, 7.5 / DATA ( F51LV(21,J), J = 1, 13 ) / & -12.5, -11.4, -10.1, -9., -8., -7., -6., -5., -4., -3., & .3, 3., 5. / DATA ( F51LV(22,J), J = 1, 13 ) / & -14.6, -13.4, -12., -11., -10., -9., -8., -7., -6.2, -5.3, & -2., .4, 2.6 / DATA ( F51LV(23,J), J = 1, 13 ) / & -16.6, -15.5, -14.1, -13., -12., -11.2, -10.2, -9.2, -8.2, -7.4, & -4.5, -1.9, 0. / DATA ( F51LV(24,J), J = 1, 13 ) / & -18.6, -17.4, -16., -15., -14., -13.2, -12.2, -11.3, -10.5, & -9.8, -7., -4.3, -2.4 / DATA ( F51LV(25,J), J = 1, 13 ) / & -20.5, -19.3, -18., -17., -16., -15.1, -14.2, -13.3, -12.5, & -11.8, -9., -6.7, -4.6 / DATA ( F51LV(26,J), J = 1, 13 ) / & -22.4, -21.2, -19.9, -18.9, -17.9, -17., -16.2, -15.3, -14.6, & -14., -11.1, -9., -6.9 / DATA ( F51LV(27,J), J = 1, 13 ) / & -24.3, -23.2, -21.9, -20.9, -19.9, -19., -18.1, -17.2, -16.3, & -15.8, -13.2, -11., -9. / DATA ( F51LV(28,J), J = 1, 13 ) / & -26.2, -25., -23.7, -22.5, -21.7, -21., -20., -19.2, -18.4, & -17.8, -15., -12.9, -11. / DATA ( F51LV(29,J), J = 1, 13 ) / & -28.1, -27., -25.6, -24.6, -23.6, -23., -22., -21.1, -20.2, & -19.6, -17., -14.9, -13. / DATA ( F51LV(30,J), J = 1, 13 ) / & -30., -29., -27.4, -26.3, -25.4, -24.5, -23.7, -22.8, -22., & -21.4, -19., -16.9, -15. / ! Derived Interfering curve added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km DATA ( F51LV(31,J), J = 1, 13 ) / & -31.9, -31., -29.2, -28., -27.2, -26.2, -25.4, -24.5, -23.8, & -23., -21., -18.9, -17. / !*********************************************************************** ! * !F(50,50) FIELD STRENGTH DATA FOR THE HIGH VHF PROPAGATION ! CURVE ( TV CHANNELS 7 THROUGH 13 ) !*********************************************************************** ! DATA ( F55HV(1,J), J = 1, 13 ) / & 94.6, 100.7, 101.6, 101.8, 101.9, 102., 102.3, 102.3, 102.3, & 102.4, 102.4, 102.4, 102.5 / DATA ( F55HV(2,J), J = 1, 13 ) / & 82.8, 88.9, 92.3, 93.9, 94.6, 95., 95.4, 95.7, 95.9, 96., & 96.2, 96.2, 96.5 / DATA ( F55HV(3,J), J = 1, 13 ) / & 75.7, 81.8, 86.6, 88.7, 89.8, 90.5, 91.3, 91.8, 92., 92.1, & 92.6, 92.6, 92.7 / DATA ( F55HV(4,J), J = 1, 13 ) / & 70.7, 76.9, 82.2, 84.8, 86.2, 87., 88., 88.7, 89.1, 89.5, & 90., 90., 90.1 / DATA ( F55HV(5,J), J = 1, 13 ) / & 66.8, 73., 78.8, 81.6, 83.2, 84.5, 85.7, 86.3, 87., 87.3, & 88., 88., 88. / DATA ( F55HV(6,J), J = 1, 13 ) / & 55., 61., 67.2, 70.8, 73.2, 75., 77., 78.1, 79.1, 80., & 81.1, 81.8, 82. / DATA ( F55HV(7,J), J = 1, 13 ) / & 42.5, 48.6, 54.7, 58.1, 60.7, 62.5, 65., 67.6, 69.5, 71., & 73.9, 74.8, 75. / DATA ( F55HV(8,J), J = 1, 13 ) / & 34., 40., 46.1, 49.8, 52.1, 54.2, 56.7, 59., 61., 62.8, & 66.3, 67.4, 68. / DATA ( F55HV(9,J), J = 1, 13 ) / & 26.3, 32., 38.1, 41.7, 44., 46., 48.8, 51., 53.3, 55., & 58.7, 60.3, 61.1 / DATA ( F55HV(10,J), J = 1, 13 ) / & 20.7, 24.1, 30.1, 33.8, 36.1, 38., 40.9, 43.5, 46., 47.9, & 52., 53.8, 54.6 / DATA ( F55HV(11,J), J = 1, 13 ) / & 16.3, 18.5, 23., 26.2, 28.8, 30.6, 33.5, 36.3, 39., 41., & 45., 47., 48.1 / DATA ( F55HV(12,J), J = 1, 13 ) / & 12.9, 14.4, 17., 20., 22.1, 24., 26.8, 29.6, 32., 34., & 38.2, 40.6, 42. / DATA ( F55HV(13,J), J = 1, 13 ) / & 9.9, 11.2, 13.5, 15.2, 17., 18.9, 21.2, 23.9, 26., 28., & 32., 34.4, 36.1 / DATA ( F55HV(14,J), J = 1, 13 ) / & 7., 8.3, 10.5, 12., 13.7, 15., 17., 19., 21., 22.6, & 26.3, 28.8, 30.6 / DATA ( F55HV(15,J), J = 1, 13 ) / & 4.3, 5.5, 7.5, 9., 10.4, 11.5, 13.1, 14.9, 16.2, 17.5, & 21.1, 23.8, 25.5 / DATA ( F55HV(16,J), J = 1, 13 ) / & 1.5, 2.9, 4.8, 6.2, 7.5, 8.6, 10., 11.2, 12.7, 13.6, & 17., 19.8, 21.8 / DATA ( F55HV(17,J), J = 1, 13 ) / & -1., .5, 2.3, 3.7, 4.8, 5.8, 7., 8.2, 9.5, 10.5, & 14., 16.6, 18.5 / DATA ( F55HV(18,J), J = 1, 13 ) / & -3.5, -2., -.3, 1., 2.2, 3.2, 4.4, 5.5, 6.5, 7.4, & 10.7, 13.1, 15.1 / DATA ( F55HV(19,J), J = 1, 13 ) / & -5.7, -4.3, -2.7, -1.2, -.1, .9, 2., 3., 4., 4.9, & 8., 10.4, 12.3 / DATA ( F55HV(20,J), J = 1, 13 ) / & -8., -6.9, -5., -3.7, -2.5, -1.5, -.5, .6, 1.5, 2.2, & 5.6, 8.2, 10.1 / DATA ( F55HV(21,J), J = 1, 13 ) / & -10.4, -9.2, -7.3, -6., -4.9, -4., -3., -2., -1., -.2, & 3., 5.5, 7.5 / DATA ( F55HV(22,J), J = 1, 13 ) / & -12.8, -11.5, -9.8, -8.4, -7.3, -6.3, -5.3, -4.3, -3.5, -2.6, & .6, 3.1, 5.1 / DATA ( F55HV(23,J), J = 1, 13 ) / & -15., -13.8, -12., -10.7, -9.7, -8.7, -7.6, -6.6, -5.8, -5., & -1.8, .9, 2.9 / DATA ( F55HV(24,J), J = 1, 13 ) / & -17.2, -16., -14.4, -13., -12., -11., -10., -9., -8.2, -7.3, & -4.2, -1.8, .3 / DATA ( F55HV(25,J), J = 1, 13 ) / & -19.1, -18.2, -16.8, -15.5, -14.4, -13.4, -12.3, -11.3, -10.5, & -9.8, -6.6, -4., -1.9 / ! ! !*********************************************************************** ! * ! F(50,10) FIELD STRENGTH DATA FOR THE HIGH VHF PROPAGATION ! CURVE ( TV CHANNELS 7 THRS 13 ) * !*********************************************************************** ! DATA ( F51HV(1,J), J = 1, 13 ) / & 55.4, 61.6, 67.7, 71., 73.5, 75.3, 77.1, 78.6, 79.6, 80.4, & 82., 82.4, 82.5 / DATA ( F51HV(2,J), J = 1, 13 ) / & 44.4, 50., 55.8, 59.1, 61.7, 63.7, 66.5, 68.9, 70.8, 72., & 75., 75.9, 76.2 / DATA ( F51HV(3,J), J = 1, 13 ) / & 39.2, 43.5, 48.6, 52., 54.6, 56.5, 59., 61.5, 63.6, 65.2, & 68.6, 69.8, 70.2 / DATA ( F51HV(4,J), J = 1, 13 ) / & 34., 38., 42.7, 45.6, 48., 50., 52.5, 54.9, 56.9, 58.8, & 62.5, 64., 64.9 / DATA ( F51HV(5,J), J = 1, 13 ) / & 29.9, 32.5, 35.9, 38.8, 41., 43., 45.8, 48.2, 50.8, 53., & 57., 58.9, 59.8 / DATA ( F51HV(6,J), J = 1, 13 ) / & 26.6, 28.2, 31., 33.4, 35.4, 37.4, 40., 43., 45.4, 47.6, & 52., 53.8, 54.8 / DATA ( F51HV(7,J), J = 1, 13 ) / & 23.5, 25., 27., 28.9, 30.7, 32.3, 35., 37.4, 40., 42., & 46.8, 48.9, 50. / DATA ( F51HV(8,J), J = 1, 13 ) / & 20.3, 22., 24., 25.5, 27., 28.3, 30.4, 32.9, 35., 36.8, & 41.5, 43.7, 45. / DATA ( F51HV(9,J), J = 1, 13 ) / & 17.4, 19., 21., 22.4, 23.8, 25., 26.9, 28.8, 30.4, 32., & 35.8, 38.2, 40.1 / DATA ( F51HV(10,J), J = 1, 13 ) / & 14.3, 16., 18.1, 19.6, 20.8, 22., 23.5, 25., 26.4, 27.7, & 31., 33.6, 35.5 / DATA ( F51HV(11,J), J = 1, 13 ) / & 11.3, 13., 15.1, 16.7, 18., 19.1, 20.5, 22., 23., 24., & 27.6, 30., 32. / DATA ( F51HV(12,J), J = 1, 13 ) / & 8.6, 10., 12.2, 13.7, 15., 16.3, 17.6, 18.8, 19.9, 20.7, & 24., 26.8, 28.9 / DATA ( F51HV(13,J), J = 1, 13 ) / & 5.8, 7.2, 9.4, 10.8, 12., 13.3, 14.7, 15.9, 17., 18., & 21.4, 24., 26. / DATA ( F51HV(14,J), J = 1, 13 ) / & 2.9, 4.7, 6.8, 8.1, 9.5, 10.6, 12., 13., 14.1, 15.2, & 18.8, 21.2, 23.4 / DATA ( F51HV(15,J), J = 1, 13 ) / & .3, 1.9, 3.8, 5.2, 6.5, 7.8, 9., 10.3, 11.5, 12.5, & 16., 18.7, 20.7 / DATA ( F51HV(16,J), J = 1, 13 ) / & -2.1, -.7, 1.2, 2.7, 3.9, 5., 6.4, 7.5, 8.8, 9.8, & 13.1, 15.9, 18. / DATA ( F51HV(17,J), J = 1, 13 ) / & -4.4, -3.2, -1.4, 0., 1.2, 2.4, 3.7, 4.9, 6., 7., & 10.6, 13.2, 15.4 / DATA ( F51HV(18,J), J = 1, 13 ) / & -6.7, -5.4, -3.8, -2.3, -1.2, 0., 1., 2.1, 3.3, 4.3, & 7.9, 10.6, 12.8 / DATA ( F51HV(19,J), J = 1, 13 ) / & -8.9, -7.8, -6.1, -4.8, -3.8, -2.6, -1.4, -.3, .8, 1.7, & 5., 8., 10. / DATA ( F51HV(20,J), J = 1, 13 ) / & -10.8, -9.8, -8.2, -7., -6., -5., -4., -3., -2., -1., & 2.5, 5.2, 7.3 / DATA ( F51HV(21,J), J = 1, 13 ) / & -12.9, -11.8, -10.3, -9., -8.2, -7.1, -6., -5.1, -4.2, & -3.3, 0., 2.8, 4.9 / DATA ( F51HV(22,J), J = 1, 13 ) / & -14.8, -13.8, -12.3, -11.1, -10.2, -9.3, -8.2, -7.4, -6.5, & -5.6, -2.4, .2, 2.2 / DATA ( F51HV(23,J), J = 1, 13 ) / & -16.9, -15.8, -14.3, -13.1, -12.2, -11.2, -10.2, -9.4, -8.6, & -7.8, -4.7, -2., -.1 / DATA ( F51HV(24,J), J = 1, 13 ) / & -18.8, -17.7, -16.3, -15.1, -14.2, -13.3, -12.3, -11.4, -10.6, & -9.8, -6.9, -4.3, -2.4 / DATA ( F51HV(25,J), J = 1, 13 ) / & -20.7, -19.7, -18.3, -17., -16.2, -15.3, -14.3, -13.5, -12.8, & -12., -9., -6.5, -4.7 / DATA ( F51HV(26,J), J = 1, 13 ) / & -22.7, -21.4, -20.1, -19., -18., -17.2, -16.2, -15.4, -14.8, & -14., -11.1, -9., -7. / DATA ( F51HV(27,J), J = 1, 13 ) / & -24.6, -23.3, -22., -20.9, -20., -19.1, -18.2, -17.4, -16.8, & -16., -13.1, -11., -9. / DATA ( F51HV(28,J), J = 1, 13 ) / & -26.4, -25.2, -24., -22.9, -21.9, -21., -20., -19.2, -18.5, & -18., -15.1, -13., -11. / DATA ( F51HV(29,J), J = 1, 13 ) / & -28.2, -27.1, -25.9, -24.8, -23.9, -23., -22., -21.1, -20.3, & -19.6, -17., -15., -13. / DATA ( F51HV(30,J), J = 1, 13 ) / & -30.1, -29., -27.7, -26.5, -25.6, -24.9, -23.9, -23., -22.1, & -21.5, -19., -16.8, -15. / ! Derived Interfering curve added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km DATA ( F51HV(31,J), J = 1, 13) / & -32., -30.9 ,-29.5, -28.2, -27.1, -26.7, -25.8, -24.9, -23.9, & -23.4, -21., -18.6, -17. / ! !*********************************************************************** ! * ! F(50,50) FIELD STRENGTH DATA FOR THE UHF PROPAGATION CURVE ! ( TV CHANNELS 14 THROUGH 83 ) * !*********************************************************************** ! DATA ( F55U(1,J), J = 1, 13 ) / & 92., 97.9, 100.7, 101.5, 101.9, 102., 102.1, 102.2, 102.3, & 102.4, 102.5, 102.5, 102.5 / DATA ( F55U(2,J), J = 1, 13 ) / & 80., 86., 91., 93., 94.1, 94.8, 95.2, 95.6, 95.9, & 96., 96.3, 96.5, 96.5 / DATA ( F55U(3,J), J = 1, 13 ) / & 72.9, 79., 84.7, 87.4, 89., 90., 90.8, 91.3, 91.8, 92., & 92.5, 92.8, 93. / DATA ( F55U(4,J), J = 1, 13 ) / & 67.9, 74., 80., 83.3, 85.1, 86.3, 87.3, 88., 88.6, 88.9, & 89.6, 90., 90.3 / DATA ( F55U(5,J), J = 1, 13 ) / & 63.8, 70., 76., 79.5, 81.5, 82.9, 84.1, 85., 85.8, 86.2, & 87.3, 87.9, 88.1 / DATA ( F55U(6,J), J = 1, 13 ) / & 51.9, 58., 64., 67.6, 70., 72., 73.8, 75.3, 76.5, 77.2, & 79.6, 80.5, 81. / DATA ( F55U(7,J), J = 1, 13 ) / & 39., 45.2, 51.2, 54.6, 57.2, 59.1, 61., 62.6, 64., 65., & 68.2, 70., 71.1 / DATA ( F55U(8,J), J = 1, 13 ) / & 27.5, 33.5, 39.6, 43., 45.7, 48., 50.5, 52.3, 53.9, 55., & 58.4, 60.8, 62.5 / DATA ( F55U(9,J), J = 1, 13 ) / & 17.8, 22.7, 28.2, 31.5, 34.5, 37.3, 40.3, 42.7, 44.3, 45.7, & 49.4, 52.1, 54. / DATA ( F55U(10,J), J = 1, 13 ) / & 13., 16., 19.6, 22.3, 25.1, 28.3, 31.8, 34.1, 36., 37.6, & 41.7, 44.8, 46.7 / DATA ( F55U(11,J), J = 1, 13 ) / & 10.1, 11.7, 14.4, 16.8, 19.1, 21.7, 24.7, 27., 29.3, 31., & 35.4, 38.6, 41. / DATA ( F55U(12,J), J = 1, 13 ) / & 7., 8.5, 10.8, 12.5, 14.2, 16.3, 19., 21.3, 23.4, 25., & 29.8, 33., 35.7 / DATA ( F55U(13,J), J = 1, 13 ) / & 4.2, 5.5, 7.7, 9.3, 10.8, 12.4, 14.5, 16.3, 18., 19.8, & 24.5, 28., 30.8 / DATA ( F55U(14,J), J = 1, 13 ) / & 1.6, 2.8, 4.7, 6., 7.5, 8.9, 10.6, 12., 13.6, 15., & 19.8, 23.4, 26. / DATA ( F55U(15,J), J = 1, 13 ) / & -1., .2, 1.9, 3.2, 4.6, 5.7, 7.1, 8.5, 9.7, 10.8, & 15., 18.8, 21.8 / DATA ( F55U(16,J), J = 1, 13 ) / & -3.2, -2., -.4, .7, 1.9, 3., 4.3, 5.6, 6.7, 7.7, & 11.5, 14.8, 17.5 / DATA ( F55U(17,J), J = 1, 13 ) / & -5., -4.2, -2.7, -1.5, -.4, .5, 1.7, 2.8, 3.8, 4.8, & 8.2, 11.1, 13.7 / DATA ( F55U(18,J), J = 1, 13 ) / & -7.2, -6.3, -4.9, -3.8, -2.9, -2., -.9, 0., 1., 1.9, & 5., 7.8, 10. / DATA ( F55U(19,J), J = 1, 13 ) / & -9.1, -8.4, -7., -5.9, -5., -4.2, -3.2, -2.3, -1.6, -.9, & 2., 4.6, 6.7 / DATA ( F55U(20,J), J = 1, 13 ) / & -11., -10.3, -8.9, -7.9, -7., -6.1, -5.2, -4.3, -3.6, -3., & -.2, 1.9, 3.7 / DATA ( F55U(21,J), J = 1, 13 ) / & -13.1, -12.3, -10.9, -9.9, -9., -8., -7.1, -6.2, -5.5, -4.8, & -2.2, -.1, 1.7 / DATA ( F55U(22,J), J = 1, 13 ) / & -15.1, -14.2, -12.8, -11.7, -10.8, -10., -9., -8.2, -7.5, & -6.8, -4.3, -2.2, -.4 / DATA ( F55U(23,J), J = 1, 13 ) / & -17.2, -16.2, -14.8, -13.8, -12.8, -11.9, -11., -10.2, -9.5, & -8.9, -6.3, -4.2, -2.3 / DATA ( F55U(24,J), J = 1, 13 ) / & -19.3, -18.3, -16.8, -15.8, -14.8, -13.9, -13., -12.2, -11.4, & -10.8, -8.3, -6.1, -4.4 / DATA ( F55U(25,J), J = 1, 13 ) / & -21.4, -20.1, -18.7, -17.7, -16.8, -15.9, -15., -14.1, -13.2, & -12.5, -10., -8., -6.3 / ! ! !*********************************************************************** ! * ! F(50,10) FIELD STRENGTH DATA FOR THE UHF PROPAGATION CURVE ! ( TV CHANNELS 14 THRS 83 ) * !*********************************************************************** ! DATA ( F51U(1,J), J = 1, 13 ) / & 52.2, 58.3, 64.7, 68., 70.5, 72.3, 74.1, 75.4, 76.4, 77.4, & 79.5, 80.7, 81.3 / DATA ( F51U(2,J), J = 1, 13 ) / & 41.6, 46.7, 52.4, 56., 58.5, 60.3, 62.3, 63.9, 65.2, 66.2, & 69.3, 71.2, 72.6 / DATA ( F51U(3,J), J = 1, 13 ) / & 35., 38., 43., 46.3, 48.8, 50.8, 52.9, 54.9, 56.3, 57.6, & 60.9, 63., 64.5 / DATA ( F51U(4,J), J = 1, 13 ) / & 30.3, 32.1, 35.3, 37.6, 40., 42.4, 45.1, 47.1, 48.7, 50., & 53.6, 56.1, 58. / DATA ( F51U(5,J), J = 1, 13 ) / & 27., 28.3, 30.8, 32.6, 34.7, 36.7, 39., 40.8, 42.4, 43.7, & 47.7, 50.2, 52.4 / DATA ( F51U(6,J), J = 1, 13 ) / & 23.8, 25.2, 27.6, 29.1, 30.4, 32., 34.5, 36.4, 37.9, 39., & 43.1, 46., 48. / DATA ( F51U(7,J), J = 1, 13 ) / & 20.8, 22.2, 24.5, 26., 27.2, 28.4, 30.4, 32.2, 33.9, 35.1, & 39.2, 42.1, 44.3 / DATA ( F51U(8,J), J = 1, 13 ) / & 17.8, 19.3, 21.3, 23., 24.2, 25.4, 27., 28.8, 30.2, 31.7, & 35.8, 38.7, 40.7 / DATA ( F51U(9,J), J = 1, 13 ) / & 14.8, 16.5, 18.5, 20., 21.2, 22.4, 23.9, 25.2, 26.6, 27.8, & 32., 35., 37.3 / DATA ( F51U(10,J), J = 1, 13 ) / & 12., 13.4, 15.6, 17.1, 18.3, 19.7, 21., 22.1, 23.4, 24.6, & 28.3, 31.3, 33.8 / DATA ( F51U(11,J), J = 1, 13 ) / & 9.2, 10.7, 12.7, 14., 15.2, 16.5, 18., 19.3, 20.3, 21.3, & 24.9, 27.8, 30.3 / DATA ( F51U(12,J), J = 1, 13 ) / & 6.6, 8., 9.9, 11.2, 12.6, 13.8, 15.3, 16.4, 17.3, 18.3, & 21.7, 24.3, 27. / DATA ( F51U(13,J), J = 1, 13 ) / & 4., 5.1, 7.1, 8.8, 10., 11., 12.5, 13.8, 14.8, 15.7, & 18.8, 21.2, 23.7 / DATA ( F51U(14,J), J = 1, 13 ) / & 1.2, 2.5, 4.4, 6., 7.3, 8.3, 9.7, 10.9, 11.9, 12.8, & 15.9, 18.2, 20.5 / DATA ( F51U(15,J), J = 1, 13 ) / & -1.3, -.2, 1.8, 3.2, 4.6, 5.7, 7., 8.1, 9.1, 10., & 13.1, 15.5, 17.4 / DATA ( F51U(16,J), J = 1, 13 ) / & -3.8, -2.4, -.8, .8, 1.9, 3., 4.4, 5.6, 6.7, 7.6, & 10.6, 12.8, 14.7 / DATA ( F51U(17,J), J = 1, 13 ) / & -6., -4.9, -3.1, -1.7, -.5, .6, 1.8, 2.9, 3.9, 4.8, & 7.9, 10., 12. / DATA ( F51U(18,J), J = 1, 13 ) / & -8.4, -7.2, -5.5, -4.1, -3., -2., -.7, .3, 1.3, 2.1, & 5.1, 7.3, 9.2 / DATA ( F51U(19,J), J = 1, 13 ) / & -10.3, -9.3, -7.7, -6.2, -5.2, -4.3, -3.2, -2.2, -1.2, & -.4, 2.2, 4.7, 6.5 / DATA ( F51U(20,J), J = 1, 13 ) / & -12.5, -11.3, -9.8, -8.4, -7.4, -6.6, -5.4, -4.5, -3.6, -2.8, & 0., 2.1, 4. / DATA ( F51U(21,J), J = 1, 13 ) / & -14.5, -13.5, -12., -10.4, -9.6, -8.8, -7.7, -6.7, -5.8, -5., & -2.2, 0., 1.8 / DATA ( F51U(22,J), J = 1, 13 ) / & -16.5, -15.5, -14., -12.7, -11.7, -10.8, -9.8, -8.9, -7.9, & -7.1, -4.3, -2.2, -.4 / DATA ( F51U(23,J), J = 1, 13 ) / & -18.5, -17.4, -15.9, -14.6, -13.8, -13., -12., -11., -10., & -9.2, -6.6, -4.6, -2.8 / DATA ( F51U(24,J), J = 1, 13 ) / & -20.5, -19.3, -17.8, -16.5, -15.6, -14.9, -14., -13., -12.2, & -11.3, -8.9, -6.8, -5. / DATA ( F51U(25,J), J = 1, 13 ) / & -22.4, -21.3, -19.8, -18.6, -17.7, -17., -16., -15., -14.2, & -13.4, -11., -8.8, -7. / DATA ( F51U(26,J), J = 1, 13 ) / & -24.2, -23.2, -21.6, -20.4, -19.6, -18.9, -17.9, -17., -16.2, & -15.4, -13., -10.8, -9. / DATA ( F51U(27,J), J = 1, 13 ) / & -26., -25., -23.4, -22.2, -21.3, -20.8, -19.9, -19.1, -18.2, & -17.5, -15., -12.9, -11. / DATA ( F51U(28,J), J = 1, 13 ) / & -27.8, -27., -25.5, -24.2, -23.3, -22.7, -21.8, -21., -20.2, & -19.4, -17., -14.9, -13. / DATA ( F51U(29,J), J = 1, 13 ) / & -29.5, -28.5, -27.1, -26., -25., -24.4, -23.7, -22.8, -22., & -21.3, -19., -16.9, -15. / DATA ( F51U(30,J), J = 1, 13 ) / & -31., -30.1, -28.9, -27.9, -27., -26.3, -25.6, -24.8, -24., & -23.2, -21., -18.9, -16.8 / ! !! Derived Interfering curve added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km DATA ( F51U(31,J), J = 1, 13 )/ & -32.5, -31.6, -30.7, -29.8, -29.0, -28.2, -27.5, -26.8, -26.0, & -25.1, -22.9, -20.9, -18.6 / ! ! FLTC_Metric: DATA TABLE INITIALIZATION OK, CONTINUE WITH PROGRAM IF ( UNIT .EQ. 1 ) THEN DO 1 I = 1, NP DM(I) = D(I) * 1.609344 HF(I) = H(I) * .3048 1 CONTINUE ELSE IF ( UNIT .EQ. 2 ) THEN DO 2 I = 1, NP DM(I) = D(I) HF(I) = H(I) 2 CONTINUE END IF ! IF ( FREQ .LT. 108.01 ) THEN ! CALL ITPLBV ( 6, 25, 13, D50, H50, F55LV, NP, DM, HF, F5050 ) CALL ITPLBV ( 6, 31, 13, D10, H10, F51LV, NP, DM, HF, F5010 ) ! ELSE IF ( FREQ .GT. 470. ) THEN ! CALL ITPLBV ( 6, 25, 13, D50, H50, F55U, NP, DM, HF, F5050 ) CALL ITPLBV ( 6, 31, 13, D10, H10, F51U, NP, DM, HF, F5010 ) ! ELSE IF ( FREQ .GT. 108.01 .AND. FREQ .LT. 470. ) THEN ! CALL ITPLBV ( 6, 25, 13, D50, H50, F55HV, NP, DM, HF, F5050 ) CALL ITPLBV ( 6, 31, 13, D10, H10, F51HV, NP, DM, HF, F5010 ) ! END IF ! DO 3 I = 1, NP IF ( DM(I) .LT. 15. ) F5010(I) = F5050(I) 3 CONTINUE ! IF ( L .LT. 49.99 .OR. L .GT. 50.01 ) GO TO 90 IF ( T .LT. 49.99 .OR. T .GT. 50.01 ) GO TO 82 ! !*********************************************************** ! AN F(50,50) FIELD STRENGTH CURVE HAS BEEN REQUESTED * !*********************************************************** ! DO 4 I = 1, NP FS(I) = F5050(I) 4 CONTINUE RETURN ! 82 IF ( T .LT. 9.99 .OR. T .GT. 10.01 ) GO TO 90 ! !************************************************************ ! AN F(50,10) FIELD STRENGTH CURVE HAS BEEN REQUESTED * !************************************************************ ! DO 6 I = 1, NP FS(I) = F5010(I) 6 CONTINUE RETURN ! !********************************************************************* ! SOMETHING OTHER THAN 50,50 OR 50,10 HAS BEEN REQUESTED. * ! CALCULATE THE LOCATION VARABILITY AND TIME VARABILITY * !********************************************************************* ! 90 CALL FZQ ( L, ZQ ) ! SIGMA = 8.58 IF ( FREQ .GT. 470. ) SIGMA = 11.88 ! RL = ZQ * SIGMA ! CALL FZQ ( T, ZQ ) ! DO 7 I = 1, NP RT = ( F5010(I) - F5050(I) ) * ZQ / 1.28155 FS(I) = F5050(I) + RL + RT 7 CONTINUE ! RETURN END ! ====================================================================== ! FZQ.F SUBROUTINE FZQ(Q,ZQ) ! DIMENSION VGRID(115),ZGRI(58),ZGRID(115) DATA VGRID/.01,.02,.03,.04,.05,.06,.07,.08,.09,.1,.15,.2,.3,.4,.5, &.6,.7,.8,.9,1.,1.2,1.4,1.6,1.8,2.,3.,4.,5.,6.,7.,8.,9.,10.,11.,12. &,13.,14.,15.,16.,17.,18.,19.,20.,22.,24.,26.,28.,30.,32.,34.,36.,3 &8.,40.,42.,44.,46.,48.,50.,52.,54.,56.,58.,60.,62.,64.,66.,68.,70. &,72.,74.,76.,78.,80.,81.,82.,83.,84.,85.,86.,87.,88.,89.,90.,91.,9 &2.,93.,94.,95.,96.,97.,98.,98.2,98.4,98.6,98.8,99.,99.1,99.2,99.3, &99.4,99.5,99.6,99.7,99.8,99.85,99.9,99.91,99.92,99.93,99.94,99.95, &99.96,99.97,99.98,99.99/ DATA ZGRI/-3.71902,-3.54008,-3.43161,-3.35279,-3.29053,-3.23888,- &3.19465,-3.15591,-3.12139,-3.09023,-2.96774,-2.87816,-2.74778,-2.6 &5207,-2.57583,-2.51214,-2.45726,-2.40892,-2.36562,-2.32635,-2.2571 &3,-2.19729,-2.14441,-2.09693,-2.05375,-1.88079,-1.75069,-1.64485,- &1.55477,-1.47579,-1.40507,-1.34076,-1.28155,-1.22653,-1.17499,-1.1 &2639,-1.08032,-1.03643,-.99446,-.95416,-.91537,-.8779,-.84162,-.77 &219,-.7063,-.64335,-.58284,-.5244,-.4677,-.41246,-.35846,-.30548,- &.25335,-.20189,-.15097,-.10043,-.05015,0.0/ ! DO 5 I=1, 57 ZGRID( I ) = -ZGRI( I ) ZGRID( I + 58 ) = ZGRI( 58 - I ) 5 CONTINUE ZGRID( 58 ) = ZGRI( 58 ) DO 10 I = 1, 115 IF( VGRID( I ) .LT. Q ) GO TO 10 PERC = ( Q - VGRID(I-1) )/( VGRID(I)-VGRID(I-1) ) ZQ = ZGRID( I-1 ) + PERC * ( ZGRID(I) - ZGRID(I-1) ) RETURN ! 10 CONTINUE WRITE( 6, 100 ) 100 FORMAT( 1X, 23HERROR IN SUBROUTINE FZQ ) RETURN END ! ================================================================== ! ITPLBV.F SUBROUTINE ITPLBV ( IU, LX, LY, X, Y, Z, N, U, V, W ) ! ! ! Subroutine by: ! ! Akima, Hiroshi, "Algorithm 474, Bivariate Interpolation ! and Smooth Surface Fitting Based on Local Procedures"; ! COMMUNICATIONS OF THE ACM, January 1974, Volume 17, ! Number 1. Copyright 1974, Association for Computing ! Machinery, Inc. General permission to republish, but not ! for profit, all or part of this material is granted by ! permission of the Association for Computing Machinery ! providing that ACM'S copyright notice is given and that ! reference is made to the publication, and to its date ! of issue. ! !********************************************************************* ! ! See OCE Report "Field Strength Calculation for TV and FM ! Broadcasting (Computer Program TVFMFS)", FCC/OCE RS76-01, ! January 1976. ! DIMENSION X(LX), Y(LY), Z(LX,LY), U(N), V(N), W(N) DIMENSION ZA(5,2), ZB(2,5), ZAB(3,3), ZX(4,4), ZY(4,4), ZXY(4,4) ! ! EQUIVALENCE ( Z3A1, ZA(1) ), ( Z3A2, ZA(2) ), ( Z3A3, ZA(3) ), ! & ( Z3A4, ZA(4) ), ( Z3A5, ZA(5) ), ( Z4A1, ZA(6) ), ! & ( Z4A2, ZA(7) ), ( Z4A3, ZA(8) ), ( Z4A4, ZA(9) ), ! & ( Z4A5, ZA(10) ), ( Z3B1, ZB(1) ), ( Z3B2, ZB(3) ), ! & ( Z3B3, ZB(5) ), ( Z3B4, ZB(7) ), ( Z3B5, ZB(9) ), ! & ( Z4B1, ZB(2) ), ( Z4B2, ZB(4) ), ( Z4B3, ZB(6) ), ! & ( Z4B4, ZB(8) ), ( Z4B5, ZB(10) ), ( ZA2B2, ZAB(1) ), ! & ( ZA3B2, ZAB(2) ), ( ZA4B2, ZAB(3) ), ! & ( ZA2B3, ZAB(4) ), ( ZA3B3, ZAB(5) ), ! & ( ZA4B3, ZAB(6) ), ( ZA2B4, ZAB(7) ), ! & ( ZA3B4, ZAB(8) ), ( ZA4B4, ZAB(9) ), ! & ( ZX33, ZX(6) ), ( ZX43, ZX(7) ), ( ZX34, ZX(10) ), ! & ( ZX44, ZX(11) ), ( ZY33, ZY(6) ), ( ZY43, ZY(7) ), ! & ( ZY34, ZY(10) ), ( ZY44, ZY(11) ), ( ZXY33, ZXY(6) ), ! & ( ZXY43, ZXY(7) ), ( ZXY34, ZXY(10) ), ! & ( ZXY44, ZXY(11) ), ( P00, Z33 ), ( P01, ZY33 ), ! & ( P10, ZX33 ), ( P11, ZXY33 ) ! ! EQUIVALENCE ( LX0, ZX(1) ), ( LXM1, ZX(4) ), ( LXM2, ZX(13) ), ! & ( LXP1, ZX(16) ), ( LY0, ZY(1) ), ( LYM1, ZY(4) ), ! & ( LYM2, ZY(13) ), ( LYP1, ZY(16) ), ( IX, ZXY(1) ), ! & ( IY, ZXY(4) ), ( IXPV, ZXY(13) ), ( IYPV, ZXY(16) ), ! & ( IMN, JX ), ( IMX, JY ), ( JXM2, JX1 ), ! & ( JYM2, JY1 ), ( UK, DX ), ( VK, DY ), ! & ( A1, A5, B1, B5, ZX(2), A, Q0 ), ! & ( A2, ZX(5), B, Q1 ), ( A4, ZX(8), C, Q2 ), ! & ( B2, ZY(2), D, Q3 ), ( B4, ZY(14), E ), ! & ( X2, ZX(3), A3SQ ), ( X4, ZX(9) ), ( X5, ZX(12) ), ! & ( Y2, ZX(14) ), ( Y4, ZY(3), B3SQ ), ! & ( Y5, ZX(15), P02 ), ( Z23, ZY(5), P03 ), ! & ( Z24, ZY(8), P12 ), ( Z32, ZY(9), P13 ), ! & ( Z34, ZY(12), P20 ), ( Z35, ZY(15), P21 ), ! & ( Z42, ZXY(2), P22 ), ( Z43, ZXY(5), P23 ), ! & ( Z44, ZXY(3), P30 ), ( Z45, ZXY(8), P31 ), ! & ( Z53, ZXY(9), P32 ), ( Z54, ZXY(12), P33 ), ! & ( W2, WY2, W4 ), ( W3, WY3, W1, W5 ), ! & ( WX2, ZXY(14) ), ( WX3, ZXY(15) ) ! EQUIVALENCE (Z3A1, ZA(1,1)), (Z3A2, ZA(2,1)), (Z3A3, ZA(3,1)) EQUIVALENCE (Z3A4, ZA(4,1)), (Z3A5, ZA(5,1)) EQUIVALENCE (Z4A1, ZA(1,2)), (Z4A2, ZA(2,2)), (Z4A3, ZA(3,2)) EQUIVALENCE (Z4A4, ZA(4,2)), (Z4A5, ZA(5,2)) EQUIVALENCE (Z3B1, ZB(1,1)), (Z3B2, ZB(1,2)), (Z3B3, ZB(1,3)) EQUIVALENCE (Z3B4, ZB(1,4)), (Z3B5, ZB(1,5)) EQUIVALENCE (Z4B1, ZB(2,1)), (Z4B2, ZB(2,2)), (Z4B3, ZB(2,3)) EQUIVALENCE (Z4B4, ZB(2,4)), (Z4B5, ZB(2,5)) EQUIVALENCE (ZA2B2, ZAB(1,1)), (ZA3B2, ZAB(2,1)) EQUIVALENCE (ZA4B2, ZAB(3,1)) EQUIVALENCE (ZA2B3, ZAB(1,2)), (ZA3B3, ZAB(2,2)) EQUIVALENCE (ZA4B3, ZAB(3,2)) EQUIVALENCE (ZA2B4, ZAB(1,3)), (ZA3B4, ZAB(2,3)) EQUIVALENCE (ZA4B4, ZAB(3,3)) EQUIVALENCE (ZX33, ZX(2,2)), (ZX43, ZX(3,2)) EQUIVALENCE (ZX34, ZX(2,3)), (ZX44, ZX(3,3)) EQUIVALENCE (ZY33, ZY(2,2)), (ZY43, ZY(3,2)) EQUIVALENCE (ZY34, ZY(2,3)), (ZY44, ZY(3,3)) EQUIVALENCE (ZXY33, ZXY(2,2)), (ZXY43, ZXY(3,2)) EQUIVALENCE (ZXY34, ZXY(2,3)), (ZXY44, ZXY(3,3)) EQUIVALENCE (LX0, ZX(1,1)), (LXM1, ZX(4,1)) EQUIVALENCE (LXM2, ZX(1,4)), (LXP1, ZX(4,4)) EQUIVALENCE (LY0, ZY(1,1)), (LYM1, ZY(4,1)) EQUIVALENCE (LYM2, ZY(1,4)), (LYP1, ZY(4,4)) EQUIVALENCE (IX, ZXY(1,1)), (IY, ZXY(4,1)) EQUIVALENCE (IXPV, ZXY(1,4)), (IYPV, ZXY(4,4)) EQUIVALENCE (P00, Z33), (P01, ZY33), (P10, ZX33), (P11, ZXY33) * EQUIVALENCE (JXM2, JX1), (JYM2, JY1) EQUIVALENCE (IMN, JX), (IMX, JY) EQUIVALENCE (UK, DX), (VK, DY) EQUIVALENCE (A1, A5, B1, B5, ZX(2,1), A, Q0) EQUIVALENCE (A2, ZX(1,2), B, Q1), (A4, ZX(4,2), C, Q2) EQUIVALENCE (X2, ZX(3,1), A3SQ), (X4, ZX(1,3)) EQUIVALENCE (X5, ZX(4,3)), (Y5, ZX(3,4), P02) EQUIVALENCE (Y2, ZX(2,4)), (Y4, ZY(3,1), B3SQ) EQUIVALENCE (B2, ZY(2,1), D, Q3), (B4, ZY(2,4), E) EQUIVALENCE (W2, WY2, W4), (W3, WY3, W1, W5) EQUIVALENCE (WX2, ZXY(2,4)) EQUIVALENCE (WX3, ZXY(3,4)) EQUIVALENCE (Z23, ZY(1,2), P03) EQUIVALENCE (Z24, ZY(4,2), P12) EQUIVALENCE (Z32, ZY(1,3), P13) EQUIVALENCE (Z34, ZY(4,3), P20) EQUIVALENCE (Z35, ZY(3,4), P21) EQUIVALENCE (Z42, ZXY(2,1), P22) EQUIVALENCE (Z43, ZXY(1,2), P23) EQUIVALENCE (Z44, ZXY(3,1), P30) EQUIVALENCE (Z45, ZXY(4,2), P31) EQUIVALENCE (Z53, ZXY(1,3), P32) EQUIVALENCE (Z54, ZXY(4,3), P33) EQUIVALENCE (W2, WY2, W4) EQUIVALENCE (W3, WY3, W1, W5) EQUIVALENCE (WX2, ZXY(2,4)) EQUIVALENCE (WX3, ZXY(3,4)) ! IU0 = IU LX0 = LX LXM1 = LX0 - 1 LXM2 = LXM1 - 1 LXP1 = LX0 + 1 LY0 = LY LYM1 = LY0 - 1 LYM2 = LYM1 - 1 LYP1 = LY0 + 1 N0 = N ! IF ( LXM2 .LT. 0 ) GO TO 710 IF ( LYM2 .LT. 0 ) GO TO 720 IF ( N0 .LT. 1 ) GO TO 730 ! DO 10 IX = 2, LX0 IF ( X(IX-1) - X(IX) ) 10, 740, 750 10 CONTINUE ! DO 20 IY = 2, LY0 IF ( Y(IY-1) - Y(IY) ) 20, 770, 780 20 CONTINUE ! IXPV = 0 IYPV = 0 ! DO 700 K = 1, N0 ! UK = U(K) VK = V(K) ! IF ( LXM2 .EQ. 0 ) GO TO 80 IF ( UK .GE. X(LX0) ) GO TO 70 IF ( UK .LT. X(1) ) GO TO 60 ! IMN = 2 IMX = LX0 30 IX = ( IMN + IMX ) / 2 IF ( UK .GE. X(IX) ) GO TO 40 IMX = IX GO TO 50 ! 40 IMN = IX + 1 50 IF ( IMX .GT. IMN ) GO TO 30 IX = IMX GO TO 90 ! 60 IX = 1 GO TO 90 ! 70 IX = LXP1 GO TO 90 ! 80 IX = 2 90 IF ( LYM2 .EQ. 0 ) GO TO 150 IF ( VK .GE. Y(LY0) ) GO TO 140 IF ( VK .LT. Y(1) ) GO TO 130 ! IMN = 2 IMX = LY0 100 IY = ( IMN + IMX ) / 2 IF ( VK .GE. Y(IY) ) GO TO 110 IMX = IY GO TO 120 ! 110 IMN = IY + 1 120 IF ( IMX .GT. IMN ) GO TO 100 IY = IMX GO TO 160 ! 130 IY = 1 GO TO 160 ! 140 IY = LYP1 GO TO 160 ! 150 IY = 2 160 IF ( IX .EQ. IXPV .AND. & IY .EQ. IYPV ) GO TO 690 ! IXPV = IX IYPV = IY JX = IX IF ( JX .EQ. 1 ) JX = 2 IF ( JX .EQ. LXP1 ) JX = LX0 ! JY = IY IF ( JY .EQ. 1 ) JY = 2 IF ( JY .EQ. LYP1 ) JY = LY0 ! JXM2 = JX - 2 JXML = JX - LX0 JYM2 = JY - 2 JYML = JY - LY0 ! X3 = X(JX-1) X4 = X(JX) A3 = 1.0 / ( X4 - X3 ) ! Y3 = Y(JY-1) Y4 = Y(JY) B3 = 1.0 / ( Y4 - Y3 ) ! Z33 = Z(JX-1,JY-1) Z43 = Z(JX,JY-1) Z34 = Z(JX-1,JY) Z44 = Z(JX,JY) ! Z3A3 = ( Z43 - Z33 ) * A3 Z4A3 = ( Z44 - Z34 ) * A3 Z3B3 = ( Z34 - Z33 ) * B3 Z4B3 = ( Z44 - Z43 ) * B3 ZA3B3 = ( Z4B3 - Z3B3 ) * A3 ! IF ( LXM2 .EQ. 0 ) GO TO 230 IF ( JXM2 .EQ. 0 ) GO TO 170 ! X2 = X(JX-2) A2 = 1.0 / ( X3 - X2 ) ! Z23 = Z(JX-2,JY-1) Z24 = Z(JX-2,JY) Z3A2 = ( Z33 - Z23 ) * A2 Z4A2 = ( Z34 - Z24 ) * A2 IF ( JXML .EQ. 0 ) GO TO 180 ! 170 X5 = X(JX+1) A4 = 1.0 / ( X5 - X4 ) Z53 = Z(JX+1,JY-1) Z54 = Z(JX+1,JY) Z3A4 = ( Z53 - Z43 ) * A4 Z4A4 = ( Z54 - Z44 ) * A4 IF ( JXM2 .NE. 0 ) GO TO 190 ! Z3A2 = Z3A3 + Z3A3 - Z3A4 Z4A2 = Z4A3 + Z4A3 - Z4A4 GO TO 190 ! 180 Z3A4 = Z3A3 + Z3A3 - Z3A2 Z4A4 = Z4A3 + Z4A3 - Z4A2 ! 190 ZA2B3 = ( Z4A2 - Z3A2 ) * B3 ZA4B3 = ( Z4A4 - Z3A4 ) * B3 IF ( JX .LE. 3 ) GO TO 200 ! A1 = 1.0 / ( X2 -X(JX-3) ) Z3A1 = ( Z23 - Z(JX-3,JY-1) ) * A1 Z4A1 = ( Z24 - Z(JX-3,JY) ) * A1 GO TO 210 ! 200 Z3A1 = Z3A2 + Z3A2 - Z3A3 Z4A1 = Z4A2 + Z4A2 - Z4A3 210 IF ( JX .GE. LXM1 ) GO TO 220 ! A5 = 1.0 / ( X(JX+2) - X5 ) Z3A5 = ( Z(JX+2,JY-1) - Z53 ) * A5 Z4A5 = ( Z(JX+2,JY) - Z54 ) * A5 GO TO 240 ! 220 Z3A5 = Z3A4 + Z3A4 - Z3A3 Z4A5 = Z4A4 + Z4A4 - Z4A3 GO TO 240 ! 230 Z3A2 = Z3A3 Z4A2 = Z4A3 GO TO 180 ! 240 IF ( LYM2 .EQ. 0 ) GO TO 310 IF ( JYM2 .EQ. 0 ) GO TO 250 ! Y2 = Y(JY-2) B2 = 1.0 / ( Y3 - Y2 ) Z32 = Z(JX-1,JY-2) Z42 = Z(JX,JY-2) Z3B2 = ( Z33 - Z32 ) * B2 Z4B2 = ( Z43 - Z42 ) * B2 IF ( JYML .EQ. 0 ) GO TO 260 ! 250 Y5 = Y(JY+1) B4 = 1.0 / ( Y5 - Y4 ) Z35 = Z(JX-1,JY+1) Z45 = Z(JX,JY+1) Z3B4 = ( Z35 - Z34 ) * B4 Z4B4 = ( Z45 - Z44 ) * B4 IF ( JYM2 .NE. 0 ) GO TO 270 ! Z3B2 = Z3B3 + Z3B3 - Z3B4 Z4B2 = Z4B3 + Z4B3 - Z4B4 GO TO 270 ! 260 Z3B4 = Z3B3 + Z3B3 - Z3B2 Z4B4 = Z4B3 + Z4B3 - Z4B2 270 ZA3B2 = ( Z4B2 - Z3B2 ) * A3 ZA3B4 = ( Z4B4 - Z3B4 ) * A3 IF ( JY .LE. 3 ) GO TO 280 ! B1 = 1.0 / ( Y2 - Y(JY-3) ) Z3B1 = ( Z32 - Z(JX-1,JY-3) ) * B1 Z4B1 = ( Z42 - Z(JX,JY-3) ) * B1 GO TO 290 ! 280 Z3B1 = Z3B2 + Z3B2 - Z3B3 Z4B1 = Z4B2 + Z4B2 - Z4B3 290 IF ( JY .GE. LYM1 ) GO TO 300 ! B5 = 1.0 / ( Y(JY+2) - Y5 ) Z3B5 = ( Z(JX-1,JY+2) - Z35 ) * B5 Z4B5 = ( Z(JX,JY+2) - Z45 ) * B5 GO TO 320 ! 300 Z3B5 = Z3B4 + Z3B4 - Z3B3 Z4B5 = Z4B4 + Z4B4 - Z4B3 GO TO 320 ! 310 Z3B2 = Z3B3 Z4B2 = Z4B3 GO TO 260 ! 320 IF ( LXM2 .EQ. 0 ) GO TO 400 IF ( LYM2 .EQ. 0 ) GO TO 410 IF ( JXML .EQ. 0 ) GO TO 350 IF ( JYM2 .EQ. 0 ) GO TO 330 ! ZA4B2 = ( ( Z53 - Z(JX+1,JY-2) ) * B2 - Z4B2 ) * A4 IF ( JYML .EQ. 0 ) GO TO 340 ! 330 ZA4B4 = ( ( Z(JX+1,JY+1) - Z54 ) * B4 - Z4B4 ) * A4 IF ( JYM2 .NE. 0 ) GO TO 380 ! ZA4B2 = ZA4B3 + ZA4B3 - ZA4B4 GO TO 380 ! 340 ZA4B4 = ZA4B3 + ZA4B3 - ZA4B2 GO TO 380 ! 350 IF ( JYM2 .EQ. 0 ) GO TO 360 ! ZA2B2 = ( Z3B2 - ( Z23 - Z(JX-2,JY-2) ) * B2 ) * A2 IF ( JYML .EQ. 0 ) GO TO 370 ! 360 ZA2B4 = ( Z3B4 - ( Z(JX-2,JY+1) - Z24 ) * B4 ) * A2 IF ( JYM2 .NE. 0 ) GO TO 390 ! ZA2B2 = ZA2B3 + ZA2B3 - ZA2B4 GO TO 390 ! 370 ZA2B4 = ZA2B3 + ZA2B3 - ZA2B2 GO TO 390 ! 380 IF ( JXM2 .NE. 0 ) GO TO 350 ! ZA2B2 = ZA3B2 + ZA3B2 - ZA4B2 ZA2B4 = ZA3B4 + ZA3B4 - ZA4B4 GO TO 420 ! 390 IF ( JXML .NE. 0 ) GO TO 420 ! ZA4B2 = ZA3B2 + ZA3B2 - ZA2B2 ZA4B4 = ZA3B4 + ZA3B4 - ZA2B4 GO TO 420 ! 400 ZA2B2 = ZA3B2 ZA4B2 = ZA3B2 ZA2B4 = ZA3B4 ZA4B4 = ZA3B4 GO TO 420 ! 410 ZA2B2 = ZA2B3 ZA2B4 = ZA2B3 ZA4B2 = ZA4B3 ZA4B4 = ZA4B3 ! 420 DO 480 JY = 2, 3 ! DO 470 JX = 2, 3 ! W2 = ABS ( ZA(JX+2,JY-1) - ZA(JX+1,JY-1) ) W3 = ABS ( ZA(JX,JY-1) - ZA(JX-1,JY-1) ) SW = W2 + W3 IF ( SW .LT. .0000001 ) GO TO 430 ! WX2 = W2 / SW WX3 = W3 / SW GO TO 440 ! 430 WX2 = 0.5 WX3 = 0.5 440 ZX(JX,JY) = WX2 * ZA(JX,JY-1) + WX3 * ZA(JX+1,JY-1) W2 = ABS ( ZB(JX-1,JY+2) - ZB(JX-1,JY+1) ) W3 = ABS ( ZB(JX-1,JY) - ZB(JX-1,JY-1) ) SW = W2 + W3 IF ( SW .LT. .0000001 ) GO TO 450 ! WY2 = W2 / SW WY3 = W3 / SW GO TO 460 ! 450 WY2 = 0.5 WY3 = 0.5 460 ZY(JX,JY) = WY2 * ZB(JX-1,JY) + WY3 * ZB(JX-1,JY+1) ZXY(JX,JY) = WY2 * ( WX2 * ZAB(JX-1,JY-1) + WX3 * & ZAB(JX,JY-1) ) + WY3 * ( WX2 * & ZAB(JX-1,JY) + WX3 * ZAB(JX,JY) ) ! 470 CONTINUE ! 480 CONTINUE ! IF ( IX .EQ. LXP1 ) GO TO 530 IF ( IX .NE. 1 ) GO TO 590 ! W2 = A4 * ( 3.0 * A3 +A4 ) W1 = 2.0 * A3 * ( A3 - A4 ) + W2 ! DO 500 JY = 2, 3 ! ZX(1,JY) = ( W1 * ZA(1,JY-1) + W2 * ZA(2,JY-1) ) / (W1+W2) ZY(1,JY) = ZY(2,JY) + ZY(2,JY) - ZY(3,JY) ZXY(1,JY) = ZXY(2,JY) + ZXY(2,JY) - ZXY(3,JY) ! DO 490 JX1 = 2, 3 ! JX = 5 - JX1 ZX(JX,JY) = ZX(JX-1,JY) ZY(JX,JY) = ZY(JX-1,JY) ZXY(JX,JY) = ZXY(JX-1,JY) ! 490 CONTINUE ! 500 CONTINUE ! X3 = X3 - 1.0 / A4 Z33 = Z33 -Z3A2 / A4 ! DO 510 JY = 1, 5 ZB(2,JY) = ZB(1,JY) 510 CONTINUE ! DO 520 JY = 2, 4 ZB(1,JY) = ZB(1,JY) - ZAB(1,JY-1) / A4 520 CONTINUE ! A3 = A4 JX = 1 GO TO 570 ! 530 W4 = A2 * ( 3.0 * A3 + A2 ) W5 = 2.0 * A3 * ( A3 - A2 ) + W4 ! DO 550 JY = 2, 3 ! ZX(4,JY) = ( W4 * ZA(4,JY-1) + W5 * ZA(5,JY-1) ) / (W4+W5) ZY(4,JY) = ZY(3,JY) + ZY(3,JY) - ZY(2,JY) ZXY(4,JY) = ZXY(3,JY) + ZXY(3,JY) - ZXY(2,JY) ! DO 540 JX = 2, 3 ! ZX(JX,JY) = ZX(JX+1,JY) ZY(JX,JY) = ZY(JX+1,JY) ZXY(JX,JY) = ZXY(JX+1,JY) ! 540 CONTINUE ! 550 CONTINUE ! X3 = X4 Z33 = Z43 DO 560 JY = 1, 5 ZB(1,JY) = ZB(2,JY) 560 CONTINUE ! A3 = A2 JX = 3 570 ZA(3,1) = ZA(JX+1,1) DO 580 JY = 1, 3 ZAB(2,JY) = ZAB(JX,JY) 580 CONTINUE 590 IF ( IY .EQ. LYP1 ) GO TO 630 IF ( IY .NE. 1 ) GO TO 680 ! W2 = B4 * ( 3.0 * B3 + B4 ) W1 = 2.0 * B3 * ( B3 - B4 ) + W2 ! DO 620 JX = 2, 3 ! IF ( JX .EQ. 3 .AND. IX .EQ. LXP1 ) GO TO 600 IF ( JX .EQ. 2 .AND. IX .EQ. 1 ) GO TO 600 ! ZY(JX,1) = ( W1 * ZB(JX-1,1) + W2 * ZB(JX-1,2) ) / (W1+W2) ZX(JX,1) = ZX(JX,2) + ZX(JX,2) - ZX(JX,3) ZXY(JX,1) = ZXY(JX,2) + ZXY(JX,2) - ZXY(JX,3) ! 600 DO 610 JY1 = 2, 3 ! JY = 5 - JY1 ZY(JX,JY) = ZY(JX,JY-1) ZX(JX,JY) = ZX(JX,JY-1) ZXY(JX,JY) = ZXY(JX,JY-1) ! 610 CONTINUE ! 620 CONTINUE ! Y3 = Y3 - 1.0 / B4 Z33 = Z33 - Z3B2 / B4 Z3A3 = Z3A3 - ZA3B2 / B4 Z3B3 = Z3B2 ZA3B3 = ZA3B2 B3 = B4 GO TO 670 ! 630 W4 = B2 * ( 3.0 * B3 + B2 ) W5 = 2.0 * B3 * ( B3 - B2 ) + W4 ! DO 660 JX = 2, 3 ! IF ( JX .EQ. 3 .AND. IX .EQ. LXP1 ) GO TO 640 IF ( JX .EQ. 2 .AND. IX .EQ. 1 ) GO TO 640 ! ZY(JX,4) = ( W4 * ZB(JX-1,4) + W5 * ZB(JX-1,5) ) / (W4+W5) ZX(JX,4) = ZX(JX,3) + ZX(JX,3) - ZX(JX,2) ZXY(JX,4) = ZXY(JX,3) + ZXY(JX,3) - ZXY(JX,2) ! 640 DO 650 JY = 2, 3 ! ZY(JX,JY) = ZY(JX,JY+1) ZX(JX,JY) = ZX(JX,JY+1) ZXY(JX,JY) = ZXY(JX,JY+1) ! 650 CONTINUE ! 660 CONTINUE ! Y3 = Y4 Z33 = Z33 + Z3B3 / B3 Z3A3 = Z3A3 + ZA3B3 / B3 Z3B3 = Z3B4 ZA3B3 = ZA3B4 B3 = B2 670 IF ( IX .NE. 1 .AND. IX .NE. LXP1 ) GO TO 680 ! JX = IX / LXP1 + 2 JX1 = 5 - JX JY = IY / LYP1 + 2 JY1 = 5 - JY ZX(JX,JY) = ZX(JX1,JY) + ZX(JX,JY1) - ZX(JX1,JY1) ZY(JX,JY) = ZY(JX1,JY) + ZY(JX,JY1) - ZY(JX1,JY1) ZXY(JX,JY) = ZXY(JX1,JY) + ZXY(JX,JY1) - ZXY(JX1,JY1) ! 680 ZX3B3 = ( ZX34 - ZX33 ) * B3 ZX4B3 = ( ZX44 - ZX43 ) * B3 ZY3A3 = ( ZY43 - ZY33 ) * A3 ZY4A3 = ( ZY44 - ZY34 ) * A3 ! A = ZA3B3 - ZX3B3 - ZY3A3 + ZXY33 B = ZX4B3 - ZX3B3 - ZXY43 + ZXY33 C = ZY4A3 - ZY3A3 - ZXY34 + ZXY33 D = ZXY44 - ZXY43 - ZXY34 + ZXY33 ! E = A + A - B - C ! A3SQ = A3 * A3 B3SQ = B3 * B3 ! P02 = ( 2.0 * ( Z3B3 - ZY33 ) + Z3B3 - ZY34 ) * B3 P03 = ( -2.0 * Z3B3 + ZY34 + ZY33 ) * B3SQ ! P12 = ( 2.0 * ( ZX3B3 - ZXY33 ) + ZX3B3 - ZXY34 ) * B3 P13 = ( -2.0 * ZX3B3 + ZXY34 + ZXY33 ) * B3SQ ! P20 = ( 2.0 * ( Z3A3 - ZX33 ) + Z3A3 - ZX43 ) * A3 P21 = ( 2.0 * ( ZY3A3 - ZXY33 ) + ZY3A3 - ZXY43 ) * A3 ! P22 = ( 3.0 * ( A + E ) + D ) * A3 * B3 P23 = ( -3.0 * E - B - D ) * A3 * B3SQ ! P30 = ( -2.0 * Z3A3 + ZX43 + ZX33 ) * A3SQ P31 = ( -2.0 * ZY3A3 + ZXY43 + ZXY33 ) * A3SQ ! P32 = ( -3.0 * E - C - D ) * B3 * A3SQ P33 = ( D + E + E ) * A3SQ * B3SQ ! 690 DY = VK - Y3 Q0 = P00 + DY * ( P01 + DY * ( P02 + DY * P03 ) ) Q1 = P10 + DY * ( P11 + DY * ( P12 + DY * P13 ) ) Q2 = P20 + DY * ( P21 + DY * ( P22 + DY * P23 ) ) Q3 = P30 + DY * ( P31 + DY * ( P32 + DY * P33 ) ) ! DX = UK - X3 W(K) = Q0 + DX * ( Q1 + DX * ( Q2 + DX * Q3 ) ) ! 700 CONTINUE ! RETURN 710 WRITE ( IU0, 9999 ) GOTO 800 ! 720 WRITE ( IU0, 9998 ) GOTO 800 ! 730 WRITE ( IU0, 9997 ) GOTO 800 ! 740 WRITE ( IU0, 9996 ) GOTO 760 ! 750 WRITE ( IU0, 9995 ) 760 WRITE ( IU0, 9994 ) IX, X(IX) GOTO 800 ! 770 WRITE ( IU0, 9993 ) GOTO 790 ! 780 WRITE ( IU0, 9992 ) 790 WRITE ( IU0, 9991 ) IY, Y(IY) 800 WRITE ( IU0, 9990 ) LX0, LY0, N0 ! RETURN ! 9999 FORMAT ( 1X / 22H LX = 1 OR LESS. / ) 9998 FORMAT ( 1X / 22H LY = 1 OR LESS. / ) 9997 FORMAT ( 1X / 21H N = 0 OR LESS. / ) 9996 FORMAT ( 1X / 26H IDENTICAL X VALUES. / ) 9995 FORMAT ( 1X / 32H X VALUES OUT OF SEQUENCE. / ) 9994 FORMAT ( 7H IX =, I6, 10X, 7HX(IX) =, E12.3 ) 9993 FORMAT ( 1X / 26H IDENTICAL Y VALUES. / ) 9992 FORMAT ( 1X / 32H Y VALUES OUT OF SEQUENCE. / ) 9991 FORMAT ( 7H IY =, I6, 10X, 7HY(IY) =, E12.3 ) 9990 FORMAT ( 7H LX =, I6, 10X, 4HLY =, I6, 10X, 3HN =, I7 / & 15H ERROR DETECTED, 20HIN ROUTINE ITPLBV ) ! END ! ====================================================================== ! LEFTJUST.F subroutine leftjust (string) ! ! Subroutine by John Boursy, July 1980. ! ! This subroutine is designed to left-justify a string of ! characters. A blank string is treated as though it is already ! left-justified. ! ! Here is a description of the argument: ! ! string -- input/output; character; the string to be left- ! justified, on input; the left-justified string, ! on output. ! ! ****************************************************************** ! ! The following statement is the first statement. ! ! ****************************************************************** ! character *(*) string if (string.eq.' ') return ! don't do anything if all spaces if (string(1:1).ne.' ') return ! already left-justified len_string=len(string) ! length of the string do 100 loop=1,len_string,1 ! look for 1st non-blank char. if (string(loop:loop).ne.' ') go to 200 100 continue ! We should never have a normal termination of this do loop, but if ! we do, it means the string is all blanks, so we return. return 200 continue ! we have now found the first non-blank characterc non_blank=len_string-loop+1 string(1:non_blank)=string(loop:len_string) string(non_blank+1:len_string)=' ' return end ! ======================================================================= ! LENGTH.F: ! ! Function by John Boursy, January 1984. ! ! This function receives a character string, and returns its length ! as an integer. Note: this is different from the intrinsic LEN ! function in FORTRAN. This function LENGTH returns the length of ! the string out to the last non-blank character, while LEN returns ! the entire length of the string (including blanks). ! function length(string) ! character string*(*) ! length = len(string) ! move back from end of string do 100 loop = length, 1, -1 if (string(loop:loop) .ne. ' ') goto 200 100 continue ! completely blank string length = 0 ! return 200 continue length = loop return end ! ========================================================================== ! ROUND.F SUBROUTINE ROUND(A,B) ! !..THIS SUBROUTINE ROUNDS ANY FLOATING POINT NUMBER ,A, TO THE !..NEAREST DECIMAL PLACE INDICATED BY ,B, FOR EXAMPLE; !.. B=1. ROUNDS A TO THE NEAREST WHOLE NUMBER !.. B=.1 ROUNDS A TO THE NEAREST TENTH ! A = A/B A = ANINT(A) A = A*B RETURN END ! ======================================================================= ! ROUND_POWER.F: ! !*********************************************************************** ! SUBROUTINE ROUND_POWER ( POWER_IN, POWER_OUT, ERROR_FLAG ) ! !*********************************************************************** ! ! This subroutine will round the power in accordance with the FCC ! Rules section 73.212. ! ! POWER_IN = Unrounded power in Watts or kilowatts; real; input. ! POWER_OUT = Rounded power in Watts or kilowatts; real; output. ! ERROR_FLAG = 0; no errors; integer; output. ! = 1; Input power is less than minimum allowed, ! POWER_OUT set equal to POWER_IN. ! = 2; Input power greater than maximum allowed, ! POWER_OUT set equal to POWER_IN. ! ! ...kalagian...11/3/86... ! !*********************************************************************** ! REAL POWER_IN, POWER_OUT ! INTEGER ERROR_FLAG ! ERROR_FLAG = 0 POWER_OUT = POWER_IN + 0.00001 ! IF ( POWER_IN .LT. 0.01 ) THEN ! ERROR_FLAG = 1 ! ELSE IF ( POWER_IN .GE. 0.01 .AND. POWER_IN .LT. 0.03 ) THEN ! CALL ROUND ( POWER_OUT, .0005 ) ! ELSE IF ( POWER_IN .GE. 0.03 .AND. POWER_IN .LT. 0.1 ) THEN ! CALL ROUND ( POWER_OUT, .001 ) ! ELSE IF ( POWER_IN .GE. 0.1 .AND. POWER_IN .LT. 0.3 ) THEN ! CALL ROUND ( POWER_OUT, .005 ) ! ELSE IF ( POWER_IN .GE. 0.3 .AND. POWER_IN .LT. 1.0 ) THEN ! CALL ROUND ( POWER_OUT, .01 ) ! ELSE IF ( POWER_IN .GE. 1.0 .AND. POWER_IN .LT. 3.0 ) THEN ! CALL ROUND ( POWER_OUT, .05 ) ! ELSE IF ( POWER_IN .GE. 3.0 .AND. POWER_IN .LT. 10.0 ) THEN ! CALL ROUND ( POWER_OUT, 0.1 ) ! ELSE IF ( POWER_IN .GE. 10.0 .AND. POWER_IN .LT. 30.0 ) THEN ! CALL ROUND ( POWER_OUT, 0.5 ) ! ELSE IF ( POWER_IN .GE. 30.0 .AND. POWER_IN .LT. 100.0 ) THEN ! CALL ROUND ( POWER_OUT, 1.0 ) ! ELSE IF ( POWER_IN .GE. 100. .AND. POWER_IN .LT. 300. ) THEN ! CALL ROUND ( POWER_OUT, 5.0 ) ! ELSE IF ( POWER_IN .GE. 300. .AND. POWER_IN .LE. 1000. ) THEN ! CALL ROUND ( POWER_OUT, 10.0 ) ! ELSE IF ( POWER_IN .GT. 1000. ) THEN ! ERROR_FLAG = 2 ! END IF ! RETURN END * *********************************************************************** * SUBROUTINE STOP_NEW_BACK ( STRING, *, *, * ) * *********************************************************************** * * * THIS SUBROUTINE DETERMINES IF STRING CONTAINS "STOP", "NEW", OR * * "BACK" . A RETURN IS TREATED AS "STOP". * * * * NORMAL RETURN IF STRING IS NOT "STOP" "NEW" OR "BACK" * * * * 1ST ABNORMAL RETURN IF STRING IS "STOP" OR "S" * * 2ND " " " " " "NEW" OR "N" * * 3RD " " " " " "BACK" OR "B" * * * * ...KALAGIAN...4/19/85... * * * *********************************************************************** * CHARACTER*(*) STRING CALL upper(string) * IF ( STRING .EQ. 'STOP' .OR. & STRING .EQ. 'S' .OR. & STRING .EQ. ' ' ) RETURN 1 * IF ( STRING .EQ. 'NEW' .OR. & STRING .EQ. 'N' ) RETURN 2 * IF ( STRING .EQ. 'BACK' .OR. & STRING .EQ. 'B' ) RETURN 3 * RETURN END ! ======================================================================= ! ======================================================================= ! TVFMFS_METRIC.F: ! ! ! * ! BASED ON "FIELD STRENGTH CALCULATIONS FOR TV AND FM ! ! BROADCASTING", BY GARY S. KALAGIAN, REPORT NO. RS 76-01, * ! JANUARY 1976. * ! MODIFIED BY GARY KALAGIAN TO CONVERT TO METRIC UNITS ! ! * ! * ! FOLLOWING IS A DESCRIPTION OF THE ARGUMENTS: * ! * ! ERP -- EFFECTIVE RADIATED POWER, IN KILOWATTS * ! * ! HAAT -- ANTENNA HEIGHT ABOVE AVERAGE TERRAIN, IN METERS ! ! * ! CHANNEL -- FM OR TV CHANNEL NUMBER * ! * ! FIELD -- FIELD STRENGTH DBU, INPUT OR OUTPUT, DEPENDS ON ! ! VALUE OF SWITCH * ! * ! DISTANCE -- DISTANCE TO ARGUMENT "FIELD", IN KILOMETERS, INPUT ! ! OR OUTPUT, DEPENDS ON VALUE OF SWITCH * ! * ! SWITCH -- 1 MEANS "FIELD" IS COMPUTED AT THE INPUT VALUE * ! FOR "DISTANCE". * ! * ! 2 MEANS "DISTANCE" TO THE INPUT VALUE OF "FIELD" * ! IS COMPUTED. * ! * ! CURVE -- 0 MEANS F(50,50) FIELD STRENGTH CURVES ARE USED. * ! * ! 1 MEANS F(50,10) FIELD STRENGTH CURVES ARE USED. * ! * ! FLAG -- A TWO CHARACTER ERROR CODE, VALUES ARE: * ! * ! 'A1' = FREE SPACE EQUATION USED TO FIND REQUESTED * ! ARGUMENT. * ! * ! 'A2' = DISTANCE EXCEEDS GREATEST VALUE ON CURVES. * ! * ! 'A3' = INVALID CHANNEL NUMBER. * ! * ! 'A4' = INVALID CURVE SELECTED. * ! * ! 'A5' = INVALID SWITCH VALUE. * ! * ! 'A6' = ERP LESS THAN OR EQUAL TO 0 KILOWATTS. * ! * ! 'A7' = HAAT LESS THAN 30 METERS, SET TO 30 METERS. * ! * ! 'A8' = HAAT EXCEEDS 1600 METERS, SET TO 1600 METERS. * ! * ! 'A9' = INVALID "DISTANCE" VALUE FOR SWITCH = 1. * ! * ! ' ' = NORMAL RETURN. * ! * !*********************************************************************** ! subroutine tvfmfs_metric(erp, haat, channel, field, distance, &switch, curve, flag) real range parameter (range = 100.) real delta parameter (delta = 0.5) integer*4 n_points parameter (n_points = 201) integer*4 id50 parameter (id50 = 25) integer*4 ih50 parameter (ih50 = 13) integer*4 id10 parameter (id10 = 31) ! integer*4 ih10 parameter (ih10 = 13) ! dimension d50(id50), h50(ih50), d10(id10), h10(ih10), f55lv(id50, &ih50), f51lv(id10, ih10), f55hv(id50, ih50), f51hv(id10, ih10), &f55u(id50, ih50), f51u(id10, ih10), d(n_points), h(n_points), f( &n_points) ! character flag*2 ! integer channel, switch, curve, curve_2 ! ! ! ************************************************** ! TVFMFS: SET UP TVFMFS ARRAYS. ! D50 IN TVFMFS D50(1)= 1.609344 D50(2)= 3.218688 D50(3)= 4.828032 D50(4)= 6.437376 D50(5)= 8.046720 D50(6)= 16.09344 D50(7)= 32.18688 D50(8)= 48.28032 D50(9)= 64.37376 D50(10)= 80.46720 D50(11)= 96.56064 D50(12)= 112.65408 D50(13)= 128.74752 D50(14)= 144.84096 D50(15)= 160.93440 D50(16)= 177.02784 D50(17)= 193.12128 D50(18)= 209.21472 D50(19)= 225.30816 D50(20)= 241.40160 D50(21)= 257.49504 D50(22)= 273.58848 D50(23)= 289.68192 D50(24)= 305.77536 D50(25)= 321.86880 ! ! D10 IN TVFMFS D10(1)=16.09344 D10(2)=32.18688 D10(3)=48.28032 D10(4)=64.37376 D10(5)=80.46720 D10(6)=96.56064 D10(7)=112.65408 D10(8)=128.74752 D10(9)=144.84096 D10(10)=160.93440 D10(11)=177.02784 D10(12)=193.12128 D10(13)=209.21472 D10(14)=225.30816 D10(15)=241.40160 D10(16)=257.49504 D10(17)=273.58848 D10(18)=289.68192 D10(19)=305.77536 D10(20)=321.86880 D10(21)=337.96224 D10(22)=354.05568 D10(23)=370.14912 D10(24)=386.24256 D10(25)=402.33600 D10(26)=418.42944 D10(27)=434.52288 D10(28)=450.61632 D10(29)=466.70976 D10(30)=482.80320 ! Distance of D10(31) added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km D10(31)=498.89644 ! ! H10, H50 IN TVFMFS H10(1)=30.48 H10(2)=60.96 H10(3)=121.92 H10(4)=182.88 H10(5)=243.84 H10(6)=304.80 H10(7)=381.00 H10(8)=457.20 H10(9)=533.40 H10(10)=609.60 H10(11)=914.40 H10(12)=1219.20 H10(13)=1524.00 H50(1)=30.48 H50(2)=60.96 H50(3)=121.92 H50(4)=182.88 H50(5)=243.84 H50(6)=304.80 H50(7)=381.00 H50(8)=457.20 H50(9)=533.40 H50(10)=609.60 H50(11)=914.40 H50(12)=1219.20 H50(13)=1524.00 ! ! !*********************************************************************** ! * ! F(50,50) FIELD STRENGTH DATA FOR THE LOW VHF PROPAGATION ! CURVE. (FM AND TV CHANNELS 2 THRS 6 ) * !*********************************************************************** DATA ( F55LV(1,J), J = 1, 13 ) / & 92., 98., 100.6, 101.5, 101.9, 102., 102.1, 102.2, 102.3, & 102.4, 102.5, 102.5, 102.5 / DATA ( F55LV(2,J), J = 1, 13 ) / & 79.7, 85.9, 91., 93.4, 94.6, 95., 95.6, 95.9, 96., 96.1, & 96.3, 96.5, 96.5 / DATA ( F55LV(3,J), J = 1, 13 ) / & 72.7, 79., 84.8, 87.8, 89.4, 90.4, 91.2, 91.8, 92., 92.2, & 92.5, 92.5, 92.5 / DATA ( F55LV(4,J), J = 1, 13 ) / & 67.8, 73.8, 80., 83.3, 85.4, 86.8, 87.7, 88.3, 88.9, 89.2, & 89.9, 90.1, 90.2 / DATA ( F55LV(5,J), J = 1, 13 ) / & 64., 70., 76., 79.6, 82., 83.7, 85., 85.8, 86.3, 86.7, & 87.6, 88., 88.1 / DATA ( F55LV(6,J), J = 1, 13 ) / & 52., 58., 64., 67.6, 70., 72., 73.9, 75.4, 76.7, 77.9, & 80.2, 81.3, 81.9 / DATA ( F55LV(7,J), J = 1, 13 ) / & 39.4, 45.5, 51.5, 55., 57.6, 59.6, 61.7, 63.3, 64.9, 66.2, & 70., 72.4, 74.2 / DATA ( F55LV(8,J), J = 1, 13 ) / & 31., 37., 43., 46.7, 49., 51., 53.2, 55.1, 57., 58.5, & 62.6, 65., 66.5 / DATA ( F55LV(9,J), J = 1, 13 ) / & 25.3, 29.5, 35.5, 39., 41.5, 43.6, 45.9, 47.9, 50., 51.5, & 55.4, 57.8, 59.6 / DATA ( F55LV(10,J), J = 1, 13 ) / & 20.3, 23.5, 28.8, 32., 34.4, 36.7, 39.1, 41.5, 43.5, 45., & 48.9, 51.2, 53. / DATA ( F55LV(11,J), J = 1, 13 ) / & 16.2, 18.1, 22., 25.3, 27.7, 29.9, 32., 34.4, 36.7, 38.2, & 42.5, 44.9, 46.4 / DATA ( F55LV(12,J), J = 1, 13 ) / & 12.8, 14.5, 17.1, 19.8, 22., 23.9, 26., 28.3, 30.7, 32.4, & 36.9, 39.1, 40.8 / DATA ( F55LV(13,J), J = 1, 13 ) / & 9.8, 11., 13.4, 15.2, 17., 18.8, 21., 23.2, 25.2, 27., & 31., 33.2, 35. / DATA ( F55LV(14,J), J = 1, 13 ) / & 6.9, 8.2, 10.2, 11.8, 13.1, 14.7, 16.8, 18.8, 20.4, 22., & 25.7, 28.1, 30. / DATA ( F55LV(15,J), J = 1, 13 ) / & 4., 5.5, 7.4, 8.9, 10.1, 11.5, 13.1, 14.9, 16., 17.3, & 21., 23.5, 25.5 / DATA ( F55LV(16,J), J = 1, 13 ) / & 1.5, 2.9, 4.8, 6., 7.2, 8.4, 9.9, 11.1, 12.5, 13.7, & 17.1, 19.8, 21.8 / DATA ( F55LV(17,J), J = 1, 13 ) / & -1.1, .3, 2.2, 3.7, 4.8, 5.7, 7., 8., 9.1, 10.1, & 13.6, 16.1, 18.3 / DATA ( F55LV(18,J), J = 1, 13 ) / & -3.6, -2.2, -.3, 1., 2., 3., 4.1, 5.2, 6.2, 7.1, & 10.3, 13., 15. / DATA ( F55LV(19,J), J = 1, 13 ) / & -5.8, -4.8, -3., -1.4, -.3, .6, 1.7, 2.7, 3.8, 4.6, & 7.8, 10.4, 12.4 / DATA ( F55LV(20,J), J = 1, 13 ) / & -8.1, -7., -5.2, -3.9, -2.7, -1.8, -.7, .2, 1.1, 2., & 5.1, 8., 10. / DATA ( F55LV(21,J), J = 1, 13 ) / & -10.6, -9.4, -7.6, -6.1, -5.1, -4.2, -3.2, -2.2, -1.3, -.4, & 2.8, 5.5, 7.7 / DATA ( F55LV(22,J), J = 1, 13 ) / & -13., -11.7, -10., -8.7, -7.6, -6.6, -5.6, -4.6, -3.6, -2.7, & .5, 3.1, 5.1 / DATA ( F55LV(23,J), J = 1, 13 ) / & -15.1, -14., -12.2, -11., -10., -9., -8., -7., -6.1, -5.1, & -2.1, .6, 2.8 / DATA ( F55LV(24,J), J = 1, 13 ) / & -17.2, -16.1, -14.6, -13.2, -12.1, -11.2, -10.2, -9.2, -8.4, & -7.6, -4.5, -2., .2 / DATA ( F55LV(25,J), J = 1, 13 ) / & -19.2, -18.3, -16.9, -15.6, -14.6, -13.6, -12.5, -11.6, & -10.6, -10., -6.8, -4.1, -2. / ! ! !*********************************************************************** ! * ! F(50,10) FIELD STRENGTH DATA FOR THE LOW VHF PROPAGATION ! CURVE. (FM AND TV CHANNELS 2 THRS 6 ) * !*********************************************************************** ! DATA ( F51LV(1,J), J = 1, 13 ) / & 52.2, 58.4, 64.3, 68., 70.5, 72.3, 74.2, 75.9, 77., 78.2, & 80.8, 81.8, 82.2 / DATA ( F51LV(2,J), J = 1, 13 ) / & 41.4, 47., 53., 56.5, 59., 60.9, 63., 64.8, 66.2, 67.6, & 71.2, 73.8, 75.5 / DATA ( F51LV(3,J), J = 1, 13 ) / & 36.4, 40.9, 45.9, 49., 51.7, 53.7, 56., 57.9, 59.6, 60.9, & 64.5, 67., 69. / DATA ( F51LV(4,J), J = 1, 13 ) / & 33., 36., 39.9, 43., 45.4, 47.5, 50., 52., 54., 55.2, & 58.9, 61.4, 63.3 / DATA ( F51LV(5,J), J = 1, 13 ) / & 30., 31.9, 35., 37.7, 40., 41.9, 44.4, 46.7, 48.5, 50., & 53.9, 56.3, 58.4 / DATA ( F51LV(6,J), J = 1, 13 ) / & 26.7, 28., 30.5, 32.8, 34.9, 36.8, 39.2, 41.6, 43.5, 45., & 49., 51.7, 53.5 / DATA ( F51LV(7,J), J = 1, 13 ) / & 23.5, 24.9, 26.9, 28.8, 30.4, 32., 34.9, 37.1, 39.2, 40.7, & 44.2, 46.9, 48.8 / DATA ( F51LV(8,J), J = 1, 13 ) / & 20.4, 22., 24., 25.6, 27., 28.4, 30.8, 33., 35., 36.2, & 39.8, 42., 44. / DATA ( F51LV(9,J), J = 1, 13 ) / & 17.4, 19., 20.9, 22.5, 23.9, 25., 27., 29., 30.8, 32., & 35.4, 37.8, 39.7 / DATA ( F51LV(10,J), J = 1, 13 ) / & 14.5, 16.1, 18.2, 19.8, 21., 22., 23.9, 25.5, 26.9, 28., & 31.3, 33.8, 35.7 / DATA ( F51LV(11,J), J = 1, 13 ) / & 11.5, 13.1, 15.3, 16.9, 18.2, 19.2, 20.8, 22., 23.2, 24.1, & 27.6, 30., 32.1 / DATA ( F51LV(12,J), J = 1, 13 ) / & 8.5, 10.1, 12.4, 13.9, 15.1, 16.2, 17.8, 19., 20., 21., & 24.4, 27., 29.1 / DATA ( F51LV(13,J), J = 1, 13 ) / & 5.9, 7.7, 9.8, 11., 12.3, 13.4, 14.8, 16., 17.1, 18., & 21.6, 24.1, 26.1 / DATA ( F51LV(14,J), J = 1, 13 ) / & 3., 4.9, 6.9, 8.2, 9.7, 10.7, 12., 13.2, 14.2, 15.3, & 18.9, 21.5, 23.5 / DATA ( F51LV(15,J), J = 1, 13 ) / & .6, 2., 4.1, 5.7, 6.9, 8., 9.1, 10.3, 11.6, 12.5, & 16., 18.8, 20.9 / DATA ( F51LV(16,J), J = 1, 13 ) / & -2., -.4, 1.6, 2.9, 4.1, 5.3, 6.7, 7.9, 9., 10., & 13.6, 16.1, 18. / DATA ( F51LV(17,J), J = 1, 13 ) / & -4.3, -3., -1., .3, 1.6, 2.7, 3.9, 5., 6., 7., & 10.7, 13.6, 15.7 / DATA ( F51LV(18,J), J = 1, 13 ) / & -6.6, -5.1, -3.4, -2.2, -1., 0., 1.1, 2.2, 3.3, 4.4, & 8., 10.9, 13. / DATA ( F51LV(19,J), J = 1, 13 ) / & -8.7, -7.4, -5.8, -4.6, -3.4, -2.5, -1.4, -.2, .9, 1.8, & 5.2, 8.1, 10.2 / DATA ( F51LV(20,J), J = 1, 13 ) / & -10.5, -9.4, -8., -6.9, -5.7, -4.9, -3.9, -2.8, -1.8, -.8, & 2.8, 5.3, 7.5 / DATA ( F51LV(21,J), J = 1, 13 ) / & -12.5, -11.4, -10.1, -9., -8., -7., -6., -5., -4., -3., & .3, 3., 5. / DATA ( F51LV(22,J), J = 1, 13 ) / & -14.6, -13.4, -12., -11., -10., -9., -8., -7., -6.2, -5.3, & -2., .4, 2.6 / DATA ( F51LV(23,J), J = 1, 13 ) / & -16.6, -15.5, -14.1, -13., -12., -11.2, -10.2, -9.2, -8.2, -7.4, & -4.5, -1.9, 0. / DATA ( F51LV(24,J), J = 1, 13 ) / & -18.6, -17.4, -16., -15., -14., -13.2, -12.2, -11.3, -10.5, & -9.8, -7., -4.3, -2.4 / DATA ( F51LV(25,J), J = 1, 13 ) / & -20.5, -19.3, -18., -17., -16., -15.1, -14.2, -13.3, -12.5, & -11.8, -9., -6.7, -4.6 / DATA ( F51LV(26,J), J = 1, 13 ) / & -22.4, -21.2, -19.9, -18.9, -17.9, -17., -16.2, -15.3, -14.6, & -14., -11.1, -9., -6.9 / DATA ( F51LV(27,J), J = 1, 13 ) / & -24.3, -23.2, -21.9, -20.9, -19.9, -19., -18.1, -17.2, -16.3, & -15.8, -13.2, -11., -9. / DATA ( F51LV(28,J), J = 1, 13 ) / & -26.2, -25., -23.7, -22.5, -21.7, -21., -20., -19.2, -18.4, & -17.8, -15., -12.9, -11. / DATA ( F51LV(29,J), J = 1, 13 ) / & -28.1, -27., -25.6, -24.6, -23.6, -23., -22., -21.1, -20.2, & -19.6, -17., -14.9, -13. / DATA ( F51LV(30,J), J = 1, 13 ) / & -30., -29., -27.4, -26.3, -25.4, -24.6, -23.7, -22.8, -22., & -21.3, -19., -16.9, -15. / ! Derived Interfering curve added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km DATA ( F51LV(31,J), J = 1, 13 ) / & -31.9, -31., -29.2, -28., -27.2, -26.2, -25.4, -24.5, -23.8, & -23., -21., -18.9, -17. / ! ! !*********************************************************************** ! * !F(50,50) FIELD STRENGTH DATA FOR THE HIGH VHF PROPAGATION ! CURVE ( TV CHANNELS 7 THROUGH 13 ) !*********************************************************************** ! DATA ( F55HV(1,J), J = 1, 13 ) / & 94.6, 100.7, 101.6, 101.8, 101.9, 102., 102.3, 102.3, 102.3, & 102.4, 102.4, 102.4, 102.5 / DATA ( F55HV(2,J), J = 1, 13 ) / & 82.8, 88.9, 92.3, 93.9, 94.6, 95., 95.4, 95.7, 95.9, 96., & 96.2, 96.2, 96.5 / DATA ( F55HV(3,J), J = 1, 13 ) / & 75.7, 81.8, 86.6, 88.7, 89.8, 90.5, 91.3, 91.8, 92., 92.1, & 92.6, 92.6, 92.7 / DATA ( F55HV(4,J), J = 1, 13 ) / & 70.7, 76.9, 82.2, 84.8, 86.2, 87., 88., 88.7, 89.1, 89.5, & 90., 90., 90.1 / DATA ( F55HV(5,J), J = 1, 13 ) / & 66.8, 73., 78.8, 81.6, 83.2, 84.5, 85.7, 86.3, 87., 87.3, & 88., 88., 88. / DATA ( F55HV(6,J), J = 1, 13 ) / & 55., 61., 67.2, 70.8, 73.2, 75., 77., 78.1, 79.1, 80., & 81.1, 81.8, 82. / DATA ( F55HV(7,J), J = 1, 13 ) / & 42.5, 48.6, 54.7, 58.1, 60.7, 62.5, 65., 67.6, 69.5, 71., & 73.9, 74.8, 75. / DATA ( F55HV(8,J), J = 1, 13 ) / & 34., 40., 46.1, 49.8, 52.1, 54.2, 56.7, 59., 61., 62.8, & 66.3, 67.4, 68. / DATA ( F55HV(9,J), J = 1, 13 ) / & 26.3, 32., 38.1, 41.7, 44., 46., 48.8, 51., 53.3, 55., & 58.7, 60.3, 61.1 / DATA ( F55HV(10,J), J = 1, 13 ) / & 20.7, 24.1, 30.1, 33.8, 36.1, 38., 40.9, 43.5, 46., 47.9, & 52., 53.8, 54.6 / DATA ( F55HV(11,J), J = 1, 13 ) / & 16.3, 18.5, 23., 26.2, 28.8, 30.6, 33.5, 36.3, 39., 41., & 45., 47., 48.1 / DATA ( F55HV(12,J), J = 1, 13 ) / & 12.9, 14.4, 17., 20., 22.1, 24., 26.8, 29.6, 32., 34., & 38.2, 40.6, 42. / DATA ( F55HV(13,J), J = 1, 13 ) / & 9.9, 11.2, 13.5, 15.2, 17., 18.9, 21.2, 23.9, 26., 28., & 32., 34.4, 36.1 / DATA ( F55HV(14,J), J = 1, 13 ) / & 7., 8.3, 10.5, 12., 13.7, 15., 17., 19., 21., 22.6, & 26.3, 28.8, 30.6 / DATA ( F55HV(15,J), J = 1, 13 ) / & 4.3, 5.5, 7.5, 9., 10.4, 11.5, 13.1, 14.9, 16.2, 17.5, & 21.1, 23.8, 25.5 / DATA ( F55HV(16,J), J = 1, 13 ) / & 1.5, 2.9, 4.8, 6.2, 7.5, 8.6, 10., 11.2, 12.7, 13.6, & 17., 19.8, 21.8 / DATA ( F55HV(17,J), J = 1, 13 ) / & -1., .5, 2.3, 3.7, 4.8, 5.8, 7., 8.2, 9.5, 10.5, & 14., 16.6, 18.5 / DATA ( F55HV(18,J), J = 1, 13 ) / & -3.5, -2., -.3, 1., 2.2, 3.2, 4.4, 5.5, 6.5, 7.4, & 10.7, 13.1, 15.1 / DATA ( F55HV(19,J), J = 1, 13 ) / & -5.7, -4.3, -2.7, -1.2, -.1, .9, 2., 3., 4., 4.9, & 8., 10.4, 12.3 / DATA ( F55HV(20,J), J = 1, 13 ) / & -8., -6.9, -5., -3.7, -2.5, -1.5, -.5, .6, 1.5, 2.2, & 5.6, 8.2, 10.1 / DATA ( F55HV(21,J), J = 1, 13 ) / & -10.4, -9.2, -7.3, -6., -4.9, -4., -3., -2., -1., -.2, & 3., 5.5, 7.5 / DATA ( F55HV(22,J), J = 1, 13 ) / & -12.8, -11.5, -9.8, -8.4, -7.3, -6.3, -5.3, -4.3, -3.5, -2.6, & .6, 3.1, 5.1 / DATA ( F55HV(23,J), J = 1, 13 ) / & -15., -13.8, -12., -10.7, -9.7, -8.7, -7.6, -6.6, -5.8, -5., & -1.8, .9, 2.9 / DATA ( F55HV(24,J), J = 1, 13 ) / & -17.2, -16., -14.4, -13., -12., -11., -10., -9., -8.2, -7.3, & -4.2, -1.8, .3 / DATA ( F55HV(25,J), J = 1, 13 ) / & -19.1, -18.2, -16.8, -15.5, -14.4, -13.4, -12.3, -11.3, -10.5, & -9.8, -6.6, -4., -1.9 / ! ! !*********************************************************************** ! * ! F(50,10) FIELD STRENGTH DATA FOR THE HIGH VHF PROPAGATION ! CURVE ( TV CHANNELS 7 THRS 13 ) * !*********************************************************************** ! DATA ( F51HV(1,J), J = 1, 13 ) / & 55.4, 61.6, 67.7, 71., 73.5, 75.3, 77.1, 78.6, 79.6, 80.4, & 82., 82.4, 82.5 / DATA ( F51HV(2,J), J = 1, 13 ) / & 44.4, 50., 55.8, 59.1, 61.7, 63.7, 66.5, 68.9, 70.8, 72., & 75., 75.9, 76.2 / DATA ( F51HV(3,J), J = 1, 13 ) / & 39.2, 43.5, 48.6, 52., 54.6, 56.5, 59., 61.5, 63.6, 65.2, & 68.6, 69.8, 70.2 / DATA ( F51HV(4,J), J = 1, 13 ) / & 34., 38., 42.7, 45.6, 48., 50., 52.5, 54.9, 56.9, 58.8, & 62.5, 64., 64.9 / DATA ( F51HV(5,J), J = 1, 13 ) / & 29.9, 32.5, 35.9, 38.8, 41., 43., 45.8, 48.2, 50.8, 53., & 57., 58.9, 59.8 / DATA ( F51HV(6,J), J = 1, 13 ) / & 26.6, 28.2, 31., 33.4, 35.4, 37.4, 40., 43., 45.4, 47.6, & 52., 53.8, 54.8 / DATA ( F51HV(7,J), J = 1, 13 ) / & 23.5, 25., 27., 28.9, 30.7, 32.3, 35., 37.4, 40., 42., & 46.8, 48.9, 50. / DATA ( F51HV(8,J), J = 1, 13 ) / & 20.3, 22., 24., 25.5, 27., 28.3, 30.4, 32.9, 35., 36.8, & 41.5, 43.7, 45. / DATA ( F51HV(9,J), J = 1, 13 ) / & 17.4, 19., 21., 22.4, 23.8, 25., 26.9, 28.8, 30.4, 32., & 35.8, 38.2, 40.1 / DATA ( F51HV(10,J), J = 1, 13 ) / & 14.3, 16., 18.1, 19.6, 20.8, 22., 23.5, 25., 26.4, 27.7, & 31., 33.6, 35.5 / DATA ( F51HV(11,J), J = 1, 13 ) / & 11.3, 13., 15.1, 16.7, 18., 19.1, 20.5, 22., 23., 24., & 27.6, 30., 32. / DATA ( F51HV(12,J), J = 1, 13 ) / & 8.6, 10., 12.2, 13.7, 15., 16.3, 17.6, 18.8, 19.9, 20.7, & 24., 26.8, 28.9 / DATA ( F51HV(13,J), J = 1, 13 ) / & 5.8, 7.2, 9.4, 10.8, 12., 13.3, 14.7, 15.9, 17., 18., & 21.4, 24., 26. / DATA ( F51HV(14,J), J = 1, 13 ) / & 2.9, 4.7, 6.8, 8.1, 9.5, 10.6, 12., 13., 14.1, 15.2, & 18.8, 21.2, 23.4 / DATA ( F51HV(15,J), J = 1, 13 ) / & .3, 1.9, 3.8, 5.2, 6.5, 7.8, 9., 10.3, 11.5, 12.5, & 16., 18.7, 20.7 / DATA ( F51HV(16,J), J = 1, 13 ) / & -2.1, -.7, 1.2, 2.7, 3.9, 5., 6.4, 7.5, 8.8, 9.8, & 13.1, 15.9, 18. / DATA ( F51HV(17,J), J = 1, 13 ) / & -4.4, -3.2, -1.4, 0., 1.2, 2.4, 3.7, 4.9, 6., 7., & 10.6, 13.2, 15.4 / DATA ( F51HV(18,J), J = 1, 13 ) / & -6.7, -5.4, -3.8, -2.3, -1.2, 0., 1., 2.1, 3.3, 4.3, & 7.9, 10.6, 12.8 / DATA ( F51HV(19,J), J = 1, 13 ) / & -8.9, -7.8, -6.1, -4.8, -3.8, -2.6, -1.4, -.3, .8, 1.7, & 5., 8., 10. / DATA ( F51HV(20,J), J = 1, 13 ) / & -10.8, -9.8, -8.2, -7., -6., -5., -4., -3., -2., -1., & 2.5, 5.2, 7.3 / DATA ( F51HV(21,J), J = 1, 13 ) / & -12.9, -11.8, -10.3, -9., -8.2, -7.1, -6., -5.1, -4.2, & -3.3, 0., 2.8, 4.9 / DATA ( F51HV(22,J), J = 1, 13 ) / & -14.8, -13.8, -12.3, -11.1, -10.2, -9.3, -8.2, -7.4, -6.5, & -5.6, -2.4, .2, 2.2 / DATA ( F51HV(23,J), J = 1, 13 ) / & -16.9, -15.8, -14.3, -13.1, -12.2, -11.2, -10.2, -9.4, -8.6, & -7.8, -4.7, -2., -.1 / DATA ( F51HV(24,J), J = 1, 13 ) / & -18.8, -17.7, -16.3, -15.1, -14.2, -13.3, -12.3, -11.4, -10.6, & -9.8, -6.9, -4.3, -2.4 / DATA ( F51HV(25,J), J = 1, 13 ) / & -20.7, -19.7, -18.3, -17., -16.2, -15.3, -14.3, -13.5, -12.8, & -12., -9., -6.5, -4.7 / DATA ( F51HV(26,J), J = 1, 13 ) / & -22.7, -21.4, -20.1, -19., -18., -17.2, -16.2, -15.4, -14.8, & -14., -11.1, -9., -7. / DATA ( F51HV(27,J), J = 1, 13 ) / & -24.6, -23.3, -22., -20.9, -20., -19.1, -18.2, -17.4, -16.8, & -16., -13.1, -11., -9. / DATA ( F51HV(28,J), J = 1, 13 ) / & -26.4, -25.2, -24., -22.9, -21.9, -21., -20., -19.2, -18.5, & -18., -15.1, -13., -11. / DATA ( F51HV(29,J), J = 1, 13 ) / & -28.2, -27.1, -25.9, -24.8, -23.9, -23., -22., -21.1, -20.3, & -19.6, -17., -15., -13. / DATA ( F51HV(30,J), J = 1, 13 ) / & -30.1, -29., -27.7, -26.5, -25.5, -24.9, -23.9, -23., -22.1, & -21.5, -19., -16.8, -15. / ! Derived Interfering curve added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km DATA ( F51HV(31,J), J = 1, 13) / & -32., -30.9 ,-29.5, -28.2, -27.1, -26.7, -25.8, -24.9, -23.9, & -23.4, -21., -18.6, -17. / ! ! !*********************************************************************** ! * ! F(50,50) FIELD STRENGTH DATA FOR THE UHF PROPAGATION CURVE ! ( TV CHANNELS 14 THROUGH 83 ) * !*********************************************************************** ! DATA ( F55U(1,J), J = 1, 13 ) / & 92., 97.9, 100.7, 101.5, 101.9, 102., 102.1, 102.2, 102.3, & 102.4, 102.5, 102.5, 102.5 / DATA ( F55U(2,J), J = 1, 13 ) / & 80., 86., 91., 93., 94.1, 94.8, 95.2, 95.6, 95.9, & 96., 96.3, 96.5, 96.5 / DATA ( F55U(3,J), J = 1, 13 ) / & 72.9, 79., 84.7, 87.4, 89., 90., 90.8, 91.3, 91.8, 92., & 92.5, 92.8, 93. / DATA ( F55U(4,J), J = 1, 13 ) / & 67.9, 74., 80., 83.3, 85.1, 86.3, 87.3, 88., 88.6, 88.9, & 89.6, 90., 90.3 / DATA ( F55U(5,J), J = 1, 13 ) / & 63.8, 70., 76., 79.5, 81.5, 82.9, 84.1, 85., 85.8, 86.2, & 87.3, 87.9, 88.1 / DATA ( F55U(6,J), J = 1, 13 ) / & 51.9, 58., 64., 67.6, 70., 72., 73.8, 75.3, 76.5, 77.2, & 79.6, 80.5, 81. / DATA ( F55U(7,J), J = 1, 13 ) / & 39., 45.2, 51.2, 54.6, 57.2, 59.1, 61., 62.6, 64., 65., & 68.2, 70., 71.1 / DATA ( F55U(8,J), J = 1, 13 ) / & 27.5, 33.5, 39.6, 43., 45.7, 48., 50.5, 52.3, 53.9, 55., & 58.4, 60.8, 62.5 / DATA ( F55U(9,J), J = 1, 13 ) / & 17.8, 22.7, 28.2, 31.5, 34.5, 37.3, 40.3, 42.7, 44.3, 45.7, & 49.4, 52.1, 54. / DATA ( F55U(10,J), J = 1, 13 ) / & 13., 16., 19.6, 22.3, 25.1, 28.3, 31.8, 34.1, 36., 37.6, & 41.7, 44.8, 46.7 / DATA ( F55U(11,J), J = 1, 13 ) / & 10.1, 11.7, 14.4, 16.8, 19.1, 21.7, 24.7, 27., 29.3, 31., & 35.4, 38.6, 41. / DATA ( F55U(12,J), J = 1, 13 ) / & 7., 8.5, 10.8, 12.5, 14.2, 16.3, 19., 21.3, 23.4, 25., & 29.8, 33., 35.7 / DATA ( F55U(13,J), J = 1, 13 ) / & 4.2, 5.5, 7.7, 9.3, 10.8, 12.4, 14.5, 16.3, 18., 19.8, & 24.5, 28., 30.8 / DATA ( F55U(14,J), J = 1, 13 ) / & 1.6, 2.8, 4.7, 6., 7.5, 8.9, 10.6, 12., 13.6, 15., & 19.8, 23.4, 26. / DATA ( F55U(15,J), J = 1, 13 ) / & -1., .2, 1.9, 3.2, 4.6, 5.7, 7.1, 8.5, 9.7, 10.8, & 15., 18.8, 21.8 / DATA ( F55U(16,J), J = 1, 13 ) / & -3.2, -2., -.4, .7, 1.9, 3., 4.3, 5.6, 6.7, 7.7, & 11.5, 14.8, 17.5 / DATA ( F55U(17,J), J = 1, 13 ) / & -5., -4.2, -2.7, -1.5, -.4, .5, 1.7, 2.8, 3.8, 4.8, & 8.2, 11.1, 13.7 / DATA ( F55U(18,J), J = 1, 13 ) / & -7.2, -6.3, -4.9, -3.8, -2.9, -2., -.9, 0., 1., 1.9, & 5., 7.8, 10. / DATA ( F55U(19,J), J = 1, 13 ) / & -9.1, -8.4, -7., -5.9, -5., -4.2, -3.2, -2.3, -1.6, -.9, & 2., 4.6, 6.7 / DATA ( F55U(20,J), J = 1, 13 ) / & -11., -10.3, -8.9, -7.9, -7., -6.1, -5.2, -4.3, -3.6, -3., & -.2, 1.9, 3.7 / DATA ( F55U(21,J), J = 1, 13 ) / & -13.1, -12.3, -10.9, -9.9, -9., -8., -7.1, -6.2, -5.5, -4.8, & -2.2, -.1, 1.7 / DATA ( F55U(22,J), J = 1, 13 ) / & -15.1, -14.2, -12.8, -11.7, -10.8, -10., -9., -8.2, -7.5, & -6.8, -4.3, -2.2, -.4 / DATA ( F55U(23,J), J = 1, 13 ) / & -17.2, -16.2, -14.8, -13.8, -12.8, -11.9, -11., -10.2, -9.5, & -8.9, -6.3, -4.2, -2.3 / DATA ( F55U(24,J), J = 1, 13 ) / & -19.3, -18.3, -16.8, -15.8, -14.8, -13.9, -13., -12.2, -11.4, & -10.8, -8.3, -6.1, -4.4 / DATA ( F55U(25,J), J = 1, 13 ) / & -21.4, -20.1, -18.7, -17.7, -16.8, -15.9, -15., -14.1, -13.2, & -12.5, -10., -8., -6.3 / ! ! !*********************************************************************** ! * ! F(50,10) FIELD STRENGTH DATA FOR THE UHF PROPAGATION CURVE ! ( TV CHANNELS 14 THRS 83 ) * !*********************************************************************** ! DATA ( F51U(1,J), J = 1, 13 ) / & 52.2, 58.3, 64.7, 68., 70.5, 72.3, 74.1, 75.4, 76.4, 77.4, & 79.5, 80.7, 81.3 / DATA ( F51U(2,J), J = 1, 13 ) / & 41.6, 46.7, 52.4, 56., 58.5, 60.3, 62.3, 63.9, 65.2, 66.2, & 69.3, 71.2, 72.6 / DATA ( F51U(3,J), J = 1, 13 ) / & 35., 38., 43., 46.3, 48.8, 50.8, 52.9, 54.9, 56.3, 57.6, & 60.9, 63., 64.5 / DATA ( F51U(4,J), J = 1, 13 ) / & 30.3, 32.1, 35.3, 37.6, 40., 42.4, 45.1, 47.1, 48.7, 50., & 53.6, 56.1, 58. / DATA ( F51U(5,J), J = 1, 13 ) / & 27., 28.3, 30.8, 32.6, 34.7, 36.7, 39., 40.8, 42.4, 43.7, & 47.7, 50.2, 52.4 / DATA ( F51U(6,J), J = 1, 13 ) / & 23.8, 25.2, 27.6, 29.1, 30.4, 32., 34.5, 36.4, 37.9, 39., & 43.1, 46., 48. / DATA ( F51U(7,J), J = 1, 13 ) / & 20.8, 22.2, 24.5, 26., 27.2, 28.4, 30.4, 32.2, 33.9, 35.1, & 39.2, 42.1, 44.3 / DATA ( F51U(8,J), J = 1, 13 ) / & 17.8, 19.3, 21.3, 23., 24.2, 25.4, 27., 28.8, 30.2, 31.7, & 35.8, 38.7, 40.7 / DATA ( F51U(9,J), J = 1, 13 ) / & 14.8, 16.5, 18.5, 20., 21.2, 22.4, 23.9, 25.2, 26.6, 27.8, & 32., 35., 37.3 / DATA ( F51U(10,J), J = 1, 13 ) / & 12., 13.4, 15.6, 17.1, 18.3, 19.7, 21., 22.1, 23.4, 24.6, & 28.3, 31.3, 33.8 / DATA ( F51U(11,J), J = 1, 13 ) / & 9.2, 10.7, 12.7, 14., 15.2, 16.5, 18., 19.3, 20.3, 21.3, & 24.9, 27.8, 30.3 / DATA ( F51U(12,J), J = 1, 13 ) / & 6.6, 8., 9.9, 11.2, 12.6, 13.8, 15.3, 16.4, 17.3, 18.3, & 21.7, 24.3, 27. / DATA ( F51U(13,J), J = 1, 13 ) / & 4., 5.1, 7.1, 8.8, 10., 11., 12.5, 13.8, 14.8, 15.7, & 18.8, 21.2, 23.7 / DATA ( F51U(14,J), J = 1, 13 ) / & 1.2, 2.5, 4.4, 6., 7.3, 8.3, 9.7, 10.9, 11.9, 12.8, & 15.9, 18.2, 20.5 / DATA ( F51U(15,J), J = 1, 13 ) / & -1.3, -.2, 1.8, 3.2, 4.6, 5.7, 7., 8.1, 9.1, 10., & 13.1, 15.5, 17.4 / DATA ( F51U(16,J), J = 1, 13 ) / & -3.8, -2.4, -.8, .8, 1.9, 3., 4.4, 5.6, 6.7, 7.6, & 10.6, 12.8, 14.7 / DATA ( F51U(17,J), J = 1, 13 ) / & -6., -4.9, -3.1, -1.7, -.5, .6, 1.8, 2.9, 3.9, 4.8, & 7.9, 10., 12. / DATA ( F51U(18,J), J = 1, 13 ) / & -8.4, -7.2, -5.5, -4.1, -3., -2., -.7, .3, 1.3, 2.1, & 5.1, 7.3, 9.2 / DATA ( F51U(19,J), J = 1, 13 ) / & -10.3, -9.3, -7.7, -6.2, -5.2, -4.3, -3.2, -2.2, -1.2, & -.4, 2.2, 4.7, 6.5 / DATA ( F51U(20,J), J = 1, 13 ) / & -12.5, -11.3, -9.8, -8.4, -7.4, -6.6, -5.4, -4.5, -3.6, -2.8, & 0., 2.1, 4. / DATA ( F51U(21,J), J = 1, 13 ) / & -14.5, -13.5, -12., -10.4, -9.6, -8.8, -7.7, -6.7, -5.8, -5., & -2.2, 0., 1.8 / DATA ( F51U(22,J), J = 1, 13 ) / & -16.5, -15.5, -14., -12.7, -11.7, -10.8, -9.8, -8.9, -7.9, & -7.1, -4.3, -2.2, -.4 / DATA ( F51U(23,J), J = 1, 13 ) / & -18.5, -17.4, -15.9, -14.6, -13.8, -13., -12., -11., -10., & -9.2, -6.6, -4.6, -2.8 / DATA ( F51U(24,J), J = 1, 13 ) / & -20.5, -19.3, -17.8, -16.5, -15.6, -14.9, -14., -13., -12.2, & -11.3, -8.9, -6.8, -5. / DATA ( F51U(25,J), J = 1, 13 ) / & -22.4, -21.3, -19.8, -18.6, -17.7, -17., -16., -15., -14.2, & -13.4, -11., -8.8, -7. / DATA ( F51U(26,J), J = 1, 13 ) / & -24.2, -23.2, -21.6, -20.4, -19.6, -18.9, -17.9, -17., -16.2, & -15.4, -13., -10.8, -9. / DATA ( F51U(27,J), J = 1, 13 ) / & -26., -25., -23.4, -22.2, -21.3, -20.8, -19.9, -19.1, -18.2, & -17.5, -15., -12.9, -11. / DATA ( F51U(28,J), J = 1, 13 ) / & -27.8, -27., -25.5, -24.2, -23.3, -22.7, -21.8, -21., -20.2, & -19.4, -17., -14.9, -13. / DATA ( F51U(29,J), J = 1, 13 ) / & -29.5, -28.5, -27.1, -26., -25., -24.4, -23.7, -22.8, -22., & -21.3, -19., -16.9, -15. / DATA ( F51U(30,J), J = 1, 13 ) / & -31., -30.1, -28.9, -27.9, -27., -26.3, -25.6, -24.8, -24., & -23.2, -21., -18.9, -16.8 / ! Derived Interfering curve added to smooth out the graph and interpolation ! for the rarely used F(50,10) curve at 500 km DATA ( F51U(31,J), J = 1, 13 )/ & -32.5, -31.6, -30.7, -29.8, -29.0, -28.2, -27.5, -26.8, -26.0, & -25.1, -22.9, -20.9, -18.6 / ! ! TVFMFS: DATA TABLE INITIALIZATION OK, CONTINUE WITH PROGRAM ! ! !*********************************************************************** ! ERROR CHECKS FOR ARGUMENT VALUES. * !*********************************************************************** ! data h50 / 30.48, 60.96, 121.92, 182.88, 243.84, 304.80, 381.00, &457.20, 533.40, 609.60, 914.40, 1219.20, 1524.00 / data h10 / 30.48, 60.96, 121.92, 182.88, 243.84, 304.80, 381.00, &457.20, 533.40, 609.60, 914.40, 1219.20, 1524.00 / ! 705 "tvfmfs_metric.for" flag = ' ' ! ! 711 "tvfmfs_metric.for" if (erp .le. 0.0) then ! 713 "tvfmfs_metric.for" flag = 'A6' ! ! 714 "tvfmfs_metric.for" return ! ! 716 "tvfmfs_metric.for" else if (((channel .lt. 2) .or. (channel .gt. 300)) .or. ((channel & .gt. 83) .and. (channel .lt. 200))) then ! 721 "tvfmfs_metric.for" flag = 'A3' ! 722 "tvfmfs_metric.for" return ! ! 724 "tvfmfs_metric.for" else if ((curve .lt. 0) .or. (curve .gt. 1)) then ! 727 "tvfmfs_metric.for" flag = 'A4' ! ! 728 "tvfmfs_metric.for" return ! ! 730 "tvfmfs_metric.for" else if ((switch .lt. 1) .or. (switch .gt. 2)) then ! 733 "tvfmfs_metric.for" flag = 'A5' ! ! 734 "tvfmfs_metric.for" return ! ! 736 "tvfmfs_metric.for" else if ((switch .eq. 1) .and. (distance .le. 0.0)) then ! 739 "tvfmfs_metric.for" flag = 'A9' ! ! 740 "tvfmfs_metric.for" return ! ! 742 "tvfmfs_metric.for" end if ! ! 744 "tvfmfs_metric.for" erp_db = 10.0 * log10(erp) ! ! 746 "tvfmfs_metric.for" height = haat ! ! 748 "tvfmfs_metric.for" if (haat .lt. 30.0) then ! 750 "tvfmfs_metric.for" height = 30.0 ! ! 751 "tvfmfs_metric.for" flag = 'A7' ! ! 753 "tvfmfs_metric.for" else if (haat .gt. 1600.0) then ! 755 "tvfmfs_metric.for" height = 1600.0 ! ! 756 "tvfmfs_metric.for" flag = 'A8' ! !*********************************************************************** ! FOR SWITCH = 1, FIND THE "FIELD" AT THE DISTANCE SPECIFIED IN * ! "DISTANCE". IF THE DISTANCE IS LESS THAN 1.5 KM, USE THE FREE * ! SPACE EQUATION. * !*********************************************************************** ! ! 758 "tvfmfs_metric.for" end if ! ! 766 "tvfmfs_metric.for" if (switch .eq. 1) then ! ! 768 "tvfmfs_metric.for" if (distance .lt. 1.5) then ! ! 770 "tvfmfs_metric.for" field = (106.92 - (20.0 * log10(distance))) + erp_db ! 772 "tvfmfs_metric.for" flag = 'A1' ! ! 773 "tvfmfs_metric.for" return ! ! 775 "tvfmfs_metric.for" else if (((curve .eq. 0) .and. (distance .gt. 300.0)) .or. ((curve & .eq. 1) .and. (distance .gt. 500.0))) then ! ! 778 "tvfmfs_metric.for" flag = 'A2' ! ! 780 "tvfmfs_metric.for" end if ! 782 "tvfmfs_metric.for" h(1) = height ! ! 783 "tvfmfs_metric.for" d(1) = distance ! ! 785 "tvfmfs_metric.for" if (((channel .ge. 2) .and. (channel .le. 6)) .or. ((channel .ge. &200) .and. (channel .le. 300))) then ! ! 788 "tvfmfs_metric.for" if ((curve .eq. 0) .or. ((curve .eq. 1) .and. (distance .lt. 15.0) &)) then ! ! 791 "tvfmfs_metric.for" call itplbv(6, id50, ih50, d50, h50, f55lv, 1, d, h, f) ! else if (curve .eq. 1) then ! call itplbv(6, id10, ih10, d10, h10, f51lv, 1, d, h, f) ! ! 799 "tvfmfs_metric.for" end if ! ! 801 "tvfmfs_metric.for" else if ((channel .ge. 7) .and. (channel .le. 13)) then ! if ((curve .eq. 0) .or. ((curve .eq. 1) .and. (distance .lt. 15.0) &)) then ! call itplbv(6, id50, ih50, d50, h50, f55hv, 1, d, h, f) ! ! 810 "tvfmfs_metric.for" else if (curve .eq. 1) then ! ! 812 "tvfmfs_metric.for" call itplbv(6, id10, ih10, d10, h10, f51hv, 1, d, h, f) ! end if ! else if ((channel .ge. 14) .and. (channel .le. 83)) then ! ! 820 "tvfmfs_metric.for" if ((curve .eq. 0) .or. ((curve .eq. 1) .and. (distance .lt. 15.0) &)) then ! ! 823 "tvfmfs_metric.for" call itplbv(6, id50, ih50, d50, h50, f55u, 1, d, h, f) ! else if (curve .eq. 1) then ! call itplbv(6, id10, ih10, d10, h10, f51u, 1, d, h, f) ! ! 831 "tvfmfs_metric.for" end if ! ! 833 "tvfmfs_metric.for" end if ! ! 835 "tvfmfs_metric.for" field = f(1) + erp_db ! !*********************************************************************** ! FOR SWITCH = 2, THE "DISTANCE" FOR A SPECIFIED "FIELD" VALUE IS ! FOUND BY COMPUTING A FIELD VS. DISTANCE CURVE AT ! INCREMENTS OF * ! 0.5 KILOMETER AND THEN FINDING THE CORRECT DISTANCE VALUE ! BY INTERPOLATING BETWEEN THE FIELD POINTS. * !*********************************************************************** ! ! 837 "tvfmfs_metric.for" return ! ! 846 "tvfmfs_metric.for" else if (switch .eq. 2) then ! ! 848 "tvfmfs_metric.for" curve_2 = curve ! ! 850 "tvfmfs_metric.for" do i = 1, n_points, 1 ! ! 852 "tvfmfs_metric.for" h(i) = height ! ! 854 "tvfmfs_metric.for" end do ! ! 856 "tvfmfs_metric.for" 100 if (curve_2 .eq. 0) then ! 858 "tvfmfs_metric.for" d_first = 1.5 ! ! 859 "tvfmfs_metric.for" d_last = 300.0 ! ! 861 "tvfmfs_metric.for" else if (curve_2 .eq. 1) then ! 863 "tvfmfs_metric.for" d_first = 15.0 ! ! 864 "tvfmfs_metric.for" d_last = 500.0 ! ! 866 "tvfmfs_metric.for" end if ! ! 868 "tvfmfs_metric.for" do i = 1, n_points, 1 ! ! 870 "tvfmfs_metric.for" d(i) = d_first + ((i - 1) * delta) ! ! 872 "tvfmfs_metric.for" end do ! ! 874 "tvfmfs_metric.for" 110 if (((channel .ge. 2) .and. (channel .le. 6)) .or. ((channel .ge. &200) .and. (channel .le. 300))) then ! ! 877 "tvfmfs_metric.for" if (curve_2 .eq. 0) then ! ! 879 "tvfmfs_metric.for" call itplbv(6, id50, ih50, d50, h50, f55lv, n_points, d, h, f) ! else if (curve_2 .eq. 1) then ! call itplbv(6, id10, ih10, d10, h10, f51lv, n_points, d, h, f) ! ! 887 "tvfmfs_metric.for" end if ! ! 889 "tvfmfs_metric.for" else if ((channel .ge. 7) .and. (channel .le. 13)) then ! if (curve_2 .eq. 0) then ! call itplbv(6, id50, ih50, d50, h50, f55hv, n_points, d, h, f) ! ! 897 "tvfmfs_metric.for" else if (curve_2 .eq. 1) then ! ! 899 "tvfmfs_metric.for" call itplbv(6, id10, ih10, d10, h10, f51hv, n_points, d, h, f) ! end if ! else if ((channel .ge. 14) .and. (channel .le. 83)) then ! ! 907 "tvfmfs_metric.for" if (curve_2 .eq. 0) then ! ! 909 "tvfmfs_metric.for" call itplbv(6, id50, ih50, d50, h50, f55u, n_points, d, h, f) ! else if (curve_2 .eq. 1) then ! call itplbv(6, id10, ih10, d10, h10, f51u, n_points, d, h, f) ! ! 917 "tvfmfs_metric.for" end if ! ! 919 "tvfmfs_metric.for" end if ! ! 921 "tvfmfs_metric.for" do i = 1, n_points, 1 ! ! 923 "tvfmfs_metric.for" f(i) = f(i) + erp_db ! !*********************************************************************** ! IF THE REQUESTED FIELD IS GREATER THAN THE FIRST POINT; * ! USE FREE SPACE IF THE CURVE WAS F(50,50), ELSE IF THE CURVE WAS * ! F(50,10), CHANGE TO F(50,50) AND RECALCULATE BECAUSE THE * ! DISTANCE SHOULD BE LESS THAN 15 KILOMETERS. * !*********************************************************************** ! ! 925 "tvfmfs_metric.for" end do ! ! 934 "tvfmfs_metric.for" if (field .gt. f(1)) then ! ! 936 "tvfmfs_metric.for" if (curve_2 .eq. 1) then ! 938 "tvfmfs_metric.for" curve_2 = 0 ! ! 939 "tvfmfs_metric.for" goto 100 ! ! 941 "tvfmfs_metric.for" else ! ! 943 "tvfmfs_metric.for" flag = 'A1' ! ! 945 "tvfmfs_metric.for" e_volts_meter = 1.0e-6 * (10.0 ** (field / 20.0)) ! ! 947 "tvfmfs_metric.for" distance = (7.014271e-3 * sqrt(erp * 1000.)) / e_volts_meter ! Added 9/2004 to prevent free space distance from exceeding ! minimum curves distance of 1.5 km if(distance. gt. 1.5) distance = 1.5 ! return ! !*********************************************************************** ! IF FIELD IS LESS THAN LAST POINT ON CURVE, RECALCULATE CURVE ! WITH NEXT RANGE OF DISTANCES. * !*********************************************************************** ! ! 952 "tvfmfs_metric.for" end if ! ! 959 "tvfmfs_metric.for" else if (field .lt. f(n_points)) then ! ! 961 "tvfmfs_metric.for" do i = 1, n_points, 1 ! ! 963 "tvfmfs_metric.for" d(i) = d(i) + range ! ! 965 "tvfmfs_metric.for" end do ! ! 967 "tvfmfs_metric.for" if (d(1) .lt. d_last) then ! ! 969 "tvfmfs_metric.for" goto 110 ! ! 971 "tvfmfs_metric.for" else ! 973 "tvfmfs_metric.for" flag = 'A2' distance = 0.0 ! ! 975 "tvfmfs_metric.for" return ! !*********************************************************************** ! FIELD VALUE LIES ON THE CURVE, FIND THE CORRESPONDING ! DISTANCE BY INTERPOLATION. * !*********************************************************************** ! ! 977 "tvfmfs_metric.for" end if ! ! 984 "tvfmfs_metric.for" else ! ! 986 "tvfmfs_metric.for" do i = 2, n_points, 1 if ((field .le. f(i - 1)) .and. (field .gt. f(i))) then ! distance = (((field - f(i - 1)) / (f(i) - f(i - 1))) * (d(i) - d(i & - 1))) + d(i - 1) ! if (distance .gt. d_last) then flag = 'A2' end if return end if end do end if ! !*********************************************************************** ! IF WE ARE HERE, WE GOOFED SOMEHOW. * !*********************************************************************** end if write(unit=6, fmt=200) 200 format(26h0 LOGIC ERROR FROM TVFMFS,/ &35h CONTACT GARY KALAGIAN AT 632-2049/ &28h OR JOHN BOURSY AT 634-6315) return end ! ======================================================================= ! UPPER.F: subroutine upper (string) ! ! Subroutine by John Boursy, December 1982. ! ! This subroutine takes a character string and converts all lower ! case letters to upper case letters. That is, letters in the range ! from a to z, inclusive, are converted to letters in the range ! from A to Z. Characters outside of this range are not touched. ! ! string, the input argument, must be a character variable; it can ! be any length. ! ! ****************************************************************** ! character string *(*) ! do 100 i=1,len(string),1 if (string(i:i).ge.'a'.and.string(i:i).le.'z') 2 string(i:i)=char(ichar(string(i:i))-32) 100 continue ! return end
kate-harrison/west
west/propagation_models/fcurves/curves_subroutines.f
FORTRAN
gpl-2.0
114,128
<?php /*****************************************/ // Template Title: Tubelar // Plugin: Landing Pages - Inboundnow.com /*****************************************/ /* Include Sharrreme Library */ include_once(LANDINGPAGES_PATH . 'assets/libraries/shareme/library.shareme.php'); /* Declare Template Key */ $key = basename(dirname(__FILE__)); $path = LANDINGPAGES_URLPATH . 'templates/' . $key . '/'; $url = plugins_url(); /* Include ACF Field Definitions */ include_once(LANDINGPAGES_PATH.'templates/'.$key.'/config.php'); /* Define Landing Pages's custom pre-load hook for 3rd party plugin integration */ do_action('lp_init'); /* Load $post data */ if (have_posts()) : while (have_posts()) : the_post(); /* Pre-load meta data into variables */ $yt_video = get_field( 'tubelar-yt-video' , $post->ID ); $logo = get_field( 'tubelar-logo' , $post->ID , false ); /* acf 4 images need false for formatting */ $sidebar = get_field( 'tubelar-sidebar' , $post->ID ); $controls = get_field( 'tubelar-controls' , $post->ID ); $boxcolor = get_field( 'tubelar-box-color' , $post->ID ); $textcolor = get_field( 'tubelar-text-color' , $post->ID ); $clear_bg_settings = get_field( 'tubelar-clear-bg-settings' , $post->ID ); $social_display = get_field( 'tubelar-display-social' , $post->ID ); $content = get_field( 'tubelar-main-content' , $post->ID ); $conversion_area = get_field( 'tubelar-conversion-area-content' , $post->ID ); $main_headline = get_field( 'lp-main-headline' , $post->ID ); /* legacy support */ // function to parse url and grab id function youtubeid($url) { if (preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $url, $match)) { $match = $match[0]; } return $match; } $videoid = youtubeid($yt_video); ?> <!DOCTYPE html> <html> <head> <title><?php wp_title(); ?></title> <?php /* Load all functions hooked to lp_head including global js and global css */ wp_head(); // Load Regular WP Head do_action('lp_head'); // Load Custom Landing Page Specific Header Items ?> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link href="<?php echo $path; ?>assets/css/screen.css" rel="stylesheet" type="text/css"/> <style type="text/css"> .inbound-field input[type=text], .inbound-field input[type=url], .inbound-field input[type=email], .inbound-field input[type=tel], .inbound-field input[type=number], .inbound-field input[type=password] { width: 93%; } #inbound_form_submit { padding: 10px; padding-left: 20px; padding-right: 20px; } .black-65 { background: url('<?php echo $path; ?>assets/img/black-65-trans.png'); } <?php if ($sidebar == "lp_left") { echo "#main {float: right;} #tube-sidebar { width: 320px;}"; }?> <?php if ($textcolor != "") { echo "#wrapper {color: $textcolor;} #video-controls a {color: $textcolor;} input[type=\"text\"], input[type=\"email\"] { border: 1px solid $textcolor; opacity: 0.8;}"; } ?> <?php if ($clear_bg_settings === "transparent"){ if ($boxcolor != "") { echo ".black-50{background: url('".$path."image.php?hex=$boxcolor');}"; } } ?> <?php if ($clear_bg_settings === "solid"){ //echo $boxcolor;exit; echo ".black-50{background: $boxcolor}"; } ?> </style> <script type="text/javascript" charset="utf-8" src="<?php echo $path; ?>assets/js/jquery.tubular.1.0.js"></script> <script type="text/javascript"> jQuery('document').ready(function () { var options = {videoId: '<?php echo $videoid; ?>', start: 3}; jQuery('#wrapper').tubular(options); }); </script> </head> <body> <div id="wrapper" class="clearfix"> <div id="logo"> <?php if ($logo != "") { ?> <img src="<?php echo $logo; ?>" alt="logo" id="logo"/> <?php } else { ?> <img src="<?php echo $path; ?>assets/img/inbound-now-logo.png" alt="Inbound Now Logo" id="logo"/> <?php } ?> </div> <div id="main"> <?php if ($social_display === "1") { // Show Social Media Icons ?> <?php lp_social_media("vertical"); // print out social media buttons?> <?php } ?> <style type="text/css"> #lp-social-buttons { top: 175px; }</style> <div class="black-50"> <h1><?php echo $main_headline; ?></h1> <?php echo $content; ?> </div> </div> <div id="tube-sidebar"> <div class="black-50"> <?php echo $conversion_area; /* Print out form content */ ?> </div> </div> <?php if ($controls === "1") { // Show video controls ?> <div id="controls"> <p id="video-controls" class="black-50 control-margin"><a href="#" class="tubular-play"><?php echo __('Play','landing-pages'); ?></a> | <a href="#" class="tubular-pause"><?php echo __('Pause','landing-pages'); ?></a> <!-- Other Controls | <a href="#" class="tubular-volume-up">Volume Up</a> | <a href="#" class="tubular-volume-down">Volume Down</a> | <a href="#" class="tubular-mute">Mute</a>--> </p> </div> <?php } ?> </div> <!-- #wrapper --> <?php break; endwhile; endif; do_action('lp_footer'); wp_footer(); ?> </body> </html>
julsquintanilla/landing-pages
templates/tubelar/index.php
PHP
gpl-2.0
5,572
#define IN_JSLTYPETAB_C #include "jsltypetab.h" #define HASH_FUN(elemp) hashFun(elemp->d->name) #define HASH_ELEM_EQUAL(e1,e2) ( \ e1->d->bits.symbolType==e2->d->bits.symbolType \ && strcmp(e1->d->name,e2->d->name)==0 \ ) #include "hash.h" #include "memory.h" /* For XX_ALLOCC */ #include "hashlist.tc"
thoni56/c-xrefactory
src/jsltypetab.c
C
gpl-2.0
429
apt-get install bind9 dnsutils cd /etc/bind ln -s -f /home/weby/servers/bind/* . touch /var/log/bind.log chown bind /var/log/bind.log # to allow bind to rotate logs, probably a better way of doing this, like a different directory cd /var/log sudo chgrp bind . sudo chmod g+w . /etc/init.d/bind9 restart #cd ../blacklist echo Bind installed successfully. echo Blacklist generation will now commence, abort if there is no blacklist required echo press enter to continue read novariable mkdir -p /tmp/blacklist cd /tmp/blacklist ~/servers/blacklist/blacklist.sh
aknutas/servers
bind/initialise.sh
Shell
gpl-2.0
562
<small class="post-meta">By <a href="https://plus.google.com/105864067956325551667" rel="author"><span class="author"><?php the_author() ?></span></a><br> lovingly typed on <?php the_time('jS F Y') ?> and filed under <?php the_category(', ') ?></small>
guyroutledge/guyroutledge.co.uk
wp-content/themes/guyroutledge-v1/inc/meta.php
PHP
gpl-2.0
253
import sys from starstoloves.models import User as UserModel from starstoloves import model_repository from starstoloves.lib.track import lastfm_track_repository from .user import User def from_session_key(session_key): user_model, created = UserModel.objects.get_or_create(session_key=session_key) return User( session_key=session_key, repository=sys.modules[__name__], ); def delete(user): try: user_model = model_repository.from_user(user) user_model.delete() except UserModel.DoesNotExist: pass;
tdhooper/starstoloves
starstoloves/lib/user/user_repository.py
Python
gpl-2.0
564