answer
stringlengths
15
1.25M
<?php // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); jimport('joomla.plugin.plugin'); /** * Usage plugin class for overview */ class plgUsageOverview extends JPlugin { /** * Constructor * * @param object &$subject The object to observe * @param array $config An optional associative array of configuration settings. * @return void */ public function __construct(&$subject, $config) { parent::__construct($subject, $config); $this->loadLanguage(); } /** * Return the name of the area this plugin retrieves records for * * @return array */ public function onUsageAreas() { $areas = array( 'overview' => JText::_('PLG_USAGE_OVERVIEW') ); return $areas; } /** * Strip Usage GET variables * * @param string $url URL * @return string */ private function _usageurlstrip($url) { $pvar = strpos($url, 'period='); if ($pvar) { $pvar $url = substr($url, 0, $pvar); } return $url; } /** * Returns TRUE if there is data in the database * for the date passed to it, FALSE otherwise. * * @param object &$db Parameter description (if any) ... * @param unknown $yearmonth Parameter description (if any) ... * @param unknown $period Parameter description (if any) ... * @return boolean Return description (if any) ... */ private function _check_for_data(&$db, $yearmonth, $period) { $sql = "SELECT COUNT(datetime) FROM summary_user_vals WHERE datetime LIKE '$yearmonth-%' AND period='$period'"; $db->setQuery($sql); $result = $db->loadResult(); if ($result && $result > 0) { return true; } return false; } /** * Write a row of data as a table row * * @param object &$db Parameter description (if any) ... * @param string $id Parameter description (if any) ... * @param string $period Parameter description (if any) ... * @param string $datetime Parameter description (if any) ... * @return string Return description (if any) ... */ private function _print_user_row(&$db, $id, $period, $datetime) { $html = ''; $sql = "SELECT value, valfmt FROM summary_user_vals WHERE rowid='$id' AND period='$period' AND datetime='$datetime' ORDER BY colid"; $db->setQuery($sql); $results = $db->loadObjectList(); if ($results) { $i = 0; foreach ($results as $row) { $i++; $cls = ($i >= 7) ? ' class="group"' : ''; if ($i == 1) { $cls = ' class="highlight"'; } if ($i == 2) { $res_iden = $row->value; } if ($i == 7) { $org_iden = $row->value; } switch ($i) { case 3: case 4: case 5: case 6: $val = ($row->value/$res_iden) * 100; break; case 8: case 9: case 10: case 11: $val = ($row->value/$org_iden) * 100; break; default: $val = $row->value; break; } $html .= "\t\t\t" . '<td' . $cls . '>' . trim($this->_fmt_result($val, $row->valfmt)) . '</td>' . "\n"; } } if ($i == 1) { $html .= $this->_empty_rows(10); } return $html; } /** * Generate a sparkline (inline chart) * * @param object $db JDatabase * @param integer $id Row ID * @param string $period Time period * @param string $datetime Timestamp * @return string */ private function _getSparkline($db, $id, $period, $datetime) { $dateFormat = '%d %b %Y'; $tz = 0; if (version_compare(JVERSION, '1.6', 'ge')) { $dateFormat = 'd M Y'; $tz = true; } $sparkline = ''; $thisyear = date("Y"); $tp = $thisyear - 2000; $limit = $tp * 12; $limit = 12; // Pull results $sql = "SELECT value, valfmt, datetime FROM summary_user_vals WHERE rowid='$id' AND period='$period' AND datetime<='$datetime' AND colid='$id' ORDER BY datetime DESC LIMIT $limit"; $db->setQuery($sql); $results = $db->loadObjectList(); if ($results) { // Reverse the array (we'll be getting back data in DESC order, we need it in ASC order) $results = array_reverse($results); // Find the highest value $vals = array(); foreach ($results as $result) { $vals[] = $result->value; } asort($vals); $highest = array_pop($vals); // Generate the sparkline $sparkline .= '<span class="sparkline">' . "\n"; foreach ($results as $result) { $height = round(($result->value / $highest)*100); $sparkline .= "\t" . '<span class="index">'; $sparkline .= '<span class="count" style="height: ' . $height . '%;" title="' . JHTML::_('date', $result->datetime, $dateFormat, $tz) . ': ' . trim($this->_fmt_result($result->value, $result->valfmt)) . '">'; $sparkline .= trim($this->_fmt_result($result->value, $result->valfmt)); $sparkline .= '</span> '; $sparkline .= '</span>' . "\n"; } $sparkline .= '</span>' . "\n"; } return $sparkline; } /** * Generate empty table cells * * @param integer $n Number of cells * @return string */ private function _empty_rows($n) { $html = ''; $i = 0; for ($i=0, $n; $i < $n; $i++) { $cls = ($i >= 5) ? ' class="group"' : ''; $html .= "\t\t\t" . '<td' . $cls . '>-</td>' . "\n"; } return $html; } /** * Format a result * * @param mixed $value Value to format * @param integer $fmt Format to use * @return mixed */ private function _fmt_result($value, $fmt) { $valfmt[0] = '-'; // blank. for future use $valfmt[1] = ' '; // no units $valfmt[2] = '%'; $valfmt[3] = 'users'; $valfmt[4] = 'jobs'; $valfmt[5] = 'days'; $valfmt[6] = 'hours'; $valfmt[7] = ''; // text data. display as is if ($fmt == 0) { return $valfmt[0]; } else if ($fmt == 1) { $value = number_format($value) . $valfmt[$fmt]; return $value; } else if ($fmt == 2) { $value = number_format($value) . $valfmt[$fmt]; return $value; } else if ($fmt == 5) { if ($value < '60') { $val = number_format($value) . ' seconds'; } else if ($value >= '60' && $value < '3600') { $val = number_format($value/60) . ' minutes'; } else if ($value >= '3600' && $value < '86400') { $val = number_format($value/3600) . ' hours'; } else if ($value >= '86400') { $val = number_format($value/86400) . ' days'; } else { $val = number_format($value); } return $val; } else if ($fmt == 6) { return $value; } else { $value = number_format($value) . ' ' . $valfmt[$fmt]; return $value; } } /** * Generate navigation links * * @param string $option Component name * @param string $task Component task * @param string $period Time period * @return string HTML */ private function _navlinks($option, $task, $period='prior12') { $html = '<div id="sub-sub-menu">' . "\n"; $html .= "\t" . '<ul>' . "\n"; $html .= "\t\t" . '<li'; if ($period == 'prior12') { $html .= ' class="active"'; } $html .= '><a href="'.JRoute::_('index.php?option=' . $option . '&task=' . $task . '&period=prior12') . '"><span>' . JText::_('<API key>') . '</span></a></li>' . "\n"; $html .= "\t\t" . '<li'; if ($period == 'month') { $html .= ' class="active"'; } $html .= '><a href="'.JRoute::_('index.php?option=' . $option . '&task=' . $task . '&period=month') . '"><span>' . JText::_('<API key>') . '</span></a></li>' . "\n"; $html .= "\t\t" . '<li'; if ($period == 'qtr') { $html .= ' class="active"'; } $html .= '><a href="'.JRoute::_('index.php?option=' . $option . '&task=' . $task . '&period=qtr') . '"><span>' . JText::_('<API key>') . '</span></a></li>' . "\n"; $html .= "\t\t" . '<li'; if ($period == 'year') { $html .= ' class="active"'; } $html .= '><a href="'.JRoute::_('index.php?option=' . $option . '&task=' . $task . '&period=year') . '"><span>' . JText::_('<API key>') . '</span></a></li>' . "\n"; $html .= "\t\t" . '<li'; if ($period == 'fiscal') { $html .= ' class="active"'; } $html .= '><a href="'.JRoute::_('index.php?option=' . $option . '&task=' . $task . '&period=fiscal') . '"><span>' . JText::_('<API key>') . '</span></a></li>' . "\n"; $html .= "\t" . '</ul>' . "\n"; $html .= '</div>' . "\n"; return $html; } /** * Event call for displaying usage data * * @param string $option Component name * @param string $task Component task * @param object $db JDatabase * @param array $months Month names (Jan -> Dec) * @param array $monthsReverse Month names in reverse (Dec -> Jan) * @param string $enddate Time period * @return string HTML */ public function onUsageDisplay($option, $task, $db, $months, $monthsReverse, $enddate) { // Check if our task is the area we want to return results for if ($task) { if (!in_array($task, $this->onUsageAreas()) && !in_array($task, array_keys($this->onUsageAreas()))) { return ''; } } $config =& JComponentHelper::getParams($option); // Incoming $period = JRequest::getVar('period', 'prior12'); $selectedPeriod = JRequest::getVar('selectedPeriod', ''); if (!$selectedPeriod) { $db->setQuery("SELECT MAX(datetime) FROM summary_misc_vals"); $lastdate = $db->loadResult(); if ($lastdate) { $defaultMonth = substr($lastdate, 5, 2); $defaultYear = substr($lastdate, 0, 4); } else { $defaultMonth = date("m"); $defaultYear = date("Y"); } $selectedPeriod = $defaultYear . '-' . $defaultMonth; } $checkyear = substr($selectedPeriod, 0, 4); $checkmonth = substr($selectedPeriod, 5, 2); if ($checkyear <= '2007') { if ($checkyear < '2007') { $page = 'old'; } else if ($checkyear == '2007') { if ($checkmonth < '10') { $page = 'old'; } else { $page = 'new'; } } } else { $page = 'new'; } if ($period == 'nice') { $page = 'old'; $selectedPeriod = '2007-09'; } // Get and set some vars $cur_year = floor(date("Y")); $cur_month = floor(date("n")); $year_data_start = 2000; $datetime = $selectedPeriod . '-00 00:00:00'; // Set the pathway $app =& JFactory::getApplication(); $pathway =& $app->getPathway(); $pathway->addItem(JText::_('PLG_USAGE_PERIOD_' . strtoupper($period)), 'index.php?option=' . $option . '&task=' . $task . '&period=' . $period); // Build the HTML $html = $this->_navlinks($option, $task, $period); $html .= '<form method="post" action="' . JRoute::_('index.php?option=' . $option . '&task=' . $task . '&period=' . $period) . '">' . "\n"; $html .= "\t" . '<fieldset class="filters"><label>' . JText::_('<API key>') . ': '; $html .= '<select name="selectedPeriod">' . "\n"; switch ($period) { case '12': case 'prior12': case 'nice': $option = 'prior12'; $period = '12'; $arrayMonths = array_values($months); for ($i = $cur_year; $i >= $year_data_start; $i { foreach ($monthsReverse as $key => $month) { if ($key == '12') { $nextmonth = 'Jan'; } else { $nextmonth = $arrayMonths[floor(array_search($month, $arrayMonths))+1]; } $value = $i . '-' . $key; if ($this->_check_for_data($db, $value, 12)) { $html .= '<option value="' . $value . '"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>' . $nextmonth . ' '; if ($key == 12) { $html .= $i; } else { $html .= $i - 1; } $html .= ' - ' . $month . ' ' . $i . '</option>' . "\n"; } } } break; case '1': case 'month': $option = 'month'; $period = '1'; for ($i = $cur_year; $i >= $year_data_start; $i { foreach ($monthsReverse as $key => $month) { $value = $i . '-' . $key; if ($this->_check_for_data($db, $value, 1)) { $html .= '<option value="' . $value . '"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>' . $month . ' ' . $i . '</option>' . "\n"; } } } break; case '3': case 'qtr': $option = 'qtr'; $period = '3'; $qtd_found = 0; foreach ($monthsReverse as $key => $month) { $value = $cur_year . '-' . $key; if (!$qtd_found && $this->_check_for_data($db, $value, 3)) { $html .= '<option value="' . $value . '"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>'; if ($key <= 3) { $key = 0; $html .= 'Jan'; } elseif ($key <= 6) { $key = 3; $html .= 'Apr'; } elseif ($key <= 9) { $key = 6; $html .= 'Jul'; } else { $key = 9; $html .= 'Oct'; } $html .= ' ' . $cur_year . ' - ' . $month . ' ' . $cur_year . '</option>' . "\n"; $qtd_found = 1; } } $qtr_found = 0; for ($j = $cur_year; $j >= $year_data_start; $j { for ($i = 12; $i > 0; $i = $i - 3) { if ($qtr_found && $key) { $i = $key; $qtd_found = 0; } $value = $j . '-' . sprintf("%02d", $i); if ($this->_check_for_data($db, $value, 3)) { $html .= '<option value="' . $value . '"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>'; if ($i == 3) { $html .= 'Jan'; } elseif ($i == 6) { $html .= 'Apr'; } elseif ($i == 9) { $html .= 'Jul'; } else { $html .= 'Oct'; } $html .= ' ' . $j . ' - '; if ($i == 3) { $html .= 'Mar'; } elseif ($i == 6) { $html .= 'Jun'; } elseif ($i == 9) { $html .= 'Sep'; } else { $html .= 'Dec'; } $html .= ' ' . $j . '</option>' . "\n"; } } } break; case '13': case 'fiscal': $option = 'fiscal'; $period = '13'; $ytd_found = 0; $full_year = $cur_year - 1; foreach ($monthsReverse as $key => $month) { $value = $cur_year . '-' . $key; if (!$ytd_found && $this->_check_for_data($db, $value, 0)) { $html .= '<option value="' . $value . '"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>Oct '; if ($cur_month >= 9) { $html .= $cur_year; $full_year = $cur_year; } else { $html .= $cur_year - 1; $full_year = $cur_year - 1; } $html .= ' - ' . $month . ' ' . $cur_year . '</option>' . "\n"; $ytd_found = 1; } } for ($i = $full_year; $i >= $year_data_start; $i { $value = $i . '-09'; if ($this->_check_for_data($db, $value, 0)) { $html .= '<option value="' . $value . '"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>Oct '; $html .= $i - 1; $html .= ' - Sep ' . $i . '</option>' . "\n"; } } break; case '0': case 'year': $option = 'year'; $period = '0'; $ytd_found = 0; foreach ($monthsReverse as $key => $month) { $value = $cur_year . '-' . $key; if (!$ytd_found && $this->_check_for_data($db, $value, 0)) { $html .= '<option value="'. $value .'"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>Jan - ' . $month . ' ' . $cur_year . '</option>' . "\n"; $ytd_found = 1; } } for ($i = $cur_year - 1; $i >= $year_data_start; $i { $value = $i . '-12'; if ($this->_check_for_data($db, $value, 0)) { $html .= '<option value="' . $value .'"'; if ($value == $selectedPeriod) { $html .= ' selected="selected"'; } $html .= '>Jan - Dec ' . $i . '</option>' . "\n"; } } break; } $html .= '</select></label> <input type="submit" value="' . JText::_('PLG_USAGE_VIEW') . '" /></fieldset>' . "\n"; $html .= '</form>' . "\n"; $tbl_cnt = 0; $html .= '<table summary="' . JText::_('A break-down of site visitors.') . '">' . "\n"; $html .= "\t" . '<caption>' . JText::_('Table ' . ++$tbl_cnt . ': User statistics') . '</caption>' . "\n"; $html .= "\t" . '<thead>' . "\n"; $html .= "\t\t" . '<tr>' . "\n"; $html .= "\t\t\t" . '<th scope="col" rowspan="2" colspan="2">' . JText::_('Users') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" rowspan="2" class="numerical-data">' . JText::_('Totals') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="colgroup" colspan="5">' . JText::_('Residence') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="colgroup" colspan="5">' . JText::_('Organization') . '</th>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; $html .= "\t\t" . '<tr>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Identified') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('US') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Asia') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Europe') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Other') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data">' . JText::_('Identified') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data" abbr="' . JText::_('Education') . '">' . JText::_('Edu.') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data" abbr="' . JText::_('Industry') . '">' . JText::_('Ind.') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data" abbr="' . JText::_('Government') . '">' . JText::_('Gov.') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data">' . JText::_('Other') . '</th>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; $html .= "\t" . '</thead>' . "\n"; $html .= "\t" . '<tbody>' . "\n"; $db->setQuery("SELECT id, label, plot FROM summary_user WHERE id IN (1,2,3,4,5) ORDER BY id"); $results = $db->loadObjectList(); if ($results) { $i = 0; $cls = 'even'; foreach ($results as $row) { $cls = ($cls == 'even') ? 'odd' : 'even'; if ($i == 0) { $cls = 'summary'; } $label = preg_replace('/\{(.*)\}/', '<sup><a href="#fn\\1">\\1</a></sup>', $row->label); $sparkline = $this->_getSparkline($db, $row->id, $period, $datetime); $html .= "\t\t" . '<tr class="' . $cls . '">' . "\n"; $html .= "\t\t\t" . '<th scope="row">' . trim($label) . '</th>' . "\n"; if ($row->plot == '1') { $img = $config->get('charts_path') . DS . substr($datetime, 0, 7) . '-' . $period . '-u' . $row->id; if (is_file(JPATH_ROOT . DS . $img . '.gif')) { $html .= "\t\t\t" . '<td><a href="' . $img . '.gif" title="DOM:users1' . $i . '" class="fixedImgTip" rel="external"><img src="' . $img . 'thumb.gif" alt="" /></a><br /><div style="display:none;" id="users1' . $i . '"><img src="' . $img . '.gif" alt="" /></div></td>' . "\n"; } else if (isset($sparkline)) { $html .= "\t\t\t" . '<td>' . $sparkline . '</td>' . "\n"; } else { $html .= "\t\t\t" . '<td>&nbsp;</td>' . "\n"; } } else if (isset($sparkline)) { $html .= "\t\t\t" . '<td>' . $sparkline . '</td>' . "\n"; } else { $html .= "\t\t\t" . '<td>&nbsp;</td>' . "\n"; } $html .= $this->_print_user_row($db, $row->id, $period, $datetime); $html .= "\t\t" . '</tr>' . "\n"; $i++; } } else { $html .= "\t\t" . '<tr class="odd">' . "\n"; $html .= "\t\t\t" . '<td colspan="13" class="textual-data">' . JText::_('No data found.') . '</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } $html .= "\t" . '</tbody>' . "\n"; $html .= '</table>' . "\n"; // Start simulation Usage $html .= '<table summary="' . JText::_('Simulation Usage') . '">' . "\n"; $html .= "\t" . '<caption>' . JText::_('Table ' . ++$tbl_cnt . ': Simulation Usage') . '</caption>' . "\n"; $html .= "\t" . '<tbody>' . "\n"; $db->setQuery("SELECT a.label,b.value,b.valfmt,a.plot,a.id FROM summary_simusage AS a, <API key> AS b WHERE a.id=b.rowid AND b.period = '$period' AND b.datetime = '$datetime' ORDER BY a.id"); $results = $db->loadObjectList(); if ($results) { $cls = 'even'; foreach ($results as $row) { $cls = ($cls == 'even') ? 'odd' : 'even'; $label = preg_replace('/\{(.*)\}/', '<sup><a href="#fn\\1">\\1</a></sup>', $row->label); //$sparkline = $this->_getSparkline($db, $row->id, $period, $datetime); $html .= "\t\t" . '<tr class="' . $cls . '">' . "\n"; $html .= "\t\t\t" . '<th scope="row">' . trim($label) . '</th>' . "\n"; $html .= "\t\t\t" . '<td>'. $this->_fmt_result($row->value, $row->valfmt) .'</td>' . "\n"; if ($row->plot == '1') { $img = $config->get('charts_path') . DS . substr($datetime, 0, 7) . '-' . $period . '-s' . $row->id; if (is_file(JPATH_ROOT . DS . $img . '.gif')) { $html .= "\t\t\t" . '<td><a href="' . $img . '.gif" title="DOM:sim' . $i . '" class="fixedImgTip" rel="external"><img src="' . $img . 'thumb.gif" alt="" /></a><br /><div style="display:none;" id="sim' . $i . '"><img src="' . $img . '.gif" alt="" /></div></td>' . "\n"; //} else if (isset($sparkline)) { // $html .= "\t\t\t" . '<td>'.$sparkline.'</td>' . "\n"; } else { $html .= "\t\t\t" . '<td>&nbsp;</td>' . "\n"; } //} else if (isset($sparkline)) { // $html .= "\t\t\t" . '<td>'.$sparkline.'</td>' . "\n"; } else { $html .= "\t\t\t" . '<td>&nbsp;</td>' . "\n"; } $html .= "\t\t" . '</tr>' . "\n"; $i++; } } else { $html .= "\t\t" . '<tr class="odd">' . "\n"; $html .= "\t\t\t" . '<td colspan="2" class="textual-data">' . JText::_('No data found.') . '</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } $html .= "\t" . '</tbody>' . "\n"; $html .= '</table>' . "\n"; // Start miscellaneous $html .= '<table summary="' . JText::_('Miscellaneous Statistics') . '">' . "\n"; $html .= "\t" . '<caption>' . JText::_('Table ' . ++$tbl_cnt . ': Miscellaneous Statistics') . '</caption>' . "\n"; $html .= "\t" . '<tbody>' . "\n"; $db->setQuery("SELECT a.label,b.value,b.valfmt FROM summary_misc AS a, summary_misc_vals AS b WHERE a.id=b.rowid AND b.period = '$period' AND b.datetime = '$datetime' ORDER BY a.id"); $results = $db->loadObjectList(); if ($results) { $cls = 'even'; foreach ($results as $row) { $cls = ($cls == 'even') ? 'odd' : 'even'; //$label = str_replace('{','<sup>',$row->label); //$label = str_replace('}','</sup>',$label); $label = preg_replace('/\{(.*)\}/', '<sup><a href="#fn\\1">\\1</a></sup>', $row->label); $html .= "\t\t" . '<tr class="' . $cls . '">' . "\n"; $html .= "\t\t\t" . '<th scope="row">' . trim($label) . '</th>' . "\n"; $html .= "\t\t\t" . '<td>'. $this->_fmt_result($row->value, $row->valfmt) . '</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } } else { $html .= "\t\t" . '<tr class="odd">' . "\n"; $html .= "\t\t\t" . '<td colspan="2" class="textual-data">' . JText::_('No data found.') . '</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } $html .= "\t" . '</tbody>' . "\n"; $html .= '</table>' . "\n"; /* // "and more" Usage $html .= '<table summary="' . JText::_('&quot;and more&quot; Usage') . '">' . "\n"; $html .= "\t" . '<caption>' . JText::_('Table '.++$tbl_cnt.': &quot;and more&quot; Usage') . '</caption>' . "\n"; $html .= "\t" . '<thead>' . "\n"; $html .= "\t\t" . '<tr>' . "\n"; $html .= "\t\t\t" . '<th scope="col" rowspan="2">' . JText::_('Type') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="colgroup" colspan="2">' . JText::_('Users') . '</th>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; $html .= "\t\t" . '<tr>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Interactive') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Download') . '</th>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; $html .= "\t" . '</thead>' . "\n"; $html .= "\t" . '<tbody>' . "\n"; $id = 1; $trows = ''; $cls = 'even'; while ($id < 9) { $sql = "SELECT a.id, a.label, b.value,b.colid,b.valfmt FROM summary_andmore a, <API key> b WHERE a.id=b.rowid AND period='".$period."' AND datetime='".$datetime."' AND a.id='".$id."' ORDER BY b.colid"; $db->setQuery($sql); $results = $db->loadObjectList(); if ($results) { foreach ($results as $row) { //$label = str_replace('{','<sup>',$row->label); //$label = str_replace('}','</sup>',$label); $label = preg_replace('/\{(.*)\}/','<sup><a href="#fn\\1">\\1</a></sup>',$row->label); $col = $row->colid; if ($col == 1) { $value1 = $this->_fmt_result($row->value,$row->valfmt); } else if ($col == 2) { $value2 = $this->_fmt_result($row->value,$row->valfmt); } } $cls = ($cls == 'even') ? 'odd' : 'even'; $trows .= "\t\t" . '<tr class="'.$cls.'">' . "\n"; $trows .= "\t\t\t" . '<th scope="row">'.trim($label).'</th>' . "\n"; $trows .= "\t\t\t" . '<td>'.$value1.'</td>' . "\n"; $trows .= "\t\t\t" . '<td>'.$value2.'</td>' . "\n"; $trows .= "\t\t" . '</tr>' . "\n"; } $id++; } $id = 9; while ($id < 13) { $sql = "SELECT a.id, a.label, b.value,b.colid,b.valfmt FROM summary_andmore a, <API key> b WHERE a.id=b.rowid AND period='".$period."' AND datetime='".$datetime."' AND a.id='".$id."' ORDER BY b.colid"; $db->setQuery($sql); $results = $db->loadObjectList(); if ($results) { foreach ($results as $row) { //$label = str_replace('{','<sup>',$row->label); //$label = str_replace('}','</sup>',$label); $label = preg_replace('/\{(.*)\}/','<sup><a href="#fn\\1">\\1</a></sup>',$row->label); $col = $row->colid; if ($col == 1) { $value1 = $this->_fmt_result($row->value,$row->valfmt); } else if ($col == 2) { $value2 = $this->_fmt_result($row->value,$row->valfmt); } } $cls = ($cls == 'even') ? 'odd' : 'even'; $trows .= "\t\t" . '<tr class="'.$cls.'">' . "\n"; $trows .= "\t\t\t" . '<th scope="row">'.trim($label).'</th>' . "\n"; $trows .= "\t\t\t" . '<td>'.$value1.'</td>' . "\n"; $trows .= "\t\t\t" . '<td>'.$value2.'</td>' . "\n"; $trows .= "\t\t" . '</tr>' . "\n"; } $id++; } if ($trows) { $html .= $trows; } else { $html .= "\t\t" . '<tr class="odd">' . "\n"; $html .= "\t\t\t" . '<td colspan="3" class="textual-data">' . JText::_('No data found.') . '</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } $html .= "\t" . '</tbody>' . "\n"; $html .= '</table>' . "\n"; // Collaboration Usage $html .= '<table summary="' . JText::_('Collaboration Usage') . '">' . "\n"; $html .= "\t" . '<caption>' . JText::_('Table '.++$tbl_cnt.': Collaboration Usage') . '</caption>' . "\n"; $html .= "\t" . '<tbody>' . "\n"; $sql = "SELECT a.label,b.value,b.valfmt FROM summary_collab AS a, summary_collab_vals AS b WHERE a.id=b.rowid AND b.period = '".$period."' AND b.datetime = '".$datetime."' ORDER BY a.id"; $db->setQuery($sql); $results = $db->loadObjectList(); if ($results) { $cls = 'even'; foreach ($results as $row) { $cls = ($cls == 'even') ? 'odd' : 'even'; //$label = str_replace('{','<sup>',$row->label); //$label = str_replace('}','</sup>',$label); $label = preg_replace('/\{(.*)\}/','<sup><a href="#fn\\1">\\1</a></sup>',$row->label); $html .= "\t\t" . '<tr class="'.$cls.'">' . "\n"; $html .= "\t\t\t" . '<th scope="row">'.trim($label).'</th>' . "\n"; $html .= "\t\t\t" . '<td>'. $this->_fmt_result($row->value,$row->valfmt) .'</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } } else { $html .= "\t\t" . '<tr class="odd">' . "\n"; $html .= "\t\t\t" . '<td colspan="2" class="textual-data">' . JText::_('No data found.') . '</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } $html .= "\t" . '</tbody>' . "\n"; $html .= '</table>' . "\n"; */ $html .= '<table summary="' . JText::_('User statistics by registered/unregistered') . '">' . "\n"; $html .= "\t" . '<caption><a name="tot"></a>' . JText::_('Table '. ++$tbl_cnt . ': User statistics by registered/unregistered') . '</caption>' . "\n"; $html .= "\t" . '<thead>' . "\n"; $html .= "\t\t" . '<tr>' . "\n"; $html .= "\t\t\t" . '<th scope="col" rowspan="2" colspan="2">' . JText::_('Users') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" rowspan="2" class="numerical-data">' . JText::_('Totals') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="colgroup" colspan="5">' . JText::_('Residence') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="colgroup" colspan="5">' . JText::_('Organization') . '</th>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; $html .= "\t\t" . '<tr>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Identified') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('US') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Asia') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Europe') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="numerical-data">' . JText::_('Other') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data">' . JText::_('Identified') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data" abbr="' . JText::_('Education') . '">' . JText::_('Edu.') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data" abbr="' . JText::_('Industry') . '">' . JText::_('Ind.') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data" abbr="' . JText::_('Government') . '">' . JText::_('Gov.') . '</th>' . "\n"; $html .= "\t\t\t" . '<th scope="col" class="group numerical-data">' . JText::_('Other') . '</th>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; $html .= "\t" . '</thead>' . "\n"; $html .= "\t" . '<tbody>' . "\n"; $db->setQuery("SELECT id, label, plot FROM summary_user WHERE id IN (1,6,7,8) ORDER BY id"); $results = $db->loadObjectList(); if ($results) { $i = 5; $cls = 'even'; foreach ($results as $row) { //$label = str_replace('{','<sup>',$row->label); //$label = str_replace('}','</sup>',$label); $label = preg_replace('/\{(.*)\}/', '<sup><a href="#fn\\1">\\1</a></sup>', $row->label); $cls = ($cls == 'even') ? 'odd' : 'even'; if ($i == 5) { $cls = 'summary'; } $sparkline = $this->_getSparkline($db, $row->id, $period, $datetime); $html .= "\t\t" . '<tr class="'.$cls.'">' . "\n"; $html .= "\t\t\t" . '<th scope="row">'.trim($label).'</th>' . "\n"; if ($row->plot == '1') { $img = $config->get('charts_path') . DS . substr($datetime, 0, 7) . '-' . $period . '-u' . $row->id; if (is_file(JPATH_ROOT . DS . $img . '.gif')) { $html .= "\t\t\t" . '<td><a href="' . $img . '.gif" title="DOM:users2' . $i . '" class="fixedImgTip" rel="external"><img src="' . $img . 'thumb.gif" alt="" /></a><br /><div style="display:none;" id="users2' . $i . '"><img src="' . $img . '.gif" alt="" /></div></td>' . "\n"; } else if (isset($sparkline)) { $html .= "\t\t\t" . '<td>' . $sparkline . '</td>' . "\n"; } else { $html .= "\t\t\t" . '<td>&nbsp;</td>' . "\n"; } } else if (isset($sparkline)) { $html .= "\t\t\t" . '<td>'.$sparkline.'</td>' . "\n"; } else { $html .= "\t\t\t" . '<td>&nbsp;</td>'; } $html .= $this->_print_user_row($db, $row->id, $period, $datetime); $html .= "\t\t" . '</tr>' . "\n"; $i++; } } else { $html .= "\t\t" . '<tr class="odd">' . "\n"; $html .= "\t\t\t" . '<td colspan="13" class="textual-data">' . JText::_('No data found.') . '</td>' . "\n"; $html .= "\t\t" . '</tr>' . "\n"; } $html .= "\t" . '</tbody>' . "\n"; $html .= '</table>' . "\n"; $html .= '<div class="footnotes">' . "\n"; $html .= "\t" . '<hr />' . "\n"; $html .= "\t" . '<ol>' . "\n"; $html .= "\t\t" . '<li id="fn1"><a name="fn1"></a>Sum of Registered Users<sup><a href="#fn2">2</a></sup>, Unregistered Interactive Users<sup><a href="#fn3">3</a></sup> and Unregistered Download Users<sup><a href="#fn4">4</a></sup></li>' . "\n"; $html .= "\t\t" . '<li id="fn2"><a name="fn2"></a>Number of Users that logged in. User registration assigns a unique login to each individual user.</li>' . "\n"; $html .= "\t\t" . '<li id="fn3"><a name="fn3"></a>Number of Unregistered Users, identified by unique hosts/IPs, that had an active Session <sup><a href="#fn10">10</a></sup> without logging in. Does not include known web bots/crawlers.</li>' . "\n"; $html .= "\t\t" . '<li id="fn4"><a name="fn4"></a>Number of Unregistered users, identified by unique hosts/IPs, that had an active session of less than 15 minutes without logging in and downloaded a non-interactive resource such as PDF or podcast. Does not include web bots/crawlers.</li>' . "\n"; $html .= "\t\t" . '<li id="fn5"><a name="fn5"></a>Number of Registered Users<sup><a href="#fn2">2</a></sup> that ran one or more simulation runs.</li>' . "\n"; $html .= "\t\t" . '<li id="fn6"><a name="fn6"></a>All Unregistered Users, identified by unique hosts/IPs, that had an active Session <sup><a href="#fn10">10</a></sup>. Does not include known web bots/crawlers.</li>' . "\n"; $html .= "\t\t" . '<li id="fn7"><a name="fn7"></a>All Unregistered users, identified by unique hosts/IPs that downloaded a non-interactive resource such as PDF or podcast. Does not include known web bots/crawlers.</li>' . "\n"; $html .= "\t\t" . '<li id="fn8"><a name="fn8"></a>Sum of Simulation Users <sup><a href="#fn5">5</a></sup> + Unregistered Interactive Users <sup><a href="#fn3">3</a></sup> including web bots/crawlers.</li>' . "\n"; $html .= "\t\t" . '<li id="fn9"><a name="fn9"></a>Number of Simulation users that returned after a gap of 3 months.</li>' . "\n"; $html .= "\t\t" . '<li id="fn10"><a name="fn10"></a>Begins when an IP is active on the site for at least 15 minutes. Ends when inactive for more than 30 minutes, including time spent viewing videos.</li>' . "\n"; $html .= "\t\t" . '<li id="fn11"><a name="fn11"></a>Identified by a unique IP address / hostname.</li>' . "\n"; $html .= "\t\t" . '<li id="fn12"><a name="fn12"></a>Based on MIT OCW metric of Visits: A visit is activity by a unique visitor delimitated by a 30 minute absence from the site on either side of the activity.<br />These visits correspond to unique visitors <sup><a href="#fn11">11</a></sup>. Does not include known web bots/crawlers</li>' . "\n"; $html .= "\t\t" . '<li id="fn13"><a name="fn13"></a>Number of Simulation sessions that were shared between 2 or more users.</li>' . "\n"; $html .= "\t" . '</ol>' . "\n"; $html .= '</div><!-- / .footnotes -->' . "\n"; return $html; } }
package com.sun.xml.internal.org.jvnet.mimepull; import java.util.concurrent.TimeUnit; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; import java.util.concurrent.<API key>; import java.util.logging.Level; import java.util.logging.Logger; final class WeakDataFile extends WeakReference<DataFile> { private static final Logger LOGGER = Logger.getLogger(WeakDataFile.class.getName()); private static int TIMEOUT = 10; //milliseconds //private static final int MAX_ITERATIONS = 2; private static ReferenceQueue<DataFile> refQueue = new ReferenceQueue<DataFile>(); private static List<WeakDataFile> refList = new ArrayList<WeakDataFile>(); private final File file; private final RandomAccessFile raf; private static boolean hasCleanUpExecutor = false; static { int delay = 10; try { delay = Integer.getInteger("com.sun.xml.internal.org.jvnet.mimepull.delay", 10); } catch (SecurityException se) { if (LOGGER.isLoggable(Level.CONFIG)) { LOGGER.log(Level.CONFIG, "Cannot read ''{0}'' property, using defaults.", new Object[] {"com.sun.xml.internal.org.jvnet.mimepull.delay"}); } } <API key> executorFactory = <API key>.newInstance(); if (executorFactory!=null) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Initializing clean up executor for MIMEPULL: {0}", executorFactory.getClass().getName()); } <API key> scheduler = executorFactory.<API key>(); scheduler.<API key>(new CleanupRunnable(), delay, delay, TimeUnit.SECONDS); hasCleanUpExecutor = true; } } WeakDataFile(DataFile df, File file) { super(df, refQueue); refList.add(this); this.file = file; try { raf = new RandomAccessFile(file, "rw"); } catch(IOException ioe) { throw new <API key>(ioe); } if (!hasCleanUpExecutor) { <API key>(); } } synchronized void read(long pointer, byte[] buf, int offset, int length ) { try { raf.seek(pointer); raf.readFully(buf, offset, length); } catch(IOException ioe) { throw new <API key>(ioe); } } synchronized long writeTo(long pointer, byte[] data, int offset, int length) { try { raf.seek(pointer); raf.write(data, offset, length); return raf.getFilePointer(); // Update pointer for next write } catch(IOException ioe) { throw new <API key>(ioe); } } void close() { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Deleting file = {0}", file.getName()); } refList.remove(this); try { raf.close(); boolean deleted = file.delete(); if (!deleted) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "File {0} was not deleted", file.getAbsolutePath()); } } } catch(IOException ioe) { throw new <API key>(ioe); } } void renameTo(File f) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Moving file={0} to={1}", new Object[]{file, f}); } refList.remove(this); try { raf.close(); boolean renamed = file.renameTo(f); if (!renamed) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, "File {0} was not moved to {1}", new Object[] {file.getAbsolutePath(), f.getAbsolutePath()}); } } } catch(IOException ioe) { throw new <API key>(ioe); } } static void <API key>() { WeakDataFile weak; while (( weak = (WeakDataFile) refQueue.poll()) != null ) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Cleaning file = {0} from reference queue.", weak.file); } weak.close(); } } private static class CleanupRunnable implements Runnable { @Override public void run() { try { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Running cleanup task"); } WeakDataFile weak = (WeakDataFile) refQueue.remove(TIMEOUT); while (weak != null) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Cleaning file = {0} from reference queue.", weak.file); } weak.close(); weak = (WeakDataFile) refQueue.remove(TIMEOUT); } } catch (<API key> e) { } } } }
#ifndef <API key> #define <API key> #define CLK_ARC_PLL 0 #define CLK_ARC 1 #define CLK_DDR_PLL 2 #define CLK_SYS_PLL 3 #define CLK_SYS_APB 4 #define CLK_SYS_AXI 5 #define CLK_SYS_ETH 6 #define CLK_SYS_USB 7 #define CLK_SYS_SDIO 8 #define CLK_SYS_HDMI 9 #define CLK_SYS_GFX_CORE 10 #define CLK_SYS_GFX_DMA 11 #define CLK_SYS_GFX_CFG 12 #define CLK_SYS_DMAC_CORE 13 #define CLK_SYS_DMAC_CFG 14 #define CLK_SYS_SDIO_REF 15 #define CLK_SYS_SPI_REF 16 #define CLK_SYS_I2C_REF 17 #define CLK_SYS_UART_REF 18 #define CLK_SYS_EBI_REF 19 #define CLK_TUN_PLL 20 #define CLK_TUN_TUN 21 #define CLK_TUN_ROM 22 #define CLK_TUN_PWM 23 #define CLK_HDMI_PLL 24 #define CLK_HDMI 25 #endif /* <API key> */
// <API key>: GPL-2.0-or-later #include <linux/bitops.h> #include <linux/clk.h> #include <linux/interrupt.h> #include <linux/fs.h> #include <linux/kfifo.h> #include <linux/mfd/syscon.h> #include <linux/miscdevice.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_device.h> #include <linux/platform_device.h> #include <linux/poll.h> #include <linux/regmap.h> #define DEVICE_NAME "aspeed-lpc-snoop" #define NUM_SNOOP_CHANNELS 2 #define SNOOP_FIFO_SIZE 2048 #define HICR5 0x0 #define HICR5_EN_SNP0W BIT(0) #define HICR5_ENINT_SNP0W BIT(1) #define HICR5_EN_SNP1W BIT(2) #define HICR5_ENINT_SNP1W BIT(3) #define HICR6 0x4 #define HICR6_STR_SNP0W BIT(0) #define HICR6_STR_SNP1W BIT(1) #define SNPWADR 0x10 #define SNPWADR_CH0_MASK GENMASK(15, 0) #define SNPWADR_CH0_SHIFT 0 #define SNPWADR_CH1_MASK GENMASK(31, 16) #define SNPWADR_CH1_SHIFT 16 #define SNPWDR 0x14 #define SNPWDR_CH0_MASK GENMASK(7, 0) #define SNPWDR_CH0_SHIFT 0 #define SNPWDR_CH1_MASK GENMASK(15, 8) #define SNPWDR_CH1_SHIFT 8 #define HICRB 0x80 #define HICRB_ENSNP0D BIT(14) #define HICRB_ENSNP1D BIT(15) struct <API key> { /* The ast2400 has bits 14 and 15 as reserved, whereas the ast2500 * can use them. */ unsigned int has_hicrb_ensnp; }; struct <API key> { struct kfifo fifo; wait_queue_head_t wq; struct miscdevice miscdev; }; struct aspeed_lpc_snoop { struct regmap *regmap; int irq; struct clk *clk; struct <API key> chan[NUM_SNOOP_CHANNELS]; }; static struct <API key> *snoop_file_to_chan(struct file *file) { return container_of(file->private_data, struct <API key>, miscdev); } static ssize_t snoop_file_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) { struct <API key> *chan = snoop_file_to_chan(file); unsigned int copied; int ret = 0; if (kfifo_is_empty(&chan->fifo)) { if (file->f_flags & O_NONBLOCK) return -EAGAIN; ret = <API key>(chan->wq, !kfifo_is_empty(&chan->fifo)); if (ret == -ERESTARTSYS) return -EINTR; } ret = kfifo_to_user(&chan->fifo, buffer, count, &copied); return ret ? ret : copied; } static __poll_t snoop_file_poll(struct file *file, struct poll_table_struct *pt) { struct <API key> *chan = snoop_file_to_chan(file); poll_wait(file, &chan->wq, pt); return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0; } static const struct file_operations snoop_fops = { .owner = THIS_MODULE, .read = snoop_file_read, .poll = snoop_file_poll, .llseek = noop_llseek, }; /* Save a byte to a FIFO and discard the oldest byte if FIFO is full */ static void <API key>(struct <API key> *chan, u8 val) { if (!kfifo_initialized(&chan->fifo)) return; if (kfifo_is_full(&chan->fifo)) kfifo_skip(&chan->fifo); kfifo_put(&chan->fifo, val); <API key>(&chan->wq); } static irqreturn_t <API key>(int irq, void *arg) { struct aspeed_lpc_snoop *lpc_snoop = arg; u32 reg, data; if (regmap_read(lpc_snoop->regmap, HICR6, &reg)) return IRQ_NONE; /* Check if one of the snoop channels is interrupting */ reg &= (HICR6_STR_SNP0W | HICR6_STR_SNP1W); if (!reg) return IRQ_NONE; /* Ack pending IRQs */ regmap_write(lpc_snoop->regmap, HICR6, reg); /* Read and save most recent snoop'ed data byte to FIFO */ regmap_read(lpc_snoop->regmap, SNPWDR, &data); if (reg & HICR6_STR_SNP0W) { u8 val = (data & SNPWDR_CH0_MASK) >> SNPWDR_CH0_SHIFT; <API key>(&lpc_snoop->chan[0], val); } if (reg & HICR6_STR_SNP1W) { u8 val = (data & SNPWDR_CH1_MASK) >> SNPWDR_CH1_SHIFT; <API key>(&lpc_snoop->chan[1], val); } return IRQ_HANDLED; } static int <API key>(struct aspeed_lpc_snoop *lpc_snoop, struct platform_device *pdev) { struct device *dev = &pdev->dev; int rc; lpc_snoop->irq = platform_get_irq(pdev, 0); if (!lpc_snoop->irq) return -ENODEV; rc = devm_request_irq(dev, lpc_snoop->irq, <API key>, IRQF_SHARED, DEVICE_NAME, lpc_snoop); if (rc < 0) { dev_warn(dev, "Unable to request IRQ %d\n", lpc_snoop->irq); lpc_snoop->irq = 0; return rc; } return 0; } static int <API key>(struct aspeed_lpc_snoop *lpc_snoop, struct device *dev, int channel, u16 lpc_port) { int rc = 0; u32 hicr5_en, snpwadr_mask, snpwadr_shift, hicrb_en; const struct <API key> *model_data = <API key>(dev); init_waitqueue_head(&lpc_snoop->chan[channel].wq); /* Create FIFO datastructure */ rc = kfifo_alloc(&lpc_snoop->chan[channel].fifo, SNOOP_FIFO_SIZE, GFP_KERNEL); if (rc) return rc; lpc_snoop->chan[channel].miscdev.minor = MISC_DYNAMIC_MINOR; lpc_snoop->chan[channel].miscdev.name = devm_kasprintf(dev, GFP_KERNEL, "%s%d", DEVICE_NAME, channel); lpc_snoop->chan[channel].miscdev.fops = &snoop_fops; lpc_snoop->chan[channel].miscdev.parent = dev; rc = misc_register(&lpc_snoop->chan[channel].miscdev); if (rc) return rc; /* Enable LPC snoop channel at requested port */ switch (channel) { case 0: hicr5_en = HICR5_EN_SNP0W | HICR5_ENINT_SNP0W; snpwadr_mask = SNPWADR_CH0_MASK; snpwadr_shift = SNPWADR_CH0_SHIFT; hicrb_en = HICRB_ENSNP0D; break; case 1: hicr5_en = HICR5_EN_SNP1W | HICR5_ENINT_SNP1W; snpwadr_mask = SNPWADR_CH1_MASK; snpwadr_shift = SNPWADR_CH1_SHIFT; hicrb_en = HICRB_ENSNP1D; break; default: return -EINVAL; } regmap_update_bits(lpc_snoop->regmap, HICR5, hicr5_en, hicr5_en); regmap_update_bits(lpc_snoop->regmap, SNPWADR, snpwadr_mask, lpc_port << snpwadr_shift); if (model_data->has_hicrb_ensnp) regmap_update_bits(lpc_snoop->regmap, HICRB, hicrb_en, hicrb_en); return rc; } static void <API key>(struct aspeed_lpc_snoop *lpc_snoop, int channel) { switch (channel) { case 0: regmap_update_bits(lpc_snoop->regmap, HICR5, HICR5_EN_SNP0W | HICR5_ENINT_SNP0W, 0); break; case 1: regmap_update_bits(lpc_snoop->regmap, HICR5, HICR5_EN_SNP1W | HICR5_ENINT_SNP1W, 0); break; default: return; } kfifo_free(&lpc_snoop->chan[channel].fifo); misc_deregister(&lpc_snoop->chan[channel].miscdev); } static int <API key>(struct platform_device *pdev) { struct aspeed_lpc_snoop *lpc_snoop; struct device *dev; u32 port; int rc; dev = &pdev->dev; lpc_snoop = devm_kzalloc(dev, sizeof(*lpc_snoop), GFP_KERNEL); if (!lpc_snoop) return -ENOMEM; lpc_snoop->regmap = <API key>( pdev->dev.parent->of_node); if (IS_ERR(lpc_snoop->regmap)) { dev_err(dev, "Couldn't get regmap\n"); return -ENODEV; } dev_set_drvdata(&pdev->dev, lpc_snoop); rc = <API key>(dev->of_node, "snoop-ports", 0, &port); if (rc) { dev_err(dev, "no snoop ports configured\n"); return -ENODEV; } lpc_snoop->clk = devm_clk_get(dev, NULL); if (IS_ERR(lpc_snoop->clk)) { rc = PTR_ERR(lpc_snoop->clk); if (rc != -EPROBE_DEFER) dev_err(dev, "couldn't get clock\n"); return rc; } rc = clk_prepare_enable(lpc_snoop->clk); if (rc) { dev_err(dev, "couldn't enable clock\n"); return rc; } rc = <API key>(lpc_snoop, pdev); if (rc) goto err; rc = <API key>(lpc_snoop, dev, 0, port); if (rc) goto err; /* Configuration of 2nd snoop channel port is optional */ if (<API key>(dev->of_node, "snoop-ports", 1, &port) == 0) { rc = <API key>(lpc_snoop, dev, 1, port); if (rc) { <API key>(lpc_snoop, 0); goto err; } } return 0; err: <API key>(lpc_snoop->clk); return rc; } static int <API key>(struct platform_device *pdev) { struct aspeed_lpc_snoop *lpc_snoop = dev_get_drvdata(&pdev->dev); /* Disable both snoop channels */ <API key>(lpc_snoop, 0); <API key>(lpc_snoop, 1); <API key>(lpc_snoop->clk); return 0; } static const struct <API key> ast2400_model_data = { .has_hicrb_ensnp = 0, }; static const struct <API key> ast2500_model_data = { .has_hicrb_ensnp = 1, }; static const struct of_device_id <API key>[] = { { .compatible = "aspeed,ast2400-lpc-snoop", .data = &ast2400_model_data }, { .compatible = "aspeed,ast2500-lpc-snoop", .data = &ast2500_model_data }, { }, }; static struct platform_driver <API key> = { .driver = { .name = DEVICE_NAME, .of_match_table = <API key>, }, .probe = <API key>, .remove = <API key>, }; <API key>(<API key>); MODULE_DEVICE_TABLE(of, <API key>); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Robert Lippert <rlippert@google.com>"); MODULE_DESCRIPTION("Linux driver to control Aspeed LPC snoop functionality");
#include "config.h" #include "TemplateRegistryKey.h" #include "<API key>.h" namespace JSC { TemplateRegistryKey::~TemplateRegistryKey() { if (m_table) m_table->unregister(*this); } } // namespace JSC
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Namespace PHP</title> <link rel="stylesheet" href="resources/style.css?2177189700"> </head> <body> <div id="left"> <div id="menu"> <a href="index.html" title="Overview"><span>Overview</span></a> <div id="groups"> <h3>Namespaces</h3> <ul> <li><a href="<API key>.html">Magyarjeti<span></span></a> <ul> <li><a href="<API key>.Loripsum.html">Loripsum<span></span></a> <ul> <li><a href="<API key>.Loripsum.Http.html">Http</a> </li> </ul></li></ul></li> <li class="active"><a href="namespace-PHP.html">PHP</a> </li> </ul> </div> <hr> <div id="elements"> <h3>Exceptions</h3> <ul> <li><a href="class-Exception.html">Exception</a></li> <li><a href="<API key>.html">RuntimeException</a></li> </ul> </div> </div> </div> <div id="splitter"></div> <div id="right"> <div id="rightInner"> <form id="search"> <input type="hidden" name="cx" value=""> <input type="hidden" name="ie" value="UTF-8"> <input type="text" name="q" class="text" placeholder="Search"> </form> <div id="navigation"> <ul> <li> <a href="index.html" title="Overview"><span>Overview</span></a> </li> <li class="active"> <span>Namespace</span> </li> <li> <span>Class</span> </li> </ul> <ul> <li> <a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a> </li> </ul> <ul> </ul> </div> <div id="content" class="namespace"> <h1>Namespace PHP</h1> <table class="summary" id="exceptions"> <caption>Exceptions summary</caption> <tr> <td class="name"><a href="class-Exception.html">Exception</a></td> <td> </td> </tr> <tr> <td class="name"><a href="<API key>.html">RuntimeException</a></td> <td> </td> </tr> </table> </div> <div id="footer"> API documentation generated by <a href="http://apigen.org">ApiGen</a> </div> </div> </div> <script src="resources/combined.js?721046668"></script> <script src="elementlist.js?2204959300"></script> </body> </html>
<?php if( ! defined( 'NV_IS_MOD_SEARCH' ) ) die( 'Stop!!!' ); $db->sqlreset() ->select( 'COUNT(*)' ) ->from(NV_PREFIXLANG . '_' . $m_values['module_data']) ->where( 'status=1 AND (' . nv_like_logic( 'title', $dbkeyword, $logic ) . ' OR ' . nv_like_logic( 'description', $dbkeyword, $logic ) . ' OR ' . nv_like_logic( 'bodytext', $dbkeyword, $logic ) . ')' ); $all_page = $db->query( $db->sql() )->fetchColumn(); if( $all_page ) { $link = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&amp;' . NV_NAME_VARIABLE . '=' . $m_values['module_name'] . '&amp;' . NV_OP_VARIABLE . '='; $db->select( 'id,title, alias, description, bodytext' ) ->limit( $limit ) ->offset( $pages ); $result = $db->query( $db->sql() ); while( list( $id, $tilterow, $alias, $description, $content ) = $result->fetch( 3 ) ) { $result_array[] = array( 'link' => $link . $alias . $global_config['rewrite_exturl'], 'title' => BoldKeywordInStr( $tilterow, $key, $logic ), 'content' => BoldKeywordInStr( $description . ' ' . $content, $key, $logic ) ); } } ?>
#include <linux/slab.h> #include <linux/poll.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/jhash.h> #include <linux/init.h> #include <linux/futex.h> #include <linux/mount.h> #include <linux/pagemap.h> #include <linux/syscalls.h> #include <linux/signal.h> #include <linux/export.h> #include <linux/magic.h> #include <linux/pid.h> #include <linux/nsproxy.h> #include <linux/ptrace.h> #include <linux/sched/rt.h> #include <linux/hugetlb.h> #include <linux/freezer.h> #include <linux/bootmem.h> #include <linux/fault-inject.h> #include <asm/futex.h> #include "locking/rtmutex_common.h" #ifndef <API key> int __read_mostly <API key>; #endif /* * Futex flags used to encode options to functions and preserve them across * restarts. */ #define FLAGS_SHARED 0x01 #define FLAGS_CLOCKRT 0x02 #define FLAGS_HAS_TIMEOUT 0x04 /* * Priority Inheritance state: */ struct futex_pi_state { /* * list of 'owned' pi_state instances - these have to be * cleaned up in do_exit() if the task exits prematurely: */ struct list_head list; /* * The PI object: */ struct rt_mutex pi_mutex; struct task_struct *owner; atomic_t refcount; union futex_key key; }; /** * struct futex_q - The hashed futex queue entry, one per waiting task * @list: priority-sorted list of tasks waiting on this futex * @task: the task waiting on the futex * @lock_ptr: the hash bucket lock * @key: the key the futex is hashed on * @pi_state: optional priority inheritance state * @rt_waiter: rt_waiter storage for use with requeue_pi * @requeue_pi_key: the requeue_pi target futex key * @bitset: bitset for the optional bitmasked wakeup * * We use this hashed waitqueue, instead of a normal wait_queue_t, so * we can wake only the relevant ones (hashed queues may be shared). * * A futex_q has a woken state, just like tasks have TASK_RUNNING. * It is considered woken when plist_node_empty(&q->list) || q->lock_ptr == 0. * The order of wakeup is always to make the first condition true, then * the second. * * PI futexes are typically woken before they are removed from the hash list via * the rt_mutex code. See unqueue_me_pi(). */ struct futex_q { struct plist_node list; struct task_struct *task; spinlock_t *lock_ptr; union futex_key key; struct futex_pi_state *pi_state; struct rt_mutex_waiter *rt_waiter; union futex_key *requeue_pi_key; u32 bitset; }; static const struct futex_q futex_q_init = { /* list gets initialized in queue_me()*/ .key = FUTEX_KEY_INIT, .bitset = <API key> }; /* * Hash buckets are shared by all the futex_keys that hash to the same * location. Each key may have multiple futex_q structures, one for each task * waiting on a futex. */ struct futex_hash_bucket { atomic_t waiters; spinlock_t lock; struct plist_head chain; } <API key>; /* * The base of the bucket array and its size are always used together * (after initialization only in hash_futex()), so ensure that they * reside in the same cacheline. */ static struct { struct futex_hash_bucket *queues; unsigned long hashsize; } __futex_data __read_mostly __aligned(2*sizeof(long)); #define futex_queues (__futex_data.queues) #define futex_hashsize (__futex_data.hashsize) /* * Fault injections for futexes. */ #ifdef CONFIG_FAIL_FUTEX static struct { struct fault_attr attr; bool ignore_private; } fail_futex = { .attr = <API key>, .ignore_private = false, }; static int __init setup_fail_futex(char *str) { return setup_fault_attr(&fail_futex.attr, str); } __setup("fail_futex=", setup_fail_futex); static bool should_fail_futex(bool fshared) { if (fail_futex.ignore_private && !fshared) return false; return should_fail(&fail_futex.attr, 1); } #ifdef <API key> static int __init fail_futex_debugfs(void) { umode_t mode = S_IFREG | S_IRUSR | S_IWUSR; struct dentry *dir; dir = <API key>("fail_futex", NULL, &fail_futex.attr); if (IS_ERR(dir)) return PTR_ERR(dir); if (!debugfs_create_bool("ignore-private", mode, dir, &fail_futex.ignore_private)) { <API key>(dir); return -ENOMEM; } return 0; } late_initcall(fail_futex_debugfs); #endif /* <API key> */ #else static inline bool should_fail_futex(bool fshared) { return false; } #endif /* CONFIG_FAIL_FUTEX */ static inline void futex_get_mm(union futex_key *key) { atomic_inc(&key->private.mm->mm_count); /* * Ensure futex_get_mm() implies a full barrier such that * get_futex_key() implies a full barrier. This is relied upon * as full barrier (B), see the ordering comment above. */ <API key>(); } /* * Reflects a new waiter being added to the waitqueue. */ static inline void hb_waiters_inc(struct futex_hash_bucket *hb) { #ifdef CONFIG_SMP atomic_inc(&hb->waiters); /* * Full barrier (A), see the ordering comment above. */ <API key>(); #endif } /* * Reflects a waiter being removed from the waitqueue by wakeup * paths. */ static inline void hb_waiters_dec(struct futex_hash_bucket *hb) { #ifdef CONFIG_SMP atomic_dec(&hb->waiters); #endif } static inline int hb_waiters_pending(struct futex_hash_bucket *hb) { #ifdef CONFIG_SMP return atomic_read(&hb->waiters); #else return 1; #endif } /* * We hash on the keys returned from get_futex_key (see below). */ static struct futex_hash_bucket *hash_futex(union futex_key *key) { u32 hash = jhash2((u32*)&key->both.word, (sizeof(key->both.word)+sizeof(key->both.ptr))/4, key->both.offset); return &futex_queues[hash & (futex_hashsize - 1)]; } /* * Return 1 if two futex_keys are equal, 0 otherwise. */ static inline int match_futex(union futex_key *key1, union futex_key *key2) { return (key1 && key2 && key1->both.word == key2->both.word && key1->both.ptr == key2->both.ptr && key1->both.offset == key2->both.offset); } /* * Take a reference to the resource addressed by a key. * Can be called while holding spinlocks. * */ static void get_futex_key_refs(union futex_key *key) { if (!key->both.ptr) return; switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { case FUT_OFF_INODE: ihold(key->shared.inode); /* implies MB (B) */ break; case FUT_OFF_MMSHARED: futex_get_mm(key); /* implies MB (B) */ break; default: /* * Private futexes do not hold reference on an inode or * mm, therefore the only purpose of calling get_futex_key_refs * is because we need the barrier for the lockless waiter check. */ smp_mb(); /* explicit MB (B) */ } } /* * Drop a reference to the resource addressed by a key. * The hash bucket spinlock must not be held. This is * a no-op for private futexes, see comment in the get * counterpart. */ static void drop_futex_key_refs(union futex_key *key) { if (!key->both.ptr) { /* If we're here then we tried to put a key we failed to get */ WARN_ON_ONCE(1); return; } switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) { case FUT_OFF_INODE: iput(key->shared.inode); break; case FUT_OFF_MMSHARED: mmdrop(key->private.mm); break; } } /** * get_futex_key() - Get parameters which are the keys for a futex * @uaddr: virtual address of the futex * @fshared: 0 for a PROCESS_PRIVATE futex, 1 for PROCESS_SHARED * @key: address where result is stored. * @rw: mapping needs to be read/write (values: VERIFY_READ, * VERIFY_WRITE) * * Return: a negative error code or 0 * * The key words are stored in *key on success. * * For shared mappings, it's (page->index, file_inode(vma->vm_file), * offset_within_page). For private mappings, it's (uaddr, current->mm). * We can usually work out the index without swapping in the page. * * lock_page() might sleep, the caller should not hold a spinlock. */ static int get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw) { unsigned long address = (unsigned long)uaddr; struct mm_struct *mm = current->mm; struct page *page; struct address_space *mapping; int err, ro = 0; /* * The futex address must be "naturally" aligned. */ key->both.offset = address % PAGE_SIZE; if (unlikely((address % sizeof(u32)) != 0)) return -EINVAL; address -= key->both.offset; if (unlikely(!access_ok(rw, uaddr, sizeof(u32)))) return -EFAULT; if (unlikely(should_fail_futex(fshared))) return -EFAULT; /* * PROCESS_PRIVATE futexes are fast. * As the mm cannot disappear under us and the 'key' only needs * virtual address, we dont even have to find the underlying vma. * Note : We do have to check 'uaddr' is a valid user address, * but access_ok() should be faster than find_vma() */ if (!fshared) { key->private.mm = mm; key->private.address = address; get_futex_key_refs(key); /* implies MB (B) */ return 0; } again: /* Ignore any VERIFY_READ mapping (futex common case) */ if (unlikely(should_fail_futex(fshared))) return -EFAULT; err = get_user_pages_fast(address, 1, 1, &page); /* * If write access is not required (eg. FUTEX_WAIT), try * and get read-only access. */ if (err == -EFAULT && rw == VERIFY_READ) { err = get_user_pages_fast(address, 1, 0, &page); ro = 1; } if (err < 0) return err; else err = 0; lock_page(page); /* * If page->mapping is NULL, then it cannot be a PageAnon * page; but it might be the ZERO_PAGE or in the gate area or * in a special mapping (all cases which we are happy to fail); * or it may have been a good file page when get_user_pages_fast * found it, but truncated or holepunched or subjected to * <API key> before we got the page lock (also * cases which we are happy to fail). And we hold a reference, * so refcount care in <API key>'s remove_mapping * prevents drop_caches from setting mapping to NULL beneath us. * * The case we do have to guard against is when memory pressure made * shmem_writepage move it from filecache to swapcache beneath us: * an unlikely race, but we do need to retry for page->mapping. */ mapping = compound_head(page)->mapping; if (!mapping) { int shmem_swizzled = PageSwapCache(page); unlock_page(page); put_page(page); if (shmem_swizzled) goto again; return -EFAULT; } /* * Private mappings are handled in a simple way. * * NOTE: When userspace waits on a MAP_SHARED mapping, even if * it's a read-only handle, it's expected that futexes attach to * the object not the particular process. */ if (PageAnon(page)) { /* * A RO anonymous page will never change and thus doesn't make * sense for futex operations. */ if (unlikely(should_fail_futex(fshared)) || ro) { err = -EFAULT; goto out; } key->both.offset |= FUT_OFF_MMSHARED; /* ref taken on mm */ key->private.mm = mm; key->private.address = address; } else { key->both.offset |= FUT_OFF_INODE; /* inode-based key */ key->shared.inode = mapping->host; key->shared.pgoff = basepage_index(page); } get_futex_key_refs(key); /* implies MB (B) */ out: unlock_page(page); put_page(page); return err; } static inline void put_futex_key(union futex_key *key) { drop_futex_key_refs(key); } /** * <API key>() - Fault in user address and verify RW access * @uaddr: pointer to faulting user space address * * Slow path to fixup the fault we just took in the atomic write * access to @uaddr. * * We have no generic implementation of a non-destructive write to the * user address. We know that we faulted in the atomic pagefault * disabled section so we can as well avoid the #PF overhead by * calling get_user_pages() right away. */ static int <API key>(u32 __user *uaddr) { struct mm_struct *mm = current->mm; int ret; down_read(&mm->mmap_sem); ret = fixup_user_fault(current, mm, (unsigned long)uaddr, FAULT_FLAG_WRITE, NULL); up_read(&mm->mmap_sem); return ret < 0 ? ret : 0; } /** * futex_top_waiter() - Return the highest priority waiter on a futex * @hb: the hash bucket the futex_q's reside in * @key: the futex key (to distinguish it from other futex futex_q's) * * Must be called with the hb lock held. */ static struct futex_q *futex_top_waiter(struct futex_hash_bucket *hb, union futex_key *key) { struct futex_q *this; <API key>(this, &hb->chain, list) { if (match_futex(&this->key, key)) return this; } return NULL; } static int <API key>(u32 *curval, u32 __user *uaddr, u32 uval, u32 newval) { int ret; pagefault_disable(); ret = <API key>(curval, uaddr, uval, newval); pagefault_enable(); return ret; } static int <API key>(u32 *dest, u32 __user *from) { int ret; pagefault_disable(); ret = <API key>(dest, from, sizeof(u32)); pagefault_enable(); return ret ? -EFAULT : 0; } /* * PI code: */ static int <API key>(void) { struct futex_pi_state *pi_state; if (likely(current->pi_state_cache)) return 0; pi_state = kzalloc(sizeof(*pi_state), GFP_KERNEL); if (!pi_state) return -ENOMEM; INIT_LIST_HEAD(&pi_state->list); /* pi_mutex gets initialized later */ pi_state->owner = NULL; atomic_set(&pi_state->refcount, 1); pi_state->key = FUTEX_KEY_INIT; current->pi_state_cache = pi_state; return 0; } static struct futex_pi_state * alloc_pi_state(void) { struct futex_pi_state *pi_state = current->pi_state_cache; WARN_ON(!pi_state); current->pi_state_cache = NULL; return pi_state; } /* * Drops a reference to the pi_state object and frees or caches it * when the last reference is gone. * * Must be called with the hb lock held. */ static void put_pi_state(struct futex_pi_state *pi_state) { if (!pi_state) return; if (!atomic_dec_and_test(&pi_state->refcount)) return; /* * If pi_state->owner is NULL, the owner is most probably dying * and has cleaned up the pi_state already */ if (pi_state->owner) { raw_spin_lock_irq(&pi_state->owner->pi_lock); list_del_init(&pi_state->list); raw_spin_unlock_irq(&pi_state->owner->pi_lock); <API key>(&pi_state->pi_mutex, pi_state->owner); } if (current->pi_state_cache) kfree(pi_state); else { /* * pi_state->list is already empty. * clear pi_state->owner. * refcount is at 0 - put it back to 1. */ pi_state->owner = NULL; atomic_set(&pi_state->refcount, 1); current->pi_state_cache = pi_state; } } /* * Look up the task based on what TID userspace gave us. * We dont trust it. */ static struct task_struct * futex_find_get_task(pid_t pid) { struct task_struct *p; rcu_read_lock(); p = find_task_by_vpid(pid); if (p) get_task_struct(p); rcu_read_unlock(); return p; } /* * This task is holding PI mutexes at exit time => bad. * Kernel cleans up PI-state, but userspace is likely hosed. * (Robust-futex cleanup is separate and might save the day for userspace.) */ void exit_pi_state_list(struct task_struct *curr) { struct list_head *next, *head = &curr->pi_state_list; struct futex_pi_state *pi_state; struct futex_hash_bucket *hb; union futex_key key = FUTEX_KEY_INIT; if (!<API key>) return; /* * We are a ZOMBIE and nobody can enqueue itself on * pi_state_list anymore, but we have to be careful * versus waiters unqueueing themselves: */ raw_spin_lock_irq(&curr->pi_lock); while (!list_empty(head)) { next = head->next; pi_state = list_entry(next, struct futex_pi_state, list); key = pi_state->key; hb = hash_futex(&key); raw_spin_unlock_irq(&curr->pi_lock); spin_lock(&hb->lock); raw_spin_lock_irq(&curr->pi_lock); /* * We dropped the pi-lock, so re-check whether this * task still owns the PI-state: */ if (head->next != next) { spin_unlock(&hb->lock); continue; } WARN_ON(pi_state->owner != curr); WARN_ON(list_empty(&pi_state->list)); list_del_init(&pi_state->list); pi_state->owner = NULL; raw_spin_unlock_irq(&curr->pi_lock); rt_mutex_unlock(&pi_state->pi_mutex); spin_unlock(&hb->lock); raw_spin_lock_irq(&curr->pi_lock); } raw_spin_unlock_irq(&curr->pi_lock); } /* * Validate that the existing waiter has a pi_state and sanity check * the pi_state against the user space value. If correct, attach to * it. */ static int attach_to_pi_state(u32 uval, struct futex_pi_state *pi_state, struct futex_pi_state **ps) { pid_t pid = uval & FUTEX_TID_MASK; /* * Userspace might have messed up non-PI and PI futexes [3] */ if (unlikely(!pi_state)) return -EINVAL; WARN_ON(!atomic_read(&pi_state->refcount)); /* * Handle the owner died case: */ if (uval & FUTEX_OWNER_DIED) { /* * exit_pi_state_list sets owner to NULL and wakes the * topmost waiter. The task which acquires the * pi_state->rt_mutex will fixup owner. */ if (!pi_state->owner) { /* * No pi state owner, but the user space TID * is not 0. Inconsistent state. [5] */ if (pid) return -EINVAL; /* * Take a ref on the state and return success. [4] */ goto out_state; } /* * If TID is 0, then either the dying owner has not * yet executed exit_pi_state_list() or some waiter * acquired the rtmutex in the pi state, but did not * yet fixup the TID in user space. * * Take a ref on the state and return success. [6] */ if (!pid) goto out_state; } else { /* * If the owner died bit is not set, then the pi_state * must have an owner. [7] */ if (!pi_state->owner) return -EINVAL; } /* * Bail out if user space manipulated the futex value. If pi * state exists then the owner TID must be the same as the * user space TID. [9/10] */ if (pid != task_pid_vnr(pi_state->owner)) return -EINVAL; out_state: atomic_inc(&pi_state->refcount); *ps = pi_state; return 0; } /* * Lookup the task for the TID provided from user space and attach to * it after doing proper sanity checks. */ static int attach_to_pi_owner(u32 uval, union futex_key *key, struct futex_pi_state **ps) { pid_t pid = uval & FUTEX_TID_MASK; struct futex_pi_state *pi_state; struct task_struct *p; /* * We are the first waiter - try to look up the real owner and attach * the new pi_state to it, but bail out when TID = 0 [1] */ if (!pid) return -ESRCH; p = futex_find_get_task(pid); if (!p) return -ESRCH; if (unlikely(p->flags & PF_KTHREAD)) { put_task_struct(p); return -EPERM; } /* * We need to look at the task state flags to figure out, * whether the task is exiting. To protect against the do_exit * change of the task flags, we do this protected by * p->pi_lock: */ raw_spin_lock_irq(&p->pi_lock); if (unlikely(p->flags & PF_EXITING)) { /* * The task is on the way out. When PF_EXITPIDONE is * set, we know that the task has finished the * cleanup: */ int ret = (p->flags & PF_EXITPIDONE) ? -ESRCH : -EAGAIN; raw_spin_unlock_irq(&p->pi_lock); put_task_struct(p); return ret; } /* * No existing pi state. First waiter. [2] */ pi_state = alloc_pi_state(); /* * Initialize the pi_mutex in locked state and make @p * the owner of it: */ <API key>(&pi_state->pi_mutex, p); /* Store the key for possible exit cleanups: */ pi_state->key = *key; WARN_ON(!list_empty(&pi_state->list)); list_add(&pi_state->list, &p->pi_state_list); pi_state->owner = p; raw_spin_unlock_irq(&p->pi_lock); put_task_struct(p); *ps = pi_state; return 0; } static int lookup_pi_state(u32 uval, struct futex_hash_bucket *hb, union futex_key *key, struct futex_pi_state **ps) { struct futex_q *match = futex_top_waiter(hb, key); /* * If there is a waiter on that futex, validate it and * attach to the pi_state when the validation succeeds. */ if (match) return attach_to_pi_state(uval, match->pi_state, ps); /* * We are the first waiter - try to look up the owner based on * @uval and attach to it. */ return attach_to_pi_owner(uval, key, ps); } static int <API key>(u32 __user *uaddr, u32 uval, u32 newval) { u32 uninitialized_var(curval); if (unlikely(should_fail_futex(true))) return -EFAULT; if (unlikely(<API key>(&curval, uaddr, uval, newval))) return -EFAULT; /*If user space value changed, let the caller retry */ return curval != uval ? -EAGAIN : 0; } /** * <API key>() - Atomic work required to acquire a pi aware futex * @uaddr: the pi futex user address * @hb: the pi futex hash bucket * @key: the futex key associated with uaddr and hb * @ps: the pi_state pointer where we store the result of the * lookup * @task: the task to perform the atomic lock work for. This will * be "current" except in the case of requeue pi. * @set_waiters: force setting the FUTEX_WAITERS bit (1) or not (0) * * Return: * 0 - ready to wait; * 1 - acquired the lock; * <0 - error * * The hb->lock and futex_key refs shall be held by the caller. */ static int <API key>(u32 __user *uaddr, struct futex_hash_bucket *hb, union futex_key *key, struct futex_pi_state **ps, struct task_struct *task, int set_waiters) { u32 uval, newval, vpid = task_pid_vnr(task); struct futex_q *match; int ret; /* * Read the user space value first so we can validate a few * things before proceeding further. */ if (<API key>(&uval, uaddr)) return -EFAULT; if (unlikely(should_fail_futex(true))) return -EFAULT; /* * Detect deadlocks. */ if ((unlikely((uval & FUTEX_TID_MASK) == vpid))) return -EDEADLK; if ((unlikely(should_fail_futex(true)))) return -EDEADLK; /* * Lookup existing state first. If it exists, try to attach to * its pi_state. */ match = futex_top_waiter(hb, key); if (match) return attach_to_pi_state(uval, match->pi_state, ps); /* * No waiter and user TID is 0. We are here because the * waiters or the owner died bit is set or called from * requeue_cmp_pi or for whatever reason something took the * syscall. */ if (!(uval & FUTEX_TID_MASK)) { /* * We take over the futex. No other waiters and the user space * TID is 0. We preserve the owner died bit. */ newval = uval & FUTEX_OWNER_DIED; newval |= vpid; /* The futex requeue_pi code can enforce the waiters bit */ if (set_waiters) newval |= FUTEX_WAITERS; ret = <API key>(uaddr, uval, newval); /* If the take over worked, return 1 */ return ret < 0 ? ret : 1; } /* * First waiter. Set the waiters bit before attaching ourself to * the owner. If owner tries to unlock, it will be forced into * the kernel and blocked on hb->lock. */ newval = uval | FUTEX_WAITERS; ret = <API key>(uaddr, uval, newval); if (ret) return ret; /* * If the update of the user space value succeeded, we try to * attach to the owner. If that fails, no harm done, we only * set the FUTEX_WAITERS bit in the user space variable. */ return attach_to_pi_owner(uval, key, ps); } /** * __unqueue_futex() - Remove the futex_q from its futex_hash_bucket * @q: The futex_q to unqueue * * The q->lock_ptr must not be NULL and must be held by the caller. */ static void __unqueue_futex(struct futex_q *q) { struct futex_hash_bucket *hb; if (WARN_ON_SMP(!q->lock_ptr || !spin_is_locked(q->lock_ptr)) || WARN_ON(plist_node_empty(&q->list))) return; hb = container_of(q->lock_ptr, struct futex_hash_bucket, lock); plist_del(&q->list, &hb->chain); hb_waiters_dec(hb); } /* * The hash bucket lock must be held when this is called. * Afterwards, the futex_q must not be accessed. Callers * must ensure to later call wake_up_q() for the actual * wakeups to occur. */ static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q) { struct task_struct *p = q->task; if (WARN(q->pi_state || q->rt_waiter, "refusing to wake PI futex\n")) return; /* * Queue the task for later wakeup for after we've released * the hb->lock. wake_q_add() grabs reference to p. */ wake_q_add(wake_q, p); __unqueue_futex(q); /* * The waiting task can free the futex_q as soon as * q->lock_ptr = NULL is written, without taking any locks. A * memory barrier is required here to prevent the following * store to lock_ptr from getting ahead of the plist_del. */ smp_wmb(); q->lock_ptr = NULL; } static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this, struct futex_hash_bucket *hb) { struct task_struct *new_owner; struct futex_pi_state *pi_state = this->pi_state; u32 uninitialized_var(curval), newval; WAKE_Q(wake_q); bool deboost; int ret = 0; if (!pi_state) return -EINVAL; /* * If current does not own the pi_state then the futex is * inconsistent and user space fiddled with the futex value. */ if (pi_state->owner != current) return -EINVAL; raw_spin_lock(&pi_state->pi_mutex.wait_lock); new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); /* * It is possible that the next waiter (the one that brought * this owner to the kernel) timed out and is no longer * waiting on the lock. */ if (!new_owner) new_owner = this->task; /* * We pass it to the next owner. The WAITERS bit is always * kept enabled while there is PI state around. We cleanup the * owner died bit, because we are the owner. */ newval = FUTEX_WAITERS | task_pid_vnr(new_owner); if (unlikely(should_fail_futex(true))) ret = -EFAULT; if (<API key>(&curval, uaddr, uval, newval)) ret = -EFAULT; else if (curval != uval) ret = -EINVAL; if (ret) { raw_spin_unlock(&pi_state->pi_mutex.wait_lock); return ret; } raw_spin_lock_irq(&pi_state->owner->pi_lock); WARN_ON(list_empty(&pi_state->list)); list_del_init(&pi_state->list); raw_spin_unlock_irq(&pi_state->owner->pi_lock); raw_spin_lock_irq(&new_owner->pi_lock); WARN_ON(!list_empty(&pi_state->list)); list_add(&pi_state->list, &new_owner->pi_state_list); pi_state->owner = new_owner; raw_spin_unlock_irq(&new_owner->pi_lock); raw_spin_unlock(&pi_state->pi_mutex.wait_lock); deboost = <API key>(&pi_state->pi_mutex, &wake_q); /* * First unlock HB so the waiter does not spin on it once he got woken * up. Second wake up the waiter before the priority is adjusted. If we * deboost first (and lose our higher priority), then the task might get * scheduled away before the wake up can take place. */ spin_unlock(&hb->lock); wake_up_q(&wake_q); if (deboost) <API key>(current); return 0; } /* * Express the locking dependencies for lockdep: */ static inline void double_lock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) { if (hb1 <= hb2) { spin_lock(&hb1->lock); if (hb1 < hb2) spin_lock_nested(&hb2->lock, <API key>); } else { /* hb1 > hb2 */ spin_lock(&hb2->lock); spin_lock_nested(&hb1->lock, <API key>); } } static inline void double_unlock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) { spin_unlock(&hb1->lock); if (hb1 != hb2) spin_unlock(&hb2->lock); } /* * Wake up waiters matching bitset queued on this futex (uaddr). */ static int futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) { struct futex_hash_bucket *hb; struct futex_q *this, *next; union futex_key key = FUTEX_KEY_INIT; int ret; WAKE_Q(wake_q); if (!bitset) return -EINVAL; ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, VERIFY_READ); if (unlikely(ret != 0)) goto out; hb = hash_futex(&key); /* Make sure we really have tasks to wakeup */ if (!hb_waiters_pending(hb)) goto out_put_key; spin_lock(&hb->lock); <API key>(this, next, &hb->chain, list) { if (match_futex (&this->key, &key)) { if (this->pi_state || this->rt_waiter) { ret = -EINVAL; break; } /* Check if one of the bits is set in both bitsets */ if (!(this->bitset & bitset)) continue; mark_wake_futex(&wake_q, this); if (++ret >= nr_wake) break; } } spin_unlock(&hb->lock); wake_up_q(&wake_q); out_put_key: put_futex_key(&key); out: return ret; } /* * Wake up all waiters hashed on the physical page that is mapped * to this virtual address: */ static int futex_wake_op(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2, int nr_wake, int nr_wake2, int op) { union futex_key key1 = FUTEX_KEY_INIT, key2 = FUTEX_KEY_INIT; struct futex_hash_bucket *hb1, *hb2; struct futex_q *this, *next; int ret, op_ret; WAKE_Q(wake_q); retry: ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, VERIFY_READ); if (unlikely(ret != 0)) goto out; ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE); if (unlikely(ret != 0)) goto out_put_key1; hb1 = hash_futex(&key1); hb2 = hash_futex(&key2); retry_private: double_lock_hb(hb1, hb2); op_ret = <API key>(op, uaddr2); if (unlikely(op_ret < 0)) { double_unlock_hb(hb1, hb2); #ifndef CONFIG_MMU /* * we don't get EFAULT from MMU faults if we don't have an MMU, * but we might get them from range checking */ ret = op_ret; goto out_put_keys; #endif if (unlikely(op_ret != -EFAULT)) { ret = op_ret; goto out_put_keys; } ret = <API key>(uaddr2); if (ret) goto out_put_keys; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&key2); put_futex_key(&key1); goto retry; } <API key>(this, next, &hb1->chain, list) { if (match_futex (&this->key, &key1)) { if (this->pi_state || this->rt_waiter) { ret = -EINVAL; goto out_unlock; } mark_wake_futex(&wake_q, this); if (++ret >= nr_wake) break; } } if (op_ret > 0) { op_ret = 0; <API key>(this, next, &hb2->chain, list) { if (match_futex (&this->key, &key2)) { if (this->pi_state || this->rt_waiter) { ret = -EINVAL; goto out_unlock; } mark_wake_futex(&wake_q, this); if (++op_ret >= nr_wake2) break; } } ret += op_ret; } out_unlock: double_unlock_hb(hb1, hb2); wake_up_q(&wake_q); out_put_keys: put_futex_key(&key2); out_put_key1: put_futex_key(&key1); out: return ret; } /** * requeue_futex() - Requeue a futex_q from one hb to another * @q: the futex_q to requeue * @hb1: the source hash_bucket * @hb2: the target hash_bucket * @key2: the new key for the requeued futex_q */ static inline void requeue_futex(struct futex_q *q, struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2, union futex_key *key2) { /* * If key1 and key2 hash to the same bucket, no need to * requeue. */ if (likely(&hb1->chain != &hb2->chain)) { plist_del(&q->list, &hb1->chain); hb_waiters_dec(hb1); plist_add(&q->list, &hb2->chain); hb_waiters_inc(hb2); q->lock_ptr = &hb2->lock; } get_futex_key_refs(key2); q->key = *key2; } /** * <API key>() - Wake a task that acquired the lock during requeue * @q: the futex_q * @key: the key of the requeue target futex * @hb: the hash_bucket of the requeue target futex * * During futex_requeue, with requeue_pi=1, it is possible to acquire the * target futex if it is uncontended or via a lock steal. Set the futex_q key * to the requeue target futex so the waiter can detect the wakeup on the right * futex, but remove it from the hb and NULL the rt_waiter so it can detect * atomic lock acquisition. Set the q->lock_ptr to the requeue target hb->lock * to protect access to the pi_state to fixup the owner later. Must be called * with both q->lock_ptr and hb->lock held. */ static inline void <API key>(struct futex_q *q, union futex_key *key, struct futex_hash_bucket *hb) { get_futex_key_refs(key); q->key = *key; __unqueue_futex(q); WARN_ON(!q->rt_waiter); q->rt_waiter = NULL; q->lock_ptr = &hb->lock; wake_up_state(q->task, TASK_NORMAL); } /** * <API key>() - Attempt an atomic lock for the top waiter * @pifutex: the user address of the to futex * @hb1: the from futex hash bucket, must be locked by the caller * @hb2: the to futex hash bucket, must be locked by the caller * @key1: the from futex key * @key2: the to futex key * @ps: address to store the pi_state pointer * @set_waiters: force setting the FUTEX_WAITERS bit (1) or not (0) * * Try and get the lock on behalf of the top waiter if we can do it atomically. * Wake the top waiter if we succeed. If the caller specified set_waiters, * then direct <API key>() to force setting the FUTEX_WAITERS bit. * hb1 and hb2 must be held by the caller. * * Return: * 0 - failed to acquire the lock atomically; * >0 - acquired the lock, return value is vpid of the top_waiter * <0 - error */ static int <API key>(u32 __user *pifutex, struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2, union futex_key *key1, union futex_key *key2, struct futex_pi_state **ps, int set_waiters) { struct futex_q *top_waiter = NULL; u32 curval; int ret, vpid; if (<API key>(&curval, pifutex)) return -EFAULT; if (unlikely(should_fail_futex(true))) return -EFAULT; /* * Find the top_waiter and determine if there are additional waiters. * If the caller intends to requeue more than 1 waiter to pifutex, * force <API key>() to set the FUTEX_WAITERS bit now, * as we have means to handle the possible fault. If not, don't set * the bit unecessarily as it will force the subsequent unlock to enter * the kernel. */ top_waiter = futex_top_waiter(hb1, key1); /* There are no waiters, nothing for us to do. */ if (!top_waiter) return 0; /* Ensure we requeue to the expected futex. */ if (!match_futex(top_waiter->requeue_pi_key, key2)) return -EINVAL; /* * Try to take the lock for top_waiter. Set the FUTEX_WAITERS bit in * the contended case or if set_waiters is 1. The pi_state is returned * in ps in contended cases. */ vpid = task_pid_vnr(top_waiter->task); ret = <API key>(pifutex, hb2, key2, ps, top_waiter->task, set_waiters); if (ret == 1) { <API key>(top_waiter, key2, hb2); return vpid; } return ret; } /** * futex_requeue() - Requeue waiters from uaddr1 to uaddr2 * @uaddr1: source futex user address * @flags: futex flags (FLAGS_SHARED, etc.) * @uaddr2: target futex user address * @nr_wake: number of waiters to wake (must be 1 for requeue_pi) * @nr_requeue: number of waiters to requeue (0-INT_MAX) * @cmpval: @uaddr1 expected value (or %NULL) * @requeue_pi: if we are attempting to requeue from a non-pi futex to a * pi futex (pi to pi requeue is not supported) * * Requeue waiters on uaddr1 to uaddr2. In the requeue_pi case, try to acquire * uaddr2 atomically on behalf of the top waiter. * * Return: * >=0 - on success, the number of tasks requeued or woken; * <0 - on error */ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, u32 __user *uaddr2, int nr_wake, int nr_requeue, u32 *cmpval, int requeue_pi) { union futex_key key1 = FUTEX_KEY_INIT, key2 = FUTEX_KEY_INIT; int drop_count = 0, task_count = 0, ret; struct futex_pi_state *pi_state = NULL; struct futex_hash_bucket *hb1, *hb2; struct futex_q *this, *next; WAKE_Q(wake_q); if (requeue_pi) { /* * Requeue PI only works on two distinct uaddrs. This * check is only valid for private futexes. See below. */ if (uaddr1 == uaddr2) return -EINVAL; /* * requeue_pi requires a pi_state, try to allocate it now * without any locks in case it fails. */ if (<API key>()) return -ENOMEM; /* * requeue_pi must wake as many tasks as it can, up to nr_wake * + nr_requeue, since it acquires the rt_mutex prior to * returning to userspace, so as to not leave the rt_mutex with * waiters and no owner. However, second and third wake-ups * cannot be predicted as they involve race conditions with the * first wake and a fault while looking up the pi_state. Both * pthread_cond_signal() and <API key>() should * use nr_wake=1. */ if (nr_wake != 1) return -EINVAL; } retry: ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, VERIFY_READ); if (unlikely(ret != 0)) goto out; ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, requeue_pi ? VERIFY_WRITE : VERIFY_READ); if (unlikely(ret != 0)) goto out_put_key1; /* * The check above which compares uaddrs is not sufficient for * shared futexes. We need to compare the keys: */ if (requeue_pi && match_futex(&key1, &key2)) { ret = -EINVAL; goto out_put_keys; } hb1 = hash_futex(&key1); hb2 = hash_futex(&key2); retry_private: hb_waiters_inc(hb2); double_lock_hb(hb1, hb2); if (likely(cmpval != NULL)) { u32 curval; ret = <API key>(&curval, uaddr1); if (unlikely(ret)) { double_unlock_hb(hb1, hb2); hb_waiters_dec(hb2); ret = get_user(curval, uaddr1); if (ret) goto out_put_keys; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&key2); put_futex_key(&key1); goto retry; } if (curval != *cmpval) { ret = -EAGAIN; goto out_unlock; } } if (requeue_pi && (task_count - nr_wake < nr_requeue)) { /* * Attempt to acquire uaddr2 and wake the top waiter. If we * intend to requeue waiters, force setting the FUTEX_WAITERS * bit. We force this here where we are able to easily handle * faults rather in the requeue loop below. */ ret = <API key>(uaddr2, hb1, hb2, &key1, &key2, &pi_state, nr_requeue); /* * At this point the top_waiter has either taken uaddr2 or is * waiting on it. If the former, then the pi_state will not * exist yet, look it up one more time to ensure we have a * reference to it. If the lock was taken, ret contains the * vpid of the top waiter task. * If the lock was not taken, we have pi_state and an initial * refcount on it. In case of an error we have nothing. */ if (ret > 0) { WARN_ON(pi_state); drop_count++; task_count++; /* * If we acquired the lock, then the user space value * of uaddr2 should be vpid. It cannot be changed by * the top waiter as it is blocked on hb2 lock if it * tries to do so. If something fiddled with it behind * our back the pi state lookup might unearth it. So * we rather use the known value than rereading and * handing potential crap to lookup_pi_state. * * If that call succeeds then we have pi_state and an * initial refcount on it. */ ret = lookup_pi_state(ret, hb2, &key2, &pi_state); } switch (ret) { case 0: /* We hold a reference on the pi state. */ break; /* If the above failed, then pi_state is NULL */ case -EFAULT: double_unlock_hb(hb1, hb2); hb_waiters_dec(hb2); put_futex_key(&key2); put_futex_key(&key1); ret = <API key>(uaddr2); if (!ret) goto retry; goto out; case -EAGAIN: /* * Two reasons for this: * - Owner is exiting and we just wait for the * exit to complete. * - The user space value changed. */ double_unlock_hb(hb1, hb2); hb_waiters_dec(hb2); put_futex_key(&key2); put_futex_key(&key1); cond_resched(); goto retry; default: goto out_unlock; } } <API key>(this, next, &hb1->chain, list) { if (task_count - nr_wake >= nr_requeue) break; if (!match_futex(&this->key, &key1)) continue; /* * <API key> and <API key> should always * be paired with each other and no other futex ops. * * We should never be requeueing a futex_q with a pi_state, * which is awaiting a futex_unlock_pi(). */ if ((requeue_pi && !this->rt_waiter) || (!requeue_pi && this->rt_waiter) || this->pi_state) { ret = -EINVAL; break; } /* * Wake nr_wake waiters. For requeue_pi, if we acquired the * lock, we already woke the top_waiter. If not, it will be * woken by futex_unlock_pi(). */ if (++task_count <= nr_wake && !requeue_pi) { mark_wake_futex(&wake_q, this); continue; } /* Ensure we requeue to the expected futex for requeue_pi. */ if (requeue_pi && !match_futex(this->requeue_pi_key, &key2)) { ret = -EINVAL; break; } /* * Requeue nr_requeue waiters and possibly one more in the case * of requeue_pi if we couldn't acquire the lock atomically. */ if (requeue_pi) { /* * Prepare the waiter to take the rt_mutex. Take a * refcount on the pi_state and store the pointer in * the futex_q object of the waiter. */ atomic_inc(&pi_state->refcount); this->pi_state = pi_state; ret = <API key>(&pi_state->pi_mutex, this->rt_waiter, this->task); if (ret == 1) { /* * We got the lock. We do neither drop the * refcount on pi_state nor clear * this->pi_state because the waiter needs the * pi_state for cleaning up the user space * value. It will drop the refcount after * doing so. */ <API key>(this, &key2, hb2); drop_count++; continue; } else if (ret) { /* * <API key>() detected a * potential deadlock when we tried to queue * that waiter. Drop the pi_state reference * which we took above and remove the pointer * to the state from the waiters futex_q * object. */ this->pi_state = NULL; put_pi_state(pi_state); /* * We stop queueing more waiters and let user * space deal with the mess. */ break; } } requeue_futex(this, hb1, hb2, &key2); drop_count++; } /* * We took an extra initial reference to the pi_state either * in <API key>() or in lookup_pi_state(). We * need to drop it here again. */ put_pi_state(pi_state); out_unlock: double_unlock_hb(hb1, hb2); wake_up_q(&wake_q); hb_waiters_dec(hb2); /* * drop_futex_key_refs() must be called outside the spinlocks. During * the requeue we moved futex_q's from the hash bucket at key1 to the * one at key2 and updated their key pointer. We no longer need to * hold the references to key1. */ while (--drop_count >= 0) drop_futex_key_refs(&key1); out_put_keys: put_futex_key(&key2); out_put_key1: put_futex_key(&key1); out: return ret ? ret : task_count; } /* The key must be already stored in q->key. */ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q) __acquires(&hb->lock) { struct futex_hash_bucket *hb; hb = hash_futex(&q->key); /* * Increment the counter before taking the lock so that * a potential waker won't miss a to-be-slept task that is * waiting for the spinlock. This is safe as all queue_lock() * users end up calling queue_me(). Similarly, for housekeeping, * decrement the counter at queue_unlock() when some error has * occurred and we don't end up adding the task to the list. */ hb_waiters_inc(hb); q->lock_ptr = &hb->lock; spin_lock(&hb->lock); /* implies MB (A) */ return hb; } static inline void queue_unlock(struct futex_hash_bucket *hb) __releases(&hb->lock) { spin_unlock(&hb->lock); hb_waiters_dec(hb); } /** * queue_me() - Enqueue the futex_q on the futex_hash_bucket * @q: The futex_q to enqueue * @hb: The destination hash bucket * * The hb->lock must be held by the caller, and is released here. A call to * queue_me() is typically paired with exactly one call to unqueue_me(). The * exceptions involve the PI related operations, which may use unqueue_me_pi() * or nothing if the unqueue is done as part of the wake process and the unqueue * state is implicit in the state of woken task (see <API key>() for * an example). */ static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) __releases(&hb->lock) { int prio; /* * The priority used to register this element is * - either the real thread-priority for the real-time threads * (i.e. threads with a priority lower than MAX_RT_PRIO) * - or MAX_RT_PRIO for non-RT threads. * Thus, all RT-threads are woken first in priority order, and * the others are woken last, in FIFO order. */ prio = min(current->normal_prio, MAX_RT_PRIO); plist_node_init(&q->list, prio); plist_add(&q->list, &hb->chain); q->task = current; spin_unlock(&hb->lock); } /** * unqueue_me() - Remove the futex_q from its futex_hash_bucket * @q: The futex_q to unqueue * * The q->lock_ptr must not be held by the caller. A call to unqueue_me() must * be paired with exactly one earlier call to queue_me(). * * Return: * 1 - if the futex_q was still queued (and we removed unqueued it); * 0 - if the futex_q was already removed by the waking thread */ static int unqueue_me(struct futex_q *q) { spinlock_t *lock_ptr; int ret = 0; /* In the common case we don't take the spinlock, which is nice. */ retry: lock_ptr = q->lock_ptr; barrier(); if (lock_ptr != NULL) { spin_lock(lock_ptr); /* * q->lock_ptr can change between reading it and * spin_lock(), causing us to take the wrong lock. This * corrects the race condition. * * Reasoning goes like this: if we have the wrong lock, * q->lock_ptr must have changed (maybe several times) * between reading it and the spin_lock(). It can * change again after the spin_lock() but only if it was * already changed before the spin_lock(). It cannot, * however, change back to the original value. Therefore * we can detect whether we acquired the correct lock. */ if (unlikely(lock_ptr != q->lock_ptr)) { spin_unlock(lock_ptr); goto retry; } __unqueue_futex(q); BUG_ON(q->pi_state); spin_unlock(lock_ptr); ret = 1; } drop_futex_key_refs(&q->key); return ret; } /* * PI futexes can not be requeued and must remove themself from the * hash bucket. The hash bucket lock (i.e. lock_ptr) is held on entry * and dropped here. */ static void unqueue_me_pi(struct futex_q *q) __releases(q->lock_ptr) { __unqueue_futex(q); BUG_ON(!q->pi_state); put_pi_state(q->pi_state); q->pi_state = NULL; spin_unlock(q->lock_ptr); } /* * Fixup the pi_state owner with the new owner. * * Must be called with hash bucket lock held and mm->sem held for non * private futexes. */ static int <API key>(u32 __user *uaddr, struct futex_q *q, struct task_struct *newowner) { u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS; struct futex_pi_state *pi_state = q->pi_state; struct task_struct *oldowner = pi_state->owner; u32 uval, uninitialized_var(curval), newval; int ret; /* Owner died? */ if (!pi_state->owner) newtid |= FUTEX_OWNER_DIED; /* * We are here either because we stole the rtmutex from the * previous highest priority waiter or we are the highest priority * waiter but failed to get the rtmutex the first time. * We have to replace the newowner TID in the user space variable. * This must be atomic as we have to preserve the owner died bit here. * * Note: We write the user space value _before_ changing the pi_state * because we can fault here. Imagine swapped out pages or a fork * that marked all the anonymous memory readonly for cow. * * Modifying pi_state _before_ the user space value would * leave the pi_state in an inconsistent state when we fault * here, because we need to drop the hash bucket lock to * handle the fault. This might be observed in the PID check * in lookup_pi_state. */ retry: if (<API key>(&uval, uaddr)) goto handle_fault; while (1) { newval = (uval & FUTEX_OWNER_DIED) | newtid; if (<API key>(&curval, uaddr, uval, newval)) goto handle_fault; if (curval == uval) break; uval = curval; } /* * We fixed up user space. Now we need to fix the pi_state * itself. */ if (pi_state->owner != NULL) { raw_spin_lock_irq(&pi_state->owner->pi_lock); WARN_ON(list_empty(&pi_state->list)); list_del_init(&pi_state->list); raw_spin_unlock_irq(&pi_state->owner->pi_lock); } pi_state->owner = newowner; raw_spin_lock_irq(&newowner->pi_lock); WARN_ON(!list_empty(&pi_state->list)); list_add(&pi_state->list, &newowner->pi_state_list); raw_spin_unlock_irq(&newowner->pi_lock); return 0; /* * To handle the page fault we need to drop the hash bucket * lock here. That gives the other task (either the highest priority * waiter itself or the task which stole the rtmutex) the * chance to try the fixup of the pi_state. So once we are * back from handling the fault we need to check the pi_state * after reacquiring the hash bucket lock and before trying to * do another fixup. When the fixup has been done already we * simply return. */ handle_fault: spin_unlock(q->lock_ptr); ret = <API key>(uaddr); spin_lock(q->lock_ptr); /* * Check if someone else fixed it for us: */ if (pi_state->owner != oldowner) return 0; if (ret) return ret; goto retry; } static long futex_wait_restart(struct restart_block *restart); /** * fixup_owner() - Post lock pi_state and corner case management * @uaddr: user address of the futex * @q: futex_q (contains pi_state and access to the rt_mutex) * @locked: if the attempt to take the rt_mutex succeeded (1) or not (0) * * After attempting to lock an rt_mutex, this function is called to cleanup * the pi_state owner as well as handle race conditions that may allow us to * acquire the lock. Must be called with the hb lock held. * * Return: * 1 - success, lock taken; * 0 - success, lock not taken; * <0 - on error (-EFAULT) */ static int fixup_owner(u32 __user *uaddr, struct futex_q *q, int locked) { struct task_struct *owner; int ret = 0; if (locked) { /* * Got the lock. We might not be the anticipated owner if we * did a lock-steal - fix up the PI-state in that case: */ if (q->pi_state->owner != current) ret = <API key>(uaddr, q, current); goto out; } /* * Catch the rare case, where the lock was released when we were on the * way back before we locked the hash bucket. */ if (q->pi_state->owner == current) { /* * Try to get the rt_mutex now. This might fail as some other * task acquired the rt_mutex after we removed ourself from the * rt_mutex waiters list. */ if (rt_mutex_trylock(&q->pi_state->pi_mutex)) { locked = 1; goto out; } /* * pi_state is incorrect, some other task did a lock steal and * we returned due to timeout or signal without taking the * rt_mutex. Too late. */ raw_spin_lock(&q->pi_state->pi_mutex.wait_lock); owner = rt_mutex_owner(&q->pi_state->pi_mutex); if (!owner) owner = rt_mutex_next_owner(&q->pi_state->pi_mutex); raw_spin_unlock(&q->pi_state->pi_mutex.wait_lock); ret = <API key>(uaddr, q, owner); goto out; } /* * Paranoia check. If we did not take the lock, then we should not be * the owner of the rt_mutex. */ if (rt_mutex_owner(&q->pi_state->pi_mutex) == current) printk(KERN_ERR "fixup_owner: ret = %d pi-mutex: %p " "pi-state %p\n", ret, q->pi_state->pi_mutex.owner, q->pi_state->owner); out: return ret ? ret : locked; } /** * futex_wait_queue_me() - queue_me() and wait for wakeup, timeout, or signal * @hb: the futex hash bucket, must be locked by the caller * @q: the futex_q to queue up on * @timeout: the prepared hrtimer_sleeper, or null for no timeout */ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, struct hrtimer_sleeper *timeout) { /* * The task state is guaranteed to be set before another task can * wake it. set_current_state() is implemented using smp_store_mb() and * queue_me() calls spin_unlock() upon completion, both serializing * access to the hash list and forcing another memory barrier. */ set_current_state(TASK_INTERRUPTIBLE); queue_me(q, hb); /* Arm the timer */ if (timeout) <API key>(&timeout->timer, HRTIMER_MODE_ABS); /* * If we have been removed from the hash list, then another task * has tried to wake us, and we can skip the call to schedule(). */ if (likely(!plist_node_empty(&q->list))) { /* * If the timer has already expired, current will already be * flagged for rescheduling. Only call schedule if there * is no timeout, or if it has yet to expire. */ if (!timeout || timeout->task) freezable_schedule(); } __set_current_state(TASK_RUNNING); } /** * futex_wait_setup() - Prepare to wait on a futex * @uaddr: the futex userspace address * @val: the expected value * @flags: futex flags (FLAGS_SHARED, etc.) * @q: the associated futex_q * @hb: storage for hash_bucket pointer to be returned to caller * * Setup the futex_q and locate the hash_bucket. Get the futex value and * compare it with the expected value. Handle atomic faults internally. * Return with the hb lock held and a q.key reference on success, and unlocked * with no q.key reference on failure. * * Return: * 0 - uaddr contains val and hb has been locked; * <1 - -EFAULT or -EWOULDBLOCK (uaddr does not contain val) and hb is unlocked */ static int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags, struct futex_q *q, struct futex_hash_bucket **hb) { u32 uval; int ret; /* * Access the page AFTER the hash-bucket is locked. * Order is important: * * Userspace waiter: val = var; if (cond(val)) futex_wait(&var, val); * Userspace waker: if (cond(var)) { var = new; futex_wake(&var); } * * The basic logical guarantee of a futex is that it blocks ONLY * if cond(var) is known to be true at the time of blocking, for * any cond. If we locked the hash-bucket after testing *uaddr, that * would open a race condition where we could block indefinitely with * cond(var) false, which would violate the guarantee. * * On the other hand, we insert q and release the hash-bucket only * after testing *uaddr. This guarantees that futex_wait() will NOT * absorb a wakeup if *uaddr does not match the desired values * while the syscall executes. */ retry: ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &q->key, VERIFY_READ); if (unlikely(ret != 0)) return ret; retry_private: *hb = queue_lock(q); ret = <API key>(&uval, uaddr); if (ret) { queue_unlock(*hb); ret = get_user(uval, uaddr); if (ret) goto out; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&q->key); goto retry; } if (uval != val) { queue_unlock(*hb); ret = -EWOULDBLOCK; } out: if (ret) put_futex_key(&q->key); return ret; } static int futex_wait(u32 __user *uaddr, unsigned int flags, u32 val, ktime_t *abs_time, u32 bitset) { struct hrtimer_sleeper timeout, *to = NULL; struct restart_block *restart; struct futex_hash_bucket *hb; struct futex_q q = futex_q_init; int ret; if (!bitset) return -EINVAL; q.bitset = bitset; if (abs_time) { to = &timeout; <API key>(&to->timer, (flags & FLAGS_CLOCKRT) ? CLOCK_REALTIME : CLOCK_MONOTONIC, HRTIMER_MODE_ABS); <API key>(to, current); <API key>(&to->timer, *abs_time, current->timer_slack_ns); } retry: /* * Prepare to wait on uaddr. On success, holds hb lock and increments * q.key refs. */ ret = futex_wait_setup(uaddr, val, flags, &q, &hb); if (ret) goto out; /* queue_me and wait for wakeup, timeout, or a signal. */ futex_wait_queue_me(hb, &q, to); /* If we were woken (and unqueued), we succeeded, whatever. */ ret = 0; /* unqueue_me() drops q.key ref */ if (!unqueue_me(&q)) goto out; ret = -ETIMEDOUT; if (to && !to->task) goto out; /* * We expect signal_pending(current), but we might be the * victim of a spurious wakeup as well. */ if (!signal_pending(current)) goto retry; ret = -ERESTARTSYS; if (!abs_time) goto out; restart = &current->restart_block; restart->fn = futex_wait_restart; restart->futex.uaddr = uaddr; restart->futex.val = val; restart->futex.time = abs_time->tv64; restart->futex.bitset = bitset; restart->futex.flags = flags | FLAGS_HAS_TIMEOUT; ret = -<API key>; out: if (to) { hrtimer_cancel(&to->timer); <API key>(&to->timer); } return ret; } static long futex_wait_restart(struct restart_block *restart) { u32 __user *uaddr = restart->futex.uaddr; ktime_t t, *tp = NULL; if (restart->futex.flags & FLAGS_HAS_TIMEOUT) { t.tv64 = restart->futex.time; tp = &t; } restart->fn = <API key>; return (long)futex_wait(uaddr, restart->futex.flags, restart->futex.val, tp, restart->futex.bitset); } /* * Userspace tried a 0 -> TID atomic transition of the futex value * and failed. The kernel side here does the whole locking operation: * if there are waiters then it will block as a consequence of relying * on rt-mutexes, it does PI, etc. (Due to races the kernel might see * a 0 value of the futex too.). * * Also serves as futex trylock_pi()'ing, and due semantics. */ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, ktime_t *time, int trylock) { struct hrtimer_sleeper timeout, *to = NULL; struct futex_hash_bucket *hb; struct futex_q q = futex_q_init; int res, ret; if (<API key>()) return -ENOMEM; if (time) { to = &timeout; <API key>(&to->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS); <API key>(to, current); hrtimer_set_expires(&to->timer, *time); } retry: ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &q.key, VERIFY_WRITE); if (unlikely(ret != 0)) goto out; retry_private: hb = queue_lock(&q); ret = <API key>(uaddr, hb, &q.key, &q.pi_state, current, 0); if (unlikely(ret)) { /* * Atomic work succeeded and we got the lock, * or failed. Either way, we do _not_ block. */ switch (ret) { case 1: /* We got the lock. */ ret = 0; goto out_unlock_put_key; case -EFAULT: goto uaddr_faulted; case -EAGAIN: /* * Two reasons for this: * - Task is exiting and we just wait for the * exit to complete. * - The user space value changed. */ queue_unlock(hb); put_futex_key(&q.key); cond_resched(); goto retry; default: goto out_unlock_put_key; } } /* * Only actually queue now that the atomic ops are done: */ queue_me(&q, hb); WARN_ON(!q.pi_state); /* * Block on the PI mutex: */ if (!trylock) { ret = <API key>(&q.pi_state->pi_mutex, to); } else { ret = rt_mutex_trylock(&q.pi_state->pi_mutex); /* Fixup the trylock return value: */ ret = ret ? 0 : -EWOULDBLOCK; } spin_lock(q.lock_ptr); /* * Fixup the pi_state owner and possibly acquire the lock if we * haven't already. */ res = fixup_owner(uaddr, &q, !ret); /* * If fixup_owner() returned an error, proprogate that. If it acquired * the lock, clear our -ETIMEDOUT or -EINTR. */ if (res) ret = (res < 0) ? res : 0; /* * If fixup_owner() faulted and was unable to handle the fault, unlock * it and return the fault to userspace. */ if (ret && (rt_mutex_owner(&q.pi_state->pi_mutex) == current)) rt_mutex_unlock(&q.pi_state->pi_mutex); /* Unqueue and drop the lock */ unqueue_me_pi(&q); goto out_put_key; out_unlock_put_key: queue_unlock(hb); out_put_key: put_futex_key(&q.key); out: if (to) <API key>(&to->timer); return ret != -EINTR ? ret : -ERESTARTNOINTR; uaddr_faulted: queue_unlock(hb); ret = <API key>(uaddr); if (ret) goto out_put_key; if (!(flags & FLAGS_SHARED)) goto retry_private; put_futex_key(&q.key); goto retry; } /* * Userspace attempted a TID -> 0 atomic transition, and failed. * This is the in-kernel slowpath: we look up the PI state (if any), * and do the rt-mutex unlock. */ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) { u32 uninitialized_var(curval), uval, vpid = task_pid_vnr(current); union futex_key key = FUTEX_KEY_INIT; struct futex_hash_bucket *hb; struct futex_q *match; int ret; retry: if (get_user(uval, uaddr)) return -EFAULT; /* * We release only a lock we actually own: */ if ((uval & FUTEX_TID_MASK) != vpid) return -EPERM; ret = get_futex_key(uaddr, flags & FLAGS_SHARED, &key, VERIFY_WRITE); if (ret) return ret; hb = hash_futex(&key); spin_lock(&hb->lock); /* * Check waiters first. We do not trust user space values at * all and we at least want to know if user space fiddled * with the futex value instead of blindly unlocking. */ match = futex_top_waiter(hb, &key); if (match) { ret = wake_futex_pi(uaddr, uval, match, hb); /* * In case of success wake_futex_pi dropped the hash * bucket lock. */ if (!ret) goto out_putkey; /* * The atomic access to the futex value generated a * pagefault, so retry the user-access and the wakeup: */ if (ret == -EFAULT) goto pi_faulted; /* * wake_futex_pi has detected invalid state. Tell user * space. */ goto out_unlock; } /* * We have no kernel internal state, i.e. no waiters in the * kernel. Waiters which are about to queue themselves are stuck * on hb->lock. So we can safely ignore them. We do neither * preserve the WAITERS bit not the OWNER_DIED one. We are the * owner. */ if (<API key>(&curval, uaddr, uval, 0)) goto pi_faulted; /* * If uval has changed, let user space handle it. */ ret = (curval == uval) ? 0 : -EAGAIN; out_unlock: spin_unlock(&hb->lock); out_putkey: put_futex_key(&key); return ret; pi_faulted: spin_unlock(&hb->lock); put_futex_key(&key); ret = <API key>(uaddr); if (!ret) goto retry; return ret; } /** * <API key>() - Detect early wakeup on the initial futex * @hb: the hash_bucket futex_q was original enqueued on * @q: the futex_q woken while waiting to be requeued * @key2: the futex_key of the requeue target futex * @timeout: the timeout associated with the wait (NULL if none) * * Detect if the task was woken on the initial futex as opposed to the requeue * target futex. If so, determine if it was a timeout or a signal that caused * the wakeup and return the appropriate error code to the caller. Must be * called with the hb lock held. * * Return: * 0 = no early wakeup detected; * <0 = -ETIMEDOUT or -ERESTARTNOINTR */ static inline int <API key>(struct futex_hash_bucket *hb, struct futex_q *q, union futex_key *key2, struct hrtimer_sleeper *timeout) { int ret = 0; /* * With the hb lock held, we avoid races while we process the wakeup. * We only need to hold hb (and not hb2) to ensure atomicity as the * wakeup code can't change q.key from uaddr to uaddr2 if we hold hb. * It can't be requeued from uaddr2 to something else since we don't * support a PI aware source futex for requeue. */ if (!match_futex(&q->key, key2)) { WARN_ON(q->lock_ptr && (&hb->lock != q->lock_ptr)); /* * We were woken prior to requeue by a timeout or a signal. * Unqueue the futex_q and determine which it was. */ plist_del(&q->list, &hb->chain); hb_waiters_dec(hb); /* Handle spurious wakeups gracefully */ ret = -EWOULDBLOCK; if (timeout && !timeout->task) ret = -ETIMEDOUT; else if (signal_pending(current)) ret = -ERESTARTNOINTR; } return ret; } /** * <API key>() - Wait on uaddr and take uaddr2 * @uaddr: the futex we initially wait on (non-pi) * @flags: futex flags (FLAGS_SHARED, FLAGS_CLOCKRT, etc.), they must be * the same type, no requeueing from private to shared, etc. * @val: the expected value of uaddr * @abs_time: absolute timeout * @bitset: 32 bit wakeup bitset set by userspace, defaults to all * @uaddr2: the pi futex we will take prior to returning to user-space * * The caller will wait on uaddr and will be requeued by futex_requeue() to * uaddr2 which must be PI aware and unique from uaddr. Normal wakeup will wake * on uaddr2 and complete the acquisition of the rt_mutex prior to returning to * userspace. This ensures the rt_mutex maintains an owner when it has waiters; * without one, the pi logic would not know which task to boost/deboost, if * there was a need to. * * We call schedule in futex_wait_queue_me() when we enqueue and return there * via the following-- * 1) wakeup on uaddr2 after an atomic lock acquisition by futex_requeue() * 2) wakeup on uaddr2 after a requeue * 3) signal * 4) timeout * * If 3, cleanup and return -ERESTARTNOINTR. * * If 2, we may then block on trying to take the rt_mutex and return via: * 5) successful lock * 6) signal * 7) timeout * 8) other lock acquisition failure * * If 6, return -EWOULDBLOCK (restarting the syscall would do the same). * * If 4 or 7, we cleanup and return with -ETIMEDOUT. * * Return: * 0 - On success; * <0 - On error */ static int <API key>(u32 __user *uaddr, unsigned int flags, u32 val, ktime_t *abs_time, u32 bitset, u32 __user *uaddr2) { struct hrtimer_sleeper timeout, *to = NULL; struct rt_mutex_waiter rt_waiter; struct rt_mutex *pi_mutex = NULL; struct futex_hash_bucket *hb; union futex_key key2 = FUTEX_KEY_INIT; struct futex_q q = futex_q_init; int res, ret; if (uaddr == uaddr2) return -EINVAL; if (!bitset) return -EINVAL; if (abs_time) { to = &timeout; <API key>(&to->timer, (flags & FLAGS_CLOCKRT) ? CLOCK_REALTIME : CLOCK_MONOTONIC, HRTIMER_MODE_ABS); <API key>(to, current); <API key>(&to->timer, *abs_time, current->timer_slack_ns); } /* * The waiter is allocated on our stack, manipulated by the requeue * code while we sleep on uaddr. */ <API key>(&rt_waiter); RB_CLEAR_NODE(&rt_waiter.pi_tree_entry); RB_CLEAR_NODE(&rt_waiter.tree_entry); rt_waiter.task = NULL; ret = get_futex_key(uaddr2, flags & FLAGS_SHARED, &key2, VERIFY_WRITE); if (unlikely(ret != 0)) goto out; q.bitset = bitset; q.rt_waiter = &rt_waiter; q.requeue_pi_key = &key2; /* * Prepare to wait on uaddr. On success, increments q.key (key1) ref * count. */ ret = futex_wait_setup(uaddr, val, flags, &q, &hb); if (ret) goto out_key2; /* * The check above which compares uaddrs is not sufficient for * shared futexes. We need to compare the keys: */ if (match_futex(&q.key, &key2)) { queue_unlock(hb); ret = -EINVAL; goto out_put_keys; } /* Queue the futex_q, drop the hb lock, wait for wakeup. */ futex_wait_queue_me(hb, &q, to); spin_lock(&hb->lock); ret = <API key>(hb, &q, &key2, to); spin_unlock(&hb->lock); if (ret) goto out_put_keys; /* * In order for us to be here, we know our q.key == key2, and since * we took the hb->lock above, we also know that futex_requeue() has * completed and we no longer have to concern ourselves with a wakeup * race with the atomic proxy lock acquisition by the requeue code. The * futex_requeue dropped our key1 reference and incremented our key2 * reference count. */ /* Check if the requeue code acquired the second futex for us. */ if (!q.rt_waiter) { /* * Got the lock. We might not be the anticipated owner if we * did a lock-steal - fix up the PI-state in that case. */ if (q.pi_state && (q.pi_state->owner != current)) { spin_lock(q.lock_ptr); ret = <API key>(uaddr2, &q, current); /* * Drop the reference to the pi state which * the requeue_pi() code acquired for us. */ put_pi_state(q.pi_state); spin_unlock(q.lock_ptr); } } else { /* * We have been woken up by futex_unlock_pi(), a timeout, or a * signal. futex_unlock_pi() will not destroy the lock_ptr nor * the pi_state. */ WARN_ON(!q.pi_state); pi_mutex = &q.pi_state->pi_mutex; ret = <API key>(pi_mutex, to, &rt_waiter); <API key>(&rt_waiter); spin_lock(q.lock_ptr); /* * Fixup the pi_state owner and possibly acquire the lock if we * haven't already. */ res = fixup_owner(uaddr2, &q, !ret); /* * If fixup_owner() returned an error, proprogate that. If it * acquired the lock, clear -ETIMEDOUT or -EINTR. */ if (res) ret = (res < 0) ? res : 0; /* Unqueue and drop the lock. */ unqueue_me_pi(&q); } /* * If <API key>() faulted and was unable to handle the * fault, unlock the rt_mutex and return the fault to userspace. */ if (ret == -EFAULT) { if (pi_mutex && rt_mutex_owner(pi_mutex) == current) rt_mutex_unlock(pi_mutex); } else if (ret == -EINTR) { /* * We've already been requeued, but cannot restart by calling * futex_lock_pi() directly. We could restart this syscall, but * it would detect that the user space "val" changed and return * -EWOULDBLOCK. Save the overhead of the restart and return * -EWOULDBLOCK directly. */ ret = -EWOULDBLOCK; } out_put_keys: put_futex_key(&q.key); out_key2: put_futex_key(&key2); out: if (to) { hrtimer_cancel(&to->timer); <API key>(&to->timer); } return ret; } /* * Support for robust futexes: the kernel cleans up held futexes at * thread exit time. * * Implementation: user-space maintains a per-thread list of locks it * is holding. Upon do_exit(), the kernel carefully walks this list, * and marks all locks that are owned by this thread with the * FUTEX_OWNER_DIED bit, and wakes up a waiter (if any). The list is * always manipulated with the lock held, so the list is private and * per-thread. Userspace also maintains a per-thread 'list_op_pending' * field, to allow the kernel to clean up if the thread dies after * acquiring the lock, but just before it could have added itself to * the list. There can only be one such pending lock. */ /** * sys_set_robust_list() - Set the robust-futex list head of a task * @head: pointer to the list-head * @len: length of the list-head, as userspace expects */ SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head, size_t, len) { if (!<API key>) return -ENOSYS; /* * The kernel knows only one size for now: */ if (unlikely(len != sizeof(*head))) return -EINVAL; current->robust_list = head; return 0; } /** * sys_get_robust_list() - Get the robust-futex list head of a task * @pid: pid of the process [zero for current task] * @head_ptr: pointer to a list-head pointer, the kernel fills it in * @len_ptr: pointer to a length field, the kernel fills in the header size */ SYSCALL_DEFINE3(get_robust_list, int, pid, struct robust_list_head __user * __user *, head_ptr, size_t __user *, len_ptr) { struct robust_list_head __user *head; unsigned long ret; struct task_struct *p; if (!<API key>) return -ENOSYS; rcu_read_lock(); ret = -ESRCH; if (!pid) p = current; else { p = find_task_by_vpid(pid); if (!p) goto err_unlock; } ret = -EPERM; if (!ptrace_may_access(p, PTRACE_MODE_READ)) goto err_unlock; head = p->robust_list; rcu_read_unlock(); if (put_user(sizeof(*head), len_ptr)) return -EFAULT; return put_user(head, head_ptr); err_unlock: rcu_read_unlock(); return ret; } /* * Process a futex-list entry, check whether it's owned by the * dying task, and do notification if so: */ int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi) { u32 uval, uninitialized_var(nval), mval; retry: if (get_user(uval, uaddr)) return -1; if ((uval & FUTEX_TID_MASK) == task_pid_vnr(curr)) { /* * Ok, this dying thread is truly holding a futex * of interest. Set the OWNER_DIED bit atomically * via cmpxchg, and if the value had FUTEX_WAITERS * set, wake up a waiter (if any). (We have to do a * futex_wake() even if OWNER_DIED is already set - * to handle the rare but possible case of recursive * thread-death.) The rest of the cleanup is done in * userspace. */ mval = (uval & FUTEX_WAITERS) | FUTEX_OWNER_DIED; /* * We are not holding a lock here, but we want to have * the pagefault_disable/enable() protection because * we want to handle the fault gracefully. If the * access fails we try to fault in the futex with R/W * verification via get_user_pages. get_user() above * does not guarantee R/W access. If that fails we * give up and leave the futex locked. */ if (<API key>(&nval, uaddr, uval, mval)) { if (<API key>(uaddr)) return -1; goto retry; } if (nval != uval) goto retry; /* * Wake robust non-PI futexes here. The wakeup of * PI futexes happens in exit_pi_state(): */ if (!pi && (uval & FUTEX_WAITERS)) futex_wake(uaddr, 1, 1, <API key>); } return 0; } /* * Fetch a robust-list pointer. Bit 0 signals PI futexes: */ static inline int fetch_robust_entry(struct robust_list __user **entry, struct robust_list __user * __user *head, unsigned int *pi) { unsigned long uentry; if (get_user(uentry, (unsigned long __user *)head)) return -EFAULT; *entry = (void __user *)(uentry & ~1UL); *pi = uentry & 1; return 0; } /* * Walk curr->robust_list (very carefully, it's a userspace list!) * and mark any locks found there dead, and notify any waiters. * * We silently return on any sign of list-walking problem. */ void exit_robust_list(struct task_struct *curr) { struct robust_list_head __user *head = curr->robust_list; struct robust_list __user *entry, *next_entry, *pending; unsigned int limit = ROBUST_LIST_LIMIT, pi, pip; unsigned int uninitialized_var(next_pi); unsigned long futex_offset; int rc; if (!<API key>) return; /* * Fetch the list head (which was registered earlier, via * sys_set_robust_list()): */ if (fetch_robust_entry(&entry, &head->list.next, &pi)) return; /* * Fetch the relative futex offset: */ if (get_user(futex_offset, &head->futex_offset)) return; /* * Fetch any possibly pending lock-add first, and handle it * if it exists: */ if (fetch_robust_entry(&pending, &head->list_op_pending, &pip)) return; next_entry = NULL; /* avoid warning with gcc */ while (entry != &head->list) { /* * Fetch the next entry in the list before calling * handle_futex_death: */ rc = fetch_robust_entry(&next_entry, &entry->next, &next_pi); /* * A pending lock might already be on the list, so * don't process it twice: */ if (entry != pending) if (handle_futex_death((void __user *)entry + futex_offset, curr, pi)) return; if (rc) return; entry = next_entry; pi = next_pi; /* * Avoid excessively long or circular lists: */ if (!--limit) break; cond_resched(); } if (pending) handle_futex_death((void __user *)pending + futex_offset, curr, pip); } long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, u32 __user *uaddr2, u32 val2, u32 val3) { int cmd = op & FUTEX_CMD_MASK; unsigned int flags = 0; if (!(op & FUTEX_PRIVATE_FLAG)) flags |= FLAGS_SHARED; if (op & <API key>) { flags |= FLAGS_CLOCKRT; if (cmd != FUTEX_WAIT && cmd != FUTEX_WAIT_BITSET && \ cmd != <API key>) return -ENOSYS; } switch (cmd) { case FUTEX_LOCK_PI: case FUTEX_UNLOCK_PI: case FUTEX_TRYLOCK_PI: case <API key>: case <API key>: if (!<API key>) return -ENOSYS; } switch (cmd) { case FUTEX_WAIT: val3 = <API key>; case FUTEX_WAIT_BITSET: return futex_wait(uaddr, flags, val, timeout, val3); case FUTEX_WAKE: val3 = <API key>; case FUTEX_WAKE_BITSET: return futex_wake(uaddr, flags, val, val3); case FUTEX_REQUEUE: return futex_requeue(uaddr, flags, uaddr2, val, val2, NULL, 0); case FUTEX_CMP_REQUEUE: return futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 0); case FUTEX_WAKE_OP: return futex_wake_op(uaddr, flags, uaddr2, val, val2, val3); case FUTEX_LOCK_PI: return futex_lock_pi(uaddr, flags, timeout, 0); case FUTEX_UNLOCK_PI: return futex_unlock_pi(uaddr, flags); case FUTEX_TRYLOCK_PI: return futex_lock_pi(uaddr, flags, NULL, 1); case <API key>: val3 = <API key>; return <API key>(uaddr, flags, val, timeout, val3, uaddr2); case <API key>: return futex_requeue(uaddr, flags, uaddr2, val, val2, &val3, 1); } return -ENOSYS; } SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val, struct timespec __user *, utime, u32 __user *, uaddr2, u32, val3) { struct timespec ts; ktime_t t, *tp = NULL; u32 val2 = 0; int cmd = op & FUTEX_CMD_MASK; if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI || cmd == FUTEX_WAIT_BITSET || cmd == <API key>)) { if (unlikely(should_fail_futex(!(op & FUTEX_PRIVATE_FLAG)))) return -EFAULT; if (copy_from_user(&ts, utime, sizeof(ts)) != 0) return -EFAULT; if (!timespec_valid(&ts)) return -EINVAL; t = timespec_to_ktime(ts); if (cmd == FUTEX_WAIT) t = ktime_add_safe(ktime_get(), t); tp = &t; } /* * requeue parameter in 'utime' if cmd == FUTEX_*_REQUEUE_*. * number of waiters to wake in 'utime' if cmd == FUTEX_WAKE_OP. */ if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE || cmd == <API key> || cmd == FUTEX_WAKE_OP) val2 = (u32) (unsigned long) utime; return do_futex(uaddr, op, val, tp, uaddr2, val2, val3); } static void __init <API key>(void) { #ifndef <API key> u32 curval; /* * This will fail and we want it. Some arch implementations do * runtime detection of the <API key>() * functionality. We want to know that before we call in any * of the complex code paths. Also we want to prevent * registration of robust lists in that case. NULL is * guaranteed to fault and we get -EFAULT on functional * implementation, the non-functional ones will return * -ENOSYS. */ if (<API key>(&curval, NULL, 0, 0) == -EFAULT) <API key> = 1; #endif } static int __init futex_init(void) { unsigned int futex_shift; unsigned long i; #if CONFIG_BASE_SMALL futex_hashsize = 16; #else futex_hashsize = roundup_pow_of_two(256 * num_possible_cpus()); #endif futex_queues = <API key>("futex", sizeof(*futex_queues), futex_hashsize, 0, futex_hashsize < 256 ? HASH_SMALL : 0, &futex_shift, NULL, futex_hashsize, futex_hashsize); futex_hashsize = 1UL << futex_shift; <API key>(); for (i = 0; i < futex_hashsize; i++) { atomic_set(&futex_queues[i].waiters, 0); plist_head_init(&futex_queues[i].chain); spin_lock_init(&futex_queues[i].lock); } return 0; } __initcall(futex_init);
<?php // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); // Load the view framework if(!class_exists('VmView'))require(<API key>.DS.'helpers'.DS.'vmview.php'); jimport('joomla.html.pane'); jimport('joomla.version'); /** * HTML View class for the configuration maintenance * * @package VirtueMart * @subpackage Config * @author RickG */ class <API key> extends VmView { function display($tpl = null) { if (!class_exists('VmImage')) require(<API key> . DS . 'helpers' . DS . 'image.php'); if (!class_exists('VmHTML')) require(<API key> . DS . 'helpers' . DS . 'html.php'); $model = VmModel::getModel(); $usermodel = VmModel::getModel('user'); JToolBarHelper::title( JText::_('<API key>') , 'head vm_config_48'); $this-><API key>(); $config = VmConfig::loadConfig(); if(!empty($config->_params)){ unset ($config->_params['pdf_invoice']); // parameter remove and replaced by inv_os } $this->assignRef('config', $config); $mainframe = JFactory::getApplication(); $this->assignRef('joomlaconfig', $mainframe); $userparams = JComponentHelper::getParams('com_users'); $this->assignRef('userparams', $userparams); $templateList = ShopFunctions::renderTemplateList(JText::_('<API key>')); $this->assignRef('jTemplateList', $templateList); $vmLayoutList = $model->getLayoutList('virtuemart'); $this->assignRef('vmLayoutList', $vmLayoutList); $categoryLayoutList = $model->getLayoutList('category'); $this->assignRef('categoryLayoutList', $categoryLayoutList); $productLayoutList = $model->getLayoutList('productdetails'); $this->assignRef('productLayoutList', $productLayoutList); $noimagelist = $model->getNoImageList(); $this->assignRef('noimagelist', $noimagelist); $orderStatusModel=VmModel::getModel('orderstatus'); $this->assignRef('orderStatusModel', $orderStatusModel); $currConverterList = $model-><API key>(); $this->assignRef('currConverterList', $currConverterList); $moduleList = $model->getModuleList(); $this->assignRef('moduleList', $moduleList); $activeLanguages = $model->getActiveLanguages( VmConfig::get('active_languages') ); $this->assignRef('activeLanguages', $activeLanguages); $orderByFields = $model-><API key>('<API key>'); $this->assignRef('orderByFields', $orderByFields); $searchFields = $model-><API key>( '<API key>'); $this->assignRef('searchFields', $searchFields); $aclGroups = $usermodel-><API key>(); $this->assignRef('aclGroups', $aclGroups); if(is_Dir(VmConfig::get('vmtemplate').DS.'images'.DS.'availability'.DS)){ $imagePath = VmConfig::get('vmtemplate').'/images/availability/'; } else { $imagePath = '/components/com_virtuemart/assets/images/availability/'; } $this->assignRef('imagePath', $imagePath); shopFunctions::checkSafePath(); $this -> checkVmUserVendor(); parent::display($tpl); } private function checkVmUserVendor(){ $db = JFactory::getDBO(); $multix = Vmconfig::get('multix','none'); $q = 'select * from #<API key> where user_is_vendor = 1';// and <API key> '.$vendorWhere.' limit 1'; $db->setQuery($q); $r = $db->loadAssocList(); if (empty($r)){ vmWarn('Your Virtuemart installation contains an error: No user as marked as vendor. Please fix this in your phpMyAdmin and set #<API key>.user_is_vendor = 1 and #<API key>.<API key> = 1 to one of your administrator users. Please update all users to be associated with <API key> 1.'); } else { if($multix=='none' and count($r)!=1){ vmWarn('You are using single vendor mode, but it seems more than one user is set as vendor'); } foreach($r as $entry){ if(empty($entry['<API key>'])){ vmWarn('The user with virtuemart_user_id = '.$entry['virtuemart_user_id'].' is set as vendor, but has no referencing vendorId.'); } } } } } // pure php no closing tag
#pragma once #include "../rsx_utils.h" #ifdef TEXTURE_CACHE_DEBUG namespace rsx { class tex_cache_checker_t { struct per_page_info_t { u8 prot = 0; u8 no = 0; u8 ro = 0; FORCE_INLINE utils::protection get_protection() const { return static_cast<utils::protection>(prot); } FORCE_INLINE void set_protection(utils::protection prot) { this->prot = static_cast<u8>(prot); } FORCE_INLINE void reset_refcount() { no = 0; ro = 0; } FORCE_INLINE u16 sum() const { return u16{ no } + ro; } FORCE_INLINE bool verify() const { const utils::protection prot = get_protection(); switch (prot) { case utils::protection::no: return no > 0; case utils::protection::ro: return no == 0 && ro > 0; case utils::protection::rw: return no == 0 && ro == 0; default: ASSUME(0); } } FORCE_INLINE void add(utils::protection prot) { switch (prot) { case utils::protection::no: if (no++ == UINT8_MAX) fmt::throw_exception("add(protection::no) overflow with NO==%d", UINT8_MAX); return; case utils::protection::ro: if (ro++ == UINT8_MAX) fmt::throw_exception("add(protection::ro) overflow with RO==%d", UINT8_MAX); return; default: ASSUME(0); } } FORCE_INLINE void remove(utils::protection prot) { switch (prot) { case utils::protection::no: if (no-- == 0) fmt::throw_exception("remove(protection::no) overflow with NO==0"); return; case utils::protection::ro: if (ro-- == 0) fmt::throw_exception("remove(protection::ro) overflow with RO==0"); return; default: ASSUME(0); } } }; static_assert(sizeof(per_page_info_t) <= 4, "page_info_elmnt must be less than 4-bytes in size"); // 4GB memory space / 4096 bytes per page = 1048576 pages // Initialized to utils::protection::rw static constexpr size_t num_pages = 0x1'0000'0000 / 4096; per_page_info_t _info[num_pages]{0}; static_assert(static_cast<u32>(utils::protection::rw) == 0, "utils::protection::rw must have value 0 for the above constructor to work"); static constexpr size_t <API key>(u32 address) { return (address / 4096); } static constexpr u32 <API key>(size_t idx) { return static_cast<u32>(idx * 4096); } constexpr per_page_info_t* <API key>(u32 address) { return &(_info[<API key>(address)]); } constexpr const per_page_info_t* <API key>(u32 address) const { return &(_info[<API key>(address)]); } constexpr u32 <API key>(const per_page_info_t* ptr) const { return <API key>(static_cast<size_t>(ptr - _info)); } std::string prot_to_str(utils::protection prot) const { switch (prot) { case utils::protection::no: return "NA"; case utils::protection::ro: return "RO"; case utils::protection::rw: return "RW"; default: fmt::throw_exception("Unreachable " HERE); } } public: void set_protection(const address_range& range, utils::protection prot) { AUDIT(range.is_page_range()); AUDIT(prot == utils::protection::no || prot == utils::protection::ro || prot == utils::protection::rw); for (per_page_info_t* ptr = <API key>(range.start); ptr <= <API key>(range.end); ptr++) { ptr->set_protection(prot); } } void discard(const address_range& range) { set_protection(range, utils::protection::rw); } void reset_refcount() { for (per_page_info_t* ptr = <API key>(0); ptr <= <API key>(0xFFFFFFFF); ptr++) { ptr->reset_refcount(); } } void add(const address_range& range, utils::protection prot) { AUDIT(range.is_page_range()); AUDIT(prot == utils::protection::no || prot == utils::protection::ro); for (per_page_info_t* ptr = <API key>(range.start); ptr <= <API key>(range.end); ptr++) { ptr->add(prot); } } void remove(const address_range& range, utils::protection prot) { AUDIT(range.is_page_range()); AUDIT(prot == utils::protection::no || prot == utils::protection::ro); for (per_page_info_t* ptr = <API key>(range.start); ptr <= <API key>(range.end); ptr++) { ptr->remove(prot); } } // Returns the a lower bound as to how many locked sections are known to be within the given range with each protection {NA,RO} // The assumption here is that the page in the given range with the largest number of refcounted sections represents the lower bound to how many there must be std::pair<u8,u8> <API key>(const address_range& range) const { AUDIT(range.is_page_range()); u8 no = 0; u8 ro = 0; for (const per_page_info_t* ptr = <API key>(range.start); ptr <= <API key>(range.end); ptr++) { no = std::max(no, ptr->no); ro = std::max(ro, ptr->ro); } return { no,ro }; } void check_unprotected(const address_range& range, bool allow_ro = false, bool must_be_empty = true) const { AUDIT(range.is_page_range()); for (const per_page_info_t* ptr = <API key>(range.start); ptr <= <API key>(range.end); ptr++) { const auto prot = ptr->get_protection(); if (prot != utils::protection::rw && (!allow_ro || prot != utils::protection::ro)) { const u32 addr = <API key>(ptr); fmt::throw_exception("Page at addr=0x%8x should be RW%s: Prot=%s, RO=%d, NA=%d", addr, allow_ro ? " or RO" : "", prot_to_str(prot), ptr->ro, ptr->no); } if (must_be_empty && ( ptr->no > 0 || (!allow_ro && ptr->ro > 0) )) { const u32 addr = <API key>(ptr); fmt::throw_exception("Page at addr=0x%8x should not have any NA%s sections: Prot=%s, RO=%d, NA=%d", addr, allow_ro ? " or RO" : "", prot_to_str(prot), ptr->ro, ptr->no); } } } void verify() const { for (size_t idx = 0; idx < num_pages; idx++) { auto &elmnt = _info[idx]; if (!elmnt.verify()) { const u32 addr = <API key>(idx); const utils::protection prot = elmnt.get_protection(); fmt::throw_exception("Protection verification failed at addr=0x%x: Prot=%s, RO=%d, NA=%d", addr, prot_to_str(prot), elmnt.ro, elmnt.no); } } } }; extern tex_cache_checker_t tex_cache_checker; }; // namespace rsx #endif //TEXTURE_CACHE_DEBUG
<?php require_once (JPATH_SITE.DS.'components'.DS.'com_fsf'.DS.'helper'.DS.'settings.php'); class FSFAdminHelper { function PageSubTitle2($title,$usejtext = true) { if ($usejtext) $title = JText::_($title); return str_replace("$1",$title,FSF_Settings::get('display_h3')); } function IsFAQs() { if (JRequest::getVar('option') == "com_fsf") return true; return false; } function IsTests() { if (JRequest::getVar('option') == "com_fst") return true; return false; } function GetVersion($path = "") { global $fsj_version; if (empty($fsj_version)) { if ($path == "") $path = JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_fsf'; $file = $path.DS.'fsf.xml'; if (!file_exists($file)) return FSF_Settings::get('version'); $xml = simplexml_load_file($file); $fsj_version = $xml->version; } if ($fsj_version == "[VERSION]") return FSF_Settings::get('version'); return $fsj_version; } function GetInstalledVersion() { return FSF_Settings::get('version'); } function Is16() { global $fsjjversion; if (empty($fsjjversion)) { $version = new JVersion; $fsjjversion = 1; if ($version->RELEASE == "1.5") $fsjjversion = 0; } return $fsjjversion; } function DoSubToolbar() { if (!FSF_Helper::Is16()) { JToolBarHelper::divider(); JToolBarHelper::help("help.php?help=admin-view-" . JRequest::getVar('view'),true); return; } JToolBarHelper::divider(); JToolBarHelper::help("",false,"http: $vName = JRequest::getCmd('view', 'fsfs'); JSubMenuHelper::addEntry( JText::_('COM_FSF_OVERVIEW'), 'index.php?option=com_fsf&view=fsfs', $vName == 'fsfs' || $vName == "" ); JSubMenuHelper::addEntry( JText::_('COM_FSF_SETTINGS'), 'index.php?option=com_fsf&view=settings', $vName == 'settings' ); JSubMenuHelper::addEntry( JText::_('COM_FSF_TEMPLATES'), 'index.php?option=com_fsf&view=templates', $vName == 'templates' ); //##NOT_TEST_START## JSubMenuHelper::addEntry( JText::_('COM_FSF_FAQS'), 'index.php?option=com_fsf&view=faqs', $vName == 'faqs' ); JSubMenuHelper::addEntry( JText::_('<API key>'), 'index.php?option=com_fsf&view=faqcats', $vName == 'faqcats' ); JSubMenuHelper::addEntry( JText::_('COM_FSF_GLOSSARY'), 'index.php?option=com_fsf&view=glossarys', $vName == 'glossarys' ); JSubMenuHelper::addEntry( JText::_('COM_FSF_ADMIN'), 'index.php?option=com_fsf&view=backup', $vName == 'backup' ); } function IncludeHelp($file) { $lang =& JFactory::getLanguage(); $tag = $lang->getTag(); $path = JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_fsf'.DS.'help'.DS.$tag.DS.$file; if (file_exists($path)) return file_get_contents($path); $path = JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_fsf'.DS.'help'.DS.'en-GB'.DS.$file; return file_get_contents($path); } }
package org.jpc.emulator.execution.opcodes.pm; import org.jpc.emulator.execution.*; import org.jpc.emulator.execution.decoder.*; import org.jpc.emulator.processor.*; import org.jpc.emulator.processor.fpu64.*; import static org.jpc.emulator.processor.Processor.*; public class xchg_o32_rBXr11_rAX extends Executable { public xchg_o32_rBXr11_rAX(int blockStart, int eip, int prefices, PeekableInputStream input) { super(blockStart, eip); } public Branch execute(Processor cpu) { int tmp2 = cpu.r_eax.get32(); int tmp1 = cpu.r_ebx.get32(); cpu.r_ebx.set32(tmp2); cpu.r_eax.set32(tmp1); return Branch.None; } public boolean isBranch() { return false; } public String toString() { return this.getClass().getName(); } }
<html><head><title>VFW</title><link rel='StyleSheet' href='styles/geo-light.css' type='text/css'></head><body><a class='wiki' href='HomePage.html'>home</a><br/><h1>VFW</h1><div class='wikitext'>Acronym for Video For Windows. <br/> <br/>Microsoft Video for Windows&reg (VFW) provides functions that enable an application to process video data. VFW was introduced in 16-bit Windows. Many of its features have been superceded by features in DirectX.<br/></div></body></html>
//Filename : OF_ALCHA.CPP //Description : Firm Monster Alchemy - AI functions #include <onation.h> #include <oinfo.h> #include <otown.h> #include <ounit.h> #include <otech.h> #include <otechres.h> #include <of_alch.h> void FirmMonsterAlchemy::process_ai() { <API key>(); if( info.game_date%30==firm_recno%30 ) { if( think_del() ) return; } } // Think about deleting this firm. int FirmMonsterAlchemy::think_del() { return 0; } void FirmMonsterAlchemy::<API key>() { Nation* nationPtr = nation_array[nation_recno]; if( reserve_qty ) { if( tech_res[TECH_RAW_TO_LIVE]-><API key>(nation_recno) ) { if( nationPtr->cash > nationPtr->live_points + 500 + nationPtr->pref_cash_reserve*2 ) change_conversion(TECH_RAW_TO_LIVE, COMMAND_AI); } if( tech_res[TECH_RAW_TO_GOLD]-><API key>(nation_recno) ) { if( nationPtr->live_points > nationPtr->cash + 500 + nationPtr-><API key>*2 ) change_conversion(TECH_RAW_TO_GOLD, COMMAND_AI); } } else { if( nationPtr->live_points < nationPtr-><API key>*5 && nationPtr->cash > 1500 + nationPtr->pref_cash_reserve*10 ) { if( tech_res[TECH_GOLD_TO_LIVE]-><API key>(nation_recno) ) change_conversion(TECH_GOLD_TO_LIVE, COMMAND_AI); } else if( nationPtr->cash < nationPtr->pref_cash_reserve*5 && nationPtr->live_points > 2500 + nationPtr-><API key>*10 ) { if( tech_res[TECH_LIVE_TO_GOLD]-><API key>(nation_recno) ) change_conversion(TECH_GOLD_TO_LIVE, COMMAND_AI); } else { change_conversion(0, COMMAND_AI); } } }
/* * @test * @bug 4714257 * @summary Test to make sure that the title attribute shows up in links. * @author jamieh * @library ../lib/ * @build JavadocTester * @build TestTitleInHref * @run main TestTitleInHref */ public class TestTitleInHref extends JavadocTester { private static final String BUG_ID = "4714257"; private static final String[][] TEST = { //Test to make sure that the title shows up in a class link. {BUG_ID + FS + "pkg" + FS + "Links.html", "<A HREF=\"../pkg/Class.html\" title=\"class in pkg\">"}, //Test to make sure that the title shows up in an interface link. {BUG_ID + FS + "pkg" + FS + "Links.html", "<A HREF=\"../pkg/Interface.html\" title=\"interface in pkg\">"}, //Test to make sure that the title shows up in cross link shows up {BUG_ID + FS + "pkg" + FS + "Links.html", "<A HREF=\"http://java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" title=\"class or interface in java.io\"><CODE>This is a cross link to class File</CODE></A>"}, }; private static final String[][] NEGATED_TEST = NO_TEST; private static final String[] ARGS = new String[] { "-d", BUG_ID, "-sourcepath", SRC_DIR, "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api", SRC_DIR, "pkg" }; /** * The entry point of the test. * @param args the array of command line arguments. */ public static void main(String[] args) { TestTitleInHref tester = new TestTitleInHref(); run(tester, ARGS, TEST, NEGATED_TEST); tester.printSummary(); } /** * {@inheritDoc} */ public String getBugId() { return BUG_ID; } /** * {@inheritDoc} */ public String getBugName() { return getClass().getName(); } }
<?php /** * @file * Contains \Drupal\<API key>\Plugin\DMU\Fixer\Delete. */ namespace Drupal\<API key>\Plugin\DMU\Fixer; use Drupal\<API key>\FixerBase; /** * @Fixer( * id = "delete" * ) */ class Delete extends FixerBase { use NodeCollectorTrait; public function execute() { foreach ($this->getObjects() as $node) { $node->remove(); } $this->target->save(); // Rebuild the index so it won't contain non-existent crap. $indexer = $this->target->getIndexer($this->configuration['type']); $indexer->clear(); $indexer->build(); } }
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>GNU gettext FAQ</title> </head> <body> <h1 style="text-align: center;">Frequently Asked Questions<br> for GNU gettext </h1> <h1 style="text-align: center;">Questions</h1> <h3>General</h3> <ul> <li><a href="#general_mailinglist">Where is the mailing list?</a></li> <li><a href="#general_source">Where is the newest gettext source?</a></li> <li><a href="#general_announce">I want to be notified of new gettext releases.</a></li> </ul> <h3>Problems building GNU gettext</h3> <ul> <li><a href="#<API key>">On Solaris, I get a build error “text relocations remain” in the <span style="font-family: monospace;">libasprintf</span> subdirectory</a></li> <li><a href=" named <span style="font-family: monospace;">rpath-<span style="font-style: italic;">Nxyz</span></span> fail: “ld: fatal error ... -lrpathz”</a></li> <li><a href=" </ul> <h3>Problems integrating GNU gettext</h3> <ul> <li><a href="#integrating_howto">How do I make use of <span style="font-family: monospace;">gettext()</span> in my package?</a></li> <li><a href=" reference to libintl_gettext”</a></li> <li><a href="#<API key>">gettextize adds multiple references to the same directories/files to <span style="font-family: monospace;">Makefile.am</span> and </a><span style="font-family: monospace;"><a href="#<API key>">configure.ac</a><br> </span></li> <li><a href="#integrating_noop">My program compiles and links fine, but doesn't output translated strings.</a><br> </li> </ul> <h3>GNU gettext on Windows</h3> <ul> <li><a href="#windows_woe32">What does Woe32 mean?</a></li> <li><a href="#windows_howto">How do I compile, link and run a program that uses the gettext() function?</a><br> </li> <li><a href="#windows_setenv">Setting the <span style="font-family: monospace;">LANG</span> environment variable doesn't have any effect</a></li> </ul> <h3>Other</h3> <ul> <li><a href=" entries do not both end with '\n'”</a></li> <li><a href=" instead of “geändert”</a></li> <li><a href="#localename">The <span style="font-family: monospace;">LANGUAGE</span> environment variable is ignored after I set <span style="font-family: monospace;">LANG=en</span></a></li> <li><a href="#nonascii_strings">I use accented characters in my source code. How do I tell the C/C++ compiler in which encoding it is (like <span style="font-family: monospace;">xgettext</span>'s <span style="font-family: monospace;">--from-code</span> option)?</a></li> </ul> <h1 style="text-align: center;">Answers</h1> <h3>General</h3> <h4><a name="general_mailinglist"></a>Where is the mailing list?</h4> Three mailing lists are available: <br> <ul> <li><span style="font-family: monospace;">bug-gnu-gettext@gnu.org</span><br> This mailing list is for discussion of features and bugs of the GNU gettext <span style="font-style: italic;">software</span>, including libintl, the gettext-tools, and its autoconf macros.</li> <li><span style="font-family: monospace;">translation-i18n@lists.sourceforge.net</span><br> This mailing list is for methodology questions around <API key>, and for discussions of translator tools, including but not limited to GNU gettext.</li> <li><span style="font-family: monospace;">translation@iro.umontreal.ca</span><br> This is the email address of the <a href="http: Project</a>, that is the project which manages the translated message catalogs for many free software packages. Note that KDE and GNOME packages are not part of this project; they have their own translation projects: <a href="http://i18n.kde.org/">i18n.kde.org</a> and <a href="http://developer.gnome.org/projects/gtp/">gtp</a>.<br> </li> </ul> The <span style="font-family: monospace;">bug-gnu-gettext</span> list is archived as part of the <a href="http://mail.gnu.org/archive/html/bug-gnu-utils/"><span style="font-family: monospace;">bug-gnu-utils</span></a> archives. <span style="font-family: monospace;">bug-gnu-gettext</span> cannot be subscribed on its own; to receive its contents by mail, subscribe to <span style="font-family: monospace;">bug-gnu-utils</span>.<br> <h4><a name="general_source"></a>Where is the newest gettext source?</h4> The newest gettext release is available on <span style="font-family: monospace;">ftp.gnu.org</span> and its mirrors, in <a href="http: <br> Prereleases are announced on the <a href="http://mail.gnu.org/pipermail/autotools-announce"><span style="font-family: monospace;">autotools-announce</span> mailing list</a>. Note that prereleases are meant for testing and not meant for use in production environments. Please don't use the “gettextize” program of a prerelease on projects which you share with other programmers via CVS.<br> <br> If you want to live on the bleeding edge, you can also use the development sources. Instructions for retrieving the gettext CVS are found <a href="http://savannah.gnu.org/projects/gettext">here</a>. Note that building from CVS requires special tools (autoconf, automake, m4, groff, bison, etc.) and requires that you pay attention to the <span style="font-family: monospace;">README-alpha</span> and <span style="font-family: monospace;">autogen.sh</span> files in the CVS.<br> <h4><a name="general_announce"></a>I want to be notified of new gettext releases.</h4> If you are interested in stable gettext releases, you can follow the <a href="http://mail.gnu.org/pipermail/info-gnu"><span style="font-family: monospace;">info-gnu</span> mailing list</a>. It is also available as a newsgroup <a href="nntp://news.gmane.org/gmane.org.fsf.announce"><span style="font-family: monospace;">gmane.org.fsf.announce</span></a> through <a href="http: style="font-family: monospace;">gmane.org</span></a>.<br> <br> You can also periodically check the download location.<br> <br> If you are interested in testing prereleases as well, you can subscribe to the <a href="http://mail.gnu.org/pipermail/autotools-announce"><span style="font-family: monospace;">autotools-announce</span> mailing list</a>.<br> <h3>Problems building GNU gettext</h3> <h4><a name="<API key>"></a>On Solaris, I get a build error “text relocations remain” in the <span style="font-family: monospace;">libasprintf</span> subdirectory</h4> libtool (or more precisely, the version of libtool that was available at the time the gettext release waas made) doesn't support linking C++ libraries with some versions of GCC. As a workaround, you can configure gettext with the option <span style="font-family: monospace;">--disable-libasprintf</span>.<br> <h4><a name="<API key>"></a>During “make check”, some tests named <span style="font-family: monospace;">rpath-<span style="font-style: italic;">Nxyz</span></span> fail: “ld: fatal error ... -lrpathz”</h4> If only a few among the many rpath tests fail, you can probably ignore the problem. The rpath tests are sensitive to incomplete shared library support in the system, and to bugs in libtool that creates the shared libraries. Some known failures are listed in <span style="font-family: monospace;">autoconf-lib-link/tests/rpath.README</span>.<br> <br> To ignore the problem, just proceed with<br> <br> <div style="margin-left: 40px;"><code>cd gettext-tools</code><br> <code>make check</code><br> <code>cd ..</code><br> </div> <br> <h4><a name="building_install"></a>“make install” fails</h4> “<span style="font-family: monospace;">make install DESTDIR=<span style="font-style: italic;">/some/tempdir</span></span>” can fail with an error message relating to <span style="font-family: monospace;">libgettextlib</span> or <span style="font-family: monospace;">libgettextsrc</span>, or can silently fail to install <span style="font-family: monospace;">libgettextsrc</span>. On some platforms, this is due to limitations of libtool regarding <span style="font-family: monospace;">DESTDIR</span>. On other platforms, it is due to the way the system handles shared libraries, and libtool cannot work around it. Fortunately, on Linux and other glibc based systems, <span style="font-family: monospace;">DESTDIR</span> is supported if no different version of gettext is already installed (i.e. it works if you uninstall the older gettext before building and installing the newer one, or if you do a plain “<span style="font-family: monospace;">make install</span>” before “<span style="font-family: monospace;">make install DESTDIR=<span style="font-style: italic;">/some/tempdir</span></span>”). On other systems, when&nbsp; <span style="font-family: monospace;">DESTDIR</span> does not work, you can still do “<span style="font-family: monospace;">make install</span>” and copy the installed files to <span style="font-family: monospace;"><span style="font-style: italic;">/some/tempdir</span></span> afterwards.<br> <br> If “<span style="font-family: monospace;">make install</span>” without <span style="font-family: monospace;">DESTDIR</span> fails, it's a bug which you are welcome to report to the usual bug report address. <h3>Problems integrating GNU gettext</h3> <h4><a name="integrating_howto"></a>How do I make use of <span style="font-family: monospace;">gettext()</span> in my package?</h4> It's not as difficult as it sounds. Here's the recipe for C or C++ based packages.<br> <ul> <li>Add an invocation of <span style="font-family: monospace;">AM_GNU_GETTEXT([external])</span> to the package's <span style="font-family: monospace;">configure.{ac,in}</span> file.</li> <li>Invoke “<span style="font-family: monospace;">gettextize --copy</span>”. It will do most of the autoconf/automake related work for you.</li> <li>Add the <span style="font-family: monospace;">gettext.h</span> file to the package's source directory, and include it in all source files that contain translatable strings or do output via <span style="font-family: monospace;">printf</span> or <span style="font-family: monospace;">fprintf</span>.</li> <li>In the source file defining the main() function of the program, add these lines to the header<br> <div style="margin-left: 40px;"><code><span style="font-family: monospace;">#include &lt;locale.h&gt;</span><br style="font-family: monospace;"> <span style="font-family: monospace;">#include "gettext.h"</span></code><br> </div> and these lines near the beginning of the main() function:<br> <div style="margin-left: 40px;"><code><span style="font-family: monospace;">setlocale (LC_ALL, "");</span><br style="font-family: monospace;"> <span style="font-family: monospace;">bindtextdomain (PACKAGE, LOCALEDIR);</span><br style="font-family: monospace;"> <span style="font-family: monospace;">textdomain (PACKAGE);</span></code><br> </div> </li> <li>Mark all strings that should be translated with _(), like this: <span style="font-family: monospace;">_("No errors found.")</span>. While doing this, try to turn the strings into good English, one entire sentence per string, not more than one paragraph per string, and use format strings instead of string concatenation. This is needed so that the translators can provide accurate translations.</li> <li>In every source file containing translatable strings, add these lines to the header:<br> <div style="margin-left: 40px;"><code><span style="font-family: monospace;">#include "gettext.h"</span><br style="font-family: monospace;"> <span style="font-family: monospace;">#define _(string) gettext (string)</span></code><br> </div> </li> <li>In the freshly created <span style="font-family: monospace;">po/</span> directory, set up the <span style="font-family: monospace;">POTFILES.in</span> file, and do a “<span style="font-family: monospace;">make update-po</span>”. Then distribute the generated <span style="font-family: monospace;">.pot</span> file to your nearest translation project.</li> <li>Shortly before a release, integrate the translators' <span style="font-family: monospace;">.po</span> files into the <span style="font-family: monospace;">po/</span> directory and do “<span style="font-family: monospace;">make update-po</span>” again.<br> </li> </ul> You find detailed descriptions of how this all works in the GNU gettext manual, chapters “The Maintainer's View” and “Preparing Program Sources”. <h4><a name="<API key>"></a>I get a linker error “undefined reference to libintl_gettext”</h4> This error means that the program uses the <span style="font-family: monospace;">gettext()</span> function after having included the <span style="font-family: monospace;">&lt;libintl.h&gt;</span> file from GNU gettext (which remaps it to <span style="font-family: monospace;">libintl_gettext()</span>), however at link time a function of this name could not be linked in. (It is expected to come from the <span style="font-family: monospace;">libintl</span> library, installed by GNU gettext.)<br> <br> There are many possible reasons for this error, but in any case you should consider the <span style="font-family: monospace;">-I</span>, <span style="font-family: monospace;">-L</span> and <span style="font-family: monospace;">-l</span> options passed to the compiler. In packages using <span style="font-family: monospace;">autoconf</span> generated configure scripts, <span style="font-family: monospace;">-I</span> options come from the <span style="font-family: monospace;">CFLAGS</span> and <span style="font-family: monospace;">CPPFLAGS</span> variables (in Makefiles also <span style="font-family: monospace;">DEFS</span> and <span style="font-family: monospace;">INCLUDES</span>), <span style="font-family: monospace;">-L</span> options come from the <span style="font-family: monospace;">LDFLAGS</span> variable, and <span style="font-family: monospace;">-l</span> options come from the <span style="font-family: monospace;">LIBS</span> variable. The first thing you should check are the values of these variables in your environment and in the&nbsp; package's <span style="font-family: monospace;">config.status</span> autoconfiguration result.<br> <br> To find the cause of the error, a little analysis is needed. Does the program's final link command contains the option “-lintl”?<br> <ul> <li>If yes:<br> Find out where the <span style="font-family: monospace;">libintl</span> comes from. To do this, you have to check for <span style="font-family: monospace;">libintl.a</span> and <span style="font-family: monospace;">libintl.so*</span> (<span style="font-family: monospace;">libintl.dylib</span> on MacOS X) in each directory given as a -L option, as well as in the compiler's implicit search directories. (You get these implicit search directories for gcc by using “<span style="font-family: monospace;">gcc -v</span>” instead of “<span style="font-family: monospace;">gcc</span>” in the final link command line; compilers other than GCC usually look in <span style="font-family: monospace;">/usr/lib</span> and <span style="font-family: monospace;">/lib</span>.) A shell command like<br> <div style="margin-left: 40px;"><code>$ for d in /usr/local/lib /usr/lib /lib; do ls -l $d/libintl.*; done</code><br> </div> will show where the <span style="font-family: monospace;">libintl</span> comes from. By looking at the dates and whether each library defines <span style="font-family: monospace;">libintl_gettext</span> (via “<span style="font-family: monospace;">nm <span style="font-style: italic;">path</span>/libintl.so | grep libintl_gettext</span>”) you can now distinguish three possible causes of the error:<br> <ul> <li>Some older libintl is used instead of the newer one. The fix is to remove the old library or to reorganize your -L options.</li> <li>The used libintl is the new one, and it doesn't contain libintl_gettext. This would be a bug in gettext. If this is the case, please report it to the usual bug report address.</li> <li>The used libintl is a static library (libintl.a), there are no uses of gettext in .o files before the “-lintl” but there are some after the “-lintl”. In this case the fix is to move the “-lintl” to the end or near the end of the link command line. The only libintl dependency that needs to be mentioned after “-lintl” is “-liconv”.</li> </ul> </li> <li>If no:<br> In this case it's likely a bug in the package you are building: The package's Makefiles should make sure that “-lintl” is used where needed.<br> Test whether libintl was found by configure. You can check this by doing<br> <div style="margin-left: 40px;"><code>$ grep '\(INTLLIBS\|LIBINTL\)' config.status</code><br> </div> and looking whether the value of this autoconf variable is non-empty.<br> <ul> <li>If yes: It should be the responsibility of the Makefile to use the value of this variable in the link command line. Does the Makefile.in rule for linking the program use <span style="font-family: monospace;">@INTLLIBS@</span> or <span style="font-family: monospace;">@LIBINTL@</span>?<br> <ul> <li>If no: It's a Makefile.am/in bug.</li> <li>If yes: Something strange is going on. You need to dig deeper.</li> </ul> Note that <span style="font-family: monospace;">@INTLLIBS@</span> is for <span style="font-family: monospace;">gettext.m4</span> versions &lt;= 0.10.40 and <span style="font-family: monospace;">@LIBINTL@</span> is for <span style="font-family: monospace;">gettext.m4</span> versions &gt;= 0.11, depending on which <span style="font-family: monospace;">gettext.m4</span> was used to build the package's <span style="font-family: monospace;">configure</span> - regardless of which gettext you have now installed.</li> <li>If no: So libintl was not found.<br> Take a look at the package's <span style="font-family: monospace;">configure.in/ac</span>. Does it invoke AM_GNU_GETTEXT?<br> <ul> <li>If no: The gettext maintainers take no responsibilities for lookalikes named CY_GNU_GETTEXT, AM_GLIB_GNU_GETTEXT, AM_GNOME_GETTEXT and similar, or for homebrewn autoconf checks. Complain to the package maintainer.</li> <li>If yes: It looks like the <span style="font-family: monospace;">-I</span> and <span style="font-family: monospace;">-L</span> options were inconsistent. You should have a <span style="font-family: monospace;">-I<span style="font-style: italic;">somedir</span>/include</span> in the <span style="font-family: monospace;">CFLAGS</span> or <span style="font-family: monospace;">CPPFLAGS</span> if and only if you also have a <span style="font-family: monospace;">-L<span style="font-style: italic;">somedir</span>/lib</span> in the <span style="font-family: monospace;">LDFLAGS</span>. And <span style="font-family: monospace;"><span style="font-style: italic;">somedir</span>/include</span> should contain a <span style="font-family: monospace;">libintl.h</span> if and only if <span style="font-family: monospace;"><span style="font-style: italic;">somedir</span>/lib</span> contains <span style="font-family: monospace;">libintl.{a,so}</span>.<br> This case can also happen if you have configured a GCC &lt; 3.2 with the same <span style="font-family: monospace;">--prefix</span> option as you used for GNU libiconv or GNU gettext. This is fatal, because these versions of GCC implicitly use <span style="font-family: monospace;">-L<span style="font-style: italic;">prefix</span>/lib</span> but <span style="font-weight: bold; font-style: italic;">not</span><br style="font-weight: bold; font-style: italic;"> <span style="font-family: monospace;">-I<span style="font-style: italic;">prefix</span>/include</span>. The workaround is to use a different <span style="font-family: monospace;">--prefix</span> for GCC.<br> </li> </ul> </li> </ul> </li> </ul> <h4><a name="<API key>"></a>gettextize adds multiple references to the same directories/files to <span style="font-family: monospace;">Makefile.am</span> and <span style="font-family: monospace;">configure.ac</span></h4> If <span style="font-family: monospace;">gettextize</span> is used on a package, then the <span style="font-family: monospace;">po/</span>, <span style="font-family: monospace;">intl/</span>, <span style="font-family: monospace;">m4/</span> directories of the package are removed, and then <span style="font-family: monospace;">gettextize</span> is invoked on the package again, it will re-add the <span style="font-family: monospace;">po/</span>, <span style="font-family: monospace;">intl/</span>, <span style="font-family: monospace;">m4/</span> directories and change <span style="font-family: monospace;">Makefile.am</span>, <span style="font-family: monospace;">configure.ac</span> and <span style="font-family: monospace;">ChangeLog</span> accordingly. This is normal. The second use of <span style="font-family: monospace;">gettextize</span> here is an abuse of the program. <span style="font-family: monospace;">gettextize</span> is a wizard intended to transform a <span style="font-style: italic;">working source package</span> into a <span style="font-style: italic;">working source package</span> that uses the newest version of gettext. If you start out from a nonfunctional source package (it is nonfunctional since you have omitted some directories), you cannot expect that <span style="font-family: monospace;">gettextize</span> corrects it.<br> <br> Often this question arises in packages that use CVS. See the section “CVS Issues / Integrating with CVS” of the GNU gettext documentation. This section mentions a program <span style="font-family: monospace;">autopoint</span> which is designed to reconstruct those files and directories created by <span style="font-family: monospace;">gettextize</span> that can be omitted from a CVS repository.<br> <h4><a name="integrating_noop"></a>My program compiles and links fine, but doesn't output translated strings.</h4> There are several possible reasons. Here is a checklist that allows you to determine the cause.<br> <ol> <li>Check that the environment variables LC_ALL, LC_MESSAGES, LC_CTYPE, LANG, LANGUAGE together specify a valid locale and language.<br> To check this, run the commands<br> <div style="margin-left: 40px;"><code>$ gettext --version</code><br> <code>$ gettext --help</code><br> </div> You should see at least some output in your desired language. If not, either<br> <ul> <li>You have chosen a too exotic language. <span style="font-family: monospace;">gettext</span> is localized to 33 languages. Choose a less exotic language, such as Galician or Ukrainian. Or<br> </li> <li>There is a problem with your environment variables. Possibly LC_ALL points to a locale that is not installed, or LC_MESSAGES and LC_CTYPE are inconsistent.</li> </ul> </li> <li>Check that your program contains a <span style="font-family: monospace;">setlocale</span> call.<br> To check this, run your program under ltrace. For example,<br> <div style="margin-left: 40px;"><code>$ ltrace ./myprog</code><br> <code>...</code><br> <code>setlocale(6, "")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "de_DE.UTF-8"</code><br> </div> If you have no ltrace, you can also do this check by running your program under the debugger. For example,<br> <div style="margin-left: 40px;"><code>$ gdb ./myprog</code><br> <code>(gdb) break main</code><br> <code>(gdb) run</code><br> <code>Breakpoint 1, main ()</code><br> <code>(gdb) break setlocale</code><br> <code>(gdb) continue</code><br> <code>Breakpoint 2, setlocale ()</code><br> <code>;; OK, the breakpoint has been hit, setlocale() is being called.</code><br> </div> Either way, check that the return value of <span style="font-family: monospace;">setlocale()</span> is non-NULL. A NULL return value indicates a failure.&nbsp;</li> <li>Check that your program contains a <span style="font-family: monospace;">textdomain</span> call, a <span style="font-family: monospace;">bindtextdomain</span> call referring to the same message domain, and then really calls the <span style="font-family: monospace;">gettext</span>, <span style="font-family: monospace;">dgettext</span> or <span style="font-family: monospace;">dcgettext</span> function.<br> To check this, run the program under ltrace. For example,<br> <div style="margin-left: 40px;"><code>$ ltrace ./myprog</code><br> <code>...</code><br> <code>textdomain("hello-c")&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "hello-c"</code><br> <code>bindtextdomain("hello-c", "/opt/share"...) = "/opt/share"...</code><br> <code>dcgettext(0, 0x08048691, 5, 0x0804a200, 0x08048689) = 0x4001721f</code><br> </div> If you have no ltrace, you can also do this check by running your program under the debugger. For example,<br> <div style="margin-left: 40px;"><code>$ gdb ./myprog</code><br> <code>(gdb) break main</code><br> <code>(gdb) run</code><br> <code>Breakpoint 1, main ()</code><br> <code>(gdb) break textdomain</code><br> <code>(gdb) break bindtextdomain</code><br> <code>(gdb) break gettext</code><br> <code>(gdb) break dgettext</code><br> <code>(gdb) break dcgettext</code><br> <code>(gdb) continue</code><br> <code>Breakpoint 2, textdomain ()</code><br> <code>(gdb) continue</code><br> <code>Breakpoint 3, bindtextdomain ()</code><br> <code>(gdb) continue</code><br> <code>Breakpoint 6, dcgettext ()</code><br> </div> Note that here <span style="font-family: monospace;">dcgettext()</span> is called instead of the <span style="font-family: monospace;">gettext()</span> function mentioned in the source code; this is due to an optimization in <span style="font-family: monospace;">&lt;libintl.h&gt;</span>.<br> When using libintl on a non-glibc system, you have to add a prefix “<span style="font-family: monospace;">libintl_</span>” to all the function names mentioned here, because that's what the functions are really named, under the hood.<br> If <span style="font-family: monospace;">gettext</span>/<span style="font-family: monospace;">dgettext</span>/<span style="font-family: monospace;">dcgettext</span> is not called at all, the possible cause might be that some autoconf or Makefile macrology has turned off <API key> entirely (like the <span style="font-family: monospace;">--disable-nls</span> configuration option usually does).<br> </li> <li>Check that the <span style="font-family: monospace;">.mo</span> file that contains the translation is really there where the program expects it.<br> To check this, run the program under strace and look at the <span style="font-family: monospace;">open()</span> calls. For example,<br> <div style="margin-left: 40px;"><code>$ strace ./myprog 2&gt;&amp;1 | grep '^open('</code><br> <code>open("/etc/ld.so.preload", O_RDONLY)&nbsp;&nbsp;&nbsp; = -1 ENOENT (No such file or directory)</code><br> <code>open("/etc/ld.so.cache", O_RDONLY)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 5</code><br> <code>open("/lib/libc.so.6", O_RDONLY)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 5</code><br> <code>open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 5</code><br> <code>open("/usr/share/locale/locale.alias", O_RDONLY) = 5</code><br> <code>open("/opt/share/locale/de/LC_MESSAGES/hello-c.mo", O_RDONLY) = 5</code><br> <code>...</code><br> </div> A nonnegative <span style="font-family: monospace;">open()</span> return value means that the file has been found.<br> If you have no strace, you can also guess the <span style="font-family: monospace;">.mo</span> file's location: it is<br> <div style="margin-left: 40px;"><span style="font-family: monospace;"><span style="font-style: italic;">localedir</span>/<span style="font-style: italic;">lang</span>/LC_MESSAGES/<span style="font-style: italic;">domain</span>.mo</span><br> </div> where <span style="font-style: italic;">domain</span> is the argument passed to <span style="font-family: monospace;">textdomain()</span>, <span style="font-style: italic;">localedir</span> is the second argument passed to <span style="font-family: monospace;">bindtextdomain()</span>, and <span style="font-style: italic;">lang</span> is the language (<span style="font-style: italic;">LL</span>) or language and territory (<span style="font-style: italic;">LL</span>_<span style="font-style: italic;">CC</span>), depending on the environment variables checked in step 1.</li> <li>Check that the .mo file contains a translation for the string that is being asked for.<br> To do this, you need to convert the .mo file back to PO file format, through the command<br> <div style="margin-left: 40px;"><code>$ msgunfmt </code><span style="font-family: monospace;"><span style="font-style: italic;">localedir</span>/<span style="font-style: italic;">lang</span>/LC_MESSAGES/<span style="font-style: italic;">domain</span>.mo</span><br> <code></code></div> and look for an <span style="font-family: monospace;">msgid</span> that matches the given string.<br> </li> </ol> <h3>GNU gettext on Windows</h3> <h4><a name="windows_woe32"></a>What does Woe32 mean?</h4> “Woe32” denotes the Windows 32-bit operating systems for x86: Windows NT/2000/XP and Windows 95/98/ME. Microsoft uses the term “Win32” to denote these; this is a psychological trick in order to make everyone believe that these OSes are a “win” for the user. However, for most users and developers, they are a source of woes, which is why I call them “Woe32”.<br> <h4><a name="windows_howto"></a>How do I compile, link and run a program that uses the gettext() function?</h4> When you use RedHat's cygwin environment, it's as on Unix:<br> <ul> <li>You need to add an <span style="font-family: monospace;">-I</span> option to the compilation command line, so that the compiler finds the <span style="font-family: monospace;">libintl.h</span> include file, and</li> <li>You need to add an <span style="font-family: monospace;">-L</span> option to the link command line, so that the linker finds the <span style="font-family: monospace;">libintl</span> library.</li> </ul> When you use the Mingw environment (either from within cygwin, with <span style="font-family: monospace;">CC="gcc -mno-cygwin"</span>, or from MSYS, with <span style="font-family: monospace;">CC="gcc"</span>), I don't know the details.<br> <br> When you use the Microsoft Visual C/C++ (MSVC) compiler, you will likely use the precompiled Woe32 binaries. For running a program that uses gettext(), one needs the <span style="font-family: monospace;">.bin.woe32.zip</span> packages of <span style="font-family: monospace;">gettext-runtime</span> and <span style="font-family: monospace;">libiconv</span>. As a developer, you'll also need the <span style="font-family: monospace;">xgettext</span> and <span style="font-family: monospace;">msgfmt</span> programs that are contained in the <span style="font-family: monospace;">.bin.woe32.zip</span> package of <span style="font-family: monospace;">gettext-tools</span>. Then<br> <ul> <li>You need to add an <span style="font-family: monospace;">-MD</span> option to all compilation and link command lines. MSVC has three different, mutually incompatible, compilation models (<span style="font-family: monospace;">-ML</span>, <span style="font-family: monospace;">-MT</span>, <span style="font-family: monospace;">-MD</span>); the default is <span style="font-family: monospace;">-ML</span>. <span style="font-family: monospace;">intl.dll</span> uses the <span style="font-family: monospace;">-MD</span> model, therefore the rest of the program must use <span style="font-family: monospace;">-MD</span> as well.<br> </li> <li>You need to add an <span style="font-family: monospace;">-I</span> option to the compilation command line, so that the compiler finds the <span style="font-family: monospace;">libintl.h</span> include file.<br> </li> <li>You need to add an <span style="font-family: monospace;">-L</span> option to the link command line, so that the linker finds the <span style="font-family: monospace;">intl.lib</span> library.</li> <li>You need to copy the <span style="font-family: monospace;">intl.dll</span> and <span style="font-family: monospace;">iconv.dll</span> to the directory where your <span style="font-family: monospace;">.exe</span> files are created, so that they will be found at runtime.<br> </li> </ul> <h4><a name="windows_setenv"></a>Setting the <span style="font-family: monospace;">LANG</span> environment variable doesn't have any effect</h4> If neither LC_ALL, LC_MESSAGES nor LANGUAGES is set, it's the LANG environment variable which determines the language into which gettext() translates the messages.<br> <br> You can test your program by setting the LANG environment variable from outside the program. In a Windows command interpreter:<br> <div style="margin-left: 40px;"><code>set LANG=de_DE</code><br> <code>.\myprog.exe</code><br> </div> Or in a Cygwin shell:<br> <div style="margin-left: 40px;"><code>$ env LANG=de_DE ./myprog.exe</code><br> </div> <br> If this test fails, look at the question “My program compiles and links fine, but doesn't output translated strings.” above.<br> <br> If this test succeeds, the problem is related in the way you set the environment variable. Here is a checklist:<br> <ul> <li>Check that you are using the <span style="font-family: monospace;">-MD</span> option in all compilation and link command lines. Otherwise you might end up calling the <span style="font-family: monospace;">putenv()</span> function from Microsoft's <span style="font-family: monospace;">libc.lib</span>, whereas <span style="font-family: monospace;">intl.dll</span> is using the <span style="font-family: monospace;">getenv()</span> function from Mictosoft's <span style="font-family: monospace;">msvcrt.lib</span>.</li> <li>Check that you set the environment variable using <span style="font-style: italic;">both</span> <span style="font-family: monospace;"><API key>()</span> and <span style="font-family: monospace;">putenv()</span>. A convenient way to do so, and to deal with the fact that some Unix systems have <span style="font-family: monospace;">setenv()</span> and some don't, is the following function.<br> <br> <div style="margin-left: 40px;"><code>#include &lt;string.h&gt;</code><br> <code>#include &lt;stdlib.h&gt;</code><br> <code>#if defined _WIN32</code><br> <code># include &lt;windows.h&gt;</code><br> <code>#endif</code><br> <code></code><br> <code>int my_setenv (const char * name, const char * value) {</code><br> <code>&nbsp; size_t namelen = strlen(name);</code><br> <code>&nbsp; size_t valuelen = (value==NULL ? 0 : strlen(value));</code><br> <code>#if defined _WIN32</code><br> <code>&nbsp; if (!<API key>(name,value))</code><br> <code>&nbsp;&nbsp;&nbsp; return -1; </code><br> <code>#endif</code><br> <code>#if defined(HAVE_PUTENV)</code><br> <code>&nbsp; char* buffer = (char*)malloc(namelen+1+valuelen+1);</code><br> <code>&nbsp; if (!buffer)</code><br> <code>&nbsp;&nbsp;&nbsp; return -1; /* no need to set errno = ENOMEM */</code><br> <code>&nbsp; memcpy(buffer,name,namelen);</code><br> <code>&nbsp; if (value != NULL) {</code><br> <code>&nbsp;&nbsp;&nbsp; buffer[namelen] = '=';</code><br> <code>&nbsp;&nbsp;&nbsp; memcpy(buffer+namelen+1,value,valuelen);</code><br> <code>&nbsp;&nbsp;&nbsp; buffer[namelen+1+valuelen] = 0;</code><br> <code>&nbsp; } else</code><br> <code>&nbsp;&nbsp;&nbsp; buffer[namelen] = 0;</code><br> <code>&nbsp; return putenv(buffer);</code><br> <code>#elif defined(HAVE_SETENV)</code><br> <code>&nbsp; return setenv(name,value,1);</code><br> <code>#else</code><br> <code>&nbsp; /* Uh oh, neither putenv() nor setenv() ... */</code><br> <code>&nbsp; return -1;</code><br> <code>#endif</code><br> <code>}</code><br> <code></code></div> <br> </li> </ul> <h3>Other</h3> <h4><a name="newline"></a>What does this mean: “`msgid' and `msgstr' entries do not both end with '\n'”</h4> It means that when the original string ends in a newline, your translation must also end in a newline. And if the original string does not end in a newline, then your translation should likewise not have a newline at the end.<br> <h4><a name="translit"></a>German umlauts are displayed like “ge"andert” instead of “geändert”</h4> This symptom occurs when the <span style="font-family: monospace;">LC_CTYPE</span> facet of the locale is not set; then gettext() doesn't know which character set to use, and converts all messages to ASCII, as far as possible.<br> <br> If the program is doing<br> <code><br> setlocale (LC_MESSAGES, "");<br> <br> </code>then change it to<br> <code><br> setlocale (LC_CTYPE, "");<br> setlocale (LC_MESSAGES, "");<br> </code><br> or do both of these in a single call:<br> <code><br> setlocale (LC_ALL, "");<br> </code><br> If the program is already doing<br> <code><br> setlocale (LC_ALL, "");<br> </code><br> then the symptom can still occur if the user has not set <span style="font-family: monospace;">LANG</span>, but instead has set <span style="font-family: monospace;">LC_MESSAGES</span> to a valid locale and has set <span style="font-family: monospace;">LC_CTYPE</span> to nothing or an invalid locale. The fix for the user is then to set <span style="font-family: monospace;">LANG</span> instead of <span style="font-family: monospace;">LC_MESSAGES</span>.<br> <h4><a name="localename"></a>The <span style="font-family: monospace;">LANGUAGE</span> environment variable is ignored after I set <span style="font-family: monospace;">LANG=en</span></h4> This is because “en” is a language name, but not a valid locale name. The <span style="font-family: monospace;">ABOUT-NLS</span>&nbsp; file says:<br> <blockquote> In the <span style="font-family: monospace;">LANGUAGE</span> environment variable, but not in the <span style="font-family: monospace;">LANG</span> environment variable, <span style="font-style: italic;">LL</span>_<span style="font-style: italic;">CC</span><span style="font-family: monospace;"> </span>combinations can be abbreviated as&nbsp;<span style="font-style: italic;">LL</span> to denote the language's main dialect.</blockquote> Why is <span style="font-family: monospace;">LANG=en</span> not allowed? Because <span style="font-family: monospace;">LANG</span> is a setting for the entire locale, including monetary information, and this depends on the country: en_GB, en_AU, en_ZA all have different currencies.<br> <h4><a name="nonascii_strings"></a>I use accented characters in my source code. How do I tell the C/C++ compiler in which encoding it is (like <span style="font-family: monospace;">xgettext</span>'s <span style="font-family: monospace;">--from-code</span> option)?</h4> Short answer: If you want your program to be useful to other people, then <span style="font-style: italic;">don't use accented characters</span> (or other non-ASCII characters) in string literals <span style="font-style: italic;">in the source code</span>. Instead, use only ASCII for string literals, and use <span style="font-family: monospace;">gettext()</span> to retrieve their display-ready form.<br> <br> Long explanation:<br> The reason is that the ISO C standard specifies that the character set at compilation time can be different from the character set at execution time.<br> The character encoding at compilation time is the one which determines how the source files are interpreted and also how string literals are stored in the compiled code. This character encoding is generally unspecified; for recent versions of GCC, it depends on the LC_CTYPE locale in effect during the compilation process.<br> The character encoding at execution time is the one which determines how standard functions like <span style="font-family: monospace;">isprint()</span>, <span style="font-family: monospace;">wcwidth()</span> etc. work and how strings written to standard output should be encoded. This character encoding is specified by POSIX to depend on the LC_CTYPE locale in effect when the program is executed; see also the description in the <span style="font-family: monospace;">ABOUT-NLS</span> file.<br> Strings in the compiled code are not magically converted between the time the program is compiled and the time it is run.<br> <br> Therefore what could you do to get accented characters to work?<br> <br> Can you ensure that the execution character set is the same as the compilation character set? Even if your program is to be used only in a single country, this is not realistically possible. For example, in Germany there are currently three character encodings in use: UTF-8, ISO-8859-15 and ISO-8859-1. Therefore you would have to explicitly convert the accented strings from the compilation character set to the execution character set at runtime, for example through iconv().<br> <br> Can you ensure that the compilation character set is the one in which your source files are stored? This is not realistically possible either: For compilers other than GCC, there is no way to specify the compilation character set. So let's assume for a moment that everyone uses GCC; then you will specify the LC_CTYPE or LC_ALL environment variable in the Makefile. But for this you have to assume that everyone has a locale in a given encoding. Be it UTF-8 or ISO-8859-1 - this is not realistic. People often have no locale installed besides the one they use.<br> <br> Use of wide strings <span style="font-family: monospace;">L"..."</span> doesn't help solving the problem, because on systems like FreeBSD or Solaris, the way how wide string literals are stored in compiled code depends on the compilation&nbsp; character set, just as it does for narrow strings <span style="font-family: monospace;">"..."</span>. Moreover, wide strings have problems of their own.<br> <br> Use of ISO C 99 Unicode escapes "\u<span style="font-style: italic;">xxxx</span>" doesn't help either because these characters are converted to the compilation character set at compile time; so again, since you can't guarantee that the compilation character set is not ASCII, you're risking compilation errors just as if the real character had been used in the source instead of the Unicode escape.<br> <br> So, in summary, there is no way to make accented characters in string literals work in C/C++.<br> <br> You might then wonder what <span style="font-family: monospace;">xgettext</span>'s <span style="font-family: monospace;">--from-code</span> option is good for. The answer is<br> <ol> <li>For the comments in C/C++ source code. The compiler ignores them.<br> </li> <li>For other programming languages like Java, for which the compiler converts all string literals to UTF-8.</li> </ol> <br> <hr style="width: 100%; height: 2px;"> <address>GNU gettext FAQ<br> Bruno Haible &lt;<a href="mailto:bruno@clisp.org">bruno@clisp.org</a>&gt;</address> <p>Last modified: 24 February 2004 </p> </body> </html>
using System; using System.IO; using dnlib.DotNet; using de4dot.blocks; namespace de4dot.code.deobfuscators.SmartAssembly { class ResourceResolver { ModuleDefMD module; AssemblyResolver assemblyResolver; <API key> <API key>; bool mergedIt = false; public ResourceResolver(ModuleDefMD module, AssemblyResolver assemblyResolver, <API key> <API key>) { this.module = module; this.assemblyResolver = assemblyResolver; this.<API key> = <API key>; } public bool canDecryptResource() { return assemblyResolver.canDecryptResource(<API key>.ResourceInfo); } public <API key> mergeResources() { if (mergedIt) return null; var info = <API key>.ResourceInfo; if (info == null) return null; DeobUtils.<API key>(module, info.resourceName, () => assemblyResolver.<API key>(info)); mergedIt = true; return info; } } }
#include <linux/init.h> #include <linux/ioport.h> #include <linux/platform_device.h> #include <linux/bootmem.h> #include <asm/mach-types.h> #include <asm/mach/mmc.h> #include <mach/msm_bus_board.h> #include <mach/board.h> #include <mach/gpio.h> #include <mach/gpiomux.h> #include "devices.h" #include "board-8064.h" /* APQ8064 has 4 SDCC controllers */ enum sdcc_controllers { SDCC1, SDCC2, SDCC3, SDCC4, MAX_SDCC_CONTROLLER }; /* All SDCC controllers require VDD/VCC voltage */ static struct msm_mmc_reg_data mmc_vdd_reg_data[MAX_SDCC_CONTROLLER] = { /* SDCC1 : eMMC card connected */ [SDCC1] = { .name = "sdc_vdd", .high_vol_level = 2950000, .low_vol_level = 2950000, .always_on = 1, .lpm_sup = 1, .lpm_uA = 9000, .hpm_uA = 200000, /* 200mA */ }, /* SDCC3 : External card slot connected */ [SDCC3] = { .name = "sdc_vdd", .high_vol_level = 2950000, .low_vol_level = 2950000, .hpm_uA = 800000, /* 800mA */ } }; /* Only slots having eMMC card will require VCCQ voltage */ static struct msm_mmc_reg_data mmc_vccq_reg_data[1] = { /* SDCC1 : eMMC card connected */ [SDCC1] = { .name = "sdc_vccq", .always_on = 1, .high_vol_level = 1800000, .low_vol_level = 1800000, .hpm_uA = 200000, /* 200mA */ } }; /* All SDCC controllers may require voting for VDD PAD voltage */ static struct msm_mmc_reg_data mmc_vddp_reg_data[MAX_SDCC_CONTROLLER] = { /* SDCC3 : External card slot connected */ [SDCC3] = { .name = "sdc_vddp", .high_vol_level = 2950000, .low_vol_level = 1850000, .always_on = 1, .lpm_sup = 1, /* Max. Active current required is 16 mA */ .hpm_uA = 16000, /* * Sleep current required is ~300 uA. But min. vote can be * in terms of mA (min. 1 mA). So let's vote for 2 mA * during sleep. */ .lpm_uA = 2000, } }; static struct <API key> mmc_slot_vreg_data[MAX_SDCC_CONTROLLER] = { /* SDCC1 : eMMC card connected */ [SDCC1] = { .vdd_data = &mmc_vdd_reg_data[SDCC1], .vccq_data = &mmc_vccq_reg_data[SDCC1], }, /* SDCC3 : External card slot connected */ [SDCC3] = { .vdd_data = &mmc_vdd_reg_data[SDCC3], .vddp_data = &mmc_vddp_reg_data[SDCC3], } }; /* SDC1 pad data */ static struct msm_mmc_pad_drv sdc1_pad_drv_on_cfg[] = { {TLMM_HDRV_SDC1_CLK, GPIO_CFG_16MA}, {TLMM_HDRV_SDC1_CMD, GPIO_CFG_10MA}, {TLMM_HDRV_SDC1_DATA, GPIO_CFG_10MA} }; static struct msm_mmc_pad_drv <API key>[] = { {TLMM_HDRV_SDC1_CLK, GPIO_CFG_2MA}, {TLMM_HDRV_SDC1_CMD, GPIO_CFG_2MA}, {TLMM_HDRV_SDC1_DATA, GPIO_CFG_2MA} }; static struct msm_mmc_pad_pull <API key>[] = { {TLMM_PULL_SDC1_CLK, GPIO_CFG_NO_PULL}, {TLMM_PULL_SDC1_CMD, GPIO_CFG_PULL_UP}, {TLMM_PULL_SDC1_DATA, GPIO_CFG_PULL_UP} }; static struct msm_mmc_pad_pull <API key>[] = { {TLMM_PULL_SDC1_CLK, GPIO_CFG_NO_PULL}, {TLMM_PULL_SDC1_CMD, GPIO_CFG_PULL_UP}, {TLMM_PULL_SDC1_DATA, GPIO_CFG_PULL_UP} }; /* SDC3 pad data */ static struct msm_mmc_pad_drv sdc3_pad_drv_on_cfg[] = { {TLMM_HDRV_SDC3_CLK, GPIO_CFG_8MA}, {TLMM_HDRV_SDC3_CMD, GPIO_CFG_8MA}, {TLMM_HDRV_SDC3_DATA, GPIO_CFG_8MA} }; static struct msm_mmc_pad_drv <API key>[] = { {TLMM_HDRV_SDC3_CLK, GPIO_CFG_2MA}, {TLMM_HDRV_SDC3_CMD, GPIO_CFG_2MA}, {TLMM_HDRV_SDC3_DATA, GPIO_CFG_2MA} }; static struct msm_mmc_pad_pull <API key>[] = { {TLMM_PULL_SDC3_CLK, GPIO_CFG_NO_PULL}, {TLMM_PULL_SDC3_CMD, GPIO_CFG_PULL_UP}, {TLMM_PULL_SDC3_DATA, GPIO_CFG_PULL_UP} }; static struct msm_mmc_pad_pull <API key>[] = { {TLMM_PULL_SDC3_CLK, GPIO_CFG_NO_PULL}, {TLMM_PULL_SDC3_CMD, GPIO_CFG_PULL_UP}, {TLMM_PULL_SDC3_DATA, GPIO_CFG_PULL_UP} }; static struct <API key> mmc_pad_pull_data[MAX_SDCC_CONTROLLER] = { [SDCC1] = { .on = <API key>, .off = <API key>, .size = ARRAY_SIZE(<API key>) }, [SDCC3] = { .on = <API key>, .off = <API key>, .size = ARRAY_SIZE(<API key>) }, }; static struct <API key> mmc_pad_drv_data[MAX_SDCC_CONTROLLER] = { [SDCC1] = { .on = sdc1_pad_drv_on_cfg, .off = <API key>, .size = ARRAY_SIZE(sdc1_pad_drv_on_cfg) }, [SDCC3] = { .on = sdc3_pad_drv_on_cfg, .off = <API key>, .size = ARRAY_SIZE(sdc3_pad_drv_on_cfg) }, }; static struct msm_mmc_pad_data mmc_pad_data[MAX_SDCC_CONTROLLER] = { [SDCC1] = { .pull = &mmc_pad_pull_data[SDCC1], .drv = &mmc_pad_drv_data[SDCC1] }, [SDCC3] = { .pull = &mmc_pad_pull_data[SDCC3], .drv = &mmc_pad_drv_data[SDCC3] }, }; static struct msm_mmc_pin_data mmc_slot_pin_data[MAX_SDCC_CONTROLLER] = { [SDCC1] = { .pad_data = &mmc_pad_data[SDCC1], }, [SDCC3] = { .pad_data = &mmc_pad_data[SDCC3], }, }; #ifdef <API key> static unsigned int sdc1_sup_clk_rates[] = { 400000, 24000000, 48000000, 96000000 }; static struct mmc_platform_data sdc1_data = { .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, #ifdef <API key> .mmc_bus_width = MMC_CAP_8_BIT_DATA, #else .mmc_bus_width = MMC_CAP_4_BIT_DATA, #endif .sup_clk_table = sdc1_sup_clk_rates, .sup_clk_cnt = ARRAY_SIZE(sdc1_sup_clk_rates), .pclk_src_dfab = 1, .nonremovable = 1, .pin_data = &mmc_slot_pin_data[SDCC1], .vreg_data = &mmc_slot_vreg_data[SDCC1], .uhs_caps = MMC_CAP_1_8V_DDR | MMC_CAP_UHS_DDR50, }; static struct mmc_platform_data *apq8064_sdc1_pdata = &sdc1_data; #else static struct mmc_platform_data *apq8064_sdc1_pdata; #endif #ifdef <API key> static unsigned int sdc3_sup_clk_rates[] = { 400000, 24000000, 48000000, 96000000, 192000000 }; static struct mmc_platform_data sdc3_data = { .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, .mmc_bus_width = MMC_CAP_4_BIT_DATA, .sup_clk_table = sdc3_sup_clk_rates, .sup_clk_cnt = ARRAY_SIZE(sdc3_sup_clk_rates), .pclk_src_dfab = 1, .pin_data = &mmc_slot_pin_data[SDCC3], .vreg_data = &mmc_slot_vreg_data[SDCC3], .wpswitch_gpio = <API key>(17), .wpswitch_polarity = 1, .status_gpio = 26, .status_irq = MSM_GPIO_TO_INT(26), .irq_flags = IRQF_TRIGGER_RISING | <API key>, .<API key> = 1, .xpc_cap = 1, .uhs_caps = (MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25 | MMC_CAP_UHS_SDR50 | MMC_CAP_UHS_DDR50 | MMC_CAP_UHS_SDR104 | <API key>), }; static struct mmc_platform_data *apq8064_sdc3_pdata = &sdc3_data; #else static struct mmc_platform_data *apq8064_sdc3_pdata; #endif void __init apq8064_init_mmc(void) { if ((<API key>()) || <API key>()) { if (apq8064_sdc1_pdata) { if (<API key>()) apq8064_sdc1_pdata->disable_bam = true; apq8064_sdc1_pdata->disable_runtime_pm = true; apq8064_sdc1_pdata->disable_cmd23 = true; } if (apq8064_sdc3_pdata) { if (<API key>()) apq8064_sdc3_pdata->disable_bam = true; apq8064_sdc3_pdata->disable_runtime_pm = true; apq8064_sdc3_pdata->disable_cmd23 = true; } } if (apq8064_sdc1_pdata) { apq8064_sdc1_pdata->swfi_latency = <API key>(); apq8064_add_sdcc(1, apq8064_sdc1_pdata); } if (apq8064_sdc3_pdata) { apq8064_sdc3_pdata->swfi_latency = <API key>(); if (!<API key>()) { apq8064_sdc3_pdata->wpswitch_gpio = 0; apq8064_sdc3_pdata->wpswitch_polarity = 0; } apq8064_add_sdcc(3, apq8064_sdc3_pdata); } }
#include <arch/acpi.h> #include <arch/io.h> #include <bootmode.h> #include <chip.h> #include <console/console.h> #include <delay.h> #include <device/device.h> #include <device/pci.h> #include <device/pci_ids.h> #include <drivers/intel/gma/i915_reg.h> #include <fsp/util.h> #include <soc/acpi.h> #include <soc/cpu.h> #include <soc/pm.h> #include <soc/ramstage.h> #include <soc/systemagent.h> #include <stdlib.h> #include <string.h> #include <vboot/vbnv.h> uintptr_t fsp_soc_get_igd_bar(void) { return find_resource(SA_DEV_IGD, PCI_BASE_ADDRESS_2)->base; } u32 map_oprom_vendev(u32 vendev) { return SA_IGD_OPROM_VENDEV; } static struct resource *gtt_res = NULL; static unsigned long gtt_read(unsigned long reg) { u32 val; val = read32((void *)(unsigned int)(gtt_res->base + reg)); return val; } static void gtt_write(unsigned long reg, unsigned long data) { write32((void *)(unsigned int)(gtt_res->base + reg), data); } static inline void gtt_rmw(u32 reg, u32 andmask, u32 ormask) { u32 val = gtt_read(reg); val &= andmask; val |= ormask; gtt_write(reg, val); } static void igd_init(struct device *dev) { u32 ddi_buf_ctl; gtt_res = find_resource(dev, PCI_BASE_ADDRESS_0); if (!gtt_res || !gtt_res->base) return; /* * Enable DDI-A (eDP) 4-lane operation if the link is not up yet. * This will allow the kernel to use 4-lane eDP links properly * if the VBIOS or GOP driver does not execute. */ ddi_buf_ctl = gtt_read(DDI_BUF_CTL_A); if (!acpi_is_wakeup_s3() && !(ddi_buf_ctl & DDI_BUF_CTL_ENABLE)) { ddi_buf_ctl |= DDI_A_4_LANES; gtt_write(DDI_BUF_CTL_A, ddi_buf_ctl); } if (IS_ENABLED(<API key>)) return; /* IGD needs to be Bus Master */ u32 reg32 = pci_read_config32(dev, PCI_COMMAND); reg32 |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO; pci_write_config32(dev, PCI_COMMAND, reg32); /* Wait for any configured pre-graphics delay */ if (!acpi_is_wakeup_s3()) { #if IS_ENABLED(CONFIG_CHROMEOS) if (<API key>() || vboot_wants_oprom()) mdelay(<API key>); #else mdelay(<API key>); #endif } /* Initialize PCI device, load/execute BIOS Option ROM */ pci_dev_init(dev); #if IS_ENABLED(CONFIG_CHROMEOS) if (!gfx_get_init_done() && !acpi_is_wakeup_s3()) { /* * Enable DDI-A if the Option ROM did not execute: * * bit 0: Display detected (RO) * bit 4: DDI A supports 4 lanes and DDI E is not used * bit 7: DDI buffer is idle */ gtt_write(DDI_BUF_CTL_A, DDI_BUF_IS_IDLE | DDI_A_4_LANES | <API key>); } #endif } /* Initialize IGD OpRegion, called from ACPI code */ static int update_igd_opregion(igd_opregion_t *opregion) { u16 reg16; /* Initialize Mailbox 3 */ opregion->mailbox3.bclp = <API key>; opregion->mailbox3.pfit = IGD_FIELD_VALID | IGD_PFIT_STRETCH; opregion->mailbox3.pcft = 0; /* should be (IMON << 1) & 0x3e */ opregion->mailbox3.cblv = IGD_FIELD_VALID | <API key>; opregion->mailbox3.bclm[0] = <API key> + 0x0000; opregion->mailbox3.bclm[1] = <API key> + 0x0a19; opregion->mailbox3.bclm[2] = <API key> + 0x1433; opregion->mailbox3.bclm[3] = <API key> + 0x1e4c; opregion->mailbox3.bclm[4] = <API key> + 0x2866; opregion->mailbox3.bclm[5] = <API key> + 0x327f; opregion->mailbox3.bclm[6] = <API key> + 0x3c99; opregion->mailbox3.bclm[7] = <API key> + 0x46b2; opregion->mailbox3.bclm[8] = <API key> + 0x50cc; opregion->mailbox3.bclm[9] = <API key> + 0x5ae5; opregion->mailbox3.bclm[10] = <API key> + 0x64ff; /* TODO This may need to happen in S3 resume */ pci_write_config32(SA_DEV_IGD, ASLS, (u32)opregion); reg16 = pci_read_config16(SA_DEV_IGD, SWSCI); reg16 &= ~GSSCIE; reg16 |= SMISCISEL; pci_write_config16(SA_DEV_IGD, SWSCI, reg16); return 0; } static unsigned long <API key>(device_t device, unsigned long current, struct acpi_rsdp *rsdp) { igd_opregion_t *opregion; /* If GOP is not used, exit here */ if (!IS_ENABLED(<API key>)) return current; /* If IGD is disabled, exit here */ if (pci_read_config16(device, PCI_VENDOR_ID) == 0xFFFF) return current; printk(BIOS_DEBUG, "ACPI: * IGD OpRegion\n"); opregion = (igd_opregion_t *)current; init_igd_opregion(opregion); update_igd_opregion(opregion); current += sizeof(igd_opregion_t); current = acpi_align_current(current); printk(BIOS_DEBUG, "current = %lx\n", current); return current; } static struct device_operations igd_ops = { .read_resources = &<API key>, .set_resources = &<API key>, .enable_resources = &<API key>, .init = &igd_init, .ops_pci = &soc_pci_ops, .write_acpi_tables = <API key>, }; static const unsigned short pci_device_ids[] = { <API key>, <API key>, <API key>, <API key>, <API key>, <API key>, 0, }; static const struct pci_driver igd_driver __pci_driver = { .ops = &igd_ops, .vendor = PCI_VENDOR_ID_INTEL, .devices = pci_device_ids, };
#include "defs.h" #include "selftest.h" #include "common/offset-type.h" #include "common/underlying.h" #include "common/valid-expr.h" namespace selftests { namespace offset_type { DEFINE_OFFSET_TYPE (off_A, unsigned int); DEFINE_OFFSET_TYPE (off_B, unsigned int); /* First, compile-time tests that: - make sure that incorrect operations with mismatching types are caught at compile time. - make sure that the same operations but involving the right types do compile and that they return the correct type. */ #define CHECK_VALID(VALID, EXPR_TYPE, EXPR) \ CHECK_VALID_EXPR_2 (off_A, off_B, VALID, EXPR_TYPE, EXPR) off_A lval_a {}; off_B lval_b {}; using undrl = std::underlying_type<off_A>::type; /* Offset +/- underlying. */ CHECK_VALID (true, off_A, off_A {} + undrl {}); CHECK_VALID (true, off_A, off_A {} - undrl {}); CHECK_VALID (true, off_A, undrl {} + off_A {}); CHECK_VALID (true, off_A, undrl {} - off_A {}); /* Add offset types. Both same and different. */ CHECK_VALID (false, void, off_A {} + off_A {}); CHECK_VALID (false, void, off_A {} + off_B {}); /* Subtract offset types. Both same and different. */ CHECK_VALID (false, void, off_B {} - off_A {}); CHECK_VALID (true, undrl, off_A {} - off_A {}); /* Add/assign offset types. Both same and different. */ CHECK_VALID (false, void, lval_a += off_A {}); CHECK_VALID (false, void, lval_a += off_B {}); CHECK_VALID (false, void, lval_a -= off_A {}); CHECK_VALID (false, void, lval_a -= off_B {}); /* operator OP+= (offset, underlying), lvalue ref on the lhs. */ CHECK_VALID (true, off_A&, lval_a += undrl {}); CHECK_VALID (true, off_A&, lval_a -= undrl {}); /* operator OP+= (offset, underlying), rvalue ref on the lhs. */ CHECK_VALID (false, void, off_A {} += undrl {}); CHECK_VALID (false, void, off_A {} -= undrl {}); /* Rel ops, with same type. */ CHECK_VALID (true, bool, off_A {} < off_A {}); CHECK_VALID (true, bool, off_A {} > off_A {}); CHECK_VALID (true, bool, off_A {} <= off_A {}); CHECK_VALID (true, bool, off_A {} >= off_A {}); /* Rel ops, with unrelated offset types. */ CHECK_VALID (false, void, off_A {} < off_B {}); CHECK_VALID (false, void, off_A {} > off_B {}); CHECK_VALID (false, void, off_A {} <= off_B {}); CHECK_VALID (false, void, off_A {} >= off_B {}); /* Rel ops, with unrelated types. */ CHECK_VALID (false, void, off_A {} < undrl {}); CHECK_VALID (false, void, off_A {} > undrl {}); CHECK_VALID (false, void, off_A {} <= undrl {}); CHECK_VALID (false, void, off_A {} >= undrl {}); static void run_tests () { /* Test op+ and op-. */ { constexpr off_A a {}; static_assert (to_underlying (a) == 0, ""); { constexpr off_A res1 = a + 2; static_assert (to_underlying (res1) == 2, ""); constexpr off_A res2 = res1 - 1; static_assert (to_underlying (res2) == 1, ""); } { constexpr off_A res1 = 2 + a; static_assert (to_underlying (res1) == 2, ""); constexpr off_A res2 = 3 - res1; static_assert (to_underlying (res2) == 1, ""); } } /* Test op+= and op-=. */ { off_A o {}; o += 10; SELF_CHECK (to_underlying (o) == 10); o -= 5; SELF_CHECK (to_underlying (o) == 5); } /* Test op-. */ { constexpr off_A o1 = (off_A) 10; constexpr off_A o2 = (off_A) 20; constexpr unsigned int delta = o2 - o1; static_assert (delta == 10, ""); } /* Test <, <=, >, >=. */ { constexpr off_A o1 = (off_A) 10; constexpr off_A o2 = (off_A) 20; static_assert (o1 < o2, ""); static_assert (!(o2 < o1), ""); static_assert (o2 > o1, ""); static_assert (!(o1 > o2), ""); static_assert (o1 <= o2, ""); static_assert (!(o2 <= o1), ""); static_assert (o2 >= o1, ""); static_assert (!(o1 >= o2), ""); static_assert (o1 <= o1, ""); static_assert (o1 >= o1, ""); } } } /* namespace offset_type */ } /* namespace selftests */ void <API key> () { register_self_test (selftests::offset_type::run_tests); }
(function ($) { if(_.isUndefined(window.vc)) window.vc = {}; // Custom vc_column shortcode window.<API key> = window.InlineShortcodeView.extend({ controls_selector: '#<API key>', events: { 'click > .vc_controls .vc_element .<API key>': 'destroy', 'click > .vc_controls .vc_element .vc_control-btn-edit': 'edit', 'click > .vc_controls .vc_element .<API key>': 'clone', 'click > .vc_controls .vc_element .<API key>': 'prependElement', 'click > .vc_controls .<API key>': 'appendElement', 'click > .vc_empty-element': 'appendElement', 'mouseenter': 'resetActive', 'mouseleave': 'holdActive' }, hold_active: false, initialize: function(params) { _.bindAll(this, 'holdActive'); window.<API key>.__super__.initialize.call(this, params); this.parent_view = vc.shortcodes.get(this.model.get('parent_id')).view; }, resetActive: function(e) { this.hold_active && window.clearTimeout(this.hold_active); }, holdActive: function(e) { this.resetActive(); this.$el.addClass('vc_hold-active'); var view = this; this.hold_active = window.setTimeout(function(){ view.hold_active && window.clearTimeout(view.hold_active); view.hold_active = false; view.$el.removeClass('vc_hold-active'); }, 700); }, content: function() { if(this.$content === false) { this.$content = this.$el.find('.vc_container-anchor:first').parent(); this.$el.find('.vc_container-anchor:first').remove(); } return this.$content; }, render: function() { window.<API key>.__super__.render.call(this); this.content().addClass('<API key>'); this.$el.addClass('vc_container-block'); return this; }, changed: function() { (this.$el.find('.vc_element[data-tag]').length == 0 && this.$el.addClass('vc_empty').find('> :first').addClass('vc_empty-element')) || this.$el.removeClass('vc_empty').find('> .vc_empty-element').removeClass('vc_empty-element'); }, prependElement: function(e) { _.isObject(e) && e.preventDefault(); this.prepend = true; vc.<API key>.render(this.model, true); }, appendElement: function(e) { _.isObject(e) && e.preventDefault(); vc.<API key>.render(this.model); }, addControls: function() { var template = $(this.controls_selector).html(), parent = vc.shortcodes.get(this.model.get('parent_id')), data = { name: vc.getMapped(this.model.get('shortcode')).name, tag: this.model.get('shortcode'), parent_name: vc.getMapped(parent.get('shortcode')).name, parent_tag: parent.get('shortcode') }; this.$controls = $(_.template(template, data, vc.template_options).trim()).addClass('vc_controls'); this.$controls.appendTo(this.$el); }, multi_edit: function(e) { var models = [], parent, children; _.isObject(e) && e.preventDefault(); if(this.model.get('parent_id')) parent = vc.shortcodes.get(this.model.get('parent_id')); if(parent) { models.push(parent); children = vc.shortcodes.where({parent_id: parent.get('id')}); vc.<API key>.render(models.concat(children), this.model.get('id')); } else { vc.<API key>.render(this.model); } } }); window.<API key> = window.<API key>.extend({ controls_selector: '#<API key>', events: { 'click > .vc_controls .vc_element .<API key>': 'destroy', 'click > .vc_controls .vc_element .vc_control-btn-edit': 'edit', 'click > .vc_controls .vc_element .<API key>': 'clone', 'click > .vc_controls .vc_element .<API key>': 'prependElement', 'click > .vc_controls .<API key>': 'appendElement', 'click > .vc_controls .vc_parent .<API key>': 'destroyParent', 'click > .vc_controls .vc_parent .vc_control-btn-edit': 'editParent', 'click > .vc_controls .vc_parent .<API key>': 'cloneParent', 'click > .vc_controls .vc_parent .<API key>': 'addSibling', 'click > .vc_controls .vc_parent .<API key>': 'changeLayout', 'click > .vc_empty-element': 'appendElement', 'click > .vc_controls .<API key>': 'switchControls', 'mouseenter': 'resetActive', 'mouseleave': 'holdActive' }, destroyParent: function(e) { e && e.preventDefault(); this.parent_view.destroy(e); }, cloneParent: function(e) { e && e.preventDefault(); this.parent_view.clone(e); }, editParent: function(e) { e && e.preventDefault(); this.parent_view.edit(e); }, addSibling: function(e) { e && e.preventDefault(); this.parent_view.addElement(e); }, changeLayout: function(e) { e && e.preventDefault(); this.parent_view.changeLayout(e); }, switchControls: function(e) { e && e.preventDefault(); vc.unsetHoldActive(); var $control = $(e.currentTarget), $parent = $control.parent(), $current; $parent.addClass('vc_active'); $current = $parent.siblings('.vc_active').removeClass('vc_active'); !$current.hasClass('vc_element') && window.setTimeout(this.holdActive, 500); } }); window.<API key> = window.InlineShortcodeView.extend({ initialize: function(options) { window.<API key>.__super__.initialize.call(this, options); _.bindAll(this, 'setupEditor', 'updateContent'); }, render: function() { window.<API key>.__super__.render.call(this); // Here return this; }, setupEditor: function(ed) { ed.on('keyup', this.updateContent) }, updateContent: function() { var params = this.model.get('params'); params.content = tinyMCE.activeEditor.getContent(); this.model.save({params: params}, {silent: true}); } }); window.<API key> = window.InlineShortcodeView.extend({ column_tag: 'vc_column', events: { 'mouseenter': 'removeHoldActive' }, layout: 1, addControls: function() { this.$controls = $('<div class="no-controls"></div>'); this.$controls.appendTo(this.$el); return this; }, removeHoldActive: function() { vc.unsetHoldActive(); }, addColumn: function() { vc.builder.create({ shortcode: this.column_tag, parent_id: this.model.get('id') }).render(); }, addElement: function(e) { e && e.preventDefault(); this.addColumn(); }, changeLayout: function(e) { e && e.preventDefault(); this.layoutEditor().render(this.model).show(); }, layoutEditor: function() { if(_.isUndefined(vc.row_layout_editor)) vc.row_layout_editor = new vc.<API key>({el: $('#vc_row-layout-panel')}); return vc.row_layout_editor; }, <API key>: function(string) { return _.map(string.split(/_/), function(c){ var w = c.split(''); w.splice(Math.floor(c.length/2), 0, '/'); return w.join(''); }); }, changed: function() { window.<API key>.__super__.changed.call(this); this.addLayoutClass(); }, content: function() { if(this.$content === false) this.$content = this.$el.find('.vc_container-anchor:first').parent(); this.$el.find('.vc_container-anchor:first').remove(); return this.$content; }, addLayoutClass: function() { this.$el.removeClass('vc_layout_' + this.layout); this.layout = _.reject(vc.shortcodes.where({parent_id: this.model.get('id')}), function(model){return model.get('deleted')}).length; this.$el.addClass('vc_layout_' + this.layout); }, convertRowColumns: function(layout, builder) { if(!layout) return false; var view = this, columns_contents = [], new_model, columns = this.<API key>(layout); vc.<API key> = []; vc.layout_old_columns = vc.shortcodes.where({parent_id: this.model.get('id')}); _.each(vc.layout_old_columns, function(column){ column.set('deleted' , true); columns_contents.push({shortcodes: vc.shortcodes.where({parent_id: column.get('id')}), params: column.get('params')}); }); _.each(columns, function(column){ var prev_settings = columns_contents.shift(); if(_.isObject(prev_settings)) { new_model = builder.create({shortcode: this.column_tag, parent_id: this.model.get('id'), order: vc.shortcodes.nextOrder(), params: _.extend({}, prev_settings.params, {width: column})}).last(); _.each(prev_settings.shortcodes, function(shortcode){ shortcode.save({parent_id: new_model.get('id'), order: vc.shortcodes.nextOrder()}, {silent: true}); vc.<API key>.push(shortcode); }, this); } else { new_model = builder.create({shortcode: this.column_tag, parent_id: this.model.get('id'), order: vc.shortcodes.nextOrder(), params: {width: column}}).last(); } }, this); _.each(columns_contents, function(column) { _.each(column.shortcodes, function(shortcode){ shortcode.save({parent_id: new_model.get('id'), order: vc.shortcodes.nextOrder()}, {silent: true}); vc.<API key>.push(shortcode); shortcode.view.<API key> && shortcode.view.<API key>() }, this); },this); builder.render(function(){ _.each(vc.<API key>, function(shortcode){ shortcode.trigger('change:parent_id'); shortcode.view.<API key> && shortcode.view.<API key>(); }); _.each(vc.layout_old_columns, function(column){ column.destroy(); }); vc.layout_old_columns = []; vc.<API key> = []; }); return columns; } }); window.<API key> = window.<API key>.extend({ controls_selector: '#<API key>', resizeDomainName: 'columnSize', _x: 0, css_width: 12, prepend: false, initialize: function(params) { window.<API key>.__super__.initialize.call(this, params); _.bindAll(this, 'startChangeSize', 'stopChangeSize', 'resize'); }, render: function() { var width; window.<API key>.__super__.render.call(this); this.prepend = false; // Here goes width logic $('<div class="vc_resize-bar"></div>') .appendTo(this.$el) .mousedown(this.startChangeSize); this.setColumnClasses(); this.<API key>(); return this; }, destroy: function(e) { var parent_id = this.model.get('parent_id'); window.<API key>.__super__.destroy.call(this, e); if( !vc.shortcodes.where({parent_id: parent_id}).length ) { vc.shortcodes.get(parent_id).destroy(); } }, <API key>: function() { var css_classes, css_regex, class_match; css_classes = this.$el.find('.wpb_column').attr('class'); if(!class_match) return false; css_regex = /.*(vc_custom_\d+).*/; class_match = css_classes.match(css_regex); if(class_match && class_match[1]) { this.$el.addClass(class_match[1]); this.$el.find('.wpb_column').attr('class', css_classes.replace(class_match[1], '').trim()); } }, setColumnClasses: function() { var offset = this.getParam('offset') || '', width = this.getParam('width') || '1/1', $content = this.$el.find('> .wpb_column'); this.css_class_width = this.convertSize(width).replace(/[^\d]/g, ''); $content.removeClass('vc_col-sm-' + this.css_class_width); if(!offset.match(/vc_col\-sm\-\d+/)) { this.$el.addClass('vc_col-sm-' + this.css_class_width); } if(vc.responsive_disabled) { offset = offset.replace(/vc_col\-(lg|md|xs)[^\s]*/g, ''); } if(!_.isEmpty(offset)) { $content.removeClass(offset); this.$el.addClass(offset); } }, startChangeSize: function(e) { var width = this.getParam(width) || 12; this._grid_step = this.parent_view.$el.width() / width; vc.frame_window.jQuery('body').addClass('vc_column-dragging').disableSelection(); this._x = parseInt(e.pageX); vc.$page.bind('mousemove.' + this.resizeDomainName, this.resize); $(vc.frame_window.document).mouseup(this.stopChangeSize); }, stopChangeSize: function() { this._x = 0; vc.frame_window.jQuery('body').removeClass('vc_column-dragging').enableSelection(); vc.$page.unbind('mousemove.' + this.resizeDomainName); }, resize: function(e) { var width, old_width, diff, params = this.model.get('params'); diff = e.pageX - this._x; if(Math.abs(diff) < this._grid_step) return; this._x = parseInt(e.pageX); old_width = '' + this.css_class_width; if(diff > 0) { this.css_class_width += 1; } else if(diff < 0) { this.css_class_width -= 1; } if(this.css_class_width > 12) this.css_class_width = 12; if(this.css_class_width < 1) this.css_class_width = 1; params.width = vc.getColumnSize(this.css_class_width); this.model.save({params: params}, {silent: true}); this.$el.removeClass('vc_col-sm-' + old_width).addClass('vc_col-sm-' + this.css_class_width); }, convertSize: function(width) { var prefix = 'vc_col-sm-', numbers = width ? width.split('/') : [1,1], range = _.range(1,13), num = !_.isUndefined(numbers[0]) && _.indexOf(range, parseInt(numbers[0], 10)) >=0 ? parseInt(numbers[0], 10) : false, dev = !_.isUndefined(numbers[1]) && _.indexOf(range, parseInt(numbers[1], 10)) >=0 ? parseInt(numbers[1], 10) : false; if(num!==false && dev!==false) { return prefix + (12*num/dev); } return prefix + '12'; } }); window.<API key> = window.<API key>.extend({ column_tag: 'vc_column_inner' }); window.<API key> = window.<API key>.extend({ }); window.<API key> = window.<API key>.extend({ events: { 'click > :first > .vc_empty-element': 'addElement', 'click > :first > .wpb_wrapper > .ui-tabs-nav > li': 'setActiveTab' }, already_build: false, active_model_id: false, render: function() { _.bindAll(this, 'stopSorting'); this.$tabs = this.$el.find('> .wpb_tabs'); window.<API key>.__super__.render.call(this); return this; }, changed: function() { if(this.$el.find('.vc_element[data-tag]').length == 0) { this.$el.addClass('vc_empty').find('> :first > div').addClass('vc_empty-element'); } else { this.$el.removeClass('vc_empty').find('> :first > div').removeClass('vc_empty-element'); } this.setSorting(); }, setActiveTab: function(e) { var $tab = $(e.currentTarget); this.active_model_id = $tab.data('modelId'); }, tabsControls: function() { return this.$el.find('.wpb_tabs_nav'); }, buildTabs: function(active_model) { var active = false; if(active_model) { this.active_model_id = active_model.get('id'); active = this.tabsControls().find('[data-model-id=' + this.active_model_id +']').index(); } if(this.active_model_id === false) { this.active_model_id = this.tabsControls().find('li:first').data('modelId'); } vc.frame_window.vc_iframe.buildTabs(this.$tabs, active); }, beforeUpdate: function() { this.$tabs.find('.wpb_tabs_heading').remove(); vc.frame_window.vc_iframe.destroyTabs(this.$tabs); }, updated: function() { window.<API key>.__super__.updated.call(this); this.$tabs.find('.wpb_tabs_nav:first').remove(); vc.frame_window.vc_iframe.buildTabs(this.$tabs); this.setSorting(); }, <API key>: function() { _.each(vc.shortcodes.where({parent_id: this.model.get('id')}), function(model){ model.view.<API key> && model.view.<API key>(); }); }, addTab: function(model) { if(this.updateIfExistTab(model)) return false; var $control = this.buildControlHtml(model), $cloned_tab; if(model.get('cloned') && ($cloned_tab = this.tabsControls().find('[data-model-id=' + model.get('cloned_from').id + ']')).length) { $control.insertAfter($cloned_tab); } else { $control.appendTo(this.tabsControls()); } this.changed(); return true; }, cloneTabAfter: function(model) { this.$tabs.find('> .wpb_wrapper > .wpb_tabs_nav > div').remove(); this.buildTabs(model); }, updateIfExistTab: function(model) { var $tab = this.tabsControls().find('[data-model-id=' + model.get('id') + ']'); if($tab.length) { $tab.find('a').text(model.getParam('title')); return true; } return false; }, buildControlHtml: function(model) { var params = model.get('params'), $tab =$('<li data-model-id="' + model.get('id') +'"><a href="#tab-' + model.getParam('tab_id') + '"></a></li>'); $tab.data('model', model); $tab.find('> a').text(model.getParam('title')); return $tab; }, addElement: function(e) { e && e.preventDefault(); new vc.ShortcodesBuilder() .create({shortcode: 'vc_tab', params: {tab_id: vc_guid() + '-' + this.tabsControls().find('li').length, title: this.getDefaultTabTitle()}, parent_id: this.model.get('id')}) .render(); }, getDefaultTabTitle: function() { return window.i18nLocale.tab; }, setSorting: function() { vc.frame_window.vc_iframe.setTabsSorting(this); }, stopSorting: function(event, ui) { this.tabsControls().find('> li').each(function(key, value){ var model = $(this).data('model'); model.save({order: key}, {silent: true}); }); }, placeElement: function($view, activity) { var model = vc.shortcodes.get($view.data('modelId')); if(model && model.get('place_after_id')) { $view.insertAfter(vc.$page.find('[data-model-id=' + model.get('place_after_id') + ']')); model.unset('place_after_id'); } else { $view.insertAfter(this.tabsControls()); } this.changed(); }, removeTab: function(model) { if(vc.shortcodes.where({parent_id: this.model.get('id')}).length == 1) return this.model.destroy(); var $tab = this.tabsControls().find('[data-model-id=' + model.get('id') + ']'), index = $tab.index(); if( this.tabsControls().find('[data-model-id]:eq(' + (index+1) + ')').length) { vc.frame_window.vc_iframe.setActiveTab(this.$tabs, (index+1)); } else if(this.tabsControls().find('[data-model-id]:eq(' + (index-1) + ')').length) { vc.frame_window.vc_iframe.setActiveTab(this.$tabs, (index-1)); } else { vc.frame_window.vc_iframe.setActiveTab(this.$tabs, 0); } $tab.remove(); }, clone: function(e) { _.each(vc.shortcodes.where({parent_id: this.model.get('id')}), function(model){ model.set('<API key>', this.active_model_id === model.get('id')); }, this); window.<API key>.__super__.clone.call(this, e); } }); window.<API key> = window.<API key>.extend({ render: function() { _.bindAll(this, 'stopSorting'); this.$tabs = this.$el.find('> .wpb_tour'); window.<API key>.__super__.render.call(this); return this; }, beforeUpdate: function() { this.$tabs.find('.wpb_tour_heading,.<API key>').remove(); vc.frame_window.vc_iframe.destroyTabs(this.$tabs); }, updated: function() { this.$tabs.find('.<API key>').appendTo(this.$tabs); window.<API key>.__super__.updated.call(this); } }); window.<API key> = window.<API key>.extend({ controls_selector: '#<API key>', render: function() { var tab_id, result, active, params; params = this.model.get('params'); window.<API key>.__super__.render.call(this); this.$tab = this.$el.find('> :first'); if(!params.tab_id) { params.tab_id = vc_guid() + '-' + Math.floor(Math.random() * 11); this.model.save('params', params); tab_id = 'tab-' + params.tab_id; this.$tab.attr('id', tab_id); } else { tab_id = this.$tab.attr('id'); } this.$el.attr('id', tab_id); this.$tab.attr('id', tab_id + '-real'); if(!this.$tab.find('.vc_element[data-tag]').length) this.$tab.html(''); this.$el.addClass('ui-tabs-panel wpb_ui-tabs-hide'); this.$tab.removeClass('ui-tabs-panel wpb_ui-tabs-hide'); if(this.parent_view && this.parent_view.addTab) { if(!this.parent_view.addTab(this.model)) this.$el.removeClass('wpb_ui-tabs-hide'); } active = this.doSetAsActive(); this.parent_view.buildTabs(active); return this; }, doSetAsActive: function() { var <API key> = this.model.get('<API key>'); if(!this.model.get('from_content') && !this.model.get('default_content') && _.isUndefined(<API key>)){ return this.model; } else if(!_.isUndefined(<API key>)) { this.model.unset('<API key>'); if(<API key> === true) return this.model; } return false; }, removeView: function(model) { window.<API key>.__super__.removeView.call(this, model); if(this.parent_view && this.parent_view.removeTab) { this.parent_view.removeTab(model); } }, clone: function(e) { _.isObject(e) && e.preventDefault() && e.stopPropagation(); vc.clone_index = vc.clone_index / 10; var clone = this.model.clone(), params = clone.get('params'), builder = new vc.ShortcodesBuilder(); var newmodel = vc.CloneModel(builder, this.model, this.model.get('parent_id')); var active_model = this.parent_view.active_model_id; if(this.parent_view.addTab) { this.parent_view.addTab(newmodel); } var that = this; builder.render(function(){ if(that.parent_view.cloneTabAfter) { that.parent_view.cloneTabAfter(newmodel); } }); }, <API key>: function() { _.each(vc.shortcodes.where({parent_id: this.model.get('id')}), function(model){ model.view.<API key> && model.view.<API key>(); }); } }); window.<API key> = window.<API key>.extend({ events: { 'click > .wpb_accordion > .vc_empty-element': 'addElement' }, render: function() { _.bindAll(this, 'stopSorting'); this.$accordion = this.$el.find('> .wpb_accordion'); window.<API key>.__super__.render.call(this); return this; }, changed: function() { if(this.$el.find('.vc_element[data-tag]').length == 0) { this.$el.addClass('vc_empty').find('> :first').addClass('vc_empty-element'); } else { this.$el.removeClass('vc_empty').find('> .vc_empty-element').removeClass('vc_empty-element'); this.setSorting(); } }, buildAccordion: function(active_model) { var active = false; if(active_model) { active = this.$accordion.find('[data-model-id=' + active_model.get('id') +']').index(); } vc.frame_window.vc_iframe.buildAccordion(this.$accordion, active); }, setSorting: function() { vc.frame_window.vc_iframe.setAccordionSorting(this); }, beforeUpdate: function() { this.$el.find('.<API key>').remove(); window.<API key>.__super__.beforeUpdate.call(this); }, stopSorting: function() { this.$accordion.find('> .<API key> > .vc_element[data-tag]').each(function(){ var model = vc.shortcodes.get($(this).data('modelId')); model.save({order: $(this).index()}, {silent: true}); }); }, addElement: function(e) { e && e.preventDefault(); new vc.ShortcodesBuilder() .create({shortcode: 'vc_accordion_tab', params: {title: window.i18nLocale.section}, parent_id: this.model.get('id')}) .render(); }, <API key>: function() { _.each(vc.shortcodes.where({parent_id: this.model.get('id')}), function(model){ model.view.<API key> && model.view.<API key>(); }); } }); window.<API key> = window.<API key>.extend({ events: { 'click > .vc_controls .vc_element .<API key>': 'destroy', 'click > .vc_controls .vc_element .vc_control-btn-edit': 'edit', 'click > .vc_controls .vc_element .<API key>': 'clone', 'click > .vc_controls .vc_element .<API key>': 'prependElement', 'click > .vc_controls .<API key>': 'appendElement', 'click > .vc_controls .vc_parent .<API key>': 'destroyParent', 'click > .vc_controls .vc_parent .vc_control-btn-edit': 'editParent', 'click > .vc_controls .vc_parent .<API key>': 'cloneParent', 'click > .vc_controls .vc_parent .<API key>': 'addSibling', 'click > .<API key> > .vc_empty-element': 'appendElement', 'click > .vc_controls .<API key>': 'switchControls', 'mouseenter': 'resetActive', 'mouseleave': 'holdActive' }, changed: function() { if(this.$el.find('.vc_element[data-tag]').length == 0) { this.$el.addClass('vc_empty'); this.content().addClass('vc_empty-element'); } else { this.$el.removeClass('vc_empty'); this.content().removeClass('vc_empty-element'); } }, render: function() { window.<API key>.__super__.render.call(this); if(!this.content().find('.vc_element[data-tag]').length) this.content().html(''); this.parent_view.buildAccordion(!this.model.get('from_content') && !this.model.get('default_content') ? this.model : false); return this; }, <API key>: function() { _.each(vc.shortcodes.where({parent_id: this.model.get('id')}), function(model){ model.view.<API key> && model.view.<API key>(); }); }, destroy: function(e) { var parent_id = this.model.get('parent_id'); window.<API key>.__super__.destroy.call(this, e); if(!vc.shortcodes.where({parent_id: parent_id}).length) { vc.shortcodes.get(parent_id).destroy(); } } }); vc.cloneMethod_vc_tab = function(data, model) { data.params = _.extend({}, data.params); data.params.tab_id = vc_guid() + '-cl'; if(!_.isUndefined(model.get('<API key>'))) data.<API key> = model.get('<API key>'); return data; }; window.<API key> = window.InlineShortcodeView.extend({ render: function() { _.bindAll(this, 'parentChanged'); window.<API key>.__super__.render.call(this); vc.frame_window.vc_iframe.addActivity(function(){ this.vc_pieChart(); }); return this; }, parentChanged: function() { this.$el.find('.vc_pie_chart').removeClass('vc_ready'); vc.frame_window.vc_pieChart(); }, <API key>: function() { window.setTimeout(this.parentChanged, 200); this.parentChanged(); } }); window.<API key> = window.InlineShortcodeView.extend({ render: function() { var model_id = this.model.get('id'); window.<API key>.__super__.render.call(this); vc.frame_window.vc_iframe.addActivity(function(){ this.vc_iframe.vc_imageCarousel(model_id); }); return this; } }); window.<API key> = window.<API key>.extend({}); window.<API key> = window.InlineShortcodeView.extend({ render: function() { var model_id = this.model.get('id'); window.<API key>.__super__.render.call(this); vc.frame_window.vc_iframe.addActivity(function(){ this.vc_iframe.vc_gallery(model_id); }); return this; } }); window.<API key> = window.InlineShortcodeView.extend({ render: function() { var model_id = this.model.get('id'); window.<API key>.__super__.render.call(this); vc.frame_window.vc_iframe.addActivity(function(){ this.vc_iframe.vc_postsSlider(model_id); }); return this; } }); window.<API key> = window.InlineShortcodeView.extend({ render: function() { var model_id = this.model.get('id'); window.<API key>.__super__.render.call(this); vc.frame_window.vc_iframe.addActivity(function(){ this.vc_iframe.vc_toggle(model_id); }); return this; } }); window.<API key> = window.InlineShortcodeView.extend({ render: function() { window.<API key>.__super__.render.call(this); var $placeholder = this.$el.find('.<API key>'); vc.frame_window.vc_iframe.addActivity(function(){ this.vc_iframe.vc_Flickr($placeholder); }); return this; } }); window.<API key> = window.InlineShortcodeView.extend({ render: function() { window.<API key>.__super__.render.call(this); var script = this.$el.find('.vc_js_inline_holder').val(); this.$el.find('.wpb_wrapper').html(script); return this; } }); vc.addTemplateFilter(function (string) { var random_id = VCS4() + '-' + VCS4(); return string.replace(/tab\_id\=\"([^\"]+)\"/g, 'tab_id="$1' + random_id + '"'); }); })(window.jQuery);
#include <QDateTime> #include <QCryptographicHash> #include <QXmlStreamReader> #include <QHttp> #include <QMapIterator> #include <QRegExp> #include <QUrl> #include <memory> #include "bunny.h" #include "bunnymanager.h" #include "httprequest.h" #include "log.h" #include "cron.h" #include "messagepacket.h" #include "plugin_ephemeride.h" #include "settings.h" #include "ttsmanager.h" Q_EXPORT_PLUGIN2(plugin_ephemeride, PluginEphemeride) PluginEphemeride::PluginEphemeride():PluginInterface("ephemeride", "Ephemeride",BunnyPlugin) {} PluginEphemeride::~PluginEphemeride() { Cron::UnregisterAll(this); } bool PluginEphemeride::Init() { QByteArray aujourdhui = TTSManager::CreateNewSound("Aujourd'hui nous fetons les", "claire"); if(aujourdhui.isNull()) return false; aujourdhuiMessage = "MU " + aujourdhui + "\nPL 3\nMW\n"; return true; } void PluginEphemeride::OnCron(Bunny * b, QVariant) { getEphemeridePage(b); } bool PluginEphemeride::OnClick(Bunny * b, PluginInterface::ClickType type) { if (type == PluginInterface::SingleClick) { getEphemeridePage(b); return true; } return false; } void PluginEphemeride::getEphemeridePage(Bunny * b) { QHttp* http = new QHttp(this); http->setProperty("BunnyID", b->GetID()); connect(http, SIGNAL(done(bool)), this, SLOT(analyseXml())); http->setHost("www.net-pratique.fr"); http->get("/services/saintdujour.php"); } void PluginEphemeride::analyseXml() { std::auto_ptr<QHttp> http(qobject_cast<QHttp *>(sender())); Bunny * bunny = BunnyManager::GetBunny(this, http->property("BunnyID").toByteArray()); if(!bunny) return; <API key> * p = new <API key>(this, bunny, http->readAll()); connect(p, SIGNAL(done(bool,Bunny*,QByteArray)), this, SLOT(analyseDone(bool,Bunny*,QByteArray))); connect(p, SIGNAL(finished()), p, SLOT(deleteLater())); p->start(); } void PluginEphemeride::analyseDone(bool ret, Bunny * b, QByteArray message) { if(ret && b->IsConnected()) b->SendPacket(MessagePacket(message)); } void PluginEphemeride::OnBunnyConnect(Bunny * b) { QStringList webcasts = b->GetPluginSetting(GetName(), "Webcast/List", QStringList()).toStringList(); foreach(QString webcast, webcasts) { Cron::RegisterDaily(this, QTime::fromString(webcast, "hh:mm"), b); } } void PluginEphemeride::OnBunnyDisconnect(Bunny * b) { Cron::<API key>(this, b); } void PluginEphemeride::InitApiCalls() { <API key>("addwebcast(time)", PluginEphemeride, Api_AddWebcast); <API key>("removewebcast(time)", PluginEphemeride, Api_RemoveWebcast); <API key>("getwebcastslist()", PluginEphemeride, Api_GetWebcastsList); } <API key>(PluginEphemeride::Api_GetWebcastsList) { Q_UNUSED(account); Q_UNUSED(hRequest); return new ApiManager::ApiList(bunny->GetPluginSetting(GetName(), "Webcast/List", QStringList()).toStringList()); } <API key>(PluginEphemeride::Api_AddWebcast) { Q_UNUSED(account); if(!bunny->IsConnected()) return new ApiManager::ApiError(QString("Bunny '%1' is not connected").arg(hRequest.GetArg("to"))); QString hTime = hRequest.GetArg("time"); if(!bunny->GetPluginSetting(GetName(), "Webcast/List", QStringList()).toStringList().contains(hTime)) { Cron::RegisterDaily(this, QTime::fromString(hTime, "hh:mm"), bunny); QStringList bunnyWebcastList = bunny->GetPluginSetting(GetName(), "Webcast/List", QStringList()).toStringList() << hTime; bunnyWebcastList.sort(); bunny->SetPluginSetting(GetName(), "Webcast/List", bunnyWebcastList); return new ApiManager::ApiOk(QString("Add webcast at '%1' to bunny '%2'").arg(hRequest.GetArg("time"), QString(bunny->GetID()))); } return new ApiManager::ApiError(QString("Webcast at '%1' already exists for bunny '%2'").arg(hRequest.GetArg("time"), QString(bunny->GetID()))); } <API key>(PluginEphemeride::Api_RemoveWebcast) { Q_UNUSED(account); if(!bunny->IsConnected()) return new ApiManager::ApiError(QString("Bunny '%1' is not connected").arg(QString(bunny->GetID()))); QStringList bunnyWebcastList = bunny->GetPluginSetting(GetName(), "Webcast/List", QStringList()).toStringList(); QString time = hRequest.GetArg("time"); if(bunnyWebcastList.contains(time)) { bunnyWebcastList.removeAll(time); bunnyWebcastList.sort(); bunny->SetPluginSetting(GetName(), "Webcast/List", bunnyWebcastList); // Recreate crons OnBunnyDisconnect(bunny); OnBunnyConnect(bunny); return new ApiManager::ApiOk(QString("Remove webcast at '%1' for bunny '%2'").arg(hRequest.GetArg("time"), QString(bunny->GetID()))); } return new ApiManager::ApiError(QString("No webcast at '%1' for bunny '%2'").arg(hRequest.GetArg("time"), QString(bunny->GetID()))); } /* WORKER THREAD */ <API key>::<API key>(PluginEphemeride * p, Bunny * bu, QByteArray b):plugin(p),bunny(bu),buffer(b.replace("&amp;", "and")) { } void <API key>::run() { QByteArray message = plugin->aujourdhuiMessage; QRegExp rx(">(.*)</span>"); if(rx.indexIn(buffer) != -1) { QByteArray prenomFile = TTSManager::CreateNewSound(rx.cap(1).trimmed(), "claire"); message += "MU " + prenomFile + "\nPL 3\nMW\n"; emit done(true, bunny, message); } else emit done(false, bunny, QByteArray()); }
<?php $featured_image_type = wt_get_option('blog', 'featured_image_type'); $layout=wt_get_option('blog','layout'); ?> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <article id="post-<?php the_ID(); ?>" class="blogEntry"> <div <?php post_class(); ?>> <?php if (wt_get_option('blog','meta_date') && !is_search() && has_post_thumbnail()){ //echo '<div class="wt_dates"><div class="entry_date">'; //echo '<a href="'.get_month_link(get_the_time('Y'), get_the_time('m')).'"><span class="day">'.get_the_time('d').'</span><span class="month">'.get_the_time('M').'</span></a></div>'; //echo '<div class="post-category"><i class="fa fa-picture-o"></i> </div> </div>'; } $thumbnail_type = get_post_meta($post->ID, '_thumbnail_type', true); switch($thumbnail_type){ case "timage" : if ( has_post_thumbnail() ) { echo '<header class="blogEntry_frame entry_' . $featured_image_type . '"> '; echo wt_theme_generator('<API key>',$featured_image_type,$layout); echo '</header>'; } break; case "tvideo" : $video_link = get_post_meta($post->ID, '_featured_video', true); echo '<header class="blogEntry_frame entry_' . $featured_image_type . '"> '; echo '<div class="<API key>">'; echo wt_video_featured($video_link,$featured_image_type,$layout,$height='',$width=''); echo '</div>'; echo '</header>'; break; case "tplayer" : $player_link = get_post_meta($post->ID,'_thumbnail_player', true); echo '<header class="blogEntry_frame entry_' . $featured_image_type . '"> '; echo '<div class="<API key>">'; echo wt_media_player($featured_image_type,$layout,$player_link); echo '</div>'; echo '</header>'; break; case "tslide" : echo '<header class="blogEntry_frame entry_' . $featured_image_type . '"> '; echo '<div class="<API key>">'; echo wt_get_slide($featured_image_type,$layout); echo '</div>'; echo '</header>'; break; } ?> <div class="blogEntry_content"> <h2 class="blogEntry_title"><a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php printf( esc_html__("Permanent Link to %s", 'wt_front'), get_the_title() ); ?>"><?php the_title(); ?></a></h2> <?php if (!is_search()): ?> <footer class="blogEntry_metadata"> <?php echo wt_theme_generator('wt_blog_meta'); ?> </footer> <?php endif; ?> <?php if(wt_get_option('blog','display_full')): global $more; $more = 0; the_content(__('Read more &raquo;','wt_front'),false); else: the_excerpt(); ?> <?php wp_link_pages( array( 'before' => '<div class="wp-pagenavi post_navi"><span class="page-links-title">' . esc_html__( 'Pages:', 'wt_front' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> <a class="read_more_link" href="<?php the_permalink(); ?>"><?php echo esc_html__('Read more &raquo;','wt_front')?></a> <?php endif; ?> </div> <?php if ($featured_image_type == 'left') { echo '<div class="wt_clearboth"></div>'; } ?> </div> </article> <?php endwhile;wp_reset_postdata();?>
<!-- HTML header for doxygen 1.8.5--> <!DOCTYPE html PUBLIC "- <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.6"/> <title>Fat-Free Framework: Basket Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Fat-Free Framework &#160;<span id="projectnumber">3.2.2</span> &#160;<span class="menu"><a href="index.html">Overview</a> <a href="annotated.html">Class List</a> <a href="hierarchy.html">Hierarchy</a></span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.6 --> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="#pub-attribs">Public Attributes</a> &#124; <a href="#pro-attribs">Protected Attributes</a> &#124; <a href="classBasket-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">Basket Class Reference</div> </div> </div><!--header <div class="contents"> <p>Session-based pseudo-mapper. <a href="classBasket.html#details">More...</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">exists</a> ($key)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">set</a> ($key, $val)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">get</a> ($key)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">clear</a> ($key)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">find</a> ($key=NULL, $val=NULL)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">findone</a> ($key, $val)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">load</a> ($key, $val)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">dry</a> ()</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">count</a> ()</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">save</a> ()</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">erase</a> ($key, $val)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">reset</a> ()</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">drop</a> ()</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">copyfrom</a> ($key)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">copyto</a> ($key)</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">checkout</a> ()</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">__construct</a> ($key='basket')</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a> Public Attributes</h2></td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">$id</a></td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Current item identifier. <br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">$item</a> =array()</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Current item contents. <br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr><td colspan="2"><div class="groupHeader"></div></td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> const&#160;</td><td class="memItemRight" valign="bottom"><b>E_Field</b> ='Undefined field %s'</td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="<API key>"></a> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classBasket.html#<API key>">$key</a></td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Session key. <br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Session-based pseudo-mapper. </p> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::__construct </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em> = <code>'basket'</code></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Instantiate class </p> <dl class="section return"><dt>Returns</dt><dd>void </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> </table> </dd> </dl> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::checkout </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Check out basket contents </p> <dl class="section return"><dt>Returns</dt><dd>array </dd></dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::clear </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Delete field </p> <dl class="section return"><dt>Returns</dt><dd>NULL </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::copyfrom </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Hydrate item using hive array variable </p> <dl class="section return"><dt>Returns</dt><dd>NULL </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::copyto </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Populate hive array variable with item contents </p> <dl class="section return"><dt>Returns</dt><dd>NULL </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::count </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Return number of items in basket </p> <dl class="section return"><dt>Returns</dt><dd>int </dd></dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::drop </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Empty basket </p> <dl class="section return"><dt>Returns</dt><dd>NULL </dd></dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::dry </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Return TRUE if current item is empty/undefined </p> <dl class="section return"><dt>Returns</dt><dd>bool </dd></dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::erase </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$val</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Erase item matching key/value pair </p> <dl class="section return"><dt>Returns</dt><dd>bool </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> <tr><td class="paramname">$val</td><td>mixed </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::exists </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Return TRUE if field is defined </p> <dl class="section return"><dt>Returns</dt><dd>bool </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::find </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em> = <code>NULL</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$val</em> = <code>NULL</code>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Return items that match key/value pair; If no key/value pair specified, return all items </p> <dl class="section return"><dt>Returns</dt><dd>array|FALSE </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> <tr><td class="paramname">$val</td><td>mixed </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::findone </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$val</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Return first item that matches key/value pair </p> <dl class="section return"><dt>Returns</dt><dd>object|FALSE </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> <tr><td class="paramname">$val</td><td>mixed </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::get </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Retrieve value of field </p> <dl class="section return"><dt>Returns</dt><dd>scalar|FALSE </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::load </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$val</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Map current item to matching key/value pair </p> <dl class="section return"><dt>Returns</dt><dd>array </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> <tr><td class="paramname">$val</td><td>mixed </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::reset </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Reset cursor </p> <dl class="section return"><dt>Returns</dt><dd>NULL </dd></dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::save </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Save current item </p> <dl class="section return"><dt>Returns</dt><dd>array </dd></dl> </div> </div> <a class="anchor" id="<API key>"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Basket::set </td> <td>(</td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">&#160;</td> <td class="paramname"><em>$val</em>&#160;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Assign value to field </p> <dl class="section return"><dt>Returns</dt><dd>scalar|FALSE </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">$key</td><td>string </td></tr> <tr><td class="paramname">$val</td><td>scalar </td></tr> </table> </dd> </dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>basket.php</li> </ul> </div><!-- contents -->
/** * @test * @summary Make sure CDS and JFR work together. * @requires vm.hasJFR & vm.cds * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes test-classes * @build Hello GetFlightRecorder * @run driver ClassFileInstaller -jar CDSandJFR.jar Hello GetFlightRecorder GetFlightRecorder$TestEvent GetFlightRecorder$SimpleEvent * @run main/othervm/timeout=500 CDSandJFR */ import jdk.test.lib.BuildHelper; import jdk.test.lib.process.OutputAnalyzer; public class CDSandJFR { static String[] classes = { "jdk/jfr/Event", "jdk/jfr/events/FileReadEvent", "jdk/jfr/events/FileWriteEvent", "jdk/jfr/events/SocketReadEvent", "jdk/jfr/events/SocketWriteEvent", "jdk/jfr/events/<API key>", "jdk/jfr/events/<API key>", "jdk/jfr/events/ErrorThrownEvent", "jdk/jfr/events/ActiveSettingEvent", "jdk/jfr/events/<API key>", "Hello", "GetFlightRecorder", "GetFlightRecorder$TestEvent", }; public static void main(String[] args) throws Exception { test(classes); } static void test(String[] classes) throws Exception { String appJar = ClassFileInstaller.getJarPath("CDSandJFR.jar"); OutputAnalyzer output; output = TestCommon.testDump(appJar, TestCommon.list(classes)); TestCommon.checkDump(output, "Skipping jdk/jfr/Event: JFR event class"); output = TestCommon.exec(appJar, "-XX:<API key>=dumponexit=true", "Hello"); TestCommon.checkExec(output, "Hello World"); TestCommon.checkExec(TestCommon.exec(appJar, "-XX:<API key>=retransform=true", "GetFlightRecorder")); TestCommon.checkExec(TestCommon.exec(appJar, "-XX:<API key>=retransform=false", "GetFlightRecorder")); // Test dumping with flight recorder enabled. output = TestCommon.testDump(appJar, TestCommon.list(classes), "-XX:<API key>=dumponexit=true"); TestCommon.checkDump(output, "warning: JFR will be disabled during CDS dumping"); } }
# This program is free software; you can redistribute it and/or modify # (at your option) any later version. # This program is distributed in the hope that it will be useful, # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ Renderer for barcodes, SVG extention for Inkscape. For supported barcodes see Barcode module directory. """ # This lists all known Barcodes missing from this package # Code11 # Codabar # Postnet # ITF25 # Code39Mod # USPS128 # PDF417 # PDF417-Macro # PDF417-Truncated # PDF417-GLI import sys def getBarcode(code, **kwargs): """Gets a barcode from a list of available barcode formats""" if not code: return sys.stderr.write("No barcode format given!\n") code = str(code).replace('-', '').strip() try: barcode = getattr(__import__('Barcode.'+code, fromlist=['Barcode']), code) return barcode(kwargs) except ImportError: sys.stderr.write("Invalid type of barcode: %s\n" % code) except AttributeError: raise sys.stderr.write("Barcode module is missing the barcode class: %s\n" % code)
<?php // $Id: <API key>.lib.php 13600 2011-09-21 11:14:20Z abourguignon $ // vim: expandtab sw=4 ts=4 sts=4: FromKernel::uses('user.lib','courselist.lib'); From::Module('CLCAL')->uses('agenda.lib'); include <API key>() . 'CLHOME.conf.php'; // conf file class <API key> { protected $courseCode; protected $year; protected $month; public function __construct($courseCode) { if (file_exists(<API key>() . 'CLCAL.conf.php')) { include <API key>() . 'CLCAL.conf.php'; } $today = getdate(); $this->courseCode = $courseCode; $this->month = $today['mon']; $this->year = $today['year']; } public function setYear( $year ) { $this->year = $year; } public function setMonth( $month ) { $this->month = $month; } public function getMonthName() { $langMonthNames = get_locale('langMonthNames'); return $langMonthNames['long'][$this->month -1]; } public function getMonth() { return $this->month; } public function getYear() { return $this->year; } public function render() { // Select current course's datas $tbl_mdb_names = <API key>(); $tbl_courses = $tbl_mdb_names['course']; $curdate = claro_mktime(); $sql = "SELECT course.cours_id, course.code AS `sysCode`, course.directory AS `directory`, course.<API key> AS `officialCode`, course.dbName AS `db`, course.intitule AS `title`, course.titulaires AS `titular`, course.language AS `language`, course.access AS `access`, course.status, course.sourceCourseId, UNIX_TIMESTAMP(course.expirationDate) AS expirationDate, UNIX_TIMESTAMP(course.creationDate) AS creationDate FROM `" . $tbl_courses . "` AS course WHERE course.code = " . Claroline::getDatabase()->quote($this->courseCode); $result = Claroline::getDatabase()->query($sql); $courseData = $result->fetch(Database_ResultSet::FETCH_ASSOC); $courseEventList = <API key>($courseData, 10, $this->month, $this->year); if ( is_array($courseEventList) ) { $courseDigestList = array(); foreach($courseEventList as $thisEvent ) { $eventLine = trim(strip_tags($thisEvent['title'])); if ( $eventLine == '' ) { $eventContent = trim(strip_tags($thisEvent['content'])); $eventLine = substr($eventContent, 0, 60) . (strlen($eventContent) > 60 ? ' (...)' : ''); } $eventDate = $thisEvent['day']; if(!array_key_exists($eventDate, $courseDigestList)) { $courseDigestList[$eventDate] = array(); $courseDigestList[$eventDate]['eventList'] = array(); $courseDigestList[$eventDate]['date'] = $eventDate; } $courseDigestList[$eventDate]['eventList'][] = array( 'id' => $thisEvent['id'], 'hour' => $thisEvent['hour'], 'location' => $thisEvent['location'], 'courseOfficialCode' => $courseData['officialCode'], 'courseSysCode' => $courseData['sysCode'], 'content' => $eventLine, 'url' => get_path('url').'/claroline/calendar/agenda.php?cidReq=' . $courseData['sysCode'] ); } } $output = ''; //$output .= '<div class="calendar">'.$this->ajaxMiniCalendar($agendaItemList).'</div>'; $output .= '<div class="details">' . "\n" . '<dl>' . "\n"; if($courseDigestList) { foreach($courseDigestList as $agendaItem) { $output .= '<dt>' . "\n" . '<h2>' . <API key>( get_locale('dateFormatLong'), strtotime($agendaItem['date']) ) . '</h2>' . "\n" . '</dt>' . "\n"; foreach($agendaItem['eventList'] as $agendaEvent) { $output .= '<dd>' . '<b>' . $agendaEvent['content'] . '</b>' . "\n" . (!empty($agendaEvent['hour']) ? ' &ndash; ' . ucfirst( strftime( get_locale('timeNoSecFormat'), strtotime($agendaEvent['hour']))) : '') . (!empty($agendaEvent['location']) ? ' | ' . $agendaEvent['location'] : '') . ' (<a href="' . $agendaEvent['url'] . '#item' . $agendaEvent['id'] . '">' . get_lang('more details') . '</a>)' . "\n" . '</dd>' . "\n"; } } } else { $output .= '<dt>' . "\n" . get_lang('No event to display') . "\n" . '</dt>' . "\n"; } $output .= '' . '</dl>' . "\n" . '</div>' . "\n"; return $output; } }
<?php declare(strict_types=1); namespace TYPO3\CMS\Form\Domain\Finishers; /** * Finisher that can be attached to a form in order to be invoked * as soon as the complete form is submitted * * Scope: frontend */ interface FinisherInterface { /** * Executes the finisher * * @param FinisherContext $finisherContext The Finisher context that contains the current Form Runtime and Response * @return string|null */ public function execute(FinisherContext $finisherContext); /** * @param string $finisherIdentifier * @todo enable this method in TYPO3 v12 with a Breaking.rst as the interface changes and drop the if condition (not body) in AbstractFinisher. */ //public function <API key>(string $finisherIdentifier): void; /** * @param array $options configuration options in the format ['option1' => 'value1', 'option2' => 'value2', ...] */ public function setOptions(array $options); /** * Sets a single finisher option (@see setOptions()) * * @param string $optionName name of the option to be set * @param mixed $optionValue value of the option */ public function setOption(string $optionName, $optionValue); /** * Returns whether this finisher is enabled * * @return bool */ public function isEnabled(): bool; }
#ifndef <API key> #define <API key> #include <asm-generic/errno-base.h> #define EDEADLK 35 #define ENAMETOOLONG 36 #define ENOLCK 37 #define ENOSYS 38 #define ENOTEMPTY 39 #define ELOOP 40 #define EWOULDBLOCK EAGAIN #define ENOMSG 42 #define EIDRM 43 #define ECHRNG 44 #define EL2NSYNC 45 #define EL3HLT 46 #define EL3RST 47 #define ELNRNG 48 #define EUNATCH 49 #define ENOCSI 50 #define EL2HLT 51 #define EBADE 52 #define EBADR 53 #define EXFULL 54 #define ENOANO 55 #define EBADRQC 56 #define EBADSLT 57 #define EDEADLOCK EDEADLK #define EBFONT 59 #define ENOSTR 60 #define ENODATA 61 #define ETIME 62 #define ENOSR 63 #define ENONET 64 #define ENOPKG 65 #define EREMOTE 66 #define ENOLINK 67 #define EADV 68 #define ESRMNT 69 #define ECOMM 70 #define EPROTO 71 #define EMULTIHOP 72 #define EDOTDOT 73 #define EBADMSG 74 #define EOVERFLOW 75 #define ENOTUNIQ 76 #define EBADFD 77 #define EREMCHG 78 #define ELIBACC 79 #define ELIBBAD 80 #define ELIBSCN 81 #define ELIBMAX 82 #define ELIBEXEC 83 #define EILSEQ 84 #define ERESTART 85 #define ESTRPIPE 86 #define EUSERS 87 #define ENOTSOCK 88 #define EDESTADDRREQ 89 #define EMSGSIZE 90 #define EPROTOTYPE 91 #define ENOPROTOOPT 92 #define EPROTONOSUPPORT 93 #define ESOCKTNOSUPPORT 94 #define EOPNOTSUPP 95 #define EPFNOSUPPORT 96 #define EAFNOSUPPORT 97 #define EADDRINUSE 98 #define EADDRNOTAVAIL 99 #define ENETDOWN 100 #define ENETUNREACH 101 #define ENETRESET 102 #define ECONNABORTED 103 #define ECONNRESET 104 #define ENOBUFS 105 #define EISCONN 106 #define ENOTCONN 107 #define ESHUTDOWN 108 #define ETOOMANYREFS 109 #define ETIMEDOUT 110 #define ECONNREFUSED 111 #define EHOSTDOWN 112 #define EHOSTUNREACH 113 #define EALREADY 114 #define EINPROGRESS 115 #define ESTALE 116 #define EUCLEAN 117 #define ENOTNAM 118 #define ENAVAIL 119 #define EISNAM 120 #define EREMOTEIO 121 #define EDQUOT 122 #define ENOMEDIUM 123 #define EMEDIUMTYPE 124 #define ECANCELED 125 #define ENOKEY 126 #define EKEYEXPIRED 127 #define EKEYREVOKED 128 #define EKEYREJECTED 129 #define EOWNERDEAD 130 #define ENOTRECOVERABLE 131 #define ERFKILL 132 #define EHWPOISON 133 #endif
<?php $client = new Lingotek_API(); $api_communities = $client->get_communities(); if (!isset($api_communities->entities)) { add_settings_error('<API key>', 'error', __('The Lingotek TMS is currently unavailable. Please try again later. If the problem persists, contact Lingotek Support.', 'wp-lingotek'), 'error'); settings_errors(); } if (!$community_id) { $ltk_client = new Lingotek_API(); $ltk_communities = $ltk_client->get_communities(); $ltk_num_communities = $ltk_communities->properties->total; if ($ltk_num_communities == 1) { $ltk_community_id = $ltk_communities->entities[0]->properties->id; $this-><API key>($ltk_community_id); echo '<script type="text/javascript">document.body.innerHTML = ""; window.location = "admin.php?page=<API key>";</script>'; } } ?> <h3><?php _e('Account', 'wp-lingotek'); ?></h3> <p class="description"><?php _e('Lingotek account connection and community selection.', 'wp-lingotek'); ?></p> <table class="form-table"> <tr> <th scope="row"> <?php _e('Connected', 'wp-lingotek') ?> <a id="cd-show-link" class="dashicons <API key>" onclick="document.getElementById('connection-details').style.display = ''; document.getElementById('cd-hide-link').style.display = ''; this.style.display = 'none'; return false;"></a> <a id="cd-hide-link" class="dashicons <API key>" onclick="document.getElementById('connection-details').style.display = 'none'; document.getElementById('cd-show-link').style.display = ''; this.style.display = 'none'; return false;" style="display: none;"></a> </th> <td> <?php _e('Yes', 'wp-lingotek') ?><span title="<?php _e('Connected', 'wp-lingotek') ?>" class="dashicons dashicons-yes" style="color: green;"></span> </td> </tr> <tbody id="connection-details" style="display: none;"> <tr> <th scope="row"><?php echo __('Login ID', 'wp-lingotek') ?></th> <td> <label> <?php printf( '<input name="%s" class="regular-text" type="text" value="%s" disabled="disabled" />', 'login_id', $token_details['login_id'] ); ?> </label> </td> </tr> <tr> <th scope="row"><?php echo __('Access Token', 'wp-lingotek') ?></th> <td> <label> <?php printf( '<input name="%s" class="regular-text" type="password" value="%s" disabled="disabled" style="display: none;" />', 'access_token', $token_details['access_token'] ); printf( '<input name="%s" class="regular-text" type="text" value="%s" disabled="disabled" />', 'access_token', $token_details['access_token'] ); ?> </label> </td> </tr> <tr> <th scope="row"><?php echo __('API Endpoint', 'wp-lingotek') ?></th> <td> <label> <?php printf( '<input name="%s" class="regular-text" type="text" value="%s" disabled="disabled" />', 'base_url', $base_url ); ?> </label> </td> </tr> <tr> <th></th> <td> <?php $confirm_message = __('Are you sure you would like to disconnect your Lingotek account? \n\nAfter disconnecting, you will need to re-connect an account to continue using Lingotek.', 'wp-lingotek'); echo '<a class="button" href="' . $redirect_url . '&delete_access_token=true" onclick="return confirm(\'' . $confirm_message . '\')">' . __('Disconnect', 'wp-lingotek') . '</a>'; ?> </td> </tr> </tbody> </table> <hr/> <form method="post" action="admin.php?page=<?php echo $page_key; ?>" class="validate"> <?php /* &amp;noheader=true */ ?> <?php wp_nonce_field($page_key, '_wpnonce_' . $page_key); ?> <table class="form-table"> <tr> <th scope="row"><label for="lingotek_community"><?php _e('Community', 'wp-lingotek') ?></label></th> <td> <select name="lingotek_community" id="lingotek_community"> <?php $<API key> = $community_id; // Community $communities = array(); if (isset($api_communities->entities)) { foreach ($api_communities->entities as $community) { $communities[$community->properties->id] = $community->properties->title; // . ' (' . $community->properties->id . ')'; } $num_communities = count($communities); if($num_communities == 1 && !$community_id){ update_option('lingotek_community', current(array_keys($communities))); } if(!$community_id && $num_communities > 1) { echo "\n\t" . '<option value="">'.__('Select', 'wp-lingotek').'...</option>'; } foreach ($communities as $community_id_option => $community_title) { $selected = ($<API key> == $community_id_option) ? 'selected="selected"' : ''; echo "\n\t" . '<option value="' . esc_attr($community_id_option) . '" '.$selected.'>' . $community_title . '</option>'; } } ?> </select> </td> </tr> </table> <?php submit_button(__('Save Changes', 'wp-lingotek'), 'primary', 'submit', false); ?> </form>
// modification, are permitted provided that the following conditions are met: // and/or other materials provided with the distribution. // * Neither the name of ARM Limited nor the names of its contributors may be // used to endorse or promote products derived from this software without // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // 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. // This file is auto generated using tools/<API key>.py. // PLEASE DO NOT EDIT. #ifndef <API key> #define <API key> const Inputs <API key>[] = { { 0x80000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs <API key>[] = { { 0x80000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x80000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs <API key>[] = { { 0x80000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs <API key>[] = { { 0x80000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x80000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs <API key>[] = { { 0x80000000, 0xabababab, 0xabababab, 0xabababab }, { 0x40000000, 0xabababab, 0xabababab, 0xabababab }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabababab, 0xabababab, 0xabababab }, { 0xc0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xa0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabababab, 0xabababab, 0xabababab }, { 0x50000000, 0xabababab, 0xabababab, 0xabababab }, { 0x30000000, 0xabababab, 0xabababab, 0xabababab }, { 0xe0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xd0000000, 0xabababab, 0xabababab, 0xabababab }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabababab, 0xabababab, 0xabababab }, { 0xf0000000, 0xabababab, 0xabababab, 0xabababab }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabababab, 0xabababab, 0xabababab }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabababab, 0xabababab, 0xabababab }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabababab, 0xabababab, 0xabababab }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x80000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x40000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x20000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x10000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xc0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xa0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x90000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x60000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x50000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x30000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xe0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xd0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xb0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0x70000000, 0xabac5756, 0xabac5756, 0xabac5756 }, { 0xf0000000, 0xabac5756, 0xabac5756, 0xabac5756 }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8002 }, { 0x00000000, 0x0001007d, 0x0001007d, 0x7fffffff }, { 0x00000000, 0x0001005d, 0x0001005d, 0xffffffe0 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000002 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffd }, { 0x00000000, 0x00007fdf, 0x00007fdf, 0x00007fff }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff83 }, { 0x00000000, 0xffff8003, 0xffff8003, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8003 }, { 0x00000000, 0x00017ffe, 0x00017ffe, 0xffffffff }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xffffff80 }, { 0x00000000, 0xffffb334, 0xffffb334, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007e }, { 0x00000000, 0x0001007b, 0x0001007b, 0x7ffffffd }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xfffffffd }, { 0x00000000, 0x00008022, 0x00008022, 0xffff8002 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xfffffffe }, { 0x00000000, 0x00000002, 0x00000002, 0x00000000 }, { 0x00000000, 0x0000007f, 0x0000007f, 0x00000001 }, { 0x00000000, 0x00000081, 0x00000081, 0x0000007f }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff80 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffe }, { 0x00000000, 0x333333b0, 0x333333b0, 0x0000007d }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0x7ffffffe }, { 0x00000000, 0x00017ffd, 0x00017ffd, 0x7fffffff }, { 0x00000000, 0x8000ff83, 0x8000ff83, 0xffffff83 }, { 0x00000000, 0x0000fffe, 0x0000fffe, 0x7ffffffe }, { 0x00000000, 0x0000007f, 0x0000007f, 0x0000007f }, { 0x00000000, 0x8000cccb, 0x8000cccb, 0xcccccccc }, { 0x00000000, 0xffffff84, 0xffffff84, 0x00000002 }, { 0x00000000, 0x8000aaa7, 0x8000aaa7, 0xaaaaaaaa }, { 0x00000000, 0xcccd4ccd, 0xcccd4ccd, 0xffff8001 }, { 0x00000000, 0x00007fff, 0x00007fff, 0xffff8001 }, { 0x00000000, 0x8000001f, 0x8000001f, 0x00000020 }, { 0x00000000, 0x00007fde, 0x00007fde, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80008001, 0xffff8000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x0000007d }, { 0x00000000, 0x0001007c, 0x0001007c, 0x7ffffffe }, { 0x00000000, 0x00017f7d, 0x00017f7d, 0xffffff80 }, { 0x00000000, 0x000000fb, 0x000000fb, 0x0000007e }, { 0x00000000, 0x00008001, 0x00008001, 0x7fffffff }, { 0x00000000, 0x0000005f, 0x0000005f, 0x0000007f }, { 0x00000000, 0x00017f7f, 0x00017f7f, 0xffffff81 }, { 0x00000000, 0x8000007e, 0x8000007e, 0x0000007e }, { 0x00000000, 0x0000aaa9, 0x0000aaa9, 0xaaaaaaaa }, { 0x00000000, 0x0000001e, 0x0000001e, 0x00000020 }, { 0x00000000, 0x00007f85, 0x00007f85, 0xffff8003 }, { 0x00000000, 0x80007fff, 0x80007fff, 0xffff8002 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x00000000 }, { 0x00000000, 0x0000ffdd, 0x0000ffdd, 0xffffffe0 }, { 0x00000000, 0x00000002, 0x00000002, 0xffff8002 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0x7ffffffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x80000000 }, { 0x00000000, 0x80003334, 0x80003334, 0x33333333 }, { 0x00000000, 0x00000003, 0x00000003, 0x00000002 }, { 0x00000000, 0x555555d4, 0x555555d4, 0x0000007f }, { 0x00000000, 0x0000fffc, 0x0000fffc, 0xfffffffd }, { 0x00000000, 0xffffff80, 0xffffff80, 0x80000000 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00008001, 0x00008001, 0xffff8003 }, { 0x00000000, 0x00000001, 0x00000001, 0xffff8000 }, { 0x00000000, 0x5555aaaa, 0x5555aaaa, 0x55555555 }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8000 }, { 0x00000000, 0x8000ffdf, 0x8000ffdf, 0xffffffe0 }, { 0x00000000, 0x00005556, 0x00005556, 0x55555555 }, { 0x00000000, 0x33343331, 0x33343331, 0x7ffffffe }, { 0x00000000, 0x8000ffe0, 0x8000ffe0, 0xffffffe0 }, { 0x00000000, 0x00000000, 0x00000000, 0x0000007d }, { 0x00000000, 0xffff8005, 0xffff8005, 0x00000002 }, { 0x00000000, 0x8000ff7f, 0x8000ff7f, 0xffffff81 }, { 0x00000000, 0x0000ff7e, 0x0000ff7e, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00010000, 0xffff8002 }, { 0x00000000, 0x8000ffff, 0x8000ffff, 0xfffffffe }, { 0x00000000, 0x8000fffa, 0x8000fffa, 0xfffffffd }, { 0x00000000, 0x8000fffb, 0x8000fffb, 0xfffffffe }, { 0x00000000, 0x8000ff81, 0x8000ff81, 0xffffff83 }, { 0x00000000, 0x00007ffb, 0x00007ffb, 0x00007ffe }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000000 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0x7fffffff }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffff83 }, { 0x00000000, 0x00000000, 0x00000000, 0xffff8000 }, { 0x00000000, 0x00010000, 0x00010000, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xffffffff }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffe }, { 0x00000000, 0xaaaaab27, 0xaaaaab27, 0x0000007d }, { 0x00000000, 0x00007fff, 0x00007fff, 0xfffffffe }, { 0x00000000, 0x0000807b, 0x0000807b, 0x0000007d }, { 0x00000000, 0x0000ff80, 0x0000ff80, 0xfffffffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0xaaab2aac, 0xaaab2aac, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00010001, 0xffffff82 }, { 0x00000000, 0x0000b332, 0x0000b332, 0x33333333 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x80000000 }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0xfffffffd }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007f }, { 0x00000000, 0x0000007b, 0x0000007b, 0x0000007e }, { 0x00000000, 0x00005535, 0x00005535, 0x55555555 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x0000005e, 0x0000005e, 0x0000007e }, { 0x00000000, 0x00007f7e, 0x00007f7e, 0x00007ffd }, { 0x00000000, 0x00008021, 0x00008021, 0xffff8001 }, { 0x00000000, 0x00017f82, 0x00017f82, 0xffffff83 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffffff82 }, { 0x00000000, 0xffff807f, 0xffff807f, 0x0000007e }, { 0x00000000, 0xffffff81, 0xffffff81, 0x00000001 }, { 0x00000000, 0x8000cccc, 0x8000cccc, 0xcccccccc }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00007ffd }, { 0x00000000, 0x7fffffff, 0x7fffffff, 0x80000001 }, { 0x00000000, 0x0000801e, 0x0000801e, 0x00007ffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008000, 0x80008000, 0xffff8001 }, { 0x00000000, 0x0000ff83, 0x0000ff83, 0xffffff83 }, { 0x00000000, 0x0000009f, 0x0000009f, 0x00000020 }, { 0x00000000, 0x80008004, 0x80008004, 0xffff8003 }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007f }, { 0x00000000, 0x00000080, 0x00000080, 0x80000001 }, { 0x00000000, 0x00010000, 0x00010000, 0x7ffffffe }, { 0x00000000, 0x0000ff05, 0x0000ff05, 0xffffff83 }, { 0x00000000, 0x00017ffc, 0x00017ffc, 0x7fffffff }, { 0x00000000, 0x8000fffc, 0x8000fffc, 0xfffffffe }, { 0x00000000, 0x00007f82, 0x00007f82, 0xffff8000 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0x00007f83, 0xffffff81 }, { 0x00000000, 0x33343332, 0x33343332, 0x7fffffff }, { 0x00000000, 0x80008000, 0x80008000, 0x00007fff }, { 0x00000000, 0x00004cce, 0x00004cce, 0xcccccccc }, { 0x00000000, 0x00000001, 0x00000001, 0x00000002 }, { 0x00000000, 0x333432b4, 0x333432b4, 0xffffff81 }, { 0x00000000, 0x0000ff7d, 0x0000ff7d, 0xffffff80 }, { 0x00000000, 0x5555ffff, 0x5555ffff, 0xaaaaaaaa }, { 0x00000000, 0x333432b5, 0x333432b5, 0xffffff82 }, { 0x00000000, 0x0000aa2a, 0x0000aa2a, 0xaaaaaaaa }, { 0x00000000, 0x0000009e, 0x0000009e, 0x00000020 }, { 0x00000000, 0x00007f80, 0x00007f80, 0x00007ffd }, { 0x00000000, 0x0000aa2c, 0x0000aa2c, 0xaaaaaaaa }, { 0x00000000, 0x00008002, 0x00008002, 0xffffffff }, { 0x00000000, 0xaaabaaa8, 0xaaabaaa8, 0xfffffffe }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0xaaaaab29, 0xaaaaab29, 0x0000007f }, { 0x00000000, 0x000000fc, 0x000000fc, 0x0000007d }, { 0x00000000, 0x00005552, 0x00005552, 0x55555555 }, { 0x00000000, 0x0000001f, 0x0000001f, 0x00000020 }, { 0x00000000, 0x00017f81, 0x00017f81, 0xffffff83 }, { 0x00000000, 0x80005554, 0x80005554, 0x55555555 }, { 0x00000000, 0x55562221, 0x55562221, 0xcccccccc }, { 0x00000000, 0x00007fe3, 0x00007fe3, 0xffff8003 }, { 0x00000000, 0x80007ffc, 0x80007ffc, 0x00007ffe }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xffff8002 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00000001 }, { 0x00000000, 0x00007ffe, 0x00007ffe, 0x00007ffe }, { 0x00000000, 0xffffffa0, 0xffffffa0, 0x00000020 }, { 0x00000000, 0xffff807d, 0xffff807d, 0x0000007d }, { 0x00000000, 0xffff8003, 0xffff8003, 0x00000000 }, { 0x00000000, 0x0000007e, 0x0000007e, 0x80000000 }, { 0x00000000, 0xfffffffd, 0xfffffffd, 0x00000000 }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffffff }, { 0x00000000, 0xcccccd4b, 0xcccccd4b, 0x0000007f }, { 0x00000000, 0x7ffffffd, 0x7ffffffd, 0x00000000 }, { 0x00000000, 0x00007fff, 0x00007fff, 0x00000000 }, { 0x00000000, 0x00000080, 0x00000080, 0x00000001 }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xffffff82 }, { 0x00000000, 0x0000fffb, 0x0000fffb, 0x00007ffd }, { 0x00000000, 0xaaaadddd, 0xaaaadddd, 0x33333333 }, { 0x00000000, 0x000054d7, 0x000054d7, 0x55555555 }, { 0x00000000, 0xffff8081, 0xffff8081, 0x0000007e }, { 0x00000000, 0xffffff85, 0xffffff85, 0x00000002 }, { 0x00000000, 0x000032b5, 0x000032b5, 0x33333333 }, { 0x00000000, 0x55565554, 0x55565554, 0xffffffff }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaab, 0x80000001 }, { 0x00000000, 0x0000ff63, 0x0000ff63, 0xffffffe0 }, { 0x00000000, 0x0000ffe1, 0x0000ffe1, 0xffffffe0 }, { 0x00000000, 0x33336666, 0x33336666, 0x33333333 }, { 0x00000000, 0x55555556, 0x55555556, 0x00000001 }, { 0x00000000, 0x00007f82, 0x00007f82, 0x00007fff }, { 0x00000000, 0x0000ffff, 0x0000ffff, 0xfffffffd }, { 0x00000000, 0x00007fe2, 0x00007fe2, 0xffff8002 }, { 0x00000000, 0x80007ffd, 0x80007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff81, 0x0000ff81, 0xfffffffe }, { 0x00000000, 0x80010000, 0x80010000, 0xffffffff }, { 0x00000000, 0xffff8023, 0xffff8023, 0x00000020 }, { 0x00000000, 0x0000cc4e, 0x0000cc4e, 0xcccccccc }, { 0x00000000, 0x0001001f, 0x0001001f, 0x7fffffff }, { 0x00000000, 0x000054d5, 0x000054d5, 0x55555555 }, { 0x00000000, 0x00000021, 0x00000021, 0x00000020 }, { 0x00000000, 0x00000000, 0x00000000, 0x00007fff }, { 0x00000000, 0x0000aaca, 0x0000aaca, 0xaaaaaaaa }, { 0x00000000, 0x55565554, 0x55565554, 0x7fffffff }, { 0x00000000, 0x0000fffd, 0x0000fffd, 0x7fffffff }, { 0x00000000, 0x0000d554, 0x0000d554, 0x55555555 }, { 0x00000000, 0x555555d2, 0x555555d2, 0x0000007d }, { 0x00000000, 0xcccdccca, 0xcccdccca, 0x7ffffffe }, { 0x00000000, 0x00000000, 0x00000000, 0x00007ffe }, { 0x00000000, 0x0000ff7f, 0x0000ff7f, 0xffffff81 }, { 0x00000000, 0xfffffffe, 0xfffffffe, 0x0000007d }, { 0x00000000, 0x0000009e, 0x0000009e, 0x0000007e }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0xffff8080, 0xffff8080, 0x0000007e }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x80005553, 0x7ffffffe, 0x80005553 }, { 0x00000000, 0x0000ffff, 0x00000001, 0x0000ffff }, { 0x00000000, 0x0000ff04, 0xffffff82, 0x0000ff04 }, { 0x00000000, 0x00000003, 0xffff8003, 0x00000003 }, { 0x00000000, 0x00000001, 0x00000000, 0x00000001 }, { 0x00000000, 0x00017f80, 0x00007fff, 0x00017f80 }, { 0x00000000, 0xffff807f, 0xffff8002, 0xffff807f }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x000054d6, 0xffffff81, 0x000054d6 }, { 0x00000000, 0x00007f7f, 0xffffff82, 0x00007f7f }, { 0x00000000, 0x0000d554, 0x00007fff, 0x0000d554 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0x0000ff82, 0xffffff83, 0x0000ff82 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x3333b335, 0x33333333, 0x3333b335 }, { 0x00000000, 0xaaab2aa7, 0xaaaaaaaa, 0xaaab2aa7 }, { 0x00000000, 0xffffd555, 0xffff8000, 0xffffd555 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff83, 0x00000000 }, { 0x00000000, 0x00000000, 0xffffff82, 0x00000000 }, { 0x00000000, 0x0000cd49, 0x0000007d, 0x0000cd49 }, { 0x00000000, 0x00008001, 0xffffffff, 0x00008001 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00007f83, 0xffffff83, 0x00007f83 }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x80005555, 0x80000000, 0x80005555 }, { 0x00000000, 0x0000807d, 0x0000007d, 0x0000807d }, { 0x00000000, 0x00002aad, 0xffff8003, 0x00002aad }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x8000007c, 0x7ffffffe, 0x8000007c }, { 0x00000000, 0x0000801d, 0x00007ffd, 0x0000801d }, { 0x00000000, 0x8000ff7e, 0x7ffffffd, 0x8000ff7e }, { 0x00000000, 0x00010002, 0x0000007f, 0x00010002 }, { 0x00000000, 0x0000007f, 0x0000007e, 0x0000007f }, { 0x00000000, 0x0000ff7f, 0xfffffffd, 0x0000ff7f }, { 0x00000000, 0x80008001, 0x7ffffffe, 0x80008001 }, { 0x00000000, 0x00000004, 0x00000002, 0x00000004 }, { 0x00000000, 0x00007f84, 0xffff8001, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffe, 0x00008000 }, { 0x00000000, 0x0000ff01, 0xffffff81, 0x0000ff01 }, { 0x00000000, 0x0000ff80, 0xffffff81, 0x0000ff80 }, { 0x00000000, 0xffffffa1, 0xffffff81, 0xffffffa1 }, { 0x00000000, 0x0000007e, 0xffffffff, 0x0000007e }, { 0x00000000, 0xcccccd49, 0xcccccccc, 0xcccccd49 }, { 0x00000000, 0x5555d554, 0x55555555, 0x5555d554 }, { 0x00000000, 0x00010000, 0x00007ffd, 0x00010000 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000fffc, 0xfffffffd, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000cd4b, 0x0000007f, 0x0000cd4b }, { 0x00000000, 0x00000003, 0x00000002, 0x00000003 }, { 0x00000000, 0x0000ff03, 0xffffff81, 0x0000ff03 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0x00007f84, 0xffff8002, 0x00007f84 }, { 0x00000000, 0x00008000, 0xfffffffd, 0x00008000 }, { 0x00000000, 0x0000ffa1, 0x00000020, 0x0000ffa1 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x80000002, 0x80000001, 0x80000002 }, { 0x00000000, 0x0000ffff, 0x00000002, 0x0000ffff }, { 0x00000000, 0x80008000, 0x7ffffffd, 0x80008000 }, { 0x00000000, 0xaaaaab28, 0xaaaaaaaa, 0xaaaaab28 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000fffb, 0x00007ffe, 0x0000fffb }, { 0x00000000, 0x80008000, 0x80000001, 0x80008000 }, { 0x00000000, 0x00007ffd, 0xfffffffe, 0x00007ffd }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd2221, 0xcccccccc, 0xcccd2221 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x0000ff7f, 0xfffffffe, 0x0000ff7f }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0xffff8080, 0xffff8001, 0xffff8080 }, { 0x00000000, 0x0000ff80, 0xffffff83, 0x0000ff80 }, { 0x00000000, 0xcccdcc4e, 0xcccccccc, 0xcccdcc4e }, { 0x00000000, 0xffffffa3, 0xffffff83, 0xffffffa3 }, { 0x00000000, 0x80007ffe, 0x80000000, 0x80007ffe }, { 0x00000000, 0xffff807f, 0xffff8000, 0xffff807f }, { 0x00000000, 0x333432b5, 0x33333333, 0x333432b5 }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007f81, 0xffff8001, 0x00007f81 }, { 0x00000000, 0xaaaaaaac, 0xaaaaaaaa, 0xaaaaaaac }, { 0x00000000, 0x8000fffe, 0x7fffffff, 0x8000fffe }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00000021, 0x00000001, 0x00000021 }, { 0x00000000, 0x00005556, 0x00000001, 0x00005556 }, { 0x00000000, 0x000054d5, 0xffffff80, 0x000054d5 }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00008001, 0x00000000, 0x00008001 }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x0000ff84, 0x00000001, 0x0000ff84 }, { 0x00000000, 0x00000001, 0xffff8002, 0x00000001 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0xcccccccd, 0xcccccccc, 0xcccccccd }, { 0x00000000, 0x00007fde, 0xffffffe0, 0x00007fde }, { 0x00000000, 0x00007ffb, 0xfffffffd, 0x00007ffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0x0000ffe1, 0x00000001, 0x0000ffe1 }, { 0x00000000, 0x0000807d, 0x00007fff, 0x0000807d }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0x8000ff80, 0x7fffffff, 0x8000ff80 }, { 0x00000000, 0x000000fb, 0x0000007d, 0x000000fb }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0xffff8080, 0xffff8003, 0xffff8080 }, { 0x00000000, 0x00017ffb, 0x00007ffd, 0x00017ffb }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0xffff8000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00003335, 0x00000002, 0x00003335 }, { 0x00000000, 0x0000ff04, 0xffffff83, 0x0000ff04 }, { 0x00000000, 0x00017ffc, 0x00007ffe, 0x00017ffc }, { 0x00000000, 0x0000007d, 0x0000007d, 0x0000007d }, { 0x00000000, 0x00000022, 0x00000002, 0x00000022 }, { 0x00000000, 0x80003334, 0x80000001, 0x80003334 }, { 0x00000000, 0x00017f80, 0x00007ffd, 0x00017f80 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x80008001, 0x80000000, 0x80008001 }, { 0x00000000, 0x80000000, 0x80000000, 0x80000000 }, { 0x00000000, 0x0000ffdf, 0xffffffff, 0x0000ffdf }, { 0x00000000, 0xffffff83, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007ffe, 0xffff8001, 0x00007ffe }, { 0x00000000, 0xffff8004, 0xffff8003, 0xffff8004 }, { 0x00000000, 0x80007ffd, 0x7fffffff, 0x80007ffd }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x00007f86, 0xffff8003, 0x00007f86 }, { 0x00000000, 0xcccd7776, 0xcccccccc, 0xcccd7776 }, { 0x00000000, 0xffffffff, 0xffffff80, 0xffffffff }, { 0x00000000, 0x00007ffe, 0x00007ffd, 0x00007ffe }, { 0x00000000, 0x80008001, 0x80000001, 0x80008001 }, { 0x00000000, 0x0000fffc, 0x00007ffd, 0x0000fffc }, { 0x00000000, 0x000000fd, 0x0000007f, 0x000000fd }, { 0x00000000, 0x0000007f, 0x0000007d, 0x0000007f }, { 0x00000000, 0x80000000, 0x7fffffff, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001007c, 0x0000007f, 0x0001007c }, { 0x00000000, 0x0000ff02, 0xffffff81, 0x0000ff02 }, { 0x00000000, 0xfffffffe, 0xfffffffd, 0xfffffffe }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x000055d4, 0x0000007f, 0x000055d4 }, { 0x00000000, 0xffffd558, 0xffff8003, 0xffffd558 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x333333b1, 0x33333333, 0x333333b1 }, { 0x00000000, 0x8000ffff, 0x80000001, 0x8000ffff }, { 0x00000000, 0x00007ffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0001007e, 0x0000007f, 0x0001007e }, { 0x00000000, 0x00008082, 0x0000007f, 0x00008082 }, { 0x00000000, 0x00017f7f, 0x00007ffd, 0x00017f7f }, { 0x00000000, 0x00003332, 0xffffffff, 0x00003332 }, { 0x00000000, 0xcccdccac, 0xcccccccc, 0xcccdccac }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0xcccccd4a, 0xcccccccc, 0xcccccd4a }, { 0x00000000, 0xffffffff, 0xfffffffd, 0xffffffff }, { 0x00000000, 0xcccd4ccb, 0xcccccccc, 0xcccd4ccb }, { 0x00000000, 0x00017ffe, 0x00007fff, 0x00017ffe }, { 0x00000000, 0x33343313, 0x33333333, 0x33343313 }, { 0x00000000, 0x000000fc, 0x0000007d, 0x000000fc }, { 0x00000000, 0x0000005f, 0xffffffe0, 0x0000005f }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x80007ffd, 0x7ffffffd, 0x80007ffd }, { 0x00000000, 0x0000cd4a, 0x0000007e, 0x0000cd4a }, { 0x00000000, 0xffffb336, 0xffff8003, 0xffffb336 }, { 0x00000000, 0x00005557, 0x00000002, 0x00005557 }, { 0x00000000, 0x00000002, 0x00000001, 0x00000002 }, { 0x00000000, 0x3333dddd, 0x33333333, 0x3333dddd }, { 0x00000000, 0x0000fffe, 0x00000001, 0x0000fffe }, { 0x00000000, 0x00007f82, 0xffff8000, 0x00007f82 }, { 0x00000000, 0x555555d2, 0x55555555, 0x555555d2 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x0000ffdf, 0xffffffe0, 0x0000ffdf }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0xaaabaa2c, 0xaaaaaaaa, 0xaaabaa2c }, { 0x00000000, 0x0000ff7d, 0xffffff80, 0x0000ff7d }, { 0x00000000, 0x8000fffe, 0x80000001, 0x8000fffe }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x0000ff7f, 0xffffff80, 0x0000ff7f }, { 0x00000000, 0xcccdcc4c, 0xcccccccc, 0xcccdcc4c }, { 0x00000000, 0x5555d553, 0x55555555, 0x5555d553 }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00007fff, 0xffff8000, 0x00007fff }, { 0x00000000, 0x0000007e, 0x0000007d, 0x0000007e }, { 0x00000000, 0x00007fe2, 0xffff8002, 0x00007fe2 }, { 0x00000000, 0x0000ffde, 0xffffffe0, 0x0000ffde }, { 0x00000000, 0xffff8003, 0xffff8003, 0xffff8003 }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0x00017fde, 0x00007ffe, 0x00017fde }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x000000fb }, { 0x00000000, 0x00008004, 0x00000002, 0x00008004 }, { 0x00000000, 0x80000001, 0x80000001, 0x80000001 }, { 0x00000000, 0xffffff85, 0xffffff83, 0xffffff85 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0xffffffe2 }, { 0x00000000, 0x8000ff83, 0x80000001, 0x8000ff83 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000807e }, { 0x00000000, 0x0001007b, 0x0000007d, 0x0001007b }, { 0x00000000, 0x00008022, 0x00000020, 0x00008022 }, { 0x00000000, 0x55555556, 0x55555555, 0x55555556 }, { 0x00000000, 0x33333333, 0x33333333, 0x33333333 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x80005552 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x00007fff }, { 0x00000000, 0x00007f86, 0xffffff83, 0x00007f86 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0x0000ff61 }, { 0x00000000, 0xffff807f, 0xffff8001, 0xffff807f }, { 0x00000000, 0x0000009e, 0x0000007e, 0x0000009e }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0x0000aaa7 }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x0000ff7f }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0xcccdcccb }, { 0x00000000, 0x80010000, 0x80000001, 0x80010000 }, { 0x00000000, 0x0001001e, 0x00000020, 0x0001001e }, { 0x00000000, 0x0000ff61, 0xffffff81, 0x0000ff61 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0x0000ff7e }, { 0x00000000, 0x0000fffe, 0xffffffff, 0x0000fffe }, { 0x00000000, 0x00004ccc, 0xffff8000, 0x00004ccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0x00017f80 }, { 0x00000000, 0x00008080, 0x0000007d, 0x00008080 }, { 0x00000000, 0xffffffff, 0xffffff81, 0xffffffff }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0x8000fffb }, { 0x00000000, 0x8000ff82, 0x80000001, 0x8000ff82 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x80008002, 0x7fffffff, 0x80008002 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x000033b0 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0xfffffffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0xffff8020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0x00017fdf }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x33333334 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0xffffffa0 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007f80 }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0x0000cc4d }, { 0x00000000, 0x00008080, 0x0000007f, 0x00008080 }, { 0x00000000, 0x00000020, 0x00000020, 0x00000020 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0x00017f7f }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x8000fffb }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0x8000ff80 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0x00007fe1 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007f7d }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x0000fffd }, { 0x00000000, 0x00008000, 0x00000000, 0x00008000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0xaaabaaa8 }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0x00017fdd }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0x0000ff63 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0xffff8002, 0xffff8002, 0xffff8002 }, { 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff }, { 0x00000000, 0x80008004, 0x80000001, 0x80008004 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xaaabaa2b }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0x0000ffdd }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007f7e }, { 0x00000000, 0x00008002, 0xffff8003, 0x00008002 }, { 0x00000000, 0x00007f82, 0xffffff82, 0x00007f82 }, { 0x00000000, 0x00000002, 0x00000002, 0x00000002 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0x0000ff03 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0xcccd4cc9 }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x00017ffd }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0x0000aa2b }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000080 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0x0000fffe }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0x00012aa8 }, { 0x00000000, 0x5555d558, 0x55555555, 0x5555d558 }, { 0x00000000, 0x0000ff81, 0x00000001, 0x0000ff81 }, { 0x00000000, 0x55555556, 0x55555555, 0x55555556 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0x0000cc4d }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xcccdccc9 }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x00007ffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0xffff8001 }, { 0x00000000, 0x00000004, 0xffff8003, 0x00000004 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x00007ffd }, { 0x00000000, 0x00014ccb, 0x00007fff, 0x00014ccb }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007f7e }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0x8000aaa7 }, { 0x00000000, 0xffff8082, 0xffff8003, 0xffff8082 }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0x0000fffb }, { 0x00000000, 0x00005553, 0xfffffffe, 0x00005553 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0x0000fffc }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007ffe }, { 0x00000000, 0x0000807b, 0x0000007e, 0x0000807b }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0xffffffe2 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0x00017f7e }, { 0x00000000, 0x0001001d, 0x00000020, 0x0001001d }, { 0x00000000, 0x00010000, 0x0000007d, 0x00010000 }, { 0x00000000, 0x55565553, 0x55555555, 0x55565553 }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00008000 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x80007ffc }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000000 }, { 0x00000000, 0x333432b6, 0x33333333, 0x333432b6 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0xccccffff }, { 0x00000000, 0xffffff81, 0xffffff80, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0xcccd4cc9 }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0x8000ff81 }, { 0x00000000, 0x00008080, 0x0000007f, 0x00008080 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0x00017f7f }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x00017ffd }, { 0x00000000, 0x5555d556, 0x55555555, 0x5555d556 }, { 0x00000000, 0x0000ff80, 0x00000000, 0x0000ff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00008001 }, { 0x00000000, 0x5555d558, 0x55555555, 0x5555d558 }, { 0x00000000, 0xffff8023, 0xffff8003, 0xffff8023 }, { 0x00000000, 0x00008001, 0xffff8002, 0x00008001 }, { 0x00000000, 0x55555555, 0x55555555, 0x55555555 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0x00017f7f }, { 0x00000000, 0x80007fff, 0x80000001, 0x80007fff }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0xaaaaaaca }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000000 }, { 0x00000000, 0x00000002, 0xffff8000, 0x00000002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0x00012aa9 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007f7d }, { 0x00000000, 0x8000ff80, 0x80000000, 0x8000ff80 }, { 0x00000000, 0x55565552, 0x55555555, 0x55565552 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffc }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0x0000ff7e }, { 0x00000000, 0x00007f84, 0xffffff82, 0x00007f84 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0x80007ffe }, { 0x00000000, 0x00007f83, 0xffff8003, 0x00007f83 }, { 0x00000000, 0x00010000, 0x00000020, 0x00010000 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0x00007fe1 }, { 0x00000000, 0x00000002, 0xffff8000, 0x00000002 }, { 0x00000000, 0x00010000, 0x00000002, 0x00010000 }, { 0x00000000, 0x00010000, 0x0000007f, 0x00010000 }, { 0x00000000, 0x00010000, 0x00000001, 0x00010000 }, { 0x00000000, 0x00003333, 0x00000000, 0x00003333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0x0000cc4f }, { 0x00000000, 0x0000801d, 0x00000020, 0x0000801d }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0xcccccccc }, { 0x00000000, 0xffffffff, 0xffff8000, 0xffffffff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0xcccd4cca }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x0000fffb }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0xaaaaffff }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xaaabaa2b }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0x00007ffe }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x0000ffdd }, { 0x00000000, 0x33343330, 0x33333333, 0x33343330 }, { 0x00000000, 0xffff8003, 0xffff8002, 0xffff8003 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0x0000ff06 }, { 0x00000000, 0xffff8022, 0xffff8002, 0xffff8022 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x8000007e }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xcccd4ccc }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x80007ffd }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x8000fffa }, { 0x00000000, 0x00007fff, 0xfffffffd, 0x00007fff }, { 0x00000000, 0x00010001, 0x00000002, 0x00010001 }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x0000001e }, { 0x00000000, 0x0000807c, 0x0000007e, 0x0000807c }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0x00017ffa }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000081 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x8000fffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x00008000 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0x8000aaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xaaab2aab }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0x00007fe3 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffc }, { 0x00000000, 0xffffff82, 0xffffff81, 0xffffff82 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0xaaaaaaab }, { 0x00000000, 0x00000000, 0xffff8000, 0x00000000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0x00012aa7 }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x7ffffffe }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0x00017f7f }, { 0x00000000, 0x0000807f, 0x0000007d, 0x0000807f }, { 0x00000000, 0x0000ff83, 0x00000002, 0x0000ff83 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x0000fffa }, { 0x00000000, 0x0000ffa0, 0x00000020, 0x0000ffa0 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0x8000ffdf }, { 0x00000000, 0xffff8081, 0xffff8002, 0xffff8081 }, { 0x00000000, 0x80008001, 0x7fffffff, 0x80008001 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x0000001d }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000005e }, { 0x00000000, 0x0001001e, 0x00000020, 0x0001001e }, { 0x00000000, 0x0000807f, 0x0000007f, 0x0000807f }, { 0x00000000, 0x8000007e, 0x80000001, 0x8000007e }, { 0x00000000, 0x0000807c, 0x0000007f, 0x0000807c }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0x0000ff62 }, { 0x00000000, 0x00008080, 0x0000007e, 0x00008080 }, { 0x00000000, 0x555555d4, 0x55555555, 0x555555d4 }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x8000fffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0x0000ff7e }, { 0x00000000, 0xffffb335, 0xffff8002, 0xffffb335 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0x0000aaa7 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x0000001d }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x0000d553 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000022 }, { 0x00000000, 0x00008000, 0xffff8002, 0x00008000 }, { 0x00000000, 0x80008003, 0x80000001, 0x80008003 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x000033b1 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0x000000fb, 0x0000007e, 0x0000007d }, { 0x00000000, 0x00008004, 0x00000002, 0xffff8002 }, { 0x00000000, 0x80000001, 0x80000001, 0x00000000 }, { 0x00000000, 0xffffff85, 0xffffff83, 0x00000002 }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x8000ff83, 0x80000001, 0xffffff82 }, { 0x00000000, 0x0000807e, 0x00007fff, 0x0000007f }, { 0x00000000, 0x0001007b, 0x0000007d, 0x7ffffffe }, { 0x00000000, 0x00008022, 0x00000020, 0xffff8002 }, { 0x00000000, 0x55555556, 0x55555555, 0x00000001 }, { 0x00000000, 0x33333333, 0x33333333, 0x00000000 }, { 0x00000000, 0x80005552, 0x7ffffffd, 0x55555555 }, { 0x00000000, 0x00007fff, 0xffff8001, 0x7ffffffe }, { 0x00000000, 0x00007f86, 0xffffff83, 0xffff8003 }, { 0x00000000, 0x0000ff61, 0xffffffe0, 0xffffff81 }, { 0x00000000, 0xffff807f, 0xffff8001, 0x0000007e }, { 0x00000000, 0x0000009e, 0x0000007e, 0x00000020 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000ff7f, 0xffffff82, 0x7ffffffd }, { 0x00000000, 0xcccdcccb, 0xcccccccc, 0x7fffffff }, { 0x00000000, 0x80010000, 0x80000001, 0xffffffff }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000ff61, 0xffffff81, 0xffffffe0 }, { 0x00000000, 0x0000ff7e, 0xffffff81, 0xfffffffd }, { 0x00000000, 0x0000fffe, 0xffffffff, 0xffffffff }, { 0x00000000, 0x00004ccc, 0xffff8000, 0xcccccccc }, { 0x00000000, 0x00017f80, 0x00007ffe, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007d, 0xffff8003 }, { 0x00000000, 0xffffffff, 0xffffff81, 0x0000007e }, { 0x00000000, 0x8000fffb, 0x7ffffffd, 0xfffffffe }, { 0x00000000, 0x8000ff82, 0x80000001, 0xffffff81 }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x80008002, 0x7fffffff, 0xffff8003 }, { 0x00000000, 0x000033b0, 0x0000007d, 0x33333333 }, { 0x00000000, 0xfffffffe, 0xffff8000, 0x00007ffe }, { 0x00000000, 0xffff8020, 0xffff8000, 0x00000020 }, { 0x00000000, 0x00017fdf, 0x00007fff, 0xffffffe0 }, { 0x00000000, 0x00007ffe, 0x00000000, 0x00007ffe }, { 0x00000000, 0x33333334, 0x33333333, 0x00000001 }, { 0x00000000, 0xffffffa0, 0xffffff80, 0x00000020 }, { 0x00000000, 0x00007f80, 0xffffff83, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x80000001 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00000020, 0x00000020, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x8000fffb, 0x7ffffffe, 0x7ffffffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x8000ff80, 0x7ffffffd, 0xffffff83 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x0000fffd, 0x00007fff, 0x00007ffe }, { 0x00000000, 0x00008000, 0x00000000, 0xffff8000 }, { 0x00000000, 0xaaabaaa8, 0xaaaaaaaa, 0x7ffffffe }, { 0x00000000, 0x00017fdd, 0x00007ffd, 0xffffffe0 }, { 0x00000000, 0x0000ff63, 0xffffffe0, 0xffffff83 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0x7ffffffd }, { 0x00000000, 0xffff8002, 0xffff8002, 0x80000000 }, { 0x00000000, 0xffffffff, 0xffffffff, 0x80000000 }, { 0x00000000, 0x80008004, 0x80000001, 0xffff8003 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x0000ffdd, 0xfffffffd, 0xffffffe0 }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x00008002, 0xffff8003, 0xffffffff }, { 0x00000000, 0x00007f82, 0xffffff82, 0xffff8000 }, { 0x00000000, 0x00000002, 0x00000002, 0x80000000 }, { 0x00000000, 0x0000ff03, 0xffffff82, 0xffffff81 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x00017ffd, 0x00007ffe, 0x7fffffff }, { 0x00000000, 0x0000aa2b, 0xffffff81, 0xaaaaaaaa }, { 0x00000000, 0x00000080, 0x0000007e, 0x00000002 }, { 0x00000000, 0x0000fffe, 0x0000007e, 0xffffff80 }, { 0x00000000, 0x00012aa8, 0x00007ffe, 0xaaaaaaaa }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0x0000ff81, 0x00000001, 0xffffff80 }, { 0x00000000, 0x55555556, 0x55555555, 0x80000001 }, { 0x00000000, 0x0000007e, 0x00000000, 0x0000007e }, { 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa, 0x00000000 }, { 0x00000000, 0x0000cc4d, 0xffffff81, 0xcccccccc }, { 0x00000000, 0xcccdccc9, 0xcccccccc, 0xfffffffd }, { 0x00000000, 0x00007ffd, 0xffff8000, 0x7ffffffd }, { 0x00000000, 0xffff8001, 0xffff8000, 0x80000001 }, { 0x00000000, 0x00000004, 0xffff8003, 0xffff8001 }, { 0x00000000, 0x00007ffd, 0x00007ffd, 0x80000000 }, { 0x00000000, 0x00014ccb, 0x00007fff, 0xcccccccc }, { 0x00000000, 0x00007f7e, 0xffffff80, 0x00007ffe }, { 0x00000000, 0x8000aaa7, 0x7ffffffd, 0xaaaaaaaa }, { 0x00000000, 0xffff8082, 0xffff8003, 0x0000007f }, { 0x00000000, 0x0000fffb, 0xfffffffe, 0xfffffffd }, { 0x00000000, 0x00005553, 0xfffffffe, 0x55555555 }, { 0x00000000, 0x0000fffc, 0xfffffffe, 0xfffffffe }, { 0x00000000, 0x00007ffe, 0xffffffff, 0x00007fff }, { 0x00000000, 0x0000807b, 0x0000007e, 0x00007ffd }, { 0x00000000, 0xffffffe2, 0xffffffe0, 0x00000002 }, { 0x00000000, 0x00017f7e, 0x00007ffd, 0xffffff81 }, { 0x00000000, 0x0001001d, 0x00000020, 0xfffffffd }, { 0x00000000, 0x00010000, 0x0000007d, 0xffffff83 }, { 0x00000000, 0x55565553, 0x55555555, 0x7ffffffe }, { 0x00000000, 0x00008000, 0x00007ffe, 0x00000002 }, { 0x00000000, 0x80007ffc, 0x7fffffff, 0x00007ffd }, { 0x00000000, 0x00000000, 0xffffffff, 0x00000001 }, { 0x00000000, 0x333432b6, 0x33333333, 0xffffff83 }, { 0x00000000, 0xccccffff, 0xcccccccc, 0x33333333 }, { 0x00000000, 0xffffff81, 0xffffff80, 0x00000001 }, { 0x00000000, 0xcccd4cc9, 0xcccccccc, 0x00007ffd }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0x8000ff81, 0x7ffffffe, 0xffffff83 }, { 0x00000000, 0x00008080, 0x0000007f, 0xffff8001 }, { 0x00000000, 0x00017f7f, 0x00007fff, 0xffffff80 }, { 0x00000000, 0x00017ffd, 0x00007fff, 0x7ffffffe }, { 0x00000000, 0x5555d556, 0x55555555, 0xffff8001 }, { 0x00000000, 0x0000ff80, 0x00000000, 0xffffff80 }, { 0x00000000, 0x00008001, 0x00007fff, 0x00000002 }, { 0x00000000, 0x5555d558, 0x55555555, 0xffff8003 }, { 0x00000000, 0xffff8023, 0xffff8003, 0x00000020 }, { 0x00000000, 0x00008001, 0xffff8002, 0x7fffffff }, { 0x00000000, 0x55555555, 0x55555555, 0x00000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x80007fff, 0x80000001, 0x00007ffe }, { 0x00000000, 0xaaaaaaca, 0xaaaaaaaa, 0x00000020 }, { 0x00000000, 0x00000000, 0xfffffffe, 0x00000002 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00012aa9, 0x00007fff, 0xaaaaaaaa }, { 0x00000000, 0x00007f7d, 0xffffff80, 0x00007ffd }, { 0x00000000, 0x8000ff80, 0x80000000, 0xffffff80 }, { 0x00000000, 0x55565552, 0x55555555, 0xfffffffd }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0x00007f84, 0xffffff82, 0xffff8002 }, { 0x00000000, 0x80007ffe, 0x7ffffffe, 0xffff8000 }, { 0x00000000, 0x00007f83, 0xffff8003, 0xffffff80 }, { 0x00000000, 0x00010000, 0x00000020, 0xffffffe0 }, { 0x00000000, 0x00007fe1, 0xffff8001, 0xffffffe0 }, { 0x00000000, 0x00000002, 0xffff8000, 0xffff8002 }, { 0x00000000, 0x00010000, 0x00000002, 0x7ffffffe }, { 0x00000000, 0x00010000, 0x0000007f, 0xffffff81 }, { 0x00000000, 0x00010000, 0x00000001, 0x7fffffff }, { 0x00000000, 0x00003333, 0x00000000, 0x33333333 }, { 0x00000000, 0x0000cc4f, 0xffffff83, 0xcccccccc }, { 0x00000000, 0x0000801d, 0x00000020, 0x00007ffd }, { 0x00000000, 0xcccccccc, 0xcccccccc, 0x00000000 }, { 0x00000000, 0xffffffff, 0xffff8000, 0x00007fff }, { 0x00000000, 0xcccd4cca, 0xcccccccc, 0x00007ffe }, { 0x00000000, 0x0000fffb, 0xfffffffd, 0x7ffffffe }, { 0x00000000, 0xaaaaffff, 0xaaaaaaaa, 0x55555555 }, { 0x00000000, 0xaaabaa2b, 0xaaaaaaaa, 0xffffff81 }, { 0x00000000, 0x00007ffe, 0xfffffffe, 0xffff8000 }, { 0x00000000, 0x0000ffdd, 0xffffffe0, 0xfffffffd }, { 0x00000000, 0x33343330, 0x33333333, 0xfffffffd }, { 0x00000000, 0xffff8003, 0xffff8002, 0x80000001 }, { 0x00000000, 0x0000ff06, 0xffffff83, 0xffffff83 }, { 0x00000000, 0xffff8022, 0xffff8002, 0x00000020 }, { 0x00000000, 0x8000007e, 0x7fffffff, 0x0000007f }, { 0x00000000, 0xcccd4ccc, 0xcccccccc, 0xffff8000 }, { 0x00000000, 0x80007ffd, 0x7ffffffe, 0x00007fff }, { 0x00000000, 0x8000fffa, 0x7ffffffd, 0x7ffffffd }, { 0x00000000, 0x00007fff, 0xfffffffd, 0xffff8002 }, { 0x00000000, 0x00010001, 0x00000002, 0x7fffffff }, { 0x00000000, 0x0000001e, 0xfffffffe, 0x00000020 }, { 0x00000000, 0x0000807c, 0x0000007e, 0x00007ffe }, { 0x00000000, 0x00017ffa, 0x00007ffd, 0xfffffffd }, { 0x00000000, 0x00000081, 0x0000007f, 0x00000002 }, { 0x00000000, 0x8000fffd, 0x80000000, 0x7ffffffd }, { 0x00000000, 0x00008000, 0x00007fff, 0x80000001 }, { 0x00000000, 0x8000aaaa, 0x80000000, 0xaaaaaaaa }, { 0x00000000, 0xaaab2aab, 0xaaaaaaaa, 0xffff8001 }, { 0x00000000, 0x00007fe3, 0xffffffe0, 0xffff8003 }, { 0x00000000, 0x00007ffc, 0xffffffff, 0x00007ffd }, { 0x00000000, 0xffffff82, 0xffffff81, 0x00000001 }, { 0x00000000, 0xaaaaaaab, 0xaaaaaaaa, 0x80000001 }, { 0x00000000, 0x00000000, 0xffff8000, 0xffff8000 }, { 0x00000000, 0x00012aa7, 0x00007ffd, 0xaaaaaaaa }, { 0x00000000, 0x7ffffffe, 0x7ffffffe, 0x80000000 }, { 0x00000000, 0x00017f7f, 0x00007ffe, 0xffffff81 }, { 0x00000000, 0x0000807f, 0x0000007d, 0xffff8002 }, { 0x00000000, 0x0000ff83, 0x00000002, 0xffffff81 }, { 0x00000000, 0x0000fffa, 0xfffffffd, 0x7ffffffd }, { 0x00000000, 0x0000ffa0, 0x00000020, 0xffffff80 }, { 0x00000000, 0x8000ffdf, 0x7fffffff, 0xffffffe0 }, { 0x00000000, 0xffff8081, 0xffff8002, 0x0000007f }, { 0x00000000, 0x80008001, 0x7fffffff, 0xffff8002 }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000005e, 0xffffffe0, 0x0000007e }, { 0x00000000, 0x0001001e, 0x00000020, 0x7ffffffe }, { 0x00000000, 0x0000807f, 0x0000007f, 0xffff8000 }, { 0x00000000, 0x8000007e, 0x80000001, 0x0000007d }, { 0x00000000, 0x0000807c, 0x0000007f, 0x00007ffd }, { 0x00000000, 0x0000ff62, 0xffffffe0, 0xffffff82 }, { 0x00000000, 0x00008080, 0x0000007e, 0xffff8002 }, { 0x00000000, 0x555555d4, 0x55555555, 0x0000007f }, { 0x00000000, 0x8000fffd, 0x7fffffff, 0x7ffffffe }, { 0x00000000, 0x0000ff7e, 0xfffffffe, 0xffffff80 }, { 0x00000000, 0xffffb335, 0xffff8002, 0x33333333 }, { 0x00000000, 0x0000aaa7, 0xfffffffd, 0xaaaaaaaa }, { 0x00000000, 0x0000001d, 0xfffffffd, 0x00000020 }, { 0x00000000, 0x0000d553, 0x00007ffe, 0x55555555 }, { 0x00000000, 0x00000022, 0x00000020, 0x00000002 }, { 0x00000000, 0x00008000, 0xffff8002, 0xfffffffe }, { 0x00000000, 0x80008003, 0x80000001, 0xffff8002 }, { 0x00000000, 0x000033b1, 0x0000007e, 0x33333333 }, }; const Inputs <API key>[] = { { 0x00000000, 0xabababab, 0xabababab, 0x00000000 }, { 0x00000000, 0xabababac, 0xabababab, 0x00000001 }, { 0x00000000, 0xabababad, 0xabababab, 0x00000002 }, { 0x00000000, 0xabababcb, 0xabababab, 0x00000020 }, { 0x00000000, 0xababac28, 0xabababab, 0x0000007d }, { 0x00000000, 0xababac29, 0xabababab, 0x0000007e }, { 0x00000000, 0xababac2a, 0xabababab, 0x0000007f }, { 0x00000000, 0xabac2ba8, 0xabababab, 0x00007ffd }, { 0x00000000, 0xabac2ba9, 0xabababab, 0x00007ffe }, { 0x00000000, 0xabac2baa, 0xabababab, 0x00007fff }, { 0x00000000, 0xababdede, 0xabababab, 0x33333333 }, { 0x00000000, 0xabac0100, 0xabababab, 0x55555555 }, { 0x00000000, 0xabacaba8, 0xabababab, 0x7ffffffd }, { 0x00000000, 0xabacaba9, 0xabababab, 0x7ffffffe }, { 0x00000000, 0xabacabaa, 0xabababab, 0x7fffffff }, { 0x00000000, 0xabababab, 0xabababab, 0x80000000 }, { 0x00000000, 0xabababac, 0xabababab, 0x80000001 }, { 0x00000000, 0xabac5655, 0xabababab, 0xaaaaaaaa }, { 0x00000000, 0xabac7877, 0xabababab, 0xcccccccc }, { 0x00000000, 0xabac2bab, 0xabababab, 0xffff8000 }, { 0x00000000, 0xabac2bac, 0xabababab, 0xffff8001 }, { 0x00000000, 0xabac2bad, 0xabababab, 0xffff8002 }, { 0x00000000, 0xabac2bae, 0xabababab, 0xffff8003 }, { 0x00000000, 0xabacab2b, 0xabababab, 0xffffff80 }, { 0x00000000, 0xabacab2c, 0xabababab, 0xffffff81 }, { 0x00000000, 0xabacab2d, 0xabababab, 0xffffff82 }, { 0x00000000, 0xabacab2e, 0xabababab, 0xffffff83 }, { 0x00000000, 0xabacab8b, 0xabababab, 0xffffffe0 }, { 0x00000000, 0xabacaba8, 0xabababab, 0xfffffffd }, { 0x00000000, 0xabacaba9, 0xabababab, 0xfffffffe }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffffff }, }; const Inputs <API key>[] = { { 0x00000000, 0xabababab, 0xabababab, 0x00000000 }, { 0x00000000, 0xabababab, 0xabababab, 0x00000001 }, { 0x00000000, 0xabababab, 0xabababab, 0x00000002 }, { 0x00000000, 0xabababab, 0xabababab, 0x00000020 }, { 0x00000000, 0xabababab, 0xabababab, 0x0000007d }, { 0x00000000, 0xabababab, 0xabababab, 0x0000007e }, { 0x00000000, 0xabababab, 0xabababab, 0x0000007f }, { 0x00000000, 0xababac2a, 0xabababab, 0x00007ffd }, { 0x00000000, 0xababac2a, 0xabababab, 0x00007ffe }, { 0x00000000, 0xababac2a, 0xabababab, 0x00007fff }, { 0x00000000, 0xababdede, 0xabababab, 0x33333333 }, { 0x00000000, 0xabac0100, 0xabababab, 0x55555555 }, { 0x00000000, 0xabacabaa, 0xabababab, 0x7ffffffd }, { 0x00000000, 0xabacabaa, 0xabababab, 0x7ffffffe }, { 0x00000000, 0xabacabaa, 0xabababab, 0x7fffffff }, { 0x00000000, 0xabababab, 0xabababab, 0x80000000 }, { 0x00000000, 0xabababab, 0xabababab, 0x80000001 }, { 0x00000000, 0xabac5655, 0xabababab, 0xaaaaaaaa }, { 0x00000000, 0xabac7877, 0xabababab, 0xcccccccc }, { 0x00000000, 0xabacab2b, 0xabababab, 0xffff8000 }, { 0x00000000, 0xabacab2b, 0xabababab, 0xffff8001 }, { 0x00000000, 0xabacab2b, 0xabababab, 0xffff8002 }, { 0x00000000, 0xabacab2b, 0xabababab, 0xffff8003 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff80 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff81 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff82 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff83 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffffe0 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xfffffffd }, { 0x00000000, 0xabacabaa, 0xabababab, 0xfffffffe }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffffff }, }; const Inputs <API key>[] = { { 0x00000000, 0xabababab, 0xabababab, 0x00000000 }, { 0x00000000, 0xabababab, 0xabababab, 0x00000001 }, { 0x00000000, 0xabababab, 0xabababab, 0x00000002 }, { 0x00000000, 0xabababab, 0xabababab, 0x00000020 }, { 0x00000000, 0xabababab, 0xabababab, 0x0000007d }, { 0x00000000, 0xabababab, 0xabababab, 0x0000007e }, { 0x00000000, 0xabababab, 0xabababab, 0x0000007f }, { 0x00000000, 0xabababab, 0xabababab, 0x00007ffd }, { 0x00000000, 0xabababab, 0xabababab, 0x00007ffe }, { 0x00000000, 0xabababab, 0xabababab, 0x00007fff }, { 0x00000000, 0xababdede, 0xabababab, 0x33333333 }, { 0x00000000, 0xabac0100, 0xabababab, 0x55555555 }, { 0x00000000, 0xabac2baa, 0xabababab, 0x7ffffffd }, { 0x00000000, 0xabac2baa, 0xabababab, 0x7ffffffe }, { 0x00000000, 0xabac2baa, 0xabababab, 0x7fffffff }, { 0x00000000, 0xabac2bab, 0xabababab, 0x80000000 }, { 0x00000000, 0xabac2bab, 0xabababab, 0x80000001 }, { 0x00000000, 0xabac5655, 0xabababab, 0xaaaaaaaa }, { 0x00000000, 0xabac7877, 0xabababab, 0xcccccccc }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffff8000 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffff8001 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffff8002 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffff8003 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff80 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff81 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff82 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffff83 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffffe0 }, { 0x00000000, 0xabacabaa, 0xabababab, 0xfffffffd }, { 0x00000000, 0xabacabaa, 0xabababab, 0xfffffffe }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffffff }, }; const Inputs <API key>[] = { { 0x00000000, 0xabababab, 0xabababab, 0x00000000 }, { 0x00000000, 0xababacab, 0xabababab, 0x00000001 }, { 0x00000000, 0xababadab, 0xabababab, 0x00000002 }, { 0x00000000, 0xababcbab, 0xabababab, 0x00000020 }, { 0x00000000, 0xabac28ab, 0xabababab, 0x0000007d }, { 0x00000000, 0xabac29ab, 0xabababab, 0x0000007e }, { 0x00000000, 0xabac2aab, 0xabababab, 0x0000007f }, { 0x00000000, 0xabaca8ab, 0xabababab, 0x00007ffd }, { 0x00000000, 0xabaca9ab, 0xabababab, 0x00007ffe }, { 0x00000000, 0xabacaaab, 0xabababab, 0x00007fff }, { 0x00000000, 0xababdede, 0xabababab, 0x33333333 }, { 0x00000000, 0xabac0100, 0xabababab, 0x55555555 }, { 0x00000000, 0xabaca92a, 0xabababab, 0x7ffffffd }, { 0x00000000, 0xabacaa2a, 0xabababab, 0x7ffffffe }, { 0x00000000, 0xabacab2a, 0xabababab, 0x7fffffff }, { 0x00000000, 0xababac2b, 0xabababab, 0x80000000 }, { 0x00000000, 0xababad2b, 0xabababab, 0x80000001 }, { 0x00000000, 0xabac5655, 0xabababab, 0xaaaaaaaa }, { 0x00000000, 0xabac7877, 0xabababab, 0xcccccccc }, { 0x00000000, 0xababacaa, 0xabababab, 0xffff8000 }, { 0x00000000, 0xababadaa, 0xabababab, 0xffff8001 }, { 0x00000000, 0xababaeaa, 0xabababab, 0xffff8002 }, { 0x00000000, 0xababafaa, 0xabababab, 0xffff8003 }, { 0x00000000, 0xabac2caa, 0xabababab, 0xffffff80 }, { 0x00000000, 0xabac2daa, 0xabababab, 0xffffff81 }, { 0x00000000, 0xabac2eaa, 0xabababab, 0xffffff82 }, { 0x00000000, 0xabac2faa, 0xabababab, 0xffffff83 }, { 0x00000000, 0xabac8caa, 0xabababab, 0xffffffe0 }, { 0x00000000, 0xabaca9aa, 0xabababab, 0xfffffffd }, { 0x00000000, 0xabacaaaa, 0xabababab, 0xfffffffe }, { 0x00000000, 0xabacabaa, 0xabababab, 0xffffffff }, }; const TestResult kReferenceUxtah[] = { { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, { ARRAY_SIZE(<API key>), <API key>, }, }; #endif // <API key>
package com.serotonin.mango.view.component; /** * Type of a line for EnhancedPoint. * * @author Jacek Rogoznicki */ public enum <API key> { LINE, SPLINE; }
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading; using System.Threading.Tasks; using CommonIO; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Logging; using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.Serialization; namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp { public class SatIpHost : BaseTunerHost, ITunerHost { private readonly IFileSystem _fileSystem; private readonly IHttpClient _httpClient; public SatIpHost(<API key> config, ILogger logger, IJsonSerializer jsonSerializer, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IHttpClient httpClient) : base(config, logger, jsonSerializer, mediaEncoder) { _fileSystem = fileSystem; _httpClient = httpClient; } private const string ChannelIdPrefix = "sat_"; protected override async Task<IEnumerable<ChannelInfo>> GetChannelsInternal(TunerHostInfo tuner, Cancellation<API key>) { if (!string.IsNullOrWhiteSpace(tuner.M3UUrl)) { return await new M3uParser(Logger, _fileSystem, _httpClient).Parse(tuner.M3UUrl, ChannelIdPrefix, tuner.Id, cancellationToken).ConfigureAwait(false); } var channels = await new ChannelScan(Logger).Scan(tuner, cancellationToken).ConfigureAwait(false); return channels; } public static string DeviceType { get { return "satip"; } } public override string Type { get { return DeviceType; } } protected override async Task<List<MediaSourceInfo>> <API key>(TunerHostInfo tuner, string channelId, Cancellation<API key>) { var urlHash = tuner.Url.GetMD5().ToString("N"); var prefix = ChannelIdPrefix + urlHash; if (!channelId.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) { return null; } var channels = await GetChannels(tuner, true, cancellationToken).ConfigureAwait(false); var m3uchannels = channels.Cast<M3UChannel>(); var channel = m3uchannels.FirstOrDefault(c => string.Equals(c.Id, channelId, StringComparison.OrdinalIgnoreCase)); if (channel != null) { var path = channel.Path; MediaProtocol protocol = MediaProtocol.File; if (path.StartsWith("http", StringComparison.OrdinalIgnoreCase)) { protocol = MediaProtocol.Http; } else if (path.StartsWith("rtmp", StringComparison.OrdinalIgnoreCase)) { protocol = MediaProtocol.Rtmp; } else if (path.StartsWith("rtsp", StringComparison.OrdinalIgnoreCase)) { protocol = MediaProtocol.Rtsp; } var mediaSource = new MediaSourceInfo { Path = channel.Path, Protocol = protocol, MediaStreams = new List<MediaStream> { new MediaStream { Type = MediaStreamType.Video, // Set the index to -1 because we don't know the exact index of the video stream within the container Index = -1, IsInterlaced = true }, new MediaStream { Type = MediaStreamType.Audio, // Set the index to -1 because we don't know the exact index of the audio stream within the container Index = -1 } }, RequiresOpening = false, RequiresClosing = false }; return new List<MediaSourceInfo> { mediaSource }; } return new List<MediaSourceInfo>(); } protected override async Task<MediaSourceInfo> GetChannelStream(TunerHostInfo tuner, string channelId, string streamId, Cancellation<API key>) { var sources = await <API key>(tuner, channelId, cancellationToken).ConfigureAwait(false); return sources.First(); } protected override async Task<bool> IsAvailableInternal(TunerHostInfo tuner, string channelId, Cancellation<API key>) { var updatedInfo = await SatIpDiscovery.Current.GetInfo(tuner.InfoUrl, cancellationToken).ConfigureAwait(false); return updatedInfo.TunersAvailable > 0; } protected override bool IsValidChannelId(string channelId) { return channelId.StartsWith(ChannelIdPrefix, StringComparison.OrdinalIgnoreCase); } public string Name { get { return "Sat IP"; } } public Task<List<LiveTvTunerInfo>> GetTunerInfos(Cancellation<API key>) { var list = GetTunerHosts() .SelectMany(i => GetTunerInfos(i, cancellationToken)) .ToList(); return Task.FromResult(list); } public List<LiveTvTunerInfo> GetTunerInfos(TunerHostInfo info, Cancellation<API key>) { var list = new List<LiveTvTunerInfo>(); for (var i = 0; i < info.Tuners; i++) { list.Add(new LiveTvTunerInfo { Name = info.FriendlyName ?? Name, SourceType = Type, Status = LiveTvTunerStatus.Available, Id = info.Url.GetMD5().ToString("N") + i.ToString(CultureInfo.InvariantCulture), Url = info.Url }); } return list; } public string ApplyDuration(string streamPath, TimeSpan duration) { return streamPath; } } }
/* ** get_option.c for corewar in /home/pirou_g/corewar/lib_src ** ** Made by Guillaume Pirou ** Login <pirou_g@epitech.net> ** ** Started on Sun Apr 12 17:36:51 2015 Guillaume Pirou ** Last update Sun Apr 12 17:36:52 2015 Guillaume Pirou */ #include <stdlib.h> #include <stdarg.h> #include "my_printf.h" int get_flags(const char *fmt, t_data *data) { if (fmt == NULL || data == NULL) return (-1); data->flag = (char)fmt[0]; return (1); } int get_width(const char *fmt, t_data *data, va_list *list) { if (fmt == NULL || data == NULL) return (-1); if (fmt[0] > '0' && fmt[0] <= '9') { data->width = my_absatoi(fmt); return (my_nbchiff(data->width, 10)); } else if (fmt[0] == '*') { if (list == NULL) return (-1); data->width = va_arg(*list, int); return (my_nbchiff(data->width, 10)); } return (-1); } int get_precision(const char *fmt, t_data *data, va_list *list) { if (fmt == NULL || data == NULL) return (-1); if (fmt[0] != '.') return (-1); if (fmt[1] >= '0' && fmt[1] <= '9') { data->precision = my_absatoi(fmt + 1); } else if (fmt[1] == '*') { if (list == NULL) return (-1); data->precision = va_arg(*list, int); return (my_nbchiff(data->precision, 10)); } return (-1); } int get_specifier(char c, t_data *data) { if (data == NULL) return (0); if (is_specifier(c)) { data->specifier = c; return (1); } return (0); }
/** * Wrapper class to read document data as a plain text string. * @class * @extends unicodeJS.TextString * @constructor * @param {Array} data Document data */ ve.dm.DataString = function VeDmDataString( data ) { this.data = data; }; /* Inheritance */ OO.inheritClass( ve.dm.DataString, unicodeJS.TextString ); /** * Reads the character from the specified position in the data. * @param {number} position Position in data to read from * @returns {string|null} Character at position, or null if not text */ ve.dm.DataString.prototype.read = function ( position ) { var dataAt = this.data[position]; // check data is present at position and is not an element if ( dataAt !== undefined && dataAt.type === undefined ) { return typeof dataAt === 'string' ? dataAt : dataAt[0]; } else { return null; } };
#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellScript.h" #include "Cell.h" #include "CellImpl.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "ulduar.h" enum FreyaYells { // Freya SAY_AGGRO = -1603180, <API key> = -1603181, SAY_SLAY_1 = -1603182, SAY_SLAY_2 = -1603183, SAY_DEATH = -1603184, SAY_BERSERK = -1603185, <API key> = -1603186, SAY_SUMMON_TRIO = -1603187, SAY_SUMMON_LASHERS = -1603188, SAY_YS_HELP = -1603189, // Elder Brightleaf <API key> = -1603190, <API key> = -1603191, <API key> = -1603192, <API key> = -1603193, // Elder Ironbranch <API key> = -1603194, <API key> = -1603195, <API key> = -1603196, <API key> = -1603197, // Elder Stonebark SAY_STONEBARK_AGGRO = -1603198, <API key> = -1603199, <API key> = -1603200, SAY_STONEBARK_DEATH = -1603201, }; enum FreyaSpells { // Freya <API key> = 62519, <API key> = 62528, SPELL_SUNBEAM = 62623, SPELL_ENRAGE = 47008, <API key> = 62437, SPELL_ROOTS_FREYA = 62283, <API key> = 62483, <API key> = 62484, <API key> = 62485, <API key> = 62467, <API key> = 62572, // Stonebark <API key> = 62344, SPELL_GROUND_TREMOR = 62325, <API key> = 62337, <API key> = 62379, // Ironbranch SPELL_IMPALE = 62310, <API key> = 62438, SPELL_THORN_SWARM = 62285, // Brightleaf SPELL_FLUX_AURA = 62239, SPELL_FLUX = 62262, SPELL_FLUX_PLUS = 62251, SPELL_FLUX_MINUS = 62252, SPELL_SOLAR_FLARE = 62240, <API key> = 62207, // Trigger 62221 // Stack Removing of Attuned to Nature <API key> = 62521, <API key> = 62525, SPELL_REMOVE_2STACK = 62524, // Achievement spells <API key> = 65015, <API key> = 65074, // Wave summoning spells <API key> = 62687, SPELL_SUMMON_TRIO = 62686, <API key> = 62685, // Detonating Lasher SPELL_DETONATE = 62598, SPELL_FLAME_LASH = 62608, // Ancient Water Spirit SPELL_TIDAL_WAVE = 62653, <API key> = 62654, // Storm Lasher <API key> = 62648, SPELL_STORMBOLT = 62649, // Snaplasher SPELL_HARDENED_BARK = 62664, SPELL_BARK_AURA = 62663, // Ancient Conservator <API key> = 62532, SPELL_NATURE_FURY = 62589, <API key> = 62566, <API key> = 62582, // Not used, triggered by <API key> <API key> = 62591, <API key> = 62592, <API key> = 62593, // Healthly Spore <API key> = 62538, SPELL_GROW = 62559, <API key> = 62541, // Eonar's Gift <API key> = 62584, SPELL_PHEROMONES = 62619, SPELL_EONAR_VISUAL = 62579, // Nature Bomb SPELL_NATURE_BOMB = 64587, SPELL_OBJECT_BOMB = 64600, <API key> = 64606, // Unstable Sun Beam <API key> = 62211, <API key> = 62217, <API key> = 62209, <API key> = 62243, <API key> = 62450, // Or maybe 62866? // Sun Beam <API key> = 62451, <API key> = 62216, // Attuned To Nature spells <API key> = 62524, <API key> = 62525, <API key> = 62521, }; enum FreyaNpcs { NPC_SUN_BEAM = 33170, <API key> = 32918, <API key> = 33203, <API key> = 33202, NPC_STORM_LASHER = 32919, NPC_SNAPLASHER = 32916, NPC_NATURE_BOMB = 34129, NPC_EONARS_GIFT = 33228, NPC_HEALTHY_SPORE = 33215, <API key> = 33050, NPC_IRON_ROOTS = 33088, <API key> = 33168, OBJECT_NATURE_BOMB = 194902, }; enum FreyaActions { ACTION_ELDER_DEATH = 1, <API key> = 2, }; enum FreyaEvents { // Freya EVENT_WAVE = 1, EVENT_EONAR_GIFT = 2, EVENT_NATURE_BOMB = 3, <API key> = 4, <API key> = 5, EVENT_GROUND_TREMOR = 6, EVENT_SUNBEAM = 7, EVENT_ENRAGE = 8, // Elder Stonebark EVENT_TREMOR = 9, EVENT_BARK = 10, EVENT_FISTS = 11, // Elder Ironbranch EVENT_IMPALE = 12, EVENT_IRON_ROOTS = 13, EVENT_THORN_SWARM = 14, // Elder Brightleaf EVENT_SOLAR_FLARE = 15, <API key> = 16, EVENT_FLUX = 17, }; #define WAVE_TIME 60000 // Normal wave is one minute #define TIME_DIFFERENCE 10000 // If difference between waveTime and WAVE_TIME is bigger then TIME_DIFFERENCE, schedule EVENT_WAVE in 10 seconds #define <API key> 1 #define DATA_KNOCK_ON_WOOD 2 class npc_iron_roots : public CreatureScript { public: npc_iron_roots() : CreatureScript("npc_iron_roots") { } struct npc_iron_rootsAI : public <API key> { npc_iron_rootsAI(Creature* creature) : <API key>(creature) { me->ApplySpellImmune(0, IMMUNITY_EFFECT, <API key>, true); me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip me->setFaction(14); me->SetReactState(REACT_PASSIVE); summonerGUID = 0; } void IsSummonedBy(Unit* summoner) { if (summoner->GetTypeId() != TYPEID_PLAYER) return; // Summoner is a player, who should have root aura on self summonerGUID = summoner->GetGUID(); me->SetFacingToObject(summoner); me->SetInCombatWith(summoner); } void JustDied(Unit* /*who*/) { if (Player* target = ObjectAccessor::GetPlayer(*me, summonerGUID)) { target-><API key>(<API key>); target-><API key>(SPELL_ROOTS_FREYA); } me->RemoveCorpse(false); } private: uint64 summonerGUID; }; CreatureAI* GetAI(Creature* creature) const { return new npc_iron_rootsAI(creature); } }; class boss_freya : public CreatureScript { public: boss_freya() : CreatureScript("boss_freya") { } struct boss_freyaAI : public BossAI { boss_freyaAI(Creature* creature) : BossAI(creature, BOSS_FREYA) { } uint64 ElementalGUID[3][2]; uint32 deforestation[6][2]; uint32 elementalTimer[2]; uint32 diffTimer; uint8 trioWaveCount; uint8 trioWaveController; uint8 waveCount; uint8 elderCount; uint8 attunedToNature; bool checkElementalAlive[2]; bool trioDefeated[2]; bool random[3]; void Reset() { _Reset(); summons.clear(); trioWaveCount = 0; trioWaveController = 0; waveCount = 0; elderCount = 0; for (uint8 i = 0; i < 3; ++i) for (uint8 n = 0; n < 2; ++n) ElementalGUID[i][n] = 0; for (uint8 i = 0; i < 6; ++i) for (uint8 n = 0; n < 2; ++n) deforestation[i][n] = 0; for (uint8 n = 0; n < 2; ++n) { checkElementalAlive[n] = true; trioDefeated[n] = false; } for (uint8 n = 0; n < 3; ++n) random[n] = false; } void KilledUnit(Unit* /*who*/) { DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } void DamageTaken(Unit* who, uint32& damage) { if (damage >= me->GetHealth()) { damage = 0; JustDied(who); instance->SetBossState(BOSS_FREYA, DONE); } } void EnterCombat(Unit* who) { _EnterCombat(); DoZoneInCombat(); Creature* Elder[3]; for (uint8 n = 0; n < 3; ++n) { Elder[n] = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF + n)); if (Elder[n] && Elder[n]->isAlive()) { me->AddAura(<API key>, Elder[n]); Elder[n]->CastSpell(me, <API key>, true); Elder[n]->RemoveLootMode(LOOT_MODE_DEFAULT); //! Why? Elder[n]->AI()->AttackStart(who); Elder[n]->AddThreat(who, 250.0f); Elder[n]->SetInCombatWith(who); ++elderCount; } } if (Elder[0] && Elder[0]->isAlive()) { Elder[0]->CastSpell(me, <API key>, true); events.ScheduleEvent(<API key>, urand(10000, 20000)); } if (Elder[1] && Elder[1]->isAlive()) { Elder[1]->CastSpell(me, <API key>, true); events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(10000, 20000)); } if (Elder[2] && Elder[2]->isAlive()) { Elder[2]->CastSpell(me, <API key>, true); events.ScheduleEvent(<API key>, urand(10000, 20000)); } if (elderCount == 0) DoScriptText(SAY_AGGRO, me); else DoScriptText(<API key>, me); me->CastCustomSpell(<API key>, <API key>, 150, me, true); events.ScheduleEvent(EVENT_WAVE, 10000); events.ScheduleEvent(EVENT_EONAR_GIFT, 25000); events.ScheduleEvent(EVENT_ENRAGE, 600000); events.ScheduleEvent(EVENT_SUNBEAM, urand(5000, 15000)); } uint32 GetData(uint32 type) { switch (type) { case <API key>: return attunedToNature; case DATA_KNOCK_ON_WOOD: return elderCount; } return 0; } void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; events.Update(diff); if (me->HasUnitState(UNIT_STAT_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_ENRAGE: DoScriptText(SAY_BERSERK, me); DoCast(me, SPELL_ENRAGE); break; case EVENT_SUNBEAM: if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true)) DoCast(target, SPELL_SUNBEAM); events.ScheduleEvent(EVENT_SUNBEAM, urand(10000, 15000)); break; case EVENT_NATURE_BOMB: { // On every player std::list<Player*> PlayerList; Trinity::<API key> checker(me, 50.0f); Trinity::PlayerListSearcher<Trinity::<API key>> searcher(me, PlayerList, checker); me-><API key>(50.0f, searcher); for (std::list<Player*>::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) (*itr)->CastSpell(*itr, <API key>, true); events.ScheduleEvent(EVENT_NATURE_BOMB, urand(10000, 12000)); break; } case <API key>: if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true)) DoCast(target, <API key>, true); events.ScheduleEvent(<API key>, urand(15000, 20000)); break; case EVENT_WAVE: SpawnWave(); if (waveCount < 6) events.ScheduleEvent(EVENT_WAVE, WAVE_TIME); else events.ScheduleEvent(EVENT_NATURE_BOMB, urand(10000, 20000)); break; case EVENT_EONAR_GIFT: DoCast(me, <API key>); events.ScheduleEvent(EVENT_EONAR_GIFT, urand(40000, 50000)); break; case <API key>: if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true, -SPELL_ROOTS_FREYA)) target->CastSpell(target, SPELL_ROOTS_FREYA, true); // This must be casted by Target self events.ScheduleEvent(<API key>, urand(12000, 20000)); break; case EVENT_GROUND_TREMOR: DoCastAOE(<API key>); events.ScheduleEvent(EVENT_GROUND_TREMOR, urand(25000, 28000)); break; } } if (!me->HasAura(<API key>)) me->CastSpell(me, <API key>, true); // For achievement check if (Aura* aura = me->GetAura(<API key>)) attunedToNature = aura->GetStackAmount(); else attunedToNature = 0; diffTimer += diff; // For getting time difference for Deforestation achievement // Elementals must be killed within 12 seconds of each other, or they will all revive and heal Creature* Elemental[3][2]; for (uint8 i = 0; i < 2; ++i) { if (checkElementalAlive[i]) elementalTimer[i] = 0; else { elementalTimer[i] += diff; for (uint8 k = 0; k < 3; ++k) Elemental[k][i] = ObjectAccessor::GetCreature(*me, ElementalGUID[k][i]); if (elementalTimer[i] > 12000) { if (!trioDefeated[i]) // Do *NOT* merge this bool with bool few lines below! { if (Elemental[0][i] && Elemental[1][i] && Elemental[2][i]) { for (uint8 n = 0; n < 3; ++n) { if (Elemental[n][i]->isAlive()) Elemental[n][i]->SetHealth(Elemental[n][i]->GetMaxHealth()); else Elemental[n][i]->Respawn(); } } } checkElementalAlive[i] = true; } else { if (!trioDefeated[i]) { if (Elemental[0][i] && Elemental[1][i] && Elemental[2][i]) { if (Elemental[0][i]->isDead() && Elemental[1][i]->isDead() && Elemental[2][i]->isDead()) { for (uint8 n = 0; n < 3; ++n) { summons.remove(Elemental[n][i]->GetGUID()); Elemental[n][i]->ForcedDespawn(5000); trioDefeated[i] = true; Elemental[n][i]->CastSpell(me, <API key>, true); } } } } } } } <API key>(); } // Check if all Trio NPCs are dead - achievement check void LasherDead(uint32 type) // Type must be in format of a binary mask { uint8 n = 0; // Handling received data for (uint8 i = 0; i < 5; ++i) // We have created "instances" for keeping informations about last 6 death lashers - needed because of respawning { deforestation[i][0] = deforestation[(i + 1)][0]; // Time deforestation[i][1] = deforestation[(i + 1)][1]; // Type } deforestation[5][0] = diffTimer; deforestation[5][1] = type; // Check for achievement completion if (deforestation[0][1]) // Check for proper functionality of binary masks (overflow would not be problem) { for (uint8 i = 0; i < 6; ++i) // Count binary mask { n += deforestation[i][1]; } if ((deforestation[5][0] - deforestation[0][0]) < 10000) // Time check { if (n == 14 && instance) // Binary mask check - verification of lasher types { instance-><API key>(<API key>); } } } } // Random order of spawning waves int GetWaveId() { if (random[0] && random[1] && random[2]) for (uint8 n = 0; n < 3; ++n) random[n] = false; uint8 randomId = urand(0, 2); while (random[randomId]) randomId = urand(0, 2); random[randomId] = true; return randomId; } void SpawnWave() { switch (GetWaveId()) { case 0: DoScriptText(SAY_SUMMON_LASHERS, me); for (uint8 n = 0; n < 10; ++n) DoCast(<API key>); break; case 1: DoScriptText(SAY_SUMMON_TRIO, me); DoCast(SPELL_SUMMON_TRIO); trioWaveCount++; break; case 2: DoScriptText(<API key>, me); DoCast(<API key>); break; } waveCount++; } void JustDied(Unit* /*who*/) { //! Freya's chest is dynamically spawned on death by different spells. const uint32 summonSpell[2][4] = { /* 0Elder, 1Elder, 2Elder, 3Elder */ /* 10N */ {62950, 62953, 62955, 62957}, /* 25N */ {62952, 62954, 62956, 62958} }; me->CastSpell((Unit*)NULL, summonSpell[me->GetMap()->GetDifficulty()][elderCount], true); DoScriptText(SAY_DEATH, me); me->SetReactState(REACT_PASSIVE); _JustDied(); me->RemoveAllAuras(); me->AttackStop(); me->setFaction(35); me->DeleteThreatList(); me->CombatStop(true); me->DespawnOrUnsummon(7500); me->CastSpell(me, <API key>, true); Creature* Elder[3]; for (uint8 n = 0; n < 3; ++n) { Elder[n] = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF + n)); if (Elder[n] && Elder[n]->isAlive()) { Elder[n]->RemoveAllAuras(); Elder[n]->AttackStop(); Elder[n]->CombatStop(true); Elder[n]->DeleteThreatList(); Elder[n]->GetAI()->DoAction(<API key>); } } } void JustSummoned(Creature* summoned) { switch (summoned->GetEntry()) { case NPC_SNAPLASHER: case <API key>: case NPC_STORM_LASHER: ElementalGUID[trioWaveController][trioWaveCount] = summoned->GetGUID(); summons.push_back(summoned->GetGUID()); ++trioWaveController; if (trioWaveController > 2) trioWaveController = 0; break; case <API key>: case <API key>: default: summons.push_back(summoned->GetGUID()); break; } // Need to have it there, or summoned units would do nothing untill attacked if (Unit* target = SelectTarget(<API key>, 0, 250.0f, true)) { summoned->AI()->AttackStart(target); summoned->AddThreat(target, 250.0f); DoZoneInCombat(summoned); } } void <API key>(Creature* summoned, Unit* who) { switch (summoned->GetEntry()) { case <API key>: summoned->CastSpell(me, SPELL_REMOVE_2STACK, true); summoned->CastSpell(who, SPELL_DETONATE, true); summoned->ForcedDespawn(5000); summons.remove(summoned->GetGUID()); break; case <API key>: summoned->CastSpell(me, <API key>, true); summoned->ForcedDespawn(5000); summons.remove(summoned->GetGUID()); break; } } }; CreatureAI* GetAI(Creature* creature) const { return GetUlduarAI<boss_freyaAI>(creature); } }; class <API key> : public CreatureScript { public: <API key>() : CreatureScript("<API key>") { } struct <API key> : public BossAI { <API key>(Creature* creature) : BossAI(creature, BOSS_BRIGHTLEAF) { } void Reset() { _Reset(); if (me->HasAura(<API key>)) me-><API key>(<API key>); events.ScheduleEvent(EVENT_SOLAR_FLARE, urand(5000, 7000)); events.ScheduleEvent(<API key>, urand(7000, 12000)); events.ScheduleEvent(EVENT_FLUX, 5000); elderCount = 0; lumberjack = false; } void KilledUnit(Unit* /*who*/) { DoScriptText(RAND(<API key>, <API key>), me); } void JustDied(Unit* who) { _JustDied(); DoScriptText(<API key>, me); if (who && who->GetTypeId() == TYPEID_PLAYER) { if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH))) Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH); if (Creature* Stonebark = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STONEBARK))) Stonebark->AI()->DoAction(ACTION_ELDER_DEATH); } } void EnterCombat(Unit* /*who*/) { _EnterCombat(); if (!me->HasAura(<API key>)) DoScriptText(<API key>, me); } void UpdateAI(uint32 const diff) { if (!UpdateVictim() || me->HasAura(<API key>)) return; events.Update(diff); if (me->HasUnitState(UNIT_STAT_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case <API key>: me->CastSpell(me, <API key>, true); events.ScheduleEvent(<API key>, urand(10000, 15000)); break; case EVENT_SOLAR_FLARE: { uint8 stackAmount = 0; if (me->GetAura(SPELL_FLUX_AURA)) stackAmount = me->GetAura(SPELL_FLUX_AURA)->GetStackAmount(); me->CastCustomSpell(SPELL_SOLAR_FLARE, <API key>, stackAmount, me, false); events.ScheduleEvent(EVENT_SOLAR_FLARE, urand(5000, 10000)); break; } case EVENT_FLUX: me-><API key>(SPELL_FLUX_AURA); me->AddAura(SPELL_FLUX_AURA, me); if (Aura* Flux = me->GetAura(SPELL_FLUX_AURA)) Flux->SetStackAmount(urand(1, 8)); events.ScheduleEvent(EVENT_FLUX, 7500); break; } } if (lumberjack) lumberjackTimer += diff; <API key>(); } void DoAction(int32 const action) { switch (action) { case ACTION_ELDER_DEATH: ++elderCount; lumberjack = true; break; case <API key>: me->DespawnOrUnsummon(10000); _JustDied(); break; } } private: uint32 lumberjackTimer; uint8 elderCount; bool lumberjack; }; CreatureAI* GetAI(Creature* creature) const { return GetUlduarAI<<API key>>(creature); } }; class <API key> : public CreatureScript { public: <API key>() : CreatureScript("<API key>") { } struct <API key> : public BossAI { <API key>(Creature* creature) : BossAI(creature, BOSS_STONEBARK) { } void Reset() { _Reset(); if (me->HasAura(<API key>)) me-><API key>(<API key>); events.ScheduleEvent(EVENT_TREMOR, urand(10000, 12000)); events.ScheduleEvent(EVENT_FISTS, urand(25000, 35000)); events.ScheduleEvent(EVENT_BARK, urand(37500, 40000)); elderCount = 0; lumberjack = false; } void KilledUnit(Unit* /*who*/) { DoScriptText(RAND(<API key>, <API key>), me); } void JustDied(Unit* who) { _JustDied(); DoScriptText(SAY_STONEBARK_DEATH, me); if (who && who->GetTypeId() == TYPEID_PLAYER) { if (Creature* Ironbranch = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_IRONBRANCH))) Ironbranch->AI()->DoAction(ACTION_ELDER_DEATH); if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF))) Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH); } } void EnterCombat(Unit* /*who*/) { _EnterCombat(); if (!me->HasAura(<API key>)) DoScriptText(SAY_STONEBARK_AGGRO, me); } void DamageTaken(Unit* who, uint32& damage) { if (who == me) return; if (me->HasAura(<API key>)) { int32 reflect = damage; who->CastCustomSpell(who, <API key>, &reflect, NULL, NULL, true); damage = 0; } } void UpdateAI(uint32 const diff) { if (!UpdateVictim() || me->HasAura(<API key>)) return; events.Update(diff); if (me->HasUnitState(UNIT_STAT_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_BARK: DoCast(me, <API key>); events.ScheduleEvent(EVENT_BARK, urand(30000, 50000)); break; case EVENT_FISTS: DoCastVictim(<API key>); events.ScheduleEvent(EVENT_FISTS, urand(20000, 30000)); break; case EVENT_TREMOR: if (!me->HasAura(<API key>)) DoCastVictim(SPELL_GROUND_TREMOR); events.ScheduleEvent(EVENT_TREMOR, urand(10000, 20000)); break; } } if (lumberjack) lumberjackTimer += diff; <API key>(); } void DoAction(int32 const action) { switch (action) { case ACTION_ELDER_DEATH: ++elderCount; lumberjack = true; break; case <API key>: me->DespawnOrUnsummon(10000); _JustDied(); break; } } private: uint32 lumberjackTimer; uint8 elderCount; bool lumberjack; }; CreatureAI* GetAI(Creature* creature) const { return GetUlduarAI<<API key>>(creature); } }; class <API key> : public CreatureScript { public: <API key>() : CreatureScript("<API key>") { } struct <API key> : public BossAI { <API key>(Creature* creature) : BossAI(creature, BOSS_IRONBRANCH) { } void Reset() { _Reset(); if (me->HasAura(<API key>)) me-><API key>(<API key>); events.ScheduleEvent(EVENT_IMPALE, urand(18000, 22000)); events.ScheduleEvent(EVENT_IRON_ROOTS, urand(12000, 17000)); events.ScheduleEvent(EVENT_THORN_SWARM, urand(7500, 12500)); elderCount = 0; lumberjack = false; } void KilledUnit(Unit* /*who*/) { DoScriptText(RAND(<API key>, <API key>), me); } void JustDied(Unit* who) { _JustDied(); DoScriptText(<API key>, me); if (who && who->GetTypeId() == TYPEID_PLAYER) { if (Creature* Brightleaf = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_BRIGHTLEAF))) Brightleaf->AI()->DoAction(ACTION_ELDER_DEATH); if (Creature* Stonebark = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_STONEBARK))) Stonebark->AI()->DoAction(ACTION_ELDER_DEATH); } } void EnterCombat(Unit* /*who*/) { _EnterCombat(); if (!me->HasAura(<API key>)) DoScriptText(<API key>, me); } void UpdateAI(uint32 const diff) { if (!UpdateVictim() || me->HasAura(<API key>)) return; events.Update(diff); if (me->HasUnitState(UNIT_STAT_CASTING)) return; while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_IMPALE: DoCastVictim(SPELL_IMPALE); events.ScheduleEvent(EVENT_IMPALE, urand(15000, 25000)); break; case EVENT_IRON_ROOTS: if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true, -<API key>)) target->CastSpell(target, <API key>, true); events.ScheduleEvent(EVENT_IRON_ROOTS, urand(10000, 20000)); break; case EVENT_THORN_SWARM: DoCastVictim(SPELL_THORN_SWARM); events.ScheduleEvent(EVENT_THORN_SWARM, urand(8000, 13000)); break; } } if (lumberjack) lumberjackTimer += diff; <API key>(); } void DoAction(int32 const action) { switch (action) { case ACTION_ELDER_DEATH: ++elderCount; lumberjack = true; break; case <API key>: me->DespawnOrUnsummon(10000); _JustDied(); break; } } private: uint32 lumberjackTimer; uint8 elderCount; bool lumberjack; }; CreatureAI* GetAI(Creature* creature) const { return GetUlduarAI<<API key>>(creature); } }; class <API key> : public CreatureScript { public: <API key>() : CreatureScript("<API key>") { } struct <API key> : public ScriptedAI { <API key>(Creature* creature) : ScriptedAI(creature) { me->ApplySpellImmune(0, IMMUNITY_STATE, <API key>, true); } void Reset() { lashTimer = 5000; changeTargetTimer = 7500; } void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; if (lashTimer <= diff) { DoCast(SPELL_FLAME_LASH); lashTimer = urand(5000, 10000); } else lashTimer -= diff; if (changeTargetTimer <= diff) { if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true)) { // Switching to other target - modify aggro of new target by 20% from current target's aggro me->AddThreat(target, me->getThreatManager().getThreat(me->getVictim(), false) * 1.2f); me->AI()->AttackStart(target); } changeTargetTimer = urand(5000, 10000); } else changeTargetTimer -= diff; <API key>(); } private: uint32 lashTimer; uint32 changeTargetTimer; }; CreatureAI* GetAI(Creature* creature) const { return new <API key>(creature); } }; class <API key> : public CreatureScript { public: <API key>() : CreatureScript("<API key>") { } struct <API key> : public ScriptedAI { <API key>(Creature* creature) : ScriptedAI(creature) { instance = me->GetInstanceScript(); if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) waveCount = CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->trioWaveCount; } void Reset() { tidalWaveTimer = 10000; } void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; if (tidalWaveTimer <= diff) { if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true)) { DoCast(target, SPELL_TIDAL_WAVE); DoCast(target, <API key>, true); } tidalWaveTimer = urand(12000, 25000); } else tidalWaveTimer -= diff; <API key>(); } void JustDied(Unit* /*who*/) { if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) { CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->checkElementalAlive[waveCount] = false; CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->LasherDead(1); } } private: InstanceScript* instance; uint32 tidalWaveTimer; uint8 waveCount; }; CreatureAI* GetAI(Creature* creature) const { return new <API key>(creature); } }; class npc_storm_lasher : public CreatureScript { public: npc_storm_lasher() : CreatureScript("npc_storm_lasher") { } struct npc_storm_lasherAI : public ScriptedAI { npc_storm_lasherAI(Creature* creature) : ScriptedAI(creature) { instance = me->GetInstanceScript(); if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) waveCount = CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->trioWaveCount; } void Reset() { lightningLashTimer = 10000; stormboltTimer = 5000; } void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; if (lightningLashTimer <= diff) { DoCast(<API key>); lightningLashTimer = urand(7000, 14000); } else lightningLashTimer -= diff; if (stormboltTimer <= diff) { if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true)) DoCast(target, SPELL_STORMBOLT); stormboltTimer = urand(8000, 12000); } else stormboltTimer -= diff; <API key>(); } void JustDied(Unit* /*who*/) { if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) { CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->checkElementalAlive[waveCount] = false; CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->LasherDead(2); } } private: InstanceScript* instance; uint32 lightningLashTimer; uint32 stormboltTimer; uint8 waveCount; }; CreatureAI* GetAI(Creature* creature) const { return new npc_storm_lasherAI(creature); } }; class npc_snaplasher : public CreatureScript { public: npc_snaplasher() : CreatureScript("npc_snaplasher") { } struct npc_snaplasherAI : public ScriptedAI { npc_snaplasherAI(Creature* creature) : ScriptedAI(creature) { instance = me->GetInstanceScript(); if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) waveCount = CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->trioWaveCount; } void UpdateAI(uint32 const /*diff*/) { if (!UpdateVictim()) return; if (!me->HasAura(SPELL_BARK_AURA)) DoCast(SPELL_HARDENED_BARK); <API key>(); } void JustDied(Unit* /*who*/) { if (Creature* Freya = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_FREYA))) { CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->checkElementalAlive[waveCount] = false; CAST_AI(boss_freya::boss_freyaAI, Freya->AI())->LasherDead(4); } } private: InstanceScript* instance; uint8 waveCount; }; CreatureAI* GetAI(Creature* creature) const { return new npc_snaplasherAI(creature); } }; class <API key> : public CreatureScript { public: <API key>() : CreatureScript("<API key>") { } struct <API key> : public ScriptedAI { <API key>(Creature* creature) : ScriptedAI(creature) { } void Reset() { natureFuryTimer = 7500; healthySporeTimer = 3500; SummonHealthySpores(2); } void SummonHealthySpores(uint8 sporesCount) { for (uint8 n = 0; n < sporesCount; ++n) { DoCast(<API key>); DoCast(<API key>); DoCast(<API key>); DoCast(<API key>); } } void EnterCombat(Unit* who) { DoCast(who, <API key>, true); } void UpdateAI(uint32 const diff) { if (!UpdateVictim()) return; if (healthySporeTimer <= diff) { SummonHealthySpores(1); healthySporeTimer = urand(15000, 17500); } else healthySporeTimer -= diff; if (natureFuryTimer <= diff) { if (Unit* target = SelectTarget(<API key>, 0, 100.0f, true, -SPELL_NATURE_FURY)) DoCast(target, SPELL_NATURE_FURY); me->AddAura(<API key>, me); natureFuryTimer = 5000; } else natureFuryTimer -= diff; <API key>(); } private: uint32 natureFuryTimer; uint32 healthySporeTimer; }; CreatureAI* GetAI(Creature* creature) const { return new <API key>(creature); } }; class npc_sun_beam : public CreatureScript { public: npc_sun_beam() : CreatureScript("npc_sun_beam") { } struct npc_sun_beamAI : public <API key> { npc_sun_beamAI(Creature* creature) : <API key>(creature) { me->SetReactState(REACT_PASSIVE); DoCastAOE(<API key>, true); DoCast(<API key>); } }; CreatureAI* GetAI(Creature* creature) const { return new npc_sun_beamAI(creature); } }; class npc_healthy_spore : public CreatureScript { public: npc_healthy_spore() : CreatureScript("npc_healthy_spore") { } struct npc_healthy_sporeAI : public <API key> { npc_healthy_sporeAI(Creature* creature) : <API key>(creature) { me->SetFlag(UNIT_FIELD_FLAGS, <API key> | <API key> | <API key>); me->SetReactState(REACT_PASSIVE); DoCast(me, <API key>); DoCast(me, <API key>); DoCast(me, SPELL_GROW); lifeTimer = urand(22000, 30000); } void UpdateAI(uint32 const diff) { if (lifeTimer <= diff) { me-><API key>(SPELL_GROW); me->ForcedDespawn(2200); lifeTimer = urand(22000, 30000); } else lifeTimer -= diff; } private: uint32 lifeTimer; }; CreatureAI* GetAI(Creature* creature) const { return new npc_healthy_sporeAI(creature); } }; class npc_eonars_gift : public CreatureScript { public: npc_eonars_gift() : CreatureScript("npc_eonars_gift") { } struct npc_eonars_giftAI : public <API key> { npc_eonars_giftAI(Creature* creature) : <API key>(creature) { <API key> = 12000; DoCast(me, SPELL_GROW); DoCast(me, SPELL_PHEROMONES, true); DoCast(me, SPELL_EONAR_VISUAL, true); } void UpdateAI(uint32 const diff) { if (<API key> <= diff) { me-><API key>(SPELL_GROW); DoCast(<API key>); me->ForcedDespawn(2500); <API key> = 12000; } else <API key> -= diff; } private: uint32 <API key>; }; CreatureAI* GetAI(Creature* creature) const { return new npc_eonars_giftAI(creature); } }; class npc_nature_bomb : public CreatureScript { public: npc_nature_bomb() : CreatureScript("npc_nature_bomb") { } struct npc_nature_bombAI : public <API key> { npc_nature_bombAI(Creature* creature) : <API key>(creature) { bombTimer = urand(8000, 10000); DoCast(SPELL_OBJECT_BOMB); } void UpdateAI(uint32 const diff) { if (bombTimer <= diff) { if (GameObject* go = me-><API key>(OBJECT_NATURE_BOMB, 1.0f)) { DoCast(me, SPELL_NATURE_BOMB); me->RemoveGameObject(go, true); me->RemoveFromWorld(); } bombTimer = 10000; } else bombTimer -= diff; } private: uint32 bombTimer; }; CreatureAI* GetAI(Creature* creature) const { return new npc_nature_bombAI(creature); } }; class <API key> : public CreatureScript { public: <API key>() : CreatureScript("<API key>") { } struct <API key> : public <API key> { <API key>(Creature* creature) : <API key>(creature) { despawnTimer = urand(7000, 12000); instance = me->GetInstanceScript(); DoCast(me, <API key>); DoCast(me, <API key>); me->SetReactState(REACT_PASSIVE); } void UpdateAI(uint32 const diff) { if (despawnTimer <= diff) { DoCastAOE(<API key>, true); me->DisappearAndDie(); } else despawnTimer -= diff; } void SpellHitTarget(Unit* target, SpellInfo const* spell) { if (target && spell->Id == <API key>) { target-><API key>(<API key>); target-><API key>(<API key>); } } private: InstanceScript* instance; uint32 despawnTimer; }; CreatureAI* GetAI(Creature* creature) const { return new <API key>(creature); } }; class <API key> : public SpellScriptLoader { public: <API key>() : SpellScriptLoader("<API key>") { } class <API key> : public SpellScript { PrepareSpellScript(<API key>) void HandleScript(SpellEffIndex /*effIndex*/) { Unit* target = GetHitUnit(); SpellInfo const* spellInfo = GetSpellInfo(); switch (spellInfo->Id) { case <API key>: if (target->HasAura(GetEffectValue())) for (uint8 n = 0; n < 2; ++n) target->RemoveAuraFromStack(GetEffectValue(), 0, <API key>); break; case <API key>: if (target->HasAura(GetEffectValue())) for (uint8 n = 0; n < 10; ++n) target->RemoveAuraFromStack(GetEffectValue(), 0, <API key>); break; case <API key>: if (target->HasAura(GetEffectValue())) for (uint8 n = 0; n < 25; ++n) target->RemoveAuraFromStack(GetEffectValue(), 0, <API key>); break; default: break; } } void Register() { OnEffectHitTarget += SpellEffectFn(<API key>::HandleScript, EFFECT_0, <API key>); } }; SpellScript* GetSpellScript() const { return new <API key>(); } }; class <API key> : public SpellScriptLoader { public: <API key>() : SpellScriptLoader("<API key>") { } class <API key> : public SpellScript { PrepareSpellScript(<API key>); void HandleSummon(SpellEffIndex effIndex) { <API key>(effIndex); uint32 entry = uint32(GetSpellInfo()->Effects[effIndex].MiscValue); Position pos; GetCaster()->GetPosition(&pos); // Not good at all, but this prevents having roots in a different position then player if (Creature* Roots = GetCaster()->SummonCreature(entry, pos)) GetCaster()->NearTeleportTo(Roots->GetPositionX(), Roots->GetPositionY(), Roots->GetPositionZ(), GetCaster()->GetOrientation()); } void Register() { OnEffectHit += SpellEffectFn(<API key>::HandleSummon, EFFECT_0, SPELL_EFFECT_SUMMON); } }; SpellScript* GetSpellScript() const { return new <API key>(); } }; class <API key> : public <API key> { public: <API key>() : <API key>("<API key>") { } bool OnCheck(Player* /*player*/, Unit* target) { if (!target) return false; if (Creature* Freya = target->ToCreature()) if (Freya->AI()->GetData(<API key>) >= 25) return true; return false; } }; class <API key> : public <API key> { public: <API key>() : <API key>("<API key>") { } bool OnCheck(Player* /*player*/, Unit* target) { if (!target) return false; if (Creature* Freya = target->ToCreature()) if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 1) return true; return false; } }; class <API key> : public <API key> { public: <API key>() : <API key>("<API key>") { } bool OnCheck(Player* /*player*/, Unit* target) { if (!target) return false; if (Creature* Freya = target->ToCreature()) if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) >= 2) return true; return false; } }; class <API key> : public <API key> { public: <API key>() : <API key>("<API key>") { } bool OnCheck(Player* /*player*/, Unit* target) { if (!target) return false; if (Creature* Freya = target->ToCreature()) if (Freya->AI()->GetData(DATA_KNOCK_ON_WOOD) == 3) return true; return false; } }; void AddSC_boss_freya() { new boss_freya(); new <API key>(); new <API key>(); new <API key>(); new <API key>(); new npc_snaplasher(); new npc_storm_lasher(); new <API key>(); new <API key>(); new npc_sun_beam(); new npc_nature_bomb(); new npc_eonars_gift(); new npc_healthy_spore(); new <API key>(); new npc_iron_roots(); new <API key>(); new <API key>(); new <API key>(); new <API key>(); new <API key>(); new <API key>(); }
#include <linux/kernel.h> #include <linux/module.h> #include <linux/delay.h> #include <linux/err.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> #include <linux/jiffies.h> #include <linux/platform_device.h> #include <linux/power_supply.h> #include <linux/slab.h> #include <linux/wakelock.h> #include <linux/workqueue.h> #include <linux/proc_fs.h> #include <linux/android_alarm.h> #include <linux/msm_adc.h> #include <linux/earlysuspend.h> #include <linux/sec_battery.h> #include <linux/<API key>.h> #include <linux/gpio.h> #include <mach/msm8960-gpio.h> #include <linux/mfd/pm8xxx/pm8xxx-adc.h> #include <asm/system_info.h> #define FG_T_SOC 0 #define FG_T_VCELL 1 #define FG_T_PSOC 2 #define FG_T_RCOMP 3 #define FG_T_FSOC 4 #define BATT_STATUS_MISSING 0 #define BATT_STATUS_PRESENT 1 #define BATT_STATUS_UNKNOWN 2 #ifdef CONFIG_BATTERY_CTIA #define USE_CALL (0x1 << 0) #define USE_VIDEO (0x1 << 1) #define USE_MUSIC (0x1 << 2) #define USE_BROWSER (0x1 << 3) #define USE_HOTSPOT (0x1 << 4) #define USE_CAMERA (0x1 << 5) #define USE_DATA_CALL (0x1 << 6) #define USE_GPS (0x1 << 7) #define USE_LTE (0x1 << 8) #define USE_WIFI (0x1 << 9) #endif /*CONFIG_BATTERY_CTIA*/ #define TOTAL_EVENT_TIME (10 * 60) /* 10 minites */ static int <API key>; enum cable_type_t { CABLE_TYPE_NONE = 0, CABLE_TYPE_USB, CABLE_TYPE_AC, CABLE_TYPE_MISC, CABLE_TYPE_CARDOCK, CABLE_TYPE_UARTOFF, CABLE_TYPE_JIG, CABLE_TYPE_UNKNOWN, CABLE_TYPE_CDP, <API key>, #ifdef <API key> CABLE_TYPE_WPC = 10, #endif }; enum batt_full_t { BATT_NOT_FULL = 0, BATT_FULL, }; enum { BAT_NOT_DETECTED, BAT_DETECTED }; static ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf); static ssize_t sec_bat_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count); struct battest_info { int rechg_count; int full_count; int test_value; int test_esuspend; bool is_rechg_state; }; struct <API key> { int event_block; int high_block; int high_recovery; int low_block; int low_recovery; }; struct sec_bat_info { struct device *dev; char *fuel_gauge_name; char *charger_name; struct power_supply psy_bat; struct power_supply psy_usb; struct power_supply psy_ac; struct wake_lock vbus_wake_lock; struct wake_lock cable_wake_lock; struct wake_lock monitor_wake_lock; struct wake_lock test_wake_lock; struct wake_lock measure_wake_lock; #if defined(CONFIG_BATTERY_CTIA) struct alarm event_alarm; #endif /*CONFIG_BATTERY_CTIA*/ struct alarm alarm; enum cable_type_t cable_type; enum cable_type_t prev_cable; enum batt_full_t batt_full_status; int batt_temp; int batt_temp_high_cnt; int batt_temp_low_cnt; int high_recovery_wpc; unsigned int batt_health; unsigned int batt_vcell; unsigned int batt_soc; unsigned int batt_raw_soc; unsigned int batt_full_soc; unsigned int batt_presoc; unsigned int measure_interval; int charging_status; int otg_state; int current_avg; unsigned int batt_temp_adc; unsigned int batt_temp_radc; unsigned int batt_current_adc; unsigned int present; struct battest_info test_info; struct workqueue_struct *monitor_wqueue; struct work_struct monitor_work; struct delayed_work cable_work; struct delayed_work measure_work; struct delayed_work otg_work; struct early_suspend bat_early_suspend; struct <API key> tspec; struct proc_dir_entry *entry; unsigned long charging_start_time; unsigned long <API key>; unsigned int iterm; unsigned int abs_time; unsigned int normal_abs_time; unsigned int wpc_abs_time; unsigned int rechg_time; unsigned int vrechg; unsigned int vmax; unsigned int recharging_status; unsigned int is_top_off; unsigned int hw_rev; unsigned int voice_call_state; unsigned int full_cond_voltage; unsigned int full_cond_count; unsigned int initial_check_count; bool charging_enabled; bool is_timeout_chgstop; bool is_esus_state; bool lpm_chg_mode; bool slate_mode; bool is_rechg_triggered; bool dcin_intr_triggered; u16 batt_rcomp; unsigned int slow_polling; #ifdef <API key> bool wc_status; int <API key>; #endif #if defined(CONFIG_BATTERY_CTIA) ktime_t cur_time; unsigned int batt_use; unsigned int batt_use_wait; #endif /*CONFIG_BATTERY_CTIA*/ ktime_t cur_monitor_time; #if defined(<API key>) bool <API key>; bool cable_uart_off; #endif unsigned int batt_int_irq; unsigned int batt_int; bool batt_int_irq_use; bool factory_mode; bool check_full_state; unsigned int <API key>; }; static char *supply_list[] = { "battery", }; static enum <API key> sec_battery_props[] = { <API key>, <API key>, <API key>, <API key>, <API key>, <API key>, <API key>, <API key>, }; static enum <API key> sec_power_props[] = { <API key>, }; #if defined(<API key>) && \ defined(<API key>) enum { INPUT_NONE, INPUT_DCIN, INPUT_USBIN, }; #endif static void <API key>(struct sec_bat_info *info, int sec) { ktime_t low_interval = ktime_set(sec - 10, 0); ktime_t slack = ktime_set(20, 0); ktime_t next; next = ktime_add(info->cur_monitor_time, low_interval); alarm_start_range(&info->alarm, next, ktime_add(next, slack)); } static void <API key>(struct alarm *alarm) { struct sec_bat_info *info = container_of(alarm, struct sec_bat_info, alarm); queue_delayed_work(info->monitor_wqueue, &info->measure_work, 0); queue_work(info->monitor_wqueue, &info->monitor_work); } static int sec_bat_check_vf(struct sec_bat_info *info) { int health = info->batt_health; if (info->present == BATT_STATUS_MISSING && !(info->factory_mode)) health = <API key>; else health = <API key>; /* update health */ if (health != info->batt_health) { if (health == <API key> || health == <API key>) { info->batt_health = health; pr_info("%s : vf error update\n", __func__); } else if (info->batt_health != <API key> && info->batt_health != <API key> && health == <API key>) { info->batt_health = health; pr_info("%s : recovery form vf error\n", __func__); } } return 0; } #if 0 static int <API key>(struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->charger_name); union <API key> value; static int cnt; int vf_state = BAT_DETECTED; int ret = 0; if (!psy) { dev_err(info->dev, "%s: fail to get charger ps\n", __func__); return -ENODEV; } ret = psy->get_property(psy, <API key>, &value); if (ret < 0) { dev_err(info->dev, "%s: fail to get status(%d)\n", __func__, ret); return -ENODEV; } if ((info->cable_type != CABLE_TYPE_NONE) && (value.intval == BAT_NOT_DETECTED)) { if (cnt <= BAT_DET_COUNT) cnt++; if (cnt >= BAT_DET_COUNT) vf_state = BAT_NOT_DETECTED; else vf_state = BAT_DETECTED; } else { vf_state = BAT_DETECTED; cnt = 0; } if (info->present == BATT_STATUS_PRESENT && vf_state == BAT_NOT_DETECTED) { pr_info("%s : detbat state(->%d) changed\n", __func__, vf_state); info->present = BATT_STATUS_MISSING; cancel_work_sync(&info->monitor_work); queue_work(info->monitor_wqueue, &info->monitor_work); } else if (info->present == BATT_STATUS_MISSING && vf_state == BAT_DETECTED) { pr_info("%s : detbat state(->%d) changed\n", __func__, vf_state); info->present = BATT_STATUS_PRESENT; cancel_work_sync(&info->monitor_work); queue_work(info->monitor_wqueue, &info->monitor_work); } return value.intval; } #endif static int <API key>(struct sec_bat_info *info) { #if defined(<API key>) || \ defined(<API key>) struct power_supply *psy = <API key>("fuelgauge"); union <API key> value; if (!psy) { pr_err("%s: fail to get fuel gauge ps\n", __func__); return -ENODEV; } psy->set_property(psy, <API key>, &value); return value.intval; #else return -ENODEV; #endif } static int <API key>(struct sec_bat_info *info, int type) { struct power_supply *psy = <API key>(info->fuel_gauge_name); union <API key> value; if (!psy) { dev_err(info->dev, "%s: fail to get fuel gauge ps\n", __func__); return -ENODEV; } switch (type) { case FG_T_VCELL: value.intval = 0; /*vcell */ psy->get_property(psy, <API key>, &value); break; case FG_T_SOC: value.intval = 0; /*normal soc */ psy->get_property(psy, <API key>, &value); #if defined(<API key>) /* According to the SAMSUMG inner charger charging concept, Full charging process should be divided into 2 phase as 1st UI full charging, 2nd real full charging. This is for the 1st UI Full charging. */ if (info-><API key> && info->charging_status == <API key>) value.intval = 100; #endif break; case FG_T_PSOC: value.intval = 1; /*raw soc */ psy->get_property(psy, <API key>, &value); break; case FG_T_RCOMP: value.intval = 2; /*rcomp */ psy->get_property(psy, <API key>, &value); break; case FG_T_FSOC: value.intval = 3; /*full soc */ psy->get_property(psy, <API key>, &value); break; default: return -ENODEV; } return value.intval; } static int <API key>(struct power_supply *ps, enum <API key> psp, union <API key> *val) { struct sec_bat_info *info = container_of(ps, struct sec_bat_info, psy_bat); switch (psp) { case <API key>: if (info->test_info.test_value == 999) { pr_info("%s : test case : %d\n", __func__, info->test_info.test_value); val->intval = <API key>; } else if (info->is_timeout_chgstop && info->charging_status == <API key>) { /* new concept : in case of time-out charging stop, Do not update FULL for UI, Use same time-out value for first charing and re-charging */ val->intval = <API key>; } else if (info->recharging_status) { val->intval = <API key>; } else { #if defined(<API key>) if (info-><API key> && info->charging_status == <API key>) { val->intval = <API key>; break; } #endif val->intval = info->charging_status; } break; case <API key>: val->intval = info->batt_health; break; case <API key>: val->intval = info->present; break; case <API key>: val->intval = info->batt_temp; break; case <API key>: if (info->charging_status == <API key> && info->cable_type != CABLE_TYPE_NONE) { val->intval = CABLE_TYPE_NONE; } else val->intval = info->cable_type; break; case <API key>: val->intval = <API key>(info, FG_T_VCELL); if (val->intval == -1) return -EINVAL; break; case <API key>: if (!info->is_timeout_chgstop && info->charging_status == <API key>) { val->intval = 100; break; } #if defined(<API key>) if (info-><API key> && info->charging_status == <API key>) { val->intval = 100; break; } #endif val->intval = info->batt_soc; if (val->intval == -1) return -EINVAL; break; case <API key>: val->intval = <API key>; break; default: return -EINVAL; } return 0; } static int <API key>(struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->charger_name); struct power_supply *psy_fg = <API key>(info->fuel_gauge_name); union <API key> value; int ret = 0; if (!psy || !psy_fg) { pr_err("%s: fail to get charger ps\n", __func__); return -ENODEV; } if (info->batt_full_status == BATT_NOT_FULL) { info->charging_status = <API key>; info->batt_full_status = BATT_FULL; info->recharging_status = false; info-><API key> = 0; info->charging_start_time = 0; #if defined(<API key>) info-><API key> = false; #endif /* disable charging */ value.intval = <API key>; ret = psy->set_property(psy, <API key>, &value); info->charging_enabled = false; /* notify full state to fuel guage */ value.intval = <API key>; ret = psy_fg->set_property(psy_fg, <API key>, &value); } return ret; } static int sec_bat_is_charging(struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->charger_name); union <API key> value; int ret; if (!psy) { dev_err(info->dev, "%s: fail to get charger ps\n", __func__); return -ENODEV; } ret = psy->get_property(psy, <API key>, &value); if (ret < 0) { dev_err(info->dev, "%s: fail to get status(%d)\n", __func__, ret); return ret; } return value.intval; } static int <API key>(struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->charger_name); union <API key> value; int ret; if (!psy) { dev_err(info->dev, "%s: fail to get charger ps\n", __func__); return -ENODEV; } ret = psy->get_property(psy, <API key>, &value); if (ret < 0) { dev_err(info->dev, "%s: fail to get online status(%d)\n", __func__, ret); return ret; } pr_debug("%s : retun value = %d\n", __func__, value.intval); return value.intval; } static void sec_otg_work(struct work_struct *work) { struct sec_bat_info *info = container_of(work, struct sec_bat_info, otg_work.work); struct power_supply *psy = <API key>(info->charger_name); union <API key> val_type; if (!psy) { dev_err(info->dev, "%s: fail to get charger ps\n", __func__); return; } val_type.intval = info->otg_state; psy->set_property(psy, <API key>, &val_type); } static int <API key>(struct power_supply *ps, enum <API key> psp, const union <API key> *val) { struct sec_bat_info *info = container_of(ps, struct sec_bat_info, psy_bat); int chg_status = 0; switch (psp) { case <API key>: chg_status = sec_bat_is_charging(info); pr_info("%s: %d\n", __func__, chg_status); if (val->intval & <API key>) { if (val->intval & <API key>) { pr_info("%s: re-charging!!\n", __func__); if (info->charging_status != <API key>) { if (info->batt_vcell >= info->full_cond_voltage) info->charging_status = <API key>; else { pr_info("%s: skip re-charging process!!\n", __func__); info->charging_status = <API key>; info->charging_enabled = true; cancel_work_sync(&info->monitor_work); queue_work(info->monitor_wqueue, &info->monitor_work); return 0; } } info->recharging_status = false; info->is_rechg_triggered = true; info->test_info.is_rechg_state = true; info->test_info.rechg_count = 0; } else if (val->intval & <API key>) { pr_info("%s: full-charging!!\n", __func__); } else { pr_err("%s: unknown chg intr state!!\n", __func__); return -EINVAL; } cancel_work_sync(&info->monitor_work); queue_work(info->monitor_wqueue, &info->monitor_work); } else { if (val->intval & <API key>) { info->dcin_intr_triggered = true; pr_info("%s: charger inserted!!\n", __func__); } else if (val->intval & <API key>) { info->dcin_intr_triggered = false; pr_info("%s: charger removed!!\n", __func__); } else { pr_err("%s: unknown chg intr state!!\n", __func__); return -EINVAL; } cancel_delayed_work(&info->measure_work); queue_delayed_work(info->monitor_wqueue, &info->measure_work, HZ); } /* if (val->intval == <API key>) { pr_info("%s: charger inserted!!\n", __func__); info->dcin_intr_triggered = true; cancel_delayed_work(&info->measure_work); queue_delayed_work(info->monitor_wqueue, &info->measure_work, HZ); } else if (val->intval == <API key>) { pr_info("%s: charger removed!!\n", __func__); info->dcin_intr_triggered = false; cancel_delayed_work(&info->measure_work); queue_delayed_work(info->monitor_wqueue, &info->measure_work, HZ); } else { pr_err("%s: unknown chg intr state!!\n", __func__); return -EINVAL; } */ break; case <API key>: dev_info(info->dev, "%s: lowbatt intr\n", __func__); if (val->intval != <API key>) return -EINVAL; queue_work(info->monitor_wqueue, &info->monitor_work); break; case <API key>: /* cable is attached or detached. called by usb switch ic */ dev_info(info->dev, "%s: cable was changed(%d), prev(%d)\n", __func__, val->intval, info->prev_cable); switch (val->intval) { case <API key>: info->cable_type = CABLE_TYPE_NONE; #if defined(<API key>) info->cable_uart_off = false; #endif break; case <API key>: info->cable_type = CABLE_TYPE_AC; break; case <API key>: info->cable_type = CABLE_TYPE_USB; break; case <API key>: info->cable_type = CABLE_TYPE_MISC; break; case <API key>: info->cable_type = CABLE_TYPE_CARDOCK; break; case <API key>: info->cable_type = CABLE_TYPE_UARTOFF; #if defined(<API key>) info->cable_uart_off = true; #endif break; #ifdef <API key> case <API key>: info->cable_type = CABLE_TYPE_WPC; info->wc_status = true; break; #endif case <API key>: info->cable_type = CABLE_TYPE_CDP; break; case <API key>: info->cable_type = <API key>; break; default: return -EINVAL; } if (info->prev_cable != info->cable_type) { queue_delayed_work(info->monitor_wqueue, &info->cable_work, 0); } if (info->cable_type && !info->charging_enabled && (info->charging_status != <API key>) && (info->batt_health == <API key>)) { queue_delayed_work(info->monitor_wqueue, &info->cable_work, 0); } info->prev_cable = info->cable_type; break; case <API key>: info->otg_state = val->intval; queue_delayed_work(info->monitor_wqueue, &info->otg_work, 0); break; default: return -EINVAL; } return 0; } static int <API key>(struct power_supply *ps, enum <API key> psp, union <API key> *val) { struct sec_bat_info *info = container_of(ps, struct sec_bat_info, psy_usb); if (psp != <API key>) return -EINVAL; /* Set enable=1 only if the USB charger is connected */ if (info->cable_type == CABLE_TYPE_USB || info->cable_type == CABLE_TYPE_CDP) val->intval = 1; else val->intval = 0; return 0; } static int sec_ac_get_property(struct power_supply *ps, enum <API key> psp, union <API key> *val) { struct sec_bat_info *info = container_of(ps, struct sec_bat_info, psy_ac); if (psp != <API key>) return -EINVAL; /* Set enable=1 only if the AC charger is connected */ if (info->charging_status == <API key> && info->cable_type != CABLE_TYPE_NONE) { val->intval = 0; } else { if (info->cable_type == CABLE_TYPE_MISC || info->cable_type == CABLE_TYPE_UARTOFF || info->cable_type == CABLE_TYPE_CARDOCK) { if (!info->dcin_intr_triggered) val->intval = 0; else val->intval = 1; } else { /* org */ val->intval = (info->cable_type == CABLE_TYPE_AC) || #ifdef <API key> (info->cable_type == CABLE_TYPE_WPC) || #endif (info->cable_type == CABLE_TYPE_UNKNOWN); } } pr_debug("%s : cable type = %d, return val = %d\n", __func__, info->cable_type, val->intval); return 0; } #ifdef <API key> static int <API key>(struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->fuel_gauge_name); union <API key> value; int ret; if (!psy) { pr_err("%s: fail to get fuelgauge ps\n", __func__); return -ENODEV; } /* Notify temperature to fuel gauge */ if (info->fuel_gauge_name) { value.intval = info->batt_temp / 10; ret = psy->set_property(psy, <API key>, &value); if (ret) { dev_err(info->dev, "%s: fail to set temperature(%d)\n", __func__, ret); return ret; } } return 0; } #endif static int <API key>(struct sec_bat_info *info) { int rc = 0; struct <API key> result = {0, 0, 0, 0}; rc = <API key>(TEMP_GPIO, TEMP_ADC_CHNNEL, &result); if (rc) { pr_err("error reading mpp %d, rc = %d\n", TEMP_GPIO, rc); return rc; } pr_debug("batt_temp phy = %lld meas = 0x%llx\n", result.physical, result.measurement); info->batt_temp = (int)result.physical; info->batt_temp_adc = (int)result.measurement; #ifdef <API key> <API key>(info); #endif return info->batt_temp; } static int <API key>(struct sec_bat_info *info) { int rescale_adc = 0; int health = info->batt_health; int high_recovery = info->tspec.high_recovery; <API key>(info); rescale_adc = info->batt_temp; if (info->test_info.test_value == 1) { pr_info("%s : test case : %d\n", __func__, info->test_info.test_value); rescale_adc = info->tspec.high_block + 1; if (info->cable_type == CABLE_TYPE_NONE) rescale_adc = info->tspec.high_recovery - 1; info->batt_temp = rescale_adc; } if (info->cable_type == CABLE_TYPE_NONE || info->test_info.test_value == 999) { info->batt_temp_high_cnt = 0; info->batt_temp_low_cnt = 0; health = <API key>; goto skip_hupdate; } #ifdef <API key> if ((info->high_recovery_wpc) && (info->cable_type == CABLE_TYPE_WPC)) { high_recovery = info->high_recovery_wpc; } else { high_recovery = info->tspec.high_recovery; } #endif #if defined(CONFIG_BATTERY_CTIA) if (info->batt_use) { if (rescale_adc >= info->tspec.event_block) { if (health != <API key>) if (info->batt_temp_high_cnt <= TEMP_BLOCK_COUNT) info->batt_temp_high_cnt++; } else if (rescale_adc <= high_recovery && rescale_adc >= info->tspec.low_recovery) { if (health == <API key> || health == <API key>) { info->batt_temp_high_cnt = 0; info->batt_temp_low_cnt = 0; } } else if (rescale_adc <= info->tspec.low_block) { if (health != <API key>) if (info->batt_temp_low_cnt <= TEMP_BLOCK_COUNT) info->batt_temp_low_cnt++; } } else { if (rescale_adc >= info->tspec.high_block) { if (health != <API key>) if (info->batt_temp_high_cnt <= TEMP_BLOCK_COUNT) info->batt_temp_high_cnt++; } else if (rescale_adc <= high_recovery && rescale_adc >= info->tspec.low_recovery) { if (health == <API key> || health == <API key>) { info->batt_temp_high_cnt = 0; info->batt_temp_low_cnt = 0; } } else if (rescale_adc <= info->tspec.low_block) { if (health != <API key>) if (info->batt_temp_low_cnt <= TEMP_BLOCK_COUNT) info->batt_temp_low_cnt++; } } #else if (rescale_adc >= info->tspec.high_block) { if (health != <API key>) if (info->batt_temp_high_cnt <= TEMP_BLOCK_COUNT) info->batt_temp_high_cnt++; } else if (rescale_adc <= high_recovery && rescale_adc >= info->tspec.low_recovery) { if (health == <API key> || health == <API key>) { info->batt_temp_high_cnt = 0; info->batt_temp_low_cnt = 0; } } else if (rescale_adc <= info->tspec.low_block) { if (health != <API key>) if (info->batt_temp_low_cnt <= TEMP_BLOCK_COUNT) info->batt_temp_low_cnt++; } #endif if (info->batt_temp_high_cnt >= TEMP_BLOCK_COUNT) { health = <API key>; wake_lock_timeout(&info->monitor_wake_lock, 10 * HZ); } else if (info->batt_temp_low_cnt >= TEMP_BLOCK_COUNT) { health = <API key>; wake_lock_timeout(&info->monitor_wake_lock, 10 * HZ); } else { health = <API key>; } skip_hupdate: if (info->batt_health != <API key> && info->batt_health != <API key> && health != info->batt_health) { info->batt_health = health; cancel_work_sync(&info->monitor_work); queue_work(info->monitor_wqueue, &info->monitor_work); } return 0; } static void check_chgcurrent(struct sec_bat_info *info) { pr_debug("[battery] charging current doesn't exist\n"); } static void <API key>(struct sec_bat_info *info) { static int cnt; static int cnt_ui; bool is_full_condition = false; struct power_supply *psy = <API key>(info->charger_name); union <API key> value; int ret; if (!psy) { dev_err(info->dev, "%s: fail to get charger ps\n", __func__); return; } if (info->charging_enabled) { check_chgcurrent(info); if (info->batt_vcell >= info->full_cond_voltage) { /* check full state with SMB charger register */ ret = psy->get_property(psy, <API key>, &value); if (ret < 0) { dev_err(info->dev, "%s: fail to get charge full(%d)\n", __func__, ret); return; } if (info->test_info.test_value == 3) { value.intval = 0; info->batt_current_adc = CURRENT_OF_FULL_CHG + 1; } info->is_top_off = value.intval; if (info->batt_current_adc == 0) { if (info->is_top_off == 1 && info->batt_presoc >= 99) { if (is_full_condition == false) wake_lock_timeout( &info->monitor_wake_lock, 10 * HZ); is_full_condition = true; pr_info ("%s : is_top_off (%d)\n", __func__, info->batt_current_adc); } else is_full_condition = false; } else { /* adc data is ok */ #if defined(<API key>) if (info->charging_status != <API key> && info->batt_current_adc <= <API key> && !info-><API key>) { cnt_ui++; if (cnt_ui >= info->full_cond_count) { info-><API key> = true; cnt_ui = 0; <API key>(&info-> psy_bat); } } #endif /* <API key> */ /* //[Jaguar, D2] disable until ADC ready to get charging current if (info->batt_current_adc <= CURRENT_OF_FULL_CHG) { is_full_condition = true; } else { is_full_condition = false; } */ } if (is_full_condition) { cnt++; pr_info("%s : full state? %d, %d\n", __func__, info->batt_current_adc, cnt); if (cnt >= info->full_cond_count) { pr_info("%s : full state!! %d/%d\n", __func__, cnt, info->full_cond_count); <API key>(info); cnt = 0; } } } else { cnt = 0; cnt_ui = 0; } } else { cnt = 0; cnt_ui = 0; info->batt_current_adc = 0; } info->test_info.full_count = cnt; } static int <API key>(struct sec_bat_info *info) { int cnt = 0; int ret = 0; if (info->charging_status != <API key> || info->recharging_status != false) { return 0; } for (cnt = 0; cnt < 4; cnt++) { info->batt_vcell = <API key>(info, FG_T_VCELL); if ((info->batt_vcell > info->vrechg) || (info->charging_status != <API key>)) return 0; else { pr_info("%s : cnt = %d\n", __func__, cnt); mdelay(5000); } } if (cnt == 4) { ret = 1; info->test_info.is_rechg_state = true; pr_info("if rechg(%d), cnt(%d)\n", ret, cnt); } else ret = 0; pr_info("[BAT] rechg(%d), cnt(%d)\n", ret, cnt); info->test_info.rechg_count = cnt; return ret; } static int <API key>(struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->charger_name); union <API key> val_vcell; int ret; if (!psy) { dev_err(info->dev, "%s: fail to get charger ps\n", __func__); return -ENODEV; } /* Notify Voltage Now */ val_vcell.intval = info->batt_vcell; ret = psy->set_property(psy, <API key>, &val_vcell); if (ret) { dev_err(info->dev, "%s: fail to notify vcell now(%d)\n", __func__, ret); return ret; } return 0; } static void sec_bat_update_info(struct sec_bat_info *info) { info->batt_presoc = info->batt_soc; info->batt_raw_soc = <API key>(info, FG_T_PSOC); info->batt_soc = <API key>(info, FG_T_SOC); info->batt_vcell = <API key>(info, FG_T_VCELL); info->batt_rcomp = <API key>(info, FG_T_RCOMP); info->batt_full_soc = <API key>(info, FG_T_FSOC); <API key>(info); } static int <API key>(struct sec_bat_info *info, bool enable) { struct power_supply *psy = <API key>(info->charger_name); union <API key> val_type, val_chg_current, val_topoff, val_vcell; int ret; ktime_t current_time; struct timespec ts; current_time = <API key>(); ts = ktime_to_timespec(current_time); if (!psy) { dev_err(info->dev, "%s: fail to get charger ps\n", __func__); return -ENODEV; } info->batt_full_status = BATT_NOT_FULL; if (enable) { switch (info->cable_type) { case CABLE_TYPE_USB: val_type.intval = <API key>; val_chg_current.intval = 500; info->current_avg = -1; break; case CABLE_TYPE_AC: case CABLE_TYPE_CARDOCK: case CABLE_TYPE_UARTOFF: case CABLE_TYPE_CDP: case <API key>: val_type.intval = <API key>; val_chg_current.intval = 900; info->current_avg = 0; break; #ifdef <API key> case CABLE_TYPE_WPC: val_type.intval = <API key>; val_chg_current.intval = info-><API key>; if (info-><API key> == 700) info->current_avg = 0; else info->current_avg = -1; break; #endif case CABLE_TYPE_MISC: val_type.intval = <API key>; val_chg_current.intval = 700; info->current_avg = -1; break; case CABLE_TYPE_UNKNOWN: val_type.intval = <API key>; val_chg_current.intval = 900; info->current_avg = 0; break; default: dev_err(info->dev, "%s: Invalid func use\n", __func__); return -EINVAL; } /* Set charging current */ ret = psy->set_property(psy, <API key>, &val_chg_current); if (ret) { dev_err(info->dev, "%s: fail to set charging cur(%d)\n", __func__, ret); return ret; } /* Set topoff current */ val_topoff.intval = info->iterm; ret = psy->set_property(psy, <API key>, &val_topoff); if (ret) { dev_err(info->dev, "%s: fail to set topoff val(%d)\n", __func__, ret); return ret; } /* Notify Voltage Now */ info->batt_vcell = <API key>(info, FG_T_VCELL); val_vcell.intval = info->batt_vcell; ret = psy->set_property(psy, <API key>, &val_vcell); if (ret) { dev_err(info->dev, "%s: fail to notify vcell now(%d)\n", __func__, ret); return ret; } info->charging_start_time = ts.tv_sec; } else { /* Disable charging */ val_type.intval = <API key>; info-><API key> = 0; info->charging_start_time = 0; info->current_avg = -1; /* Double check recharging */ info->recharging_status = false; } ret = psy->set_property(psy, <API key>, &val_type); if (ret) { dev_err(info->dev, "%s: fail to set charging status(%d)\n", __func__, ret); return ret; } if (info->present == BATT_STATUS_MISSING) { pr_info("[battery] battery is missing, suspend SMB347 charger\n"); psy->set_property(psy, <API key>, &val_type); } info->charging_enabled = enable; return 0; } #ifdef <API key> static int sec_fg_update_rcomp(struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->fuel_gauge_name); union <API key> value; int ret; if (!psy) { pr_err("%s: fail to get fuelgauge ps\n", __func__); return -ENODEV; } if (info->fuel_gauge_name) { value.intval = info->charging_status; ret = psy->set_property(psy, <API key>, &value); if (ret) { dev_err(info->dev, "%s: fail to set status(%d)\n", __func__, ret); return ret; } } return 0; } #endif static void <API key>(struct sec_bat_info *info) { pr_info(" %s : cable_type = %d\n", __func__, info->cable_type); if (info->present == BATT_STATUS_MISSING) return; info->batt_full_status = BATT_NOT_FULL; info->recharging_status = false; info->test_info.is_rechg_state = false; info->charging_start_time = 0; #if defined(<API key>) info-><API key> = false; #endif #ifdef <API key> info->wc_status = false; #endif info->charging_status = <API key>; info->is_timeout_chgstop = false; #ifdef <API key> sec_fg_update_rcomp(info); #endif <API key>(info, false); <API key>(&info->psy_bat); } static void sec_bat_cable_work(struct work_struct *work) { struct sec_bat_info *info = container_of(work, struct sec_bat_info, cable_work.work); struct power_supply *psy = <API key>(info->charger_name); union <API key> val_input; int ret = 0; u8 pok_cnt = 0; wake_lock(&info->cable_wake_lock); if ((info->present == BATT_STATUS_MISSING) && (info->cable_type != CABLE_TYPE_NONE)) { pr_info("[battery] VF is open, do not care cable_work\n"); info->batt_health = <API key>; psy->set_property(psy, <API key>, &val_input); queue_work(info->monitor_wqueue, &info->monitor_work); goto cable_skip; } switch (info->cable_type) { case CABLE_TYPE_NONE: #if defined(<API key>) && \ defined(<API key>) /* check charger state*/ ret = psy->get_property(psy, <API key>, &val_input); if (!ret) { if (info->wc_status == false && val_input.intval == INPUT_DCIN) { info->wc_status = true; info->cable_type = CABLE_TYPE_WPC; ret = psy->set_property(psy, <API key>, &val_input); if (ret < 0) pr_err("%s : failed to set charger state(%d)\n", __func__, ret); queue_delayed_work(info->monitor_wqueue, &info->cable_work, msecs_to_jiffies(500)); pr_info("cable none : power source is dcin. retry cable work!!!\n"); return; } } else pr_err("%s : failed to get input source(%d)\n", __func__, ret); #endif /* TODO : check DCIN state again */ while (1) { if ((sec_bat_is_charging(info) == <API key>) && info->dcin_intr_triggered && !info->slate_mode) { pok_cnt++; if (pok_cnt >= 2) { pr_info("cable none : vdcin ok, skip!!!\n"); wake_unlock(&info->cable_wake_lock); return; } msleep(300); } else { pr_info("cable none : vdcin nok, cable is removed.\n"); break; } } /* if (info->batt_int_irq_use) { info->present = BATT_STATUS_PRESENT; info->batt_health = <API key>; disable_irq_nosync(info->batt_int_irq); }*/ wake_lock_timeout(&info->vbus_wake_lock, 5 * HZ); cancel_delayed_work(&info->measure_work); info->batt_full_status = BATT_NOT_FULL; info->recharging_status = false; info->test_info.is_rechg_state = false; info->charging_start_time = 0; info->charging_status = <API key>; info->is_timeout_chgstop = false; info->dcin_intr_triggered = false; #if defined(<API key>) info-><API key> = false; #endif #ifdef <API key> info->wc_status = false; #endif <API key>(info, false); info->measure_interval = <API key>; queue_delayed_work(info->monitor_wqueue, &info->measure_work, HZ / 2); break; case CABLE_TYPE_MISC: case CABLE_TYPE_CARDOCK: case CABLE_TYPE_UARTOFF: if (!info->dcin_intr_triggered && !info->lpm_chg_mode) { wake_lock_timeout(&info->vbus_wake_lock, 5 * HZ); pr_info("%s : dock inserted, but dcin nok skip charging!\n", __func__); <API key>(info, true); info->charging_enabled = false; break; } case CABLE_TYPE_UNKNOWN: case CABLE_TYPE_USB: case CABLE_TYPE_AC: case CABLE_TYPE_CDP: case <API key>: #if defined(<API key>) && \ defined(<API key>) case CABLE_TYPE_WPC: /* set input state */ ret = psy->get_property(psy, <API key>, &val_input); if (!ret) { if (info->wc_status == true && val_input.intval != INPUT_DCIN) { info->wc_status = false; ret = psy->set_property(psy, <API key>, &val_input); if (ret < 0) pr_err("%s : failed to set input source(%d)\n", __func__, ret); } } else pr_err("%s : failed to get input source(%d)\n", __func__, ret); #endif /* if (((info->cable_type == CABLE_TYPE_AC) || (info->cable_type == CABLE_TYPE_USB)) && (info->batt_int != 0)) { enable_irq(info->batt_int_irq); info->batt_int_irq_use = 1; info->present = !<API key>(info->batt_int); } */ wake_lock_timeout(&info->vbus_wake_lock, 5 * HZ); cancel_delayed_work(&info->measure_work); info->charging_status = <API key>; <API key>(info, true); info->measure_interval = <API key>; queue_delayed_work(info->monitor_wqueue, &info->measure_work, HZ / 2); queue_work(info->monitor_wqueue, &info->monitor_work); break; default: dev_err(info->dev, "%s: Invalid cable type\n", __func__); break; } cable_skip: #ifdef <API key> sec_fg_update_rcomp(info); #endif <API key>(&info->psy_ac); <API key>(&info->psy_usb); <API key>(&info->psy_bat); wake_unlock(&info->cable_wake_lock); } static void <API key>(struct sec_bat_info *info) { unsigned long charging_time=0; ktime_t current_time; struct timespec ts; current_time = <API key>(); ts = ktime_to_timespec(current_time); /* If timeout_chgstop is already set, then re-start charging */ if (info->is_timeout_chgstop) { info->is_timeout_chgstop = false; if (info->charging_status == <API key>) info->recharging_status = true; <API key>(info, true); pr_info("%s: [BATT] chgstop is cancelled\n", __func__); } if (info->charging_start_time == 0) { pr_debug("%s: charging_start_time=0\n", __func__); return; } if (info->charging_enabled) { if (ts.tv_sec >= info->charging_start_time) charging_time = ts.tv_sec - info->charging_start_time; else charging_time = 0xFFFFFFFF - info->charging_start_time + ts.tv_sec; info-><API key> = charging_time; } switch (info->charging_status) { case <API key>: if (charging_time > info->rechg_time && info->recharging_status == true) { <API key>(info, false); info->recharging_status = false; info->is_timeout_chgstop = true; pr_info("%s: [BATT]Recharging timer expired\n", __func__); } break; case <API key>: if (charging_time > info->abs_time) { <API key>(info, false); info->charging_status = <API key>; info->is_timeout_chgstop = true; pr_info("%s: [BATT]Charging timer expired\n", __func__); } break; default: info->is_timeout_chgstop = false; return; } dev_dbg(info->dev, "[BATT]Time past : %lu secs, Spec : %d, %d\n", charging_time, info->abs_time, info->rechg_time); return; } static void <API key>(struct work_struct *work) { int i; struct sec_bat_info *info = container_of(work, struct sec_bat_info, monitor_work); struct power_supply *psy_fg = <API key>(info->fuel_gauge_name); struct power_supply *psy_smb = <API key>(info->charger_name); union <API key> value; struct timespec ts; int ret = 0; wake_lock(&info->monitor_wake_lock); if (!psy_fg) { pr_err("%s: fail to get charger ps\n", __func__); goto monitoring_skip; } <API key>(1); /* check battery 5 times */ for (i = 0; i < 5; i++) { msleep(500); info->present = !<API key>(info->batt_int); /* If the battery is missing, then check more */ if (info->present) { i++; break; } } <API key>(0); pr_info("%s: battery check is %s (%d time%c)\n", __func__, info->present ? "present" : "absent", i, (i == 1) ? ' ' : 's'); if ((info->present == BATT_STATUS_MISSING) && (info->cable_type != CABLE_TYPE_NONE)) { pr_info("[battery] battery is missing, suspend SMB347 charger\n"); psy_smb->set_property(psy_smb, <API key>, &value); } #ifdef <API key> if (info->wpc_abs_time && (info->cable_type == CABLE_TYPE_WPC)) { info->abs_time = info->wpc_abs_time; pr_debug("[battery] wpc abs time (%d)\n", info->abs_time); } else { info->abs_time = info->normal_abs_time; pr_debug("[battery] normal abs time (%d)\n", info->abs_time); } #endif <API key>(info); sec_bat_update_info(info); sec_bat_check_vf(info); <API key>(info); #ifdef <API key> <API key>(info); #endif pr_info("[battery] level(%d), vcell(%d), therm(%d)\n", info->batt_soc, info->batt_vcell, info->batt_temp); pr_info("[battery] cable_type(%d), chg_status(%d), health(%d)\n", info->cable_type, info->charging_status, info->batt_health); pr_info("[battery] timeout_chgstp(%d), chg_enabled(%d), rechg_status(%d)\n", info->is_timeout_chgstop, info->charging_enabled, info->recharging_status); if (<API key>(info)) { pr_info("%s : rechg triggered!\n", __func__); info->is_rechg_triggered = true; } switch (info->charging_status) { case <API key>: /* notify full state to fuel guage */ info->check_full_state = true; if (!info->is_timeout_chgstop) { value.intval = <API key>; ret = psy_fg->set_property(psy_fg, <API key>, &value); } if (info->is_rechg_triggered && info->recharging_status == false) { info->recharging_status = true; <API key>(info, true); info->is_rechg_triggered = false; dev_info(info->dev, "%s: Start Recharging, Vcell = %d\n", __func__, info->batt_vcell); } /* break; */ case <API key>: if (info->batt_health == <API key> || info->batt_health == <API key>) { <API key>(info, false); info->charging_status = <API key>; info->test_info.is_rechg_state = false; pr_info("%s: Not charging\n", __func__); } else if (info->batt_health == <API key>) { <API key>(info, false); info->charging_status = <API key>; info->test_info.is_rechg_state = false; pr_info("%s: Not charging (VF err!)\n", __func__); } break; case <API key>: dev_dbg(info->dev, "%s: Discharging\n", __func__); if ((info->batt_health == <API key>) && (info->cable_type != CABLE_TYPE_NONE)) { <API key>(info, false); info->charging_status = <API key>; info->test_info.is_rechg_state = false; pr_info("%s: Not charging (VF err!)\n", __func__); } break; case <API key>: if (info->batt_health == <API key>) { dev_info(info->dev, "%s: recover health state\n", __func__); if (info->cable_type != CABLE_TYPE_NONE) { <API key>(info, true); info->charging_status = <API key>; } else info->charging_status = <API key>; } break; default: pr_err("%s: Undefined Battery Status\n", __func__); goto monitoring_skip; } /* check default charger state, and set again */ if (sec_bat_is_charging(info) == <API key> && info->charging_enabled) { if (<API key>(info)) { pr_info("%s : default charger state, set again\n", __func__); queue_delayed_work(info->monitor_wqueue, &info->cable_work, 0); } } if (info->check_full_state == true && info->charging_status == <API key>) { if (info-><API key> <= 1) { info->batt_soc = 100; info-><API key>++; } else { if (info->batt_presoc > info->batt_soc) { info->batt_soc = info->batt_presoc - 1; } else { info->check_full_state = false; info-><API key> = 0; } } } if (info->batt_soc != info->batt_presoc) pr_info("[fg] p:%d, s1:%d, s2:%d, v:%d, t:%d\n", info->batt_raw_soc, info->batt_soc, info->batt_presoc, info->batt_vcell, info->batt_temp_radc); <API key>(&info->psy_bat); monitoring_skip: info->cur_monitor_time = <API key>(); ts = ktime_to_timespec(info->cur_monitor_time); <API key>(info, <API key>); wake_unlock(&info->monitor_wake_lock); return; } static void <API key>(struct work_struct *work) { struct sec_bat_info *info = container_of(work, struct sec_bat_info, measure_work.work); unsigned long flags; bool isFirstCheck = false; wake_lock(&info->measure_wake_lock); <API key>(info); /* <API key>(info); */ /* check dcin */ if ((sec_bat_is_charging(info) == <API key>) && (info->charging_status == <API key>)) { pr_info ("%s : dcin ok, but not charging, set cable type again!\n", __func__); if (0 == <API key>) { local_irq_save(flags); if (info->cable_type == CABLE_TYPE_NONE) { #if defined(<API key>) if (info->cable_uart_off) info->cable_type = CABLE_TYPE_UARTOFF; else #endif info->cable_type = CABLE_TYPE_UNKNOWN; } local_irq_restore(flags); queue_delayed_work(info->monitor_wqueue, &info->cable_work, HZ); } } else if ((sec_bat_is_charging(info) == <API key>) && (info->charging_status != <API key>)) { pr_info("%s : dcin nok, but still charging, just disable charging!\n", __func__); local_irq_save(flags); if (info->cable_type == CABLE_TYPE_UNKNOWN || #ifdef <API key> info->cable_type == CABLE_TYPE_WPC || #endif info->cable_type == CABLE_TYPE_UARTOFF) info->cable_type = CABLE_TYPE_NONE; local_irq_restore(flags); <API key>(info); } if (info->charging_enabled && (((0 < info->batt_temp_high_cnt) && (info->batt_temp_high_cnt < TEMP_BLOCK_COUNT)) || ((0 < info->batt_temp_low_cnt) && (info->batt_temp_low_cnt < TEMP_BLOCK_COUNT)))) { isFirstCheck = true; } else { isFirstCheck = false; } if (info->initial_check_count) { info->initial_check_count queue_delayed_work(info->monitor_wqueue, &info->measure_work, HZ); } else if (isFirstCheck) { queue_delayed_work(info->monitor_wqueue, &info->measure_work, HZ); } else { queue_delayed_work(info->monitor_wqueue, &info->measure_work, msecs_to_jiffies(info->measure_interval)); } wake_unlock(&info->measure_wake_lock); } /* static irqreturn_t <API key>(int irq, struct sec_bat_info *info) { struct power_supply *psy = <API key>(info->charger_name); union <API key> value; int ret = 0; if (!psy) { pr_err("%s: fail to get charger ps\n", __func__); return -ENODEV; } ret = <API key>(info->batt_int); pr_info("%s, %d\n", __func__, ret); if (ret < 0) { pr_err("%s batt_in gpio failed ret=%d\n", __func__, ret); goto err; } info->present = ret ? 0 : 1; if (ret) psy->set_property(psy, <API key>, &value); err: return IRQ_HANDLED; } */ #define SEC_BATTERY_ATTR(_name) \ { \ .attr = { .name = #_name, \ .mode = 0664, \ /*.owner = THIS_MODULE */}, \ .show = <API key>, \ .store = sec_bat_store, \ } static struct device_attribute sec_battery_attrs[] = { SEC_BATTERY_ATTR(batt_vol), SEC_BATTERY_ATTR(batt_read_adj_soc), SEC_BATTERY_ATTR(batt_vfocv), SEC_BATTERY_ATTR(batt_vf_adc), SEC_BATTERY_ATTR(batt_temp), SEC_BATTERY_ATTR(batt_temp_adc), SEC_BATTERY_ATTR(batt_temp_radc), SEC_BATTERY_ATTR(<API key>), SEC_BATTERY_ATTR(batt_lp_charging), SEC_BATTERY_ATTR(batt_type), SEC_BATTERY_ATTR(batt_full_check), SEC_BATTERY_ATTR(batt_temp_check), SEC_BATTERY_ATTR(batt_temp_adc_spec), SEC_BATTERY_ATTR(batt_test_value), SEC_BATTERY_ATTR(batt_current_adc), SEC_BATTERY_ATTR(batt_esus_test), SEC_BATTERY_ATTR(sys_rev), SEC_BATTERY_ATTR(fg_psoc), SEC_BATTERY_ATTR(batt_reset_soc), #ifdef <API key> SEC_BATTERY_ATTR(wc_status), SEC_BATTERY_ATTR(wc_adc), #endif #if !defined(CONFIG_BATTERY_CTIA) SEC_BATTERY_ATTR(talk_wcdma), SEC_BATTERY_ATTR(talk_gsm), SEC_BATTERY_ATTR(data_call), SEC_BATTERY_ATTR(camera), SEC_BATTERY_ATTR(browser), #endif SEC_BATTERY_ATTR(charging_enable), #if defined(CONFIG_BATTERY_CTIA) SEC_BATTERY_ATTR(talk_wcdma), SEC_BATTERY_ATTR(talk_gsm), SEC_BATTERY_ATTR(call), SEC_BATTERY_ATTR(video), SEC_BATTERY_ATTR(music), SEC_BATTERY_ATTR(browser), SEC_BATTERY_ATTR(hotspot), SEC_BATTERY_ATTR(camera), SEC_BATTERY_ATTR(data_call), SEC_BATTERY_ATTR(gps), SEC_BATTERY_ATTR(lte), SEC_BATTERY_ATTR(wifi), SEC_BATTERY_ATTR(batt_use), #endif /*CONFIG_BATTERY_CTIA*/ SEC_BATTERY_ATTR(batt_slate_mode), SEC_BATTERY_ATTR(current_avg), SEC_BATTERY_ATTR(factory_mode), }; enum { BATT_VOL = 0, BATT_SOC, BATT_VFOCV, BATT_VFADC, BATT_TEMP, BATT_TEMP_ADC, BATT_TEMP_RADC, <API key>, BATT_LP_CHARGING, BATT_TYPE, BATT_FULL_CHECK, BATT_TEMP_CHECK, BATT_TEMP_ADC_SPEC, BATT_TEST_VALUE, BATT_CURRENT_ADC, BATT_ESUS_TEST, BATT_SYSTEM_REV, BATT_FG_PSOC, BATT_RESET_SOC, #ifdef <API key> BATT_WC_STATUS, BATT_WC_ADC, #endif #if !defined(CONFIG_BATTERY_CTIA) BATT_WCDMA_CALL, BATT_GSM_CALL, BATT_DATACALL, BATT_CAMERA, BATT_BROWSER, #endif <API key>, #if defined(CONFIG_BATTERY_CTIA) BATT_WCDMA_CALL, BATT_GSM_CALL, BATT_CALL, BATT_VIDEO, BATT_MUSIC, BATT_BROWSER, BATT_HOTSPOT, BATT_CAMERA, BATT_DATA_CALL, BATT_GPS, BATT_LTE, BATT_WIFI, BATT_USE, #endif /*CONFIG_BATTERY_CTIA*/ BATT_SLATE_MODE, BATT_CURR_AVG, BATT_FACTORY, }; #if defined(CONFIG_BATTERY_CTIA) static void <API key>(struct sec_bat_info *info, int seconds) { ktime_t low_interval = ktime_set(seconds - 10, 0); ktime_t slack = ktime_set(20, 0); ktime_t next; next = ktime_add(info->cur_time, low_interval); alarm_start_range(&info->event_alarm, next, ktime_add(next, slack)); } static void <API key>(struct alarm *alarm) { struct sec_bat_info *info = container_of(alarm, struct sec_bat_info, event_alarm); info->batt_use &= (~info->batt_use_wait); pr_info("/BATT_USE/ timer expired (0x%x)\n", info->batt_use); } static void sec_bat_use_module(struct sec_bat_info *info, int module, int enable) { struct timespec ts; /* ignore duplicated deactivation of same event */ if (!enable && (info->batt_use == info->batt_use_wait)) { pr_info("/BATT_USE/ ignore duplicated same event\n"); return; } /*del_timer_sync(&info->bat_use_timer);*/ alarm_cancel(&info->event_alarm); info->batt_use &= (~info->batt_use_wait); if (enable) { info->batt_use_wait = 0; info->batt_use |= module; /* debug msg */ if (module == USE_CALL) pr_info("/BATT_USE/ call 0x%x\n", info->batt_use); else if (module == USE_VIDEO) pr_info("/BATT_USE/ video 0x%x\n", info->batt_use); else if (module == USE_MUSIC) pr_info("/BATT_USE/ music 0x%x\n", info->batt_use); else if (module == USE_BROWSER) pr_info("/BATT_USE/ browser 0x%x\n", info->batt_use); else if (module == USE_HOTSPOT) pr_info("/BATT_USE/ hotspot 0x%x\n", info->batt_use); else if (module == USE_CAMERA) pr_info("/BATT_USE/ camera 0x%x\n", info->batt_use); else if (module == USE_DATA_CALL) pr_info("/BATT_USE/ datacall 0x%x\n", info->batt_use); else if (module == USE_LTE) pr_info("/BATT_USE/ lte 0x%x\n", info->batt_use); else if (module == USE_WIFI) pr_info("/BATT_USE/ wifi 0x%x\n", info->batt_use); } else { if (info->batt_use == 0) { pr_info("/BATT_USE/ nothing to clear\n"); return; /* nothing to clear */ } info->batt_use_wait = module; info->cur_time = <API key>(); ts = ktime_to_timespec(info->cur_time); <API key>(info, TOTAL_EVENT_TIME); pr_info("/BATT_USE/ start timer (curr 0x%x, wait 0x%x)\n", info->batt_use, info->batt_use_wait); } } #endif /*CONFIG_BATTERY_CTIA*/ static ssize_t <API key>(struct device *dev, struct device_attribute *attr, char *buf) { struct sec_bat_info *info = dev_get_drvdata(dev->parent); int i = 0, val = 0; const ptrdiff_t off = attr - sec_battery_attrs; switch (off) { case BATT_VOL: val = <API key>(info, FG_T_VCELL); i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", val); break; case BATT_SOC: val = <API key>(info, FG_T_SOC); i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", val); break; case BATT_VFOCV: /* max17048 doesn't have VFOCV register */ pr_err("skip! MAX17048 doesn't have VFOCV register.\n"); break; case BATT_VFADC: /* read batt_id */ break; case BATT_TEMP: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->batt_temp); break; case BATT_TEMP_ADC: <API key>(info); i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->batt_temp_adc); break; case BATT_TEMP_RADC: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->batt_temp_radc); break; case <API key>: val = info->cable_type; /*val = 2; // for lpm test */ if (info->lpm_chg_mode && info->cable_type != CABLE_TYPE_NONE && info->charging_status == <API key>) { val = CABLE_TYPE_NONE; } i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", val); break; case BATT_LP_CHARGING: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", poweroff_charging); break; case BATT_TYPE: i += scnprintf(buf + i, PAGE_SIZE - i, "%s\n", "SDI_SDI"); break; case BATT_FULL_CHECK: /* new concept : in case of time-out charging stop, Do not update FULL for UI, Use same time-out value for first charing and re-charging */ i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->is_timeout_chgstop == false && info->charging_status == <API key>) ? 1 : 0); break; case BATT_TEMP_CHECK: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->batt_health); break; case BATT_TEMP_ADC_SPEC: i += scnprintf(buf + i, PAGE_SIZE - i, "(HIGH: %d / %d, LOW: %d / %d)\n", info->tspec.high_block, info->tspec.high_recovery, info->tspec.low_block, info->tspec.low_recovery); break; case BATT_TEST_VALUE: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->test_info.test_value); break; case BATT_CURRENT_ADC: check_chgcurrent(info); #ifdef <API key> i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->wc_status == false) ? info->batt_current_adc : 0); #else i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->batt_current_adc); #endif break; case BATT_ESUS_TEST: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->test_info.test_esuspend); break; case BATT_SYSTEM_REV: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->hw_rev); break; case BATT_FG_PSOC: val = <API key>(info, FG_T_PSOC); i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", val); break; #if defined(CONFIG_BATTERY_CTIA) case BATT_WCDMA_CALL: case BATT_GSM_CALL: case BATT_CALL: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_CALL) ? 1 : 0); break; case BATT_VIDEO: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_VIDEO) ? 1 : 0); break; case BATT_MUSIC: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_MUSIC) ? 1 : 0); break; case BATT_BROWSER: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_BROWSER) ? 1 : 0); break; case BATT_HOTSPOT: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_HOTSPOT) ? 1 : 0); break; case BATT_CAMERA: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_CAMERA) ? 1 : 0); break; case BATT_DATA_CALL: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_DATA_CALL) ? 1 : 0); break; case BATT_GPS: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_GPS) ? 1 : 0); break; case BATT_LTE: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & USE_GPS) ? 1 : 0); break; case BATT_WIFI: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->batt_use & BATT_WIFI) ? 1 : 0); break; case BATT_USE: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->batt_use); break; #endif case <API key>: { int val = (info->charging_enabled) ? 1 : 0; i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", val); } break; #ifdef <API key> case BATT_WC_STATUS: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->wc_status == true) ? 1 : 0); break; case BATT_WC_ADC: check_chgcurrent(info); i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", (info->wc_status == true) ? info->batt_current_adc : 0); break; #endif case BATT_SLATE_MODE: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->slate_mode); break; case BATT_CURR_AVG: i += scnprintf(buf + i, PAGE_SIZE - i, "%d\n", info->current_avg); break; default: i = -EINVAL; } return i; } static ssize_t sec_bat_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { int ret = 0, x = 0; const ptrdiff_t off = attr - sec_battery_attrs; struct sec_bat_info *info = dev_get_drvdata(dev->parent); switch (off) { case BATT_ESUS_TEST: /* early_suspend test */ if (sscanf(buf, "%d\n", &x) == 1) { if (x == 0) { info->test_info.test_esuspend = 0; wake_lock_timeout(&info->test_wake_lock, 5 * HZ); cancel_delayed_work(&info->measure_work); info->measure_interval = <API key>; queue_delayed_work(info->monitor_wqueue, &info->measure_work, 0); } else { info->test_info.test_esuspend = 1; wake_lock(&info->test_wake_lock); cancel_delayed_work(&info->measure_work); info->measure_interval = <API key>; queue_delayed_work(info->monitor_wqueue, &info->measure_work, 0); } ret = count; } break; case BATT_TEST_VALUE: if (sscanf(buf, "%d\n", &x) == 1) { if (x == 0) info->test_info.test_value = 0; else if (x == 1) { /* for temp warning event */ info->test_info.test_value = 1; } else if (x == 2) { /* // for full event info->test_info.test_value = 2; */ /* disable full test interface. */ info->test_info.test_value = 0; } else if (x == 3) { /* for abs time event */ info->test_info.test_value = 3; } else if (x == 999) { /* for pop-up disable */ info->test_info.test_value = 999; if ((info->batt_health == <API key>) || (info->batt_health == <API key>)) { info->batt_health = <API key>; queue_work(info->monitor_wqueue, &info->monitor_work); } } else info->test_info.test_value = 0; pr_info("%s : test case : %d\n", __func__, info->test_info.test_value); ret = count; } break; case BATT_RESET_SOC: pr_info("battery reset soc\n"); if (sscanf(buf, "%d\n", &x) == 1) { if (x == 1) { <API key>(info); ret = count; } } break; #if !defined(CONFIG_BATTERY_CTIA) case BATT_WCDMA_CALL: case BATT_GSM_CALL: if (sscanf(buf, "%d\n", &x) == 1) { info->voice_call_state = x; pr_info("%s : voice call = %d, %d\n", __func__, x, info->voice_call_state); } break; case BATT_DATACALL: if (sscanf(buf, "%d\n", &x) == 1) dev_dbg(info->dev, "%s : data call = %d\n", __func__, x); break; case BATT_CAMERA: if (sscanf(buf, "%d\n", &x) == 1) ret = count; break; case BATT_BROWSER: if (sscanf(buf, "%d\n", &x) == 1) ret = count; break; #endif case <API key>: { pr_info("%s : <API key> buf=[%s]\n", __func__, buf); if (sscanf(buf, "%d\n", &x) == 1) { if (x == 0) { <API key> = 1; info->cable_type = CABLE_TYPE_NONE; queue_delayed_work(info->monitor_wqueue, &info->cable_work, 0); } else if (x == 1) { <API key> = 0; info->cable_type = CABLE_TYPE_UNKNOWN; queue_delayed_work(info->monitor_wqueue, &info->cable_work, 0); } else pr_info("%s:Invalid\n", __func__); ret = count; } } break; #if defined(CONFIG_BATTERY_CTIA) case BATT_WCDMA_CALL: case BATT_GSM_CALL: case BATT_CALL: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_CALL, x); ret = count; } pr_debug("[BAT]:%s: camera = %d\n", __func__, x); break; case BATT_VIDEO: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_VIDEO, x); ret = count; } pr_debug("[BAT]:%s: mp3 = %d\n", __func__, x); break; case BATT_MUSIC: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_MUSIC, x); ret = count; } pr_debug("[BAT]:%s: video = %d\n", __func__, x); break; case BATT_BROWSER: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_BROWSER, x); ret = count; } pr_debug("[BAT]:%s: voice call 2G = %d\n", __func__, x); break; case BATT_HOTSPOT: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_HOTSPOT, x); ret = count; } pr_debug("[BAT]:%s: voice call 3G = %d\n", __func__, x); break; case BATT_CAMERA: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_CAMERA, x); ret = count; } pr_debug("[BAT]:%s: data call = %d\n", __func__, x); break; case BATT_DATA_CALL: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_DATA_CALL, x); ret = count; } pr_debug("[BAT]:%s: wifi = %d\n", __func__, x); break; case BATT_GPS: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_GPS, x); ret = count; } break; case BATT_LTE: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_LTE, x); ret = count; } pr_debug("[BAT]:%s: gps = %d\n", __func__, x); break; case BATT_WIFI: if (sscanf(buf, "%d\n", &x) == 1) { sec_bat_use_module(info, USE_WIFI, x); ret = count; } pr_debug("[BAT]:%s: gps = %d\n", __func__, x); break; #endif case BATT_SLATE_MODE: { pr_info("%s : BATT_SLATE_MODE %s\n", __func__, buf); if (sscanf(buf, "%d\n", &x) == 1) { if (x == 1) { info->slate_mode = true; <API key> = 1; info->cable_type = CABLE_TYPE_NONE; queue_delayed_work(info->monitor_wqueue, &info->cable_work, 0); } else if (x == 0) { info->slate_mode = false; <API key> = 0; info->cable_type = CABLE_TYPE_UNKNOWN; queue_delayed_work(info->monitor_wqueue, &info->cable_work, 0); } else pr_info("%s:Invalid\n", __func__); ret = count; } } break; case BATT_FACTORY: if (sscanf(buf, "%d\n", &x) == 1) { if (x) info->factory_mode = true; else info->factory_mode = false; ret = count; } pr_info("[battery]:%s: factory mode = %d\n", __func__, x); break; default: ret = -EINVAL; } return ret; } static int <API key>(struct device *dev) { int i, rc; for (i = 0; i < ARRAY_SIZE(sec_battery_attrs); i++) { rc = device_create_file(dev, &sec_battery_attrs[i]); if (rc) goto sec_attrs_failed; } goto succeed; sec_attrs_failed: while (i device_remove_file(dev, &sec_battery_attrs[i]); succeed: return rc; } static int sec_bat_read_proc(char *buf, char **start, off_t offset, int count, int *eof, void *data) { struct sec_bat_info *info = data; struct timespec cur_time; ktime_t ktime; int len = 0; ktime = <API key>(); cur_time = ktime_to_timespec(ktime); len = sprintf(buf, "%lu, %u, %u, %u, %u, %d, %u, %d, %d, %d, %u, %u, %u, %d, %u, %u, 0x%04x, %u, %lu\n", cur_time.tv_sec, info->batt_raw_soc, info->batt_soc, info->batt_vcell, info->batt_current_adc, info->charging_enabled, info->batt_full_status, info->test_info.full_count, info->test_info.rechg_count, info->test_info.is_rechg_state, info->recharging_status, info->batt_temp_radc, info->batt_health, info->charging_status, info->present, info->cable_type, info->batt_rcomp, info->batt_full_soc, info-><API key>); return len; } static void <API key>(struct early_suspend *handle) { struct sec_bat_info *info = container_of(handle, struct sec_bat_info, bat_early_suspend); pr_info("%s[BATT]...\n", __func__); info->is_esus_state = true; return; } static void sec_bat_late_resume(struct early_suspend *handle) { struct sec_bat_info *info = container_of(handle, struct sec_bat_info, bat_early_suspend); pr_info("%s[BATT]...\n", __func__); info->is_esus_state = false; return; } static __devinit int sec_bat_probe(struct platform_device *pdev) { struct <API key> *pdata = dev_get_platdata(&pdev->dev); struct sec_bat_info *info; int ret = 0; if (!pdata->sec_battery_using()) { pr_info("%s: SEC Battery driver Loading SKIP!!!\n", __func__); return -EINVAL; } pr_info("%s: SEC Battery Driver Loading\n", __func__); info = kzalloc(sizeof(*info), GFP_KERNEL); if (!info) return -ENOMEM; <API key>(pdev, info); info->dev = &pdev->dev; if (!pdata->fuel_gauge_name || !pdata->charger_name) { dev_err(info->dev, "%s: no fuel gauge or charger name\n", __func__); goto err_kfree; } pr_info("[battery] enable Vref_batt_therm\n"); <API key>(1); info->fuel_gauge_name = pdata->fuel_gauge_name; info->charger_name = pdata->charger_name; info->hw_rev = system_rev; info->present = BATT_STATUS_UNKNOWN; info->current_avg = -1; info->psy_bat.name = "battery", info->psy_bat.type = <API key>, info->psy_bat.properties = sec_battery_props, info->psy_bat.num_properties = ARRAY_SIZE(sec_battery_props), info->psy_bat.get_property = <API key>, info->psy_bat.set_property = <API key>, info->psy_usb.name = "usb", info->psy_usb.type = <API key>, info->psy_usb.supplied_to = supply_list, info->psy_usb.num_supplicants = ARRAY_SIZE(supply_list), info->psy_usb.properties = sec_power_props, info->psy_usb.num_properties = ARRAY_SIZE(sec_power_props), info->psy_usb.get_property = <API key>, info->psy_ac.name = "ac", info->psy_ac.type = <API key>, info->psy_ac.supplied_to = supply_list, info->psy_ac.num_supplicants = ARRAY_SIZE(supply_list), info->psy_ac.properties = sec_power_props, info->psy_ac.num_properties = ARRAY_SIZE(sec_power_props), info->psy_ac.get_property = sec_ac_get_property; wake_lock_init(&info->vbus_wake_lock, WAKE_LOCK_SUSPEND, "vbus_present"); wake_lock_init(&info->monitor_wake_lock, WAKE_LOCK_SUSPEND, "sec-battery-monitor"); wake_lock_init(&info->cable_wake_lock, WAKE_LOCK_SUSPEND, "sec-battery-cable"); wake_lock_init(&info->test_wake_lock, WAKE_LOCK_SUSPEND, "bat_esus_test"); wake_lock_init(&info->measure_wake_lock, WAKE_LOCK_SUSPEND, "sec-battery-measure"); info->batt_health = <API key>; info->charging_status = sec_bat_is_charging(info); pr_info("%s: initial charging_status = %d\n", __func__, info->charging_status); if (info->charging_status == <API key>) { info->cable_type = CABLE_TYPE_UNKNOWN; info->prev_cable = CABLE_TYPE_NONE; } else { info->charging_status = <API key>; info->cable_type = CABLE_TYPE_NONE; info->prev_cable = CABLE_TYPE_NONE; } info->batt_vcell = <API key>(info, FG_T_VCELL); info->batt_soc = <API key>(info, FG_T_SOC); info->batt_temp = RCOMP0_TEMP * 10; info->recharging_status = false; info->is_timeout_chgstop = false; info->is_esus_state = false; info->is_rechg_triggered = false; info->dcin_intr_triggered = false; #if defined(<API key>) info-><API key> = false; #endif info->initial_check_count = INIT_CHECK_COUNT; info->charging_start_time = 0; info->slate_mode = false; info->factory_mode = false; info->check_full_state = false; info-><API key> = 0; #ifdef <API key> info-><API key> = pdata-><API key>; #endif /*<API key>*/ if (poweroff_charging) info->lpm_chg_mode = true; else info->lpm_chg_mode = false; if ((poweroff_charging) && (pdata->lpm_high_block != 0)) { info->tspec.high_block = pdata->lpm_high_block; info->tspec.high_recovery = pdata->lpm_high_recovery; info->tspec.low_block = pdata->lpm_low_block; info->tspec.low_recovery = pdata->lpm_low_recovery; } else { if (pdata->high_block != 0) { info->tspec.event_block = pdata->event_block; info->tspec.high_block = pdata->high_block; info->tspec.high_recovery = pdata->high_recovery; info->tspec.low_block = pdata->low_block; info->tspec.low_recovery = pdata->low_recovery; } else { info->tspec.event_block = <API key>; info->tspec.high_block = <API key>; info->tspec.high_recovery = <API key>; info->tspec.low_block = <API key>; info->tspec.low_recovery = <API key>; } } if (pdata->high_recovery_wpc) info->high_recovery_wpc = pdata->high_recovery_wpc; else info->high_recovery_wpc = 0; if (info->charging_status == <API key>) info->measure_interval = <API key>; else info->measure_interval = <API key>; if (!pdata->recharge_voltage) { if (pdata->check_batt_type) { if (pdata->check_batt_type()) { pdata->max_voltage = 4350 * 1000; pdata->recharge_voltage = 4280 * 1000; } } } if (pdata->max_voltage != 0) { info->vmax = pdata->max_voltage; info->full_cond_count = FULL_CHG_COND_COUNT; info->full_cond_voltage = pdata->max_voltage - 100000; } else { info->vmax = DEFAULT_MAX_VOLTAGE; info->full_cond_count = FULL_CHG_COND_COUNT; info->full_cond_voltage = <API key>; } if (pdata->recharge_voltage != 0) info->vrechg = pdata->recharge_voltage; else info->vrechg = <API key>; if (pdata->charge_duration != 0 && pdata->recharge_duration != 0) { info->abs_time = pdata->charge_duration; info->normal_abs_time = pdata->charge_duration; info->rechg_time = pdata->recharge_duration; } else { info->abs_time = DEFAULT_CHG_TIME; info->normal_abs_time = DEFAULT_CHG_TIME; info->rechg_time = DEFAULT_RECHG_TIME; } if (pdata->wpc_charge_duration != 0) info->wpc_abs_time = pdata->wpc_charge_duration; else info->wpc_abs_time = 0; if (pdata->iterm != 0) info->iterm = pdata->iterm; else info->iterm = <API key>; ret = <API key>(&pdev->dev, &info->psy_bat); if (ret) { dev_err(info->dev, "%s: failed to register psy_bat\n", __func__); goto err_wakelock_free; } ret = <API key>(&pdev->dev, &info->psy_usb); if (ret) { dev_err(info->dev, "%s: failed to register psy_usb\n", __func__); goto <API key>; } ret = <API key>(&pdev->dev, &info->psy_ac); if (ret) { dev_err(info->dev, "%s: failed to register psy_ac\n", __func__); goto <API key>; } /* create sec detail attributes */ ret = <API key>(info->psy_bat.dev); if (ret) { dev_err(info->dev, "%s: failed to create attrs\n", __func__); goto err_supply_unreg_ac; } info->entry = create_proc_entry("batt_info_proc", S_IRUGO, NULL); if (!info->entry) dev_err(info->dev, "%s: failed to create proc_entry\n", __func__); else { info->entry->read_proc = sec_bat_read_proc; info->entry->data = (struct sec_bat_info *)info; } info->monitor_wqueue = <API key>(dev_name(&pdev->dev)); if (!info->monitor_wqueue) { dev_err(info->dev, "%s: fail to create workqueue\n", __func__); goto err_supply_unreg_ac; } #if defined(CONFIG_BATTERY_CTIA) alarm_init(&info->event_alarm, <API key>, <API key>); #endif /*CONFIG_BATTERY_CTIA*/ alarm_init(&info->alarm, <API key>, <API key>); if (pdata->batt_int != 0) { info->batt_int = pdata->batt_int; info->batt_int_irq = gpio_to_irq(pdata->batt_int); ret = enable_irq_wake(info->batt_int_irq); if (ret) { pr_err("%s : Failed to enable_irq_wake[%d]\r\n", __func__, info->batt_int_irq); } /* ret = <API key>( info->batt_int_irq, NULL, <API key>, (<API key>|IRQF_TRIGGER_RISING), "battery removal", info); if (ret) { pr_err("%s : Failed to request batt_int irq\n", __func__); goto err_request_irq; } disable_irq(info->batt_int_irq); */ } info->bat_early_suspend.level = <API key> + 1; info->bat_early_suspend.suspend = <API key>; info->bat_early_suspend.resume = sec_bat_late_resume; <API key>(&info->bat_early_suspend); INIT_WORK(&info->monitor_work, <API key>); <API key>(&info->cable_work, sec_bat_cable_work); <API key>(&info->measure_work, <API key>); <API key>(&info->otg_work, sec_otg_work); pdata->get_cable_type(); queue_delayed_work(info->monitor_wqueue, &info->measure_work, 0); queue_work(info->monitor_wqueue, &info->monitor_work); return 0; #if 0 err_request_irq: destroy_workqueue(info->monitor_wqueue); #endif err_supply_unreg_ac: <API key>(&info->psy_ac); <API key>: <API key>(&info->psy_usb); <API key>: <API key>(&info->psy_bat); err_wakelock_free: wake_lock_destroy(&info->vbus_wake_lock); wake_lock_destroy(&info->monitor_wake_lock); wake_lock_destroy(&info->cable_wake_lock); wake_lock_destroy(&info->test_wake_lock); wake_lock_destroy(&info->measure_wake_lock); err_kfree: kfree(info); return ret; } static int __devexit sec_bat_remove(struct platform_device *pdev) { struct sec_bat_info *info = <API key>(pdev); remove_proc_entry("batt_info_proc", NULL); flush_workqueue(info->monitor_wqueue); destroy_workqueue(info->monitor_wqueue); cancel_delayed_work(&info->cable_work); cancel_delayed_work(&info->measure_work); cancel_delayed_work(&info->otg_work); <API key>(&info->psy_bat); <API key>(&info->psy_usb); <API key>(&info->psy_ac); wake_lock_destroy(&info->vbus_wake_lock); wake_lock_destroy(&info->monitor_wake_lock); wake_lock_destroy(&info->cable_wake_lock); wake_lock_destroy(&info->test_wake_lock); wake_lock_destroy(&info->measure_wake_lock); #if defined(CONFIG_BATTERY_CTIA) alarm_cancel(&info->event_alarm); #endif /*CONFIG_BATTERY_CTIA*/ alarm_cancel(&info->alarm); kfree(info); return 0; } static int sec_bat_suspend(struct device *dev) { struct sec_bat_info *info = dev_get_drvdata(dev); pr_info("[BATT] battery suspend! cancel_work_sync(&info->monitor_work); cancel_delayed_work(&info->cable_work); cancel_delayed_work(&info->measure_work); cancel_delayed_work(&info->otg_work); /*add alarm monitoring */ info->cur_monitor_time = <API key>(); if (info->cable_type == CABLE_TYPE_NONE) { <API key>(info, ALARM_INTERVAL); info->slow_polling = 1; } else { <API key>(info, <API key>); } return 0; } static void sec_bat_resume(struct device *dev) { struct sec_bat_info *info = dev_get_drvdata(dev); pr_info("[BATT] battery resume! if (info->slow_polling) info->slow_polling = 0; queue_delayed_work(info->monitor_wqueue, &info->measure_work, 0); queue_work(info->monitor_wqueue, &info->monitor_work); } static const struct dev_pm_ops sec_bat_pm_ops = { .prepare = sec_bat_suspend, .complete = sec_bat_resume, }; static struct platform_driver sec_bat_driver = { .driver = { .name = "sec-battery", .owner = THIS_MODULE, .pm = &sec_bat_pm_ops, }, .probe = sec_bat_probe, .remove = __devexit_p(sec_bat_remove), }; static int __init sec_bat_init(void) { return <API key>(&sec_bat_driver); } static void __exit sec_bat_exit(void) { <API key>(&sec_bat_driver); } late_initcall(sec_bat_init); module_exit(sec_bat_exit); MODULE_DESCRIPTION("SEC battery driver"); MODULE_AUTHOR("<jongmyeong.ko@samsung.com>"); MODULE_AUTHOR("<ms925.kim@samsung.com>"); MODULE_AUTHOR("<joshua.chang@samsung.com>"); MODULE_LICENSE("GPL");
/* $Id: openprom.h,v 1.1.1.1 2010/12/02 04:12:36 walf_wu Exp $ */ #ifndef <API key> #define <API key> #ifndef __ASSEMBLY__ /* V0 prom device operations. */ struct linux_dev_v0_funcs { int (*v0_devopen)(char *device_str); int (*v0_devclose)(int dev_desc); int (*v0_rdblkdev)(int dev_desc, int num_blks, int blk_st, char *buf); int (*v0_wrblkdev)(int dev_desc, int num_blks, int blk_st, char *buf); int (*v0_wrnetdev)(int dev_desc, int num_bytes, char *buf); int (*v0_rdnetdev)(int dev_desc, int num_bytes, char *buf); int (*v0_rdchardev)(int dev_desc, int num_bytes, int dummy, char *buf); int (*v0_wrchardev)(int dev_desc, int num_bytes, int dummy, char *buf); int (*v0_seekdev)(int dev_desc, long logical_offst, int from); }; /* V2 and later prom device operations. */ struct linux_dev_v2_funcs { int (*v2_inst2pkg)(int d); /* Convert ihandle to phandle */ char * (*v2_dumb_mem_alloc)(char *va, unsigned sz); void (*v2_dumb_mem_free)(char *va, unsigned sz); /* To map devices into virtual I/O space. */ char * (*v2_dumb_mmap)(char *virta, int which_io, unsigned paddr, unsigned sz); void (*v2_dumb_munmap)(char *virta, unsigned size); int (*v2_dev_open)(char *devpath); void (*v2_dev_close)(int d); int (*v2_dev_read)(int d, char *buf, int nbytes); int (*v2_dev_write)(int d, char *buf, int nbytes); int (*v2_dev_seek)(int d, int hi, int lo); /* Never issued (multistage load support) */ void (*v2_wheee2)(void); void (*v2_wheee3)(void); }; struct linux_mlist_v0 { struct linux_mlist_v0 *theres_more; unsigned start_adr; unsigned num_bytes; }; struct linux_mem_v0 { struct linux_mlist_v0 **v0_totphys; struct linux_mlist_v0 **v0_prommap; struct linux_mlist_v0 **v0_available; /* What we can use */ }; /* Arguments sent to the kernel from the boot prompt. */ struct linux_arguments_v0 { char *argv[8]; char args[100]; char boot_dev[2]; int boot_dev_ctrl; int boot_dev_unit; int dev_partition; char *kernel_file_name; void *aieee1; /* XXX */ }; /* V2 and up boot things. */ struct linux_bootargs_v2 { char **bootpath; char **bootargs; int *fd_stdin; int *fd_stdout; }; /* The top level PROM vector. */ struct linux_romvec { /* Version numbers. */ unsigned int pv_magic_cookie; unsigned int pv_romvers; unsigned int pv_plugin_revision; unsigned int pv_printrev; /* Version 0 memory descriptors. */ struct linux_mem_v0 pv_v0mem; /* Node operations. */ struct linux_nodeops *pv_nodeops; char **pv_bootstr; struct linux_dev_v0_funcs pv_v0devops; char *pv_stdin; char *pv_stdout; #define PROMDEV_KBD 0 /* input from keyboard */ #define PROMDEV_SCREEN 0 /* output to screen */ #define PROMDEV_TTYA 1 /* in/out to ttya */ #define PROMDEV_TTYB 2 /* in/out to ttyb */ /* Blocking getchar/putchar. NOT REENTRANT! (grr) */ int (*pv_getchar)(void); void (*pv_putchar)(int ch); /* Non-blocking variants. */ int (*pv_nbgetchar)(void); int (*pv_nbputchar)(int ch); void (*pv_putstr)(char *str, int len); /* Miscellany. */ void (*pv_reboot)(char *bootstr); void (*pv_printf)(__const__ char *fmt, ...); void (*pv_abort)(void); __volatile__ int *pv_ticks; void (*pv_halt)(void); void (**pv_synchook)(void); /* Evaluate a forth string, not different proto for V0 and V2->up. */ union { void (*v0_eval)(int len, char *str); void (*v2_eval)(char *str); } pv_fortheval; struct linux_arguments_v0 **pv_v0bootargs; /* Get ether address. */ unsigned int (*pv_enaddr)(int d, char *enaddr); struct linux_bootargs_v2 pv_v2bootargs; struct linux_dev_v2_funcs pv_v2devops; int filler[15]; /* This one is sun4c/sun4 only. */ void (*pv_setctxt)(int ctxt, char *va, int pmeg); /* Prom version 3 Multiprocessor routines. This stuff is crazy. * No joke. Calling these when there is only one cpu probably * crashes the machine, have to test this. :-) */ /* v3_cpustart() will start the cpu 'whichcpu' in mmu-context * 'thiscontext' executing at address 'prog_counter' */ int (*v3_cpustart)(unsigned int whichcpu, int ctxtbl_ptr, int thiscontext, char *prog_counter); /* v3_cpustop() will cause cpu 'whichcpu' to stop executing * until a resume cpu call is made. */ int (*v3_cpustop)(unsigned int whichcpu); /* v3_cpuidle() will idle cpu 'whichcpu' until a stop or * resume cpu call is made. */ int (*v3_cpuidle)(unsigned int whichcpu); /* v3_cpuresume() will resume processor 'whichcpu' executing * starting with whatever 'pc' and 'npc' were left at the * last 'idle' or 'stop' call. */ int (*v3_cpuresume)(unsigned int whichcpu); }; /* Routines for traversing the prom device tree. */ struct linux_nodeops { int (*no_nextnode)(int node); int (*no_child)(int node); int (*no_proplen)(int node, char *name); int (*no_getprop)(int node, char *name, char *val); int (*no_setprop)(int node, char *name, char *val, int len); char * (*no_nextprop)(int node, char *name); }; /* More fun PROM structures for device probing. */ #define PROMREG_MAX 24 #define PROMVADDR_MAX 16 #define PROMINTR_MAX 15 struct <API key> { unsigned which_io; /* hi part of physical address */ unsigned phys_addr; /* The physical address of this register */ int reg_size; /* How many bytes does this register take up? */ }; struct <API key> { unsigned long phys_addr; unsigned long reg_size; }; struct linux_prom_irqs { int pri; /* IRQ priority */ int vector; /* This is foobar, what does it do? */ }; /* Element of the "ranges" vector */ struct linux_prom_ranges { unsigned int ot_child_space; unsigned int ot_child_base; /* Bus feels this */ unsigned int ot_parent_space; unsigned int ot_parent_base; /* CPU looks from here */ unsigned int or_size; }; struct linux_prom64_ranges { unsigned long ot_child_base; /* Bus feels this */ unsigned long ot_parent_base; /* CPU looks from here */ unsigned long or_size; }; /* Ranges and reg properties are a bit different for PCI. */ struct <API key> { unsigned int phys_hi; unsigned int phys_mid; unsigned int phys_lo; unsigned int size_hi; unsigned int size_lo; }; struct <API key> { unsigned int child_phys_hi; /* Only certain bits are encoded here. */ unsigned int child_phys_mid; unsigned int child_phys_lo; unsigned int parent_phys_hi; unsigned int parent_phys_lo; unsigned int size_hi; unsigned int size_lo; }; struct <API key> { unsigned int phys_hi; unsigned int phys_mid; unsigned int phys_lo; unsigned int interrupt; int cnode; unsigned int cinterrupt; }; struct <API key> { unsigned int phys_hi; unsigned int phys_mid; unsigned int phys_lo; unsigned int interrupt; }; struct <API key> { unsigned int child_phys_hi; unsigned int child_phys_lo; unsigned int parent_phys_hi; unsigned int parent_phys_mid; unsigned int parent_phys_lo; unsigned int size; }; struct <API key> { unsigned int phys_hi; unsigned int phys_lo; unsigned int interrupt; int cnode; unsigned int cinterrupt; }; struct <API key> { unsigned int phys_hi; unsigned int phys_lo; unsigned int interrupt; }; #endif /* !(__ASSEMBLY__) */ #endif /* !(<API key>) */
#include "TuioContainer.h" using namespace TUIO; TuioContainer::TuioContainer (TuioTime ttime, long si, float xp, float yp):TuioPoint(ttime, xp,yp) ,state(TUIO_ADDED) ,source_id(0) ,source_name("undefined") ,source_addr("localhost") { session_id = si; x_speed = 0.0f; y_speed = 0.0f; motion_speed = 0.0f; motion_accel = 0.0f; x_accel = 0.0f; y_accel = 0.0f; TuioPoint p(currentTime,xpos,ypos); path.push_back(p); lastPoint = &path.back(); } TuioContainer::TuioContainer (long si, float xp, float yp):TuioPoint(xp,yp) ,state(TUIO_ADDED) ,source_id(0) ,source_name("undefined") ,source_addr("localhost") { session_id = si; x_speed = 0.0f; y_speed = 0.0f; motion_speed = 0.0f; motion_accel = 0.0f; x_accel = 0.0f; y_accel = 0.0f; TuioPoint p(currentTime,xpos,ypos); path.push_back(p); lastPoint = &path.back(); } TuioContainer::TuioContainer (TuioContainer *tcon):TuioPoint(tcon) ,state(TUIO_ADDED) ,source_id(0) ,source_name("undefined") ,source_addr("localhost") { session_id = tcon->getSessionID(); x_speed = 0.0f; y_speed = 0.0f; motion_speed = 0.0f; motion_accel = 0.0f; x_accel = 0.0f; y_accel = 0.0f; TuioPoint p(currentTime,xpos,ypos); path.push_back(p); lastPoint = &path.back(); } void TuioContainer::setTuioSource(int src_id, const char *src_name, const char *src_addr) { source_id = src_id; source_name = std::string(src_name); source_addr = std::string(src_addr); } const char* TuioContainer::getTuioSourceName() const{ return source_name.c_str(); } const char* TuioContainer::<API key>() const{ return source_addr.c_str(); } int TuioContainer::getTuioSourceID() const{ return source_id; } void TuioContainer::update (TuioTime ttime, float xp, float yp) { lastPoint = &path.back(); TuioPoint::update(ttime,xp, yp); TuioTime diffTime = currentTime - lastPoint->getTuioTime(); float dt = diffTime.<API key>()/1000.0f; float dx = xpos - lastPoint->getX(); float dy = ypos - lastPoint->getY(); float dist = sqrt(dx*dx+dy*dy); float last_motion_speed = motion_speed; float last_x_speed = x_speed; float last_y_speed = y_speed; x_speed = dx/dt; y_speed = dy/dt; motion_speed = dist/dt; motion_accel = (motion_speed - last_motion_speed)/dt; x_accel = (x_speed - last_x_speed)/dt; y_accel = (y_speed - last_y_speed)/dt; TuioPoint p(currentTime,xpos,ypos); path.push_back(p); if (path.size()>MAX_PATH_SIZE) path.pop_front(); if (motion_accel>0) state = TUIO_ACCELERATING; else if (motion_accel<0) state = TUIO_DECELERATING; else state = TUIO_STOPPED; } void TuioContainer::stop(TuioTime ttime) { if ( state==TUIO_IDLE )update(ttime,xpos,ypos); else state=TUIO_IDLE; } void TuioContainer::update (TuioTime ttime, float xp, float yp, float xs, float ys, float ma) { TuioPoint::update(ttime,xp, yp); x_speed = xs; y_speed = ys; motion_speed = (float)sqrt(x_speed*x_speed+y_speed*y_speed); motion_accel = ma; x_accel = ma; y_accel = ma; lastPoint = &path.back(); TuioPoint p(currentTime,xpos,ypos); path.push_back(p); if (path.size()>MAX_PATH_SIZE) path.pop_front(); if (motion_accel>0) state = TUIO_ACCELERATING; else if (motion_accel<0) state = TUIO_DECELERATING; else state = TUIO_STOPPED; } void TuioContainer::update (float xp, float yp, float xs, float ys, float ma) { TuioPoint::update(xp,yp); x_speed = xs; y_speed = ys; motion_speed = (float)sqrt(x_speed*x_speed+y_speed*y_speed); motion_accel = ma; x_accel = ma; y_accel = ma; lastPoint = &path.back(); TuioPoint p(currentTime,xpos,ypos); path.push_back(p); if (path.size()>MAX_PATH_SIZE) path.pop_front(); if (motion_accel>0) state = TUIO_ACCELERATING; else if (motion_accel<0) state = TUIO_DECELERATING; else state = TUIO_STOPPED; } void TuioContainer::update (TuioContainer *tcon) { TuioPoint::update(tcon); x_speed = tcon->getXSpeed(); y_speed = tcon->getYSpeed(); motion_speed = tcon->getMotionSpeed(); motion_accel = tcon->getMotionAccel(); x_accel = motion_accel; y_accel = motion_accel; lastPoint = &path.back(); TuioPoint p(tcon->getTuioTime(),xpos,ypos); path.push_back(p); if (path.size()>MAX_PATH_SIZE) path.pop_front(); if (motion_accel>0) state = TUIO_ACCELERATING; else if (motion_accel<0) state = TUIO_DECELERATING; else state = TUIO_STOPPED; } void TuioContainer::remove(TuioTime ttime) { currentTime = ttime; state = TUIO_REMOVED; } long TuioContainer::getSessionID() const{ return session_id; } void TuioContainer::setSessionID(long s_id) { session_id = s_id; } float TuioContainer::getXSpeed() const{ return x_speed; } float TuioContainer::getYSpeed() const{ return y_speed; } TuioPoint TuioContainer::getPosition() const{ TuioPoint p(xpos,ypos); return p; } std::list<TuioPoint> TuioContainer::getPath() const{ return path; } float TuioContainer::getMotionSpeed() const{ return motion_speed; } float TuioContainer::getMotionAccel() const{ return motion_accel; } int TuioContainer::getTuioState() const{ return state; } bool TuioContainer::isMoving() const{ if ((state==TUIO_ACCELERATING) || (state==TUIO_DECELERATING)) return true; else return false; } TuioPoint TuioContainer::predictPosition() { /*if (path.size()>1) { std::list<TuioPoint>::iterator iter = path.end(); std::advance(iter, -2); TuioTime diffTime = currentTime - (*iter).getTuioTime(); float dt = diffTime.<API key>()/1000.0f; float tx = x_speed * dt; float ty = y_speed * dt; float nx = xpos+tx-tx*x_accel*dt; float ny = ypos+ty-ty*y_accel*dt; //if (xposFilter && yposFilter) { // nx = xposFilter->filter(nx,dt); // ny = yposFilter->filter(ny,dt); // //std::cout << dt << " " << xp << " " << xpos << " " << yp << " " << ypos << std::endl; //} //std::cout << nx << " " << ny << std::endl; return TuioPoint(nx,ny); } else return TuioPoint(xpos,ypos);*/ TuioTime diffTime = currentTime - lastPoint->getTuioTime(); float dt = diffTime.<API key>()/1000.0f; float tx = x_speed * dt; float ty = y_speed * dt; float nx = xpos+tx-tx*x_accel*dt; float ny = ypos+ty-ty*y_accel*dt; //if (xposFilter && yposFilter) { // nx = xposFilter->filter(nx,dt); // ny = yposFilter->filter(ny,dt); // //std::cout << dt << " " << xp << " " << xpos << " " << yp << " " << ypos << std::endl; //std::cout << nx << " " << ny << std::endl; return TuioPoint(nx,ny); }
## Host Registry Interface, .DK Host EPP extension commands ## This file is part of Net::DRI ## Net::DRI is free software; you can redistribute it and/or modify ## (at your option) any later version. package Net::DRI::Protocol::EPP::Extensions::DK::Host; use strict; use warnings; use Net::DRI::Exception; use Net::DRI::Util; use DateTime::Format::ISO8601; use Net::DRI::Protocol::EPP::Util; use utf8; =pod =head1 NAME Net::DRI::Protocol::EPP::Extensions::DK::Host - .DK EPP Host extension commands for Net::DRI =head1 DESCRIPTION Please see the README file for details. =head1 SUPPORT For now, support questions should be sent to: E<lt>netdri@dotandco.comE<gt> Please also see the SUPPORT file in the distribution. =head1 SEE ALSO E<lt>http: =head1 AUTHOR David Makuni <d.makuni@live.co.uk> =head1 COPYRIGHT Copyright (c) 2006-2013 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. Copyright (c) 2014-2015 David Makuni <d.makuni@live.co.uk>. All rights reserved. Copyright (c) 2013-2015 Paulo Jorge <paullojorgge@gmail.com>. All rights reserved. Copyright (c) 2017 Michael Holloway <michael@thedarkwinter.com>. All rights reserved. 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 LICENSE file that comes with this distribution for more details. =cut sub register_commands { my ( $class, $version)=@_; my %tmp=( 'create' => [ \&create, undef], 'update' => [ \&update, undef], ); return { 'host' => \%tmp }; } ## HELPERS sub _build_dkhm_host { my ($epp,$host,$rd)=@_; my $mes=$epp->message(); my $ns = $mes->ns('dkhm'); return unless Net::DRI::Util::has_key($rd,'requested_ns_admin'); my $eid=$mes-><API key>('dkhm:requestedNsAdmin','xmlns:dkhm="'.$ns.'"'); $mes->command_extension($eid,$rd->{requested_ns_admin}); return; } sub create { return _build_dkhm_host(@_); } sub update { my ($epp,$host,$todo)=@_; my $requested_ns_admin = $todo->set('requested_ns_admin'); return unless $requested_ns_admin; return _build_dkhm_host($epp,$host, {'requested_ns_admin' => $requested_ns_admin}); } 1;
#include "NetrcAuthResolver.h" #include <cppunit/extensions/HelperMacros.h> #include "prefs.h" #include "Netrc.h" #include "AuthConfig.h" #include "a2functional.h" namespace aria2 { class <API key> : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(<API key>); CPPUNIT_TEST(testResolve<API key>); CPPUNIT_TEST(testResolve<API key>); CPPUNIT_TEST(testResolve<API key>); <API key>(); private: std::unique_ptr<Netrc> netrc_; std::unique_ptr<NetrcAuthResolver> resolver_; public: void setUp() { netrc_.reset(new Netrc()); netrc_->addAuthenticator( make_unique<Authenticator>("localhost", "name", "passwd", "account")); netrc_->addAuthenticator(make_unique<<API key>>( "default", "defaultpasswd", "defaultaccount")); resolver_.reset(new NetrcAuthResolver()); resolver_->setNetrc(netrc_.get()); resolver_->setDefaultCred("foo", "bar"); } void testResolve<API key>(); void testResolve<API key>(); void testResolve<API key>(); }; <API key>(<API key>); void <API key>::testResolve<API key>() { auto authConfig = resolver_->resolveAuthConfig("localhost"); <API key>(std::string("name:passwd"), authConfig->getAuthText()); authConfig = resolver_->resolveAuthConfig("mymachine"); <API key>(std::string("default:defaultpasswd"), authConfig->getAuthText()); resolver_->setNetrc(nullptr); authConfig = resolver_->resolveAuthConfig("localhost"); <API key>(std::string("foo:bar"), authConfig->getAuthText()); } void <API key>::testResolve<API key>() { resolver_->setUserDefinedCred("myname", "mypasswd"); auto authConfig = resolver_->resolveAuthConfig("localhost"); <API key>(std::string("myname:mypasswd"), authConfig->getAuthText()); authConfig = resolver_->resolveAuthConfig("mymachine"); <API key>(std::string("myname:mypasswd"), authConfig->getAuthText()); resolver_->setNetrc(nullptr); authConfig = resolver_->resolveAuthConfig("mymachine"); <API key>(std::string("myname:mypasswd"), authConfig->getAuthText()); } void <API key>::testResolve<API key>() { resolver_->ignoreDefault(); auto authConfig = resolver_->resolveAuthConfig("mirror"); <API key>(std::string("foo:bar"), authConfig->getAuthText()); resolver_->useDefault(); auto defAuthConfig = resolver_->resolveAuthConfig("mirror"); <API key>(std::string("default:defaultpasswd"), defAuthConfig->getAuthText()); } } // namespace aria2
<?php /** * Data Access Object for `forum_subscription` table. * * @author Egor Bulgakov <egor.bulgakov@gmail.com> * @package ow.ow_plugins.forum.bol * @since 1.0 */ class <API key> extends OW_BaseDao { /** * Class constructor * */ protected function __construct() { parent::__construct(); } /** * Class instance * * @var <API key> */ private static $classInstance; /** * Returns class instance * * @return <API key> */ public static function getInstance() { if ( self::$classInstance === null ) { self::$classInstance = new self(); } return self::$classInstance; } /** * @see OW_BaseDao::getDtoClassName() * */ public function getDtoClassName() { return '<API key>'; } /** * @see OW_BaseDao::getTableName() * */ public function getTableName() { return OW_DB_PREFIX . 'forum_subscription'; } /** * Returns list of topic subscribers * * @param int $topicId * @return array */ public function <API key>( $topicId ) { $sql = "SELECT `userId` FROM `".$this->getTableName()."` WHERE `topicId`=:topicId"; return $this->dbo->queryForColumnList($sql, array('topicId' => $topicId)); } public function addSubscription( <API key> $subscription ) { $this->save($subscription); return $subscription->id; } public function deleteSubscription( $userId, $topicId ) { $example = new OW_Example(); $example->andFieldEqual('userId', $userId); $example->andFieldEqual('topicId', $topicId); $this->deleteByExample($example); } public function isUserSubscribed( $userId, $topicId ) { $example = new OW_Example(); $example->andFieldEqual('userId', $userId); $example->andFieldEqual('topicId', $topicId); return $this->findObjectByExample($example) ? true : false; } }
subroutine build_fock_tmp(fock_diag_tmp,det_ref,Nint) use bitmasks implicit none BEGIN_DOC ! Build the diagonal of the Fock matrix corresponding to a generator ! determinant. F_00 is <i|H|i> = E0. END_DOC integer, intent(in) :: Nint integer(bit_kind), intent(in) :: det_ref(Nint,2) double precision, intent(out) :: fock_diag_tmp(2,mo_tot_num+1) integer :: occ(Nint*bit_kind_size,2) integer :: ne(2), i, j, ii, jj double precision :: E0 ! Compute Fock matrix diagonal elements call <API key>(det_ref,occ,Ne,Nint) fock_diag_tmp = 0.d0 E0 = 0.d0 if (Ne(1) /= elec_alpha_num) then print *, 'Error in build_fock_tmp (alpha)', Ne(1), Ne(2) stop -1 endif if (Ne(2) /= elec_beta_num) then print *, 'Error in build_fock_tmp (beta)', Ne(1), Ne(2) stop -1 endif ! Occupied MOs do ii=1,elec_alpha_num i = occ(ii,1) fock_diag_tmp(1,i) = fock_diag_tmp(1,i) + <API key>(i,i) E0 = E0 + <API key>(i,i) do jj=1,elec_alpha_num j = occ(jj,1) if (i==j) cycle fock_diag_tmp(1,i) = fock_diag_tmp(1,i) + <API key>(i,j) E0 = E0 + 0.5d0*<API key>(i,j) enddo do jj=1,elec_beta_num j = occ(jj,2) fock_diag_tmp(1,i) = fock_diag_tmp(1,i) + <API key>(i,j) E0 = E0 + <API key>(i,j) enddo enddo do ii=1,elec_beta_num i = occ(ii,2) fock_diag_tmp(2,i) = fock_diag_tmp(2,i) + <API key>(i,i) E0 = E0 + <API key>(i,i) do jj=1,elec_beta_num j = occ(jj,2) if (i==j) cycle fock_diag_tmp(2,i) = fock_diag_tmp(2,i) + <API key>(i,j) E0 = E0 + 0.5d0*<API key>(i,j) enddo do jj=1,elec_alpha_num j = occ(jj,1) fock_diag_tmp(2,i) = fock_diag_tmp(2,i) + <API key>(i,j) enddo enddo ! Virtual MOs do i=1,mo_tot_num if (fock_diag_tmp(1,i) /= 0.d0) cycle fock_diag_tmp(1,i) = fock_diag_tmp(1,i) + <API key>(i,i) do jj=1,elec_alpha_num j = occ(jj,1) fock_diag_tmp(1,i) = fock_diag_tmp(1,i) + <API key>(i,j) enddo do jj=1,elec_beta_num j = occ(jj,2) fock_diag_tmp(1,i) = fock_diag_tmp(1,i) + <API key>(i,j) enddo enddo do i=1,mo_tot_num if (fock_diag_tmp(2,i) /= 0.d0) cycle fock_diag_tmp(2,i) = fock_diag_tmp(2,i) + <API key>(i,i) do jj=1,elec_beta_num j = occ(jj,2) fock_diag_tmp(2,i) = fock_diag_tmp(2,i) + <API key>(i,j) enddo do jj=1,elec_alpha_num j = occ(jj,1) fock_diag_tmp(2,i) = fock_diag_tmp(2,i) + <API key>(i,j) enddo enddo fock_diag_tmp(1,mo_tot_num+1) = E0 fock_diag_tmp(2,mo_tot_num+1) = E0 end
#if HAVE_CONFIG_H #include <config.h> #endif #include <stdlib.h> #include <errno.h> #include <sys/mman.h> #include <assert.h> #include <string.h> #include <unistd.h> #include <pthread.h> #include <stdint.h> #include "slab.h" #define SLAB_PAGES 4 /* Number of pages the slab allocator has allocated. */ static int <API key>; /* Buffer control structure. Lives at the end of an object. If the buffer is allocated, SLAB points to the slab to which it belongs. If the buffer is free, NEXT points to next buffer on free list. */ union hurd_bufctl { union hurd_bufctl *next; struct hurd_slab *slab; }; /* When the allocator needs to grow a cache, it allocates a slab. A slab consists of one or more pages of memory, split up into equally sized chunks. */ struct hurd_slab { struct hurd_slab *next; struct hurd_slab *prev; /* The reference counter holds the number of allocated chunks in the slab. When the counter is zero, all chunks are free and the slab can be relinquished. */ int refcount; /* Single linked list of free buffers in the slab. */ union hurd_bufctl *free_list; }; /* Allocate a buffer in *PTR of size SIZE which must be a power of 2 and self aligned (i.e. aligned on a SIZE byte boundary) for slab space SPACE. Return 0 on success, an error code on failure. */ static error_t allocate_buffer (struct hurd_slab_space *space, size_t size, void **ptr) { if (space->allocate_buffer) return space->allocate_buffer (space->hook, size, ptr); else { *ptr = mmap (NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); if (*ptr == MAP_FAILED) return errno; else return 0; } } /* Deallocate buffer BUFFER of size SIZE which was allocated for slab space SPACE. Return 0 on success, an error code on failure. */ static error_t deallocate_buffer (struct hurd_slab_space *space, void *buffer, size_t size) { if (space->deallocate_buffer) return space->deallocate_buffer (space->hook, buffer, size); else { if (munmap (buffer, size) == -1) return errno; else return 0; } } /* Insert SLAB into the list of slabs in SPACE. SLAB is expected to be complete (so it will be inserted at the end). */ static void insert_slab (struct hurd_slab_space *space, struct hurd_slab *slab) { assert (slab->refcount == 0); if (space->slab_first == 0) space->slab_first = space->slab_last = slab; else { space->slab_last->next = slab; slab->prev = space->slab_last; space->slab_last = slab; } } /* Remove SLAB from list of slabs in SPACE. */ static void remove_slab (struct hurd_slab_space *space, struct hurd_slab *slab) { if (slab != space->slab_first && slab != space->slab_last) { slab->next->prev = slab->prev; slab->prev->next = slab->next; return; } if (slab == space->slab_first) { space->slab_first = slab->next; if (space->slab_first) space->slab_first->prev = NULL; } if (slab == space->slab_last) { if (slab->prev) slab->prev->next = NULL; space->slab_last = slab->prev; } } /* Iterate through slabs in SPACE and release memory for slabs that are complete (no allocated buffers). */ static error_t reap (struct hurd_slab_space *space) { struct hurd_slab *s, *next, *new_first; error_t err = 0; for (s = space->slab_first; s; s = next) { next = s->next; /* If the reference counter is zero there is no allocated buffers, so it can be freed. */ if (!s->refcount) { remove_slab (space, s); /* If there is a destructor it must be invoked for every buffer in the slab. */ if (space->destructor) { union hurd_bufctl *bufctl; for (bufctl = s->free_list; bufctl; bufctl = bufctl->next) { void *buffer = (((void *) bufctl) - (space->size - sizeof *bufctl)); (*space->destructor) (space->hook, buffer); } } /* The slab is located at the end of the page (with the buffers in front of it), get address by masking with page size. This frees the slab and all its buffers, since they live on the same page. */ err = deallocate_buffer (space, (void *) (((uintptr_t) s) + sizeof (struct hurd_slab) - space->slab_size), space->slab_size); if (err) break; <API key> } } /* Even in the case of an error, first_free must be updated since that slab may have been deallocated. */ new_first = space->slab_first; while (new_first) { if (new_first->refcount != space->full_refcount) break; new_first = new_first->next; } space->first_free = new_first; return err; } /* Initialize slab space SPACE. */ static void init_space (hurd_slab_space_t space) { size_t size = space->requested_size + sizeof (union hurd_bufctl); size_t alignment = space->requested_align; /* If SIZE is so big that one object can not fit into a page something gotta be really wrong. */ size = (size + alignment - 1) & ~(alignment - 1); assert (size <= (space->slab_size - sizeof (struct hurd_slab) - sizeof (union hurd_bufctl))); space->size = size; /* Number of objects that fit into one page. Used to detect when there are no free objects left in a slab. */ space->full_refcount = ((space->slab_size - sizeof (struct hurd_slab)) / size); /* FIXME: Notify pager's reap functionality about this slab space. */ space->initialized = true; } /* SPACE has no more memory. Allocate new slab and insert it into the list, repoint free_list and return possible error. */ static error_t grow (struct hurd_slab_space *space) { error_t err; struct hurd_slab *new_slab; union hurd_bufctl *bufctl; int nr_objs, i; void *p; /* If the space has not yet been initialized this is the place to do so. It is okay to test some fields such as first_free prior to initialization since they will be a null pointer in any case. */ if (!space->initialized) init_space (space); err = allocate_buffer (space, space->slab_size, &p); if (err) return err; <API key>++; new_slab = (p + space->slab_size - sizeof (struct hurd_slab)); memset (new_slab, 0, sizeof (*new_slab)); /* Calculate the number of objects that the page can hold. SPACE->size should be adjusted to handle alignment. */ nr_objs = ((space->slab_size - sizeof (struct hurd_slab)) / space->size); for (i = 0; i < nr_objs; i++, p += space->size) { /* Invoke constructor at object creation time, not when it is really allocated (for faster allocation). */ if (space->constructor) { error_t err = (*space->constructor) (space->hook, p); if (err) { /* The allocated page holds both slab and memory objects. Call the destructor for objects that has been initialized. */ for (bufctl = new_slab->free_list; bufctl; bufctl = bufctl->next) { void *buffer = (((void *) bufctl) - (space->size - sizeof *bufctl)); (*space->destructor) (space->hook, buffer); } deallocate_buffer (space, p, space->slab_size); return err; } } /* The most activity is in front of the object, so it is most likely to be overwritten if a freed buffer gets accessed. Therefor, put the bufctl structure at the end of the object. */ bufctl = (p + space->size - sizeof *bufctl); bufctl->next = new_slab->free_list; new_slab->free_list = bufctl; } /* Insert slab into the list of available slabs for this cache. The only time a slab should be allocated is when there is no more buffers, so it is safe to repoint first_free. */ insert_slab (space, new_slab); space->first_free = new_slab; return 0; } /* Initialize the slab space SPACE. */ error_t hurd_slab_init (hurd_slab_space_t space, size_t size, size_t alignment, <API key> allocate_buffer, <API key> deallocate_buffer, <API key> constructor, <API key> destructor, void *hook) { error_t err; /* Initialize all members to zero by default. */ memset (space, 0, sizeof (struct hurd_slab_space)); if (!alignment) /* FIXME: Is this a good default? Maybe eight (8) is better, since several architectures require that double and friends are eight byte aligned. */ alignment = __alignof__ (void *); space->requested_size = size; space->requested_align = alignment; space->slab_size = getpagesize () * SLAB_PAGES; /* Testing the size here avoids an assertion in init_space. */ size = size + sizeof (union hurd_bufctl); size = (size + alignment - 1) & ~(alignment - 1); if (size > (space->slab_size - sizeof (struct hurd_slab) - sizeof (union hurd_bufctl))) return EINVAL; err = pthread_mutex_init (&space->lock, NULL); if (err) return err; space->allocate_buffer = allocate_buffer; space->deallocate_buffer = deallocate_buffer; space->constructor = constructor; space->destructor = destructor; space->hook = hook; /* The remaining fields will be initialized by init_space. */ return 0; } /* Create a new slab space with the given object size, alignment, constructor and destructor. ALIGNMENT can be zero. */ error_t hurd_slab_create (size_t size, size_t alignment, <API key> allocate_buffer, <API key> deallocate_buffer, <API key> constructor, <API key> destructor, void *hook, hurd_slab_space_t *r_space) { hurd_slab_space_t space; error_t err; space = malloc (sizeof (struct hurd_slab_space)); if (!space) return ENOMEM; err = hurd_slab_init (space, size, alignment, allocate_buffer, deallocate_buffer, constructor, destructor, hook); if (err) { free (space); return err; } *r_space = space; return 0; } /* Destroy all objects and the slab space SPACE. Returns EBUSY if there are still allocated objects in the slab. */ error_t hurd_slab_destroy (hurd_slab_space_t space) { error_t err; /* The caller wants to destroy the slab. It can not be destroyed if there are any outstanding memory allocations. */ pthread_mutex_lock (&space->lock); err = reap (space); if (err) { <API key> (&space->lock); return err; } if (space->slab_first) { /* There are still slabs, i.e. there is outstanding allocations. Return EBUSY. */ <API key> (&space->lock); return EBUSY; } /* FIXME: Remove slab space from pager's reap functionality. */ return 0; } /* Destroy all objects and the slab space SPACE. If there were no outstanding allocations free the slab space. Returns EBUSY if there are still allocated objects in the slab space. */ error_t hurd_slab_free (hurd_slab_space_t space) { error_t err = hurd_slab_destroy (space); if (err) return err; free (space); return 0; } /* Allocate a new object from the slab space SPACE. */ error_t hurd_slab_alloc (hurd_slab_space_t space, void **buffer) { error_t err; union hurd_bufctl *bufctl; pthread_mutex_lock (&space->lock); /* If there is no slabs with free buffer, the cache has to be expanded with another slab. If the slab space has not yet been initialized this is always true. */ if (!space->first_free) { err = grow (space); if (err) { <API key> (&space->lock); return err; } } /* Remove buffer from the free list and update the reference counter. If the reference counter will hit the top, it is handled at the time of the next allocation. */ bufctl = space->first_free->free_list; space->first_free->free_list = bufctl->next; space->first_free->refcount++; bufctl->slab = space->first_free; /* If the reference counter hits the top it means that there has been an allocation boost, otherwise dealloc would have updated the first_free pointer. Find a slab with free objects. */ if (space->first_free->refcount == space->full_refcount) { struct hurd_slab *new_first = space->slab_first; while (new_first) { if (new_first->refcount != space->full_refcount) break; new_first = new_first->next; } /* If first_free is set to NULL here it means that there are only empty slabs. The next call to alloc will allocate a new slab if there was no call to dealloc in the meantime. */ space->first_free = new_first; } *buffer = ((void *) bufctl) - (space->size - sizeof *bufctl); <API key> (&space->lock); return 0; } static inline void put_on_slab_list (struct hurd_slab *slab, union hurd_bufctl *bufctl) { bufctl->next = slab->free_list; slab->free_list = bufctl; slab->refcount assert (slab->refcount >= 0); } /* Deallocate the object BUFFER from the slab space SPACE. */ void hurd_slab_dealloc (hurd_slab_space_t space, void *buffer) { struct hurd_slab *slab; union hurd_bufctl *bufctl; assert (space->initialized); pthread_mutex_lock (&space->lock); bufctl = (buffer + (space->size - sizeof *bufctl)); put_on_slab_list (slab = bufctl->slab, bufctl); /* Try to have first_free always pointing at the slab that has the most number of free objects. So after this deallocation, update the first_free pointer if reference counter drops below the current reference counter of first_free. */ if (!space->first_free || slab->refcount < space->first_free->refcount) space->first_free = slab; <API key> (&space->lock); }
/* Do not modify this file, it was automatically generated by the * PNG2cpp CMake script, using a *.png file as input. */ #include <bitmaps.h> static const unsigned char png[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c, 0xce, 0x00, 0x00, 0x07, 0x49, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xa5, 0x56, 0x6b, 0x4c, 0x53, 0x69, 0x1a, 0x46, 0x81, 0xc1, 0x0b, 0x28, 0x2a, 0xe2, 0x65, 0x47, 0x67, 0x9c, 0x8c, 0xcb, 0x44, 0x9d, 0xc4, 0xe8, 0x26, 0xeb, 0xea, 0xfe, 0xd8, 0xac, 0x89, 0x9a, 0xe8, 0x46, 0x23, 0x51, 0x36, 0x5e, 0xc6, 0xfd, 0xe1, 0xae, 0x66, 0x86, 0x31, 0x81, 0xcc, 0xe8, 0x8c, 0x51, 0x71, 0x91, 0x8b, 0xb2, 0x28, 0x61, 0x03, 0x8c, 0x80, 0x20, 0x0d, 0xa2, 0xcb, 0x5d, 0x90, 0xfb, 0x4d, 0x90, 0x3b, 0x02, 0x15, 0xa7, 0x48, 0x2f, 0xa7, 0x2d, 0xa7, 0xa7, 0xa5, 0xb4, 0xd0, 0xd2, 0x96, 0xb6, 0xd0, 0x9e, 0xb6, 0xdf, 0x3e, 0x1f, 0x5b, 0x71, 0x46, 0x63, 0x76, 0xb2, 0x7b, 0x92, 0x27, 0xe7, 0xf4, 0xf4, 0xfb, 0xde, 0xe7, 0x7b, 0x9f, 0xf7, 0x76, 0x7c, 0x08, 0x21, 0x3e, 0x14, 0xb8, 0xd6, 0x84, 0x84, 0x84, 0x7c, 0x8b, 0xfb, 0xaf, 0x5f, 0xbf, 0xfb, 0x7f, 0x80, 0x6b, 0x2d, 0xec, 0x9d, 0x5f, 0xb3, 0x66, 0xcd, 0x1f, 0xbd, 0xbf, 0x7d, 0x36, 0x03, 0x9b, 0x80, 0xcf, 0x77, 0xef, 0xde, 0x9d, 0xb5, 0x6b, 0xd7, 0xae, 0x0c, 0x2c, 0xb8, 0x46, 0xdf, 0xfd, 0x8f, 0x04, 0x9f, 0xae, 0x5e, 0xbd, 0xfa, 0xbb, 0x75, 0xeb, 0xd6, 0x65, 0x1e, 0x3f, 0x7e, 0x3c, 0x7f, 0xc5, 0x8a, 0x15, 0x49, 0x4b, 0x96, 0x2c, 0x09, 0xf7, 0x09, 0x0c, 0x0c, 0x4c, 0xdb, 0xb8, 0x71, 0x63, 0x66, 0x40, 0x40, 0x40, 0xe1, 0xc1, 0x83, 0x07, 0xdb, 0xc6, 0xc6, 0xc6, 0x9e, 0x34, 0x37, 0x37, 0xe7, 0x6f, 0xdb, 0xb6, 0x2d, 0x63, 0xd5, 0xaa, 0x55, 0xdf, 0x63, 0xe3, 0x86, 0x5f, 0x60, 0x7c, 0x01, 0xb0, 0x03, 0xeb, 0x13, 0xb6, 0x6e, 0xdd, 0x9a, 0x9b, 0x91, 0x91, 0x51, 0xdf, 0xd7, 0xd7, 0x27, 0x8c, 0x8d, 0x8d, 0x95, 0x85, 0x85, 0x85, 0x75, 0x2c, 0x5a, 0xb4, 0x28, 0xd7, 0x67, 0xd9, 0xb2, 0x65, 0xe9, 0x5a, 0xad, 0x56, 0x50, 0x52, 0x52, 0xf2, 0x38, 0x32, 0x32, 0x52, 0xfc, 0xf4, 0xe9, 0x53, 0x59, 0x7a, 0x7a, 0x3a, 0xdb, 0xdb, 0xdb, 0x2b, 0xbc, 0x7f, 0xff, 0x7e, 0xed, 0xa6, 0x4d, 0x9b, 0xee, 0xae, 0x5c, 0xb9, 0xf2, 0x18, 0x35, 0xf6, 0x1e, 0x92, 0x0f, 0x83, 0x83, 0x83, 0xef, 0xec, 0xd9, 0xb3, 0xa7, 0x2e, 0x3b, 0x3b, 0x5b, 0x84, 0xfd, 0xd2, 0xe2, 0xe2, 0xe2, 0xd1, 0x57, 0xaf, 0x5e, 0x29, 0x5a, 0x5b, 0x5b, 0x19, 0x90, 0xf5, 0xe0, 0xff, 0xac, 0x79, 0xa2, 0x67, 0xcf, 0x9e, 0x3d, 0x8e, 0x8b, 0x8b, 0x93, 0xe9, 0xf5, 0x7a, 0xce, 0x68, 0x34, 0x8e, 0x56, 0x55, 0x55, 0x71, 0x95, 0x95, 0x95, 0x8a, 0xa6, 0xa6, 0x26, 0x49, 0x78, 0x78, 0x78, 0x2d, 0x24, 0x88, 0x83, 0xd1, 0xe5, 0x3f, 0x21, 0xf0, 0x0d, 0x0a, 0x0a, 0xfa, 0x0b, 0x64, 0x6a, 0x49, 0x4a, 0x4a, 0x92, 0x8e, 0x8c, 0x8c, 0x48, 0x61, 0x43, 0xd5, 0xd5, 0xd5, 0xc5, 0x59, 0xad, 0x56, 0x85, 0xc5, 0x62, 0x61, 0x1b, 0x1b, 0x1b, 0x95, 0x37, 0x6e, 0xdc, 0xe8, 0x59, 0xba, 0x74, 0x69, 0xf6, 0x3c, 0x51, 0x67, 0x67, 0xe7, 0x63, 0x6c, 0x10, 0x7b, 0x3c, 0x1e, 0xc6, 0x64, 0x32, 0xb1, 0x3a, 0x9d, 0x4e, 0x8d, 0xcd, 0x5c, 0x5b, 0x5b, 0x1b, 0x27, 0x12, 0x89, 0xa4, 0x57, 0xae, 0x5c, 0x11, 0x63, 0x6d, 0x21, 0x08, 0x82, 0x00, 0x3f, 0x3c, 0xdf, 0xdd, 0xbb, 0x77, 0xef, 0xc8, 0xd0, 0xd0, 0x10, 0x3d, 0x9c, 0x02, 0x9e, 0xa8, 0xc7, 0xc7, 0xc7, 0x59, 0xb3, 0xd9, 0xcc, 0x4e, 0x4f, 0x4f, 0x8f, 0x52, 0x3b, 0x20, 0x66, 0x70, 0xf8, 0x6e, 0x84, 0x25, 0xe7, 0x67, 0x44, 0xb7, 0x6e, 0xdd, 0x92, 0x18, 0x0c, 0x06, 0x95, 0xcb, 0xe5, 0x92, 0xe3, 0xd4, 0x8c, 0xdd, 0x6e, 0x57, 0x8e, 0x8e, 0x8e, 0xaa, 0xe1, 0x9d, 0x4e, 0xa1, 0x50, 0xa8, 0x20, 0x83, 0x64, 0xf9, 0xf2, 0xe5, 0x75, 0x90, 0xa2, 0xfe, 0xf4, 0xe9, 0xd3, 0x23, 0x36, 0x9b, 0x8d, 0x19, 0x1e, 0x1e, 0x66, 0xdb, 0xdb, 0xdb, 0x35, 0x94, 0xe0, 0xf5, 0x3e, 0xb7, 0xdb, 0x2d, 0x9f, 0x9a, 0x9a, 0x52, 0xc1, 0x23, 0x05, 0x25, 0xf2, 0xf3, 0xf3, 0x7b, 0x13, 0x23, 0xb8, 0x5c, 0x0e, 0x22, 0x31, 0x5d, 0x84, 0x40, 0x8e, 0xc1, 0xc0, 0x78, 0x7d, 0x7d, 0xfd, 0x2c, 0x62, 0xe5, 0x61, 0x18, 0x86, 0x80, 0x90, 0xf4, 0xf7, 0xf7, 0x7b, 0x1e, 0x3d, 0x7a, 0xe4, 0x3e, 0x7b, 0xf6, 0xac, 0x15, 0x24, 0x72, 0xc8, 0x3a, 0x26, 0x93, 0xc9, 0x38, 0xba, 0x87, 0x92, 0x4c, 0x4e, 0x4e, 0x72, 0x13, 0x13, 0x13, 0x1c, 0xf6, 0x68, 0x9d, 0x4e, 0xa7, 0x02, 0x6a, 0x30, 0x09, 0x09, 0x09, 0xdd, 0xbe, 0xbe, 0xbe, 0xf7, 0xe7, 0x89, 0x7a, 0x7a, 0x7a, 0xe6, 0x88, 0xe0, 0xbe, 0xba, 0xae, 0xae, 0xce, 0x22, 0x97, 0xcb, 0x89, 0x92, 0x1b, 0x27, 0x82, 0xaa, 0x01, 0xf2, 0x6d, 0x5a, 0x23, 0xf9, 0x3a, 0xa5, 0x8e, 0xdc, 0x2d, 0xeb, 0x25, 0x3f, 0x4a, 0x39, 0x02, 0x63, 0x04, 0x01, 0xe7, 0x41, 0xae, 0x99, 0x99, 0x99, 0x51, 0x52, 0x99, 0x21, 0x9f, 0x0a, 0x36, 0x38, 0x1a, 0x23, 0xa8, 0xa2, 0xa4, 0x1e, 0x21, 0x7b, 0xe5, 0xf1, 0xf1, 0xf1, 0x5d, 0xfe, 0xfe, 0xfe, 0x6f, 0xa4, 0xc3, 0x29, 0xca, 0x6f, 0xde, 0xbc, 0x29, 0x06, 0x89, 0xd5, 0x64, 0x32, 0x93, 0x4c, 0x18, 0x3d, 0x1d, 0x57, 0xed, 0xce, 0xaa, 0x7e, 0xc9, 0x37, 0xbf, 0xd0, 0x38, 0xea, 0x07, 0xd4, 0xce, 0xac, 0x5a, 0xb1, 0x23, 0xe2, 0x5a, 0xa9, 0x3b, 0x26, 0xbb, 0x85, 0x18, 0xa6, 0x4c, 0xa4, 0xa6, 0xa6, 0xc6, 0xc3, 0xb2, 0xac, 0x46, 0x2c, 0x16, 0xb3, 0x20, 0xa0, 0x31, 0xe2, 0x68, 0x32, 0x51, 0xf9, 0x79, 0x9e, 0x97, 0xb7, 0xb4, 0xb4, 0x30, 0x48, 0x86, 0x4e, 0xc4, 0xe8, 0x4d, 0x32, 0x40, 0xae, 0x32, 0x10, 0x8d, 0xe1, 0x99, 0x24, 0x17, 0xb4, 0x93, 0xd8, 0x07, 0xcf, 0x9d, 0x8c, 0x76, 0x9a, 0x9f, 0xb4, 0xcc, 0xba, 0x39, 0xfd, 0xb4, 0x9b, 0x19, 0x33, 0xbb, 0xc4, 0x6a, 0x33, 0x5f, 0xd6, 0x2a, 0x72, 0x9d, 0xbf, 0xf5, 0x98, 0xff, 0xea, 0x76, 0x9d, 0x07, 0x41, 0x27, 0x28, 0x01, 0x27, 0x92, 0x45, 0x43, 0x25, 0xa3, 0x12, 0xd2, 0x18, 0x81, 0x44, 0x81, 0xcc, 0x55, 0x41, 0x5a, 0x39, 0xe2, 0xda, 0xb9, 0x78, 0xf1, 0xe2, 0xcc, 0x79, 0x22, 0xe8, 0x5f, 0x86, 0x74, 0x76, 0xf7, 0xbd, 0x94, 0x93, 0x33, 0x09, 0x35, 0xee, 0x17, 0xf2, 0x49, 0x9e, 0x9b, 0xb0, 0xb9, 0xc7, 0xa7, 0x66, 0x5c, 0x63, 0x46, 0x3b, 0x2f, 0xd7, 0x9a, 0x5d, 0x43, 0x72, 0x1d, 0xdf, 0xd4, 0x27, 0x71, 0x7d, 0x97, 0x56, 0xe5, 0x38, 0x77, 0xa7, 0xd1, 0xf9, 0xa0, 0x66, 0x80, 0x48, 0x24, 0x12, 0x82, 0x78, 0x6a, 0x69, 0xa6, 0x51, 0x6f, 0xa4, 0x52, 0xa9, 0x06, 0x04, 0x73, 0x31, 0x82, 0x74, 0x73, 0x1e, 0xa1, 0x60, 0xdf, 0xd4, 0x11, 0x32, 0xa7, 0x16, 0xee, 0x93, 0x7f, 0x3c, 0x68, 0x27, 0x69, 0x95, 0x22, 0xc7, 0xf0, 0xa8, 0x81, 0x97, 0x70, 0x06, 0x9e, 0xd5, 0x4f, 0x53, 0x38, 0x59, 0xbd, 0xd5, 0x01, 0x0f, 0x67, 0xcb, 0x9a, 0x07, 0xf8, 0xc8, 0xc4, 0x82, 0xd9, 0x7b, 0x0d, 0x8c, 0xf5, 0x5c, 0x52, 0x8d, 0x07, 0x9d, 0x84, 0x54, 0x54, 0x54, 0x58, 0xd4, 0x6a, 0x35, 0xdb, 0xd1, 0xd1, 0x41, 0x4b, 0x41, 0x85, 0xf2, 0x50, 0x51, 0x0f, 0xa9, 0x47, 0x48, 0x86, 0x0e, 0x48, 0x77, 0x6f, 0x9e, 0x08, 0x8b, 0x7b, 0x85, 0x42, 0x21, 0xf9, 0x1b, 0x36, 0x97, 0x77, 0xab, 0xec, 0x2f, 0x95, 0x46, 0xa7, 0x84, 0x9b, 0x72, 0x0c, 0x2b, 0xc6, 0x1d, 0x52, 0xce, 0x30, 0x03, 0x8f, 0x66, 0xc4, 0x9c, 0xd1, 0xfe, 0xf7, 0xf4, 0xe2, 0x99, 0x2f, 0x6f, 0xe4, 0xcc, 0xe4, 0xb5, 0x30, 0xd3, 0x5f, 0xc4, 0x57, 0xbb, 0x29, 0x11, 0xe4, 0xe3, 0x07, 0x07, 0x07, 0x69, 0x42, 0x70, 0x34, 0xf3, 0xa8, 0x37, 0x54, 0x42, 0x10, 0x31, 0xa8, 0xcd, 0x8e, 0x9f, 0x25, 0x03, 0x6a, 0xa5, 0x0b, 0xc5, 0x47, 0xa2, 0x52, 0xeb, 0x49, 0x46, 0x95, 0x68, 0x66, 0x50, 0x6e, 0x98, 0x15, 0x6b, 0x2c, 0x36, 0xa9, 0x7a, 0xca, 0x3e, 0xac, 0xd0, 0xda, 0x7b, 0x86, 0x64, 0xb6, 0x7e, 0xd9, 0xc4, 0x64, 0x74, 0x42, 0xb6, 0xed, 0x7c, 0xcc, 0x0f, 0xf6, 0xa2, 0x4e, 0x95, 0xe9, 0x4c, 0x5c, 0xa5, 0x1b, 0xc9, 0x40, 0x1e, 0x3e, 0x7c, 0xe8, 0x44, 0x37, 0x18, 0xa5, 0xc6, 0x69, 0x47, 0x80, 0x3d, 0x8e, 0x02, 0xc9, 0xa2, 0x48, 0x4e, 0x4e, 0x6e, 0x7f, 0x3b, 0xbd, 0x9f, 0x40, 0x3e, 0x22, 0xa8, 0xee, 0x27, 0x51, 0x19, 0xad, 0x0e, 0x41, 0xad, 0xd0, 0xd6, 0x38, 0x30, 0x6a, 0x7d, 0x2e, 0xd1, 0x99, 0x5f, 0x71, 0x16, 0xbd, 0x50, 0xa6, 0x1d, 0xff, 0x57, 0x4d, 0x97, 0x31, 0x3a, 0xee, 0x07, 0xeb, 0xf9, 0x6b, 0xe9, 0xb6, 0xa4, 0x87, 0xdd, 0xb6, 0xe8, 0x7f, 0xd6, 0x7b, 0x94, 0x4a, 0x25, 0xcd, 0xbe, 0x29, 0xea, 0x09, 0x3a, 0x89, 0x06, 0xfd, 0x4d, 0x83, 0x78, 0xcf, 0x65, 0x1d, 0x32, 0x58, 0x7e, 0xfb, 0xf6, 0xed, 0xf6, 0x05, 0x0b, 0x16, 0xe4, 0xcd, 0x13, 0x61, 0x51, 0x31, 0x95, 0x40, 0x3f, 0x61, 0x24, 0x7f, 0xbe, 0x5e, 0xe1, 0xb9, 0x57, 0x3f, 0x32, 0x0d, 0x32, 0x53, 0x61, 0xd3, 0x8b, 0xa9, 0x67, 0x43, 0xec, 0xe4, 0x73, 0xf1, 0x98, 0x7e, 0x50, 0x61, 0xd4, 0x46, 0xc7, 0xdd, 0xb5, 0x9d, 0xbb, 0x92, 0x66, 0xff, 0x22, 0xbe, 0x96, 0x17, 0x49, 0x59, 0x52, 0x5b, 0x5b, 0x4b, 0x70, 0x48, 0x1d, 0x3a, 0x8b, 0x1a, 0x8d, 0x94, 0xa5, 0xb1, 0x51, 0xa9, 0x54, 0x5c, 0x43, 0x43, 0x03, 0x17, 0x13, 0x13, 0xc3, 0xa4, 0xa6, 0xa6, 0xb6, 0x2d, 0x5c, 0xb8, 0xf0, 0x3f, 0x44, 0x88, 0x8d, 0x00, 0x6e, 0x0b, 0x50, 0x84, 0xdd, 0xd8, 0x44, 0x84, 0x23, 0x1c, 0x39, 0x7a, 0xb9, 0xc4, 0x9d, 0x58, 0xd0, 0x69, 0x2d, 0x7a, 0x3a, 0x6c, 0x12, 0x3c, 0xe9, 0x36, 0x36, 0x0b, 0x55, 0x13, 0x8d, 0x03, 0x2a, 0xc3, 0x57, 0xb1, 0xf7, 0xec, 0x7f, 0xfa, 0x26, 0xdf, 0x55, 0xda, 0x3c, 0x44, 0x90, 0x00, 0xe4, 0xd2, 0xa5, 0x4b, 0x3c, 0xc8, 0xb4, 0x88, 0x15, 0x0d, 0xbe, 0xea, 0xe2, 0xc5, 0x8b, 0x12, 0xcc, 0x21, 0xc9, 0x85, 0x0b, 0x17, 0xfa, 0xaf, 0x5f, 0xbf, 0xde, 0x20, 0x10, 0x08, 0x0a, 0xe6, 0x88, 0xe8, 0x08, 0x00, 0x59, 0x5a, 0x68, 0x68, 0x68, 0xe6, 0x89, 0x13, 0x27, 0x32, 0x31, 0x22, 0x86, 0x51, 0x80, 0x44, 0x3f, 0x69, 0xa2, 0x1d, 0xc1, 0x13, 0x71, 0xb5, 0x84, 0x8f, 0x4c, 0x69, 0x70, 0x7c, 0x99, 0x5c, 0xed, 0x3c, 0x13, 0x5f, 0xc5, 0xff, 0x35, 0xb1, 0xc2, 0x23, 0x63, 0x75, 0x04, 0x95, 0x4f, 0xe8, 0xba, 0xb2, 0xb2, 0x32, 0x72, 0xf5, 0xea, 0x55, 0x37, 0xf6, 0xb2, 0x47, 0x8e, 0x1c, 0x79, 0xb1, 0x7f, 0xff, 0xfe, 0x52, 0xd8, 0xcc, 0x46, 0x67, 0x4f, 0xc7, 0x7c, 0x8a, 0xc7, 0x73, 0x34, 0xea, 0xe8, 0xd0, 0x4f, 0xe7, 0x4a, 0x08, 0xf0, 0x7b, 0xb4, 0xfd, 0xaf, 0x8f, 0x1e, 0x3d, 0xda, 0x5a, 0x54, 0x54, 0xe4, 0xa2, 0xad, 0x86, 0x16, 0x25, 0xa3, 0xd2, 0x11, 0x11, 0xa3, 0x21, 0x66, 0x8b, 0x85, 0x20, 0x75, 0xe7, 0xe4, 0xca, 0xcb, 0xcb, 0x23, 0x88, 0xc1, 0xdc, 0x3d, 0x27, 0x27, 0x87, 0xa4, 0xa4, 0xa4, 0x78, 0x76, 0xec, 0xd8, 0x51, 0x8a, 0xc0, 0xff, 0x01, 0x76, 0x82, 0xdf, 0x99, 0x5b, 0xef, 0x9b, 0x9a, 0x87, 0x0e, 0x1d, 0xfa, 0x2c, 0x2a, 0x2a, 0xaa, 0x14, 0xbd, 0x4a, 0x9f, 0x9f, 0x9f, 0xef, 0xc2, 0x60, 0xa4, 0x46, 0xf9, 0xcb, 0x97, 0x2f, 0x3b, 0x4e, 0x9e, 0x3c, 0x69, 0x4e, 0x4c, 0x4c, 0x34, 0x15, 0x16, 0x16, 0x12, 0xfa, 0x1e, 0x87, 0x22, 0x99, 0x99, 0x99, 0x24, 0x37, 0x37, 0x97, 0x1c, 0x3e, 0x7c, 0x38, 0x7b, 0xe7, 0xce, 0x9d, 0xfe, 0xbf, 0x98, 0xc8, 0x7b, 0xd1, 0x11, 0xfd, 0x01, 0xda, 0x3c, 0xf5, 0x34, 0x75, 0xed, 0xda, 0xb5, 0x7d, 0x80, 0x61, 0xfd, 0xfa, 0xf5, 0x06, 0x8c, 0x8b, 0xe1, 0xed, 0xdb, 0xb7, 0x37, 0x62, 0xaa, 0x7a, 0xca, 0xcb, 0xcb, 0x09, 0x45, 0x56, 0x56, 0x16, 0x41, 0x4c, 0x08, 0xba, 0xfb, 0xcb, 0x7d, 0xfb, 0xf6, 0x85, 0xbe, 0x97, 0x88, 0x4e, 0x4d, 0x20, 0x00, 0x58, 0xe2, 0x1d, 0x70, 0xc1, 0xc0, 0x4a, 0x60, 0x35, 0xfd, 0x4a, 0x02, 0x7e, 0x07, 0xed, 0x1b, 0x30, 0x31, 0xdb, 0xf0, 0xfc, 0x1b, 0x20, 0x14, 0x23, 0x3c, 0x1c, 0x33, 0xc7, 0x81, 0x82, 0x9f, 0xf3, 0xac, 0xa0, 0xa0, 0x80, 0x66, 0xa1, 0xe7, 0xd4, 0xa9, 0x53, 0xcd, 0xef, 0x10, 0x79, 0x2f, 0x3f, 0x60, 0x11, 0x10, 0xe8, 0x25, 0x58, 0xe5, 0x35, 0xfe, 0x2b, 0xe0, 0x23, 0xe0, 0x13, 0xfa, 0x29, 0x06, 0x7c, 0x06, 0x84, 0xd1, 0xaf, 0x1d, 0xe0, 0x63, 0xfa, 0xcd, 0xb0, 0x65, 0xcb, 0x96, 0xdf, 0x22, 0xcb, 0xd4, 0x94, 0x0c, 0x1d, 0x82, 0x70, 0x1c, 0x47, 0xd0, 0xa0, 0x1d, 0x9b, 0x37, 0x6f, 0x0e, 0x78, 0xc7, 0x23, 0xaf, 0x4c, 0xfe, 0xc0, 0xe2, 0xb7, 0xc8, 0x42, 0xe9, 0x37, 0x9a, 0x97, 0xf0, 0x43, 0xfa, 0x55, 0xe4, 0x05, 0xfd, 0xbd, 0xce, 0x7b, 0x98, 0x90, 0x0d, 0x1b, 0x36, 0xac, 0x8f, 0x88, 0x88, 0xa8, 0xa1, 0xc9, 0x81, 0xe1, 0xe8, 0x39, 0x76, 0xec, 0xd8, 0x9d, 0xff, 0x1a, 0x23, 0x2f, 0xa9, 0xaf, 0x97, 0xf8, 0xb5, 0x94, 0x4b, 0xbd, 0x07, 0x08, 0xf2, 0xde, 0x03, 0xbd, 0xef, 0xe8, 0xc1, 0x3e, 0xf0, 0x2a, 0xb2, 0xf0, 0xc0, 0x81, 0x03, 0x1f, 0x03, 0x61, 0x6f, 0xdb, 0xfc, 0x37, 0x93, 0xe9, 0x6a, 0x81, 0xf0, 0x72, 0xaa, 0xef, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, }; const BITMAP_OPAQUE library_browse_xpm[1] = {{ png, sizeof( png ), "library_browse_xpm" }}; //EOF
# AddCPU_to_VM.rb # Description: This method is used to modify vCPUs to an existing VM running on VMware # Get vm object from root vm = $evm.root['vm'] raise "Missing $evm.root['vm'] object" if vm.nil? # Check to ensure that the VM in question is vmware vendor = vm.vendor.downcase rescue nil raise "Invalid vendor detected: #{vendor}" unless vendor == 'vmware' # if dialog_cpus then we are adding cpus vcpus = $evm.root['dialog_cpus'].to_i unless vcpus.zero? $evm.log(:info, "Adding #{vcpus} vCPU(s) to VM: #{vm.name} current vCPU count: #{vm.num_cpu}") vcpus += vm.num_cpu end vcpus = $evm.root['<API key>'].to_i if vcpus.zero? unless vcpus.zero? $evm.log(:info, "Setting VM: #{vm.name} vCPU count to: #{vcpus}") vm.set_number_of_cpus(vcpus, :sync=>true) end
#ifndef _waiting_threads_h #define _waiting_threads_h #include <my_global.h> #include <my_sys.h> #include <lf.h> C_MODE_START typedef struct st_wt_resource_id WT_RESOURCE_ID; typedef struct st_wt_resource WT_RESOURCE; typedef struct st_wt_resource_type { my_bool (*compare)(const void *a, const void *b); const void *(*make_key)(const WT_RESOURCE_ID *id, uint *len); /* not used */ } WT_RESOURCE_TYPE; struct st_wt_resource_id { ulonglong value; const WT_RESOURCE_TYPE *type; }; /* the below differs from sizeof(WT_RESOURCE_ID) by the amount of padding */ #define <API key> (sizeof(ulonglong)+sizeof(void*)) #define WT_WAIT_STATS 24 #define WT_CYCLE_STATS 32 extern ulonglong wt_wait_table[WT_WAIT_STATS]; extern uint32 wt_wait_stats[WT_WAIT_STATS+1]; extern uint32 wt_cycle_stats[2][WT_CYCLE_STATS+1]; extern uint32 wt_success_stats; typedef struct st_wt_thd { /* XXX there's no protection (mutex) against concurrent access of the dynarray below. it is assumed that a caller will have it anyway (not to protect this array but to protect its own - caller's - data structures), and we'll get it for free. A caller needs to ensure that a blocker won't release a resource before a blocked thread starts waiting, which is usually done with a mutex. If the above assumption is wrong, we'll need to add a mutex here. */ DYNAMIC_ARRAY my_resources; /* 'waiting_for' is modified under waiting_for->lock, and only by thd itself 'waiting_for' is read lock-free (using pinning protocol), but a thd object can read its own 'waiting_for' without any locks or tricks. */ WT_RESOURCE *waiting_for; LF_PINS *pins; /* pointers to values */ const ulong *timeout_short; const ulong *<API key>; const ulong *timeout_long; const ulong *<API key>; /* weight relates to the desirability of a transaction being killed if it's part of a deadlock. In a deadlock situation transactions with lower weights are killed first. Examples of using the weight to implement different selection strategies: 1. Latest Keep all weights equal. 2. Random Assight weights at random. (variant: modify a weight randomly before every lock request) 3. Youngest Set weight to -NOW() 4. Minimum locks count locks granted in your lock manager, store the value as a weight 5. Minimum work depends on the definition of "work". For example, store the number of rows modifies in this transaction (or a length of REDO log for a transaction) as a weight. It is only statistically relevant and is not protected by any locks. */ ulong volatile weight; /* 'killed' is indirectly protected by waiting_for->lock because a killed thread needs to clear its 'waiting_for' and thus needs a lock. That is a thread needs an exclusive lock to read 'killed' reliably. But other threads may change 'killed' from 0 to 1, a shared lock is enough for that. */ my_bool killed; #ifndef DBUG_OFF const char *name; #endif } WT_THD; #define WT_TIMEOUT ETIMEDOUT #define WT_OK 0 #define WT_DEADLOCK -1 #define WT_DEPTH_EXCEEDED -2 #define WT_FREE_TO_GO -3 void wt_init(void); void wt_end(void); void wt_thd_lazy_init(WT_THD *, const ulong *, const ulong *, const ulong *, const ulong *); void wt_thd_destroy(WT_THD *); int <API key>(WT_THD *, WT_THD *, const WT_RESOURCE_ID *); int <API key>(WT_THD *, mysql_mutex_t *); void wt_thd_release(WT_THD *, const WT_RESOURCE_ID *); #define wt_thd_release_all(THD) wt_thd_release((THD), 0) my_bool <API key>(const void *, const void *); C_MODE_END #endif
#ifndef D_BT_RUNTIME_H #define D_BT_RUNTIME_H #include "common.h" namespace aria2 { class BtRuntime { private: int64_t <API key>; bool halt_; int connections_; bool ready_; // Maximum number of peers to hold connections at the same time. // 0 means unlimited. int maxPeers_; // Minimum number of peers. This value is used for getting more peers from // tracker. 0 means always the number of peers is under minimum. int minPeers_; public: BtRuntime(); ~BtRuntime(); int64_t <API key>() const { return <API key>; } void <API key>(int64_t length) { <API key> = length; } bool isHalt() const { return halt_; } void setHalt(bool halt) { halt_ = halt; } int getConnections() const { return connections_; } void increaseConnections() { ++connections_; } void decreaseConnections() { --connections_; } bool lessThanMaxPeers() const { return maxPeers_ == 0 || connections_ < maxPeers_; } bool lessThanMinPeers() const { return minPeers_ == 0 || connections_ < minPeers_; } bool lessThanEqMinPeers() const { return minPeers_ == 0 || connections_ <= minPeers_; } bool ready() { return ready_; } void setReady(bool go) { ready_ = go; } void setMaxPeers(int maxPeers); int getMaxPeers() const { return maxPeers_; } static const int DEFAULT_MAX_PEERS = 55; static const int DEFAULT_MIN_PEERS = 40; }; } // namespace aria2 #endif // D_BT_RUNTIME_H
// <API key>: Apache-2.0 WITH LLVM-exception #ifndef <API key> #define <API key> #include <memory> #include <string> #include "lldb/lldb-private.h" #include "lldb/Host/SocketAddress.h" #include "lldb/Utility/IOObject.h" #include "lldb/Utility/Predicate.h" #include "lldb/Utility/Status.h" #ifdef _WIN32 #include "lldb/Host/windows/windows.h" #include <winsock2.h> #include <ws2tcpip.h> #endif namespace llvm { class StringRef; } namespace lldb_private { #if defined(_MSC_VER) typedef SOCKET NativeSocket; #else typedef int NativeSocket; #endif class Socket : public IOObject { public: enum SocketProtocol { ProtocolTcp, ProtocolUdp, ProtocolUnixDomain, <API key> }; static const NativeSocket kInvalidSocketValue; ~Socket() override; static llvm::Error Initialize(); static void Terminate(); static std::unique_ptr<Socket> Create(const SocketProtocol protocol, bool <API key>, Status &error); virtual Status Connect(llvm::StringRef name) = 0; virtual Status Listen(llvm::StringRef name, int backlog) = 0; virtual Status Accept(Socket *&socket) = 0; // Initialize a Tcp Socket object in listening mode. listen and accept are // implemented separately because the caller may wish to manipulate or query // the socket after it is initialized, but before entering a blocking accept. static Status TcpListen(llvm::StringRef host_and_port, bool <API key>, Socket *&socket, Predicate<uint16_t> *predicate, int backlog = 5); static Status TcpConnect(llvm::StringRef host_and_port, bool <API key>, Socket *&socket); static Status UdpConnect(llvm::StringRef host_and_port, bool <API key>, Socket *&socket); static Status UnixDomainConnect(llvm::StringRef host_and_port, bool <API key>, Socket *&socket); static Status UnixDomainAccept(llvm::StringRef host_and_port, bool <API key>, Socket *&socket); static Status UnixAbstractConnect(llvm::StringRef host_and_port, bool <API key>, Socket *&socket); static Status UnixAbstractAccept(llvm::StringRef host_and_port, bool <API key>, Socket *&socket); int GetOption(int level, int option_name, int &option_value); int SetOption(int level, int option_name, int option_value); NativeSocket GetNativeSocket() const { return m_socket; } SocketProtocol GetSocketProtocol() const { return m_protocol; } Status Read(void *buf, size_t &num_bytes) override; Status Write(const void *buf, size_t &num_bytes) override; virtual Status PreDisconnect(); Status Close() override; bool IsValid() const override { return m_socket != kInvalidSocketValue; } WaitableHandle GetWaitableHandle() override; static bool DecodeHostAndPort(llvm::StringRef host_and_port, std::string &host_str, std::string &port_str, int32_t &port, Status *error_ptr); // If this Socket is connected then return the URI used to connect. virtual std::string <API key>() const { return ""; }; protected: Socket(SocketProtocol protocol, bool should_close, bool <API key>); virtual size_t Send(const void *buf, const size_t num_bytes); static void SetLastError(Status &error); static NativeSocket CreateSocket(const int domain, const int type, const int protocol, bool <API key>, Status &error); static NativeSocket AcceptSocket(NativeSocket sockfd, struct sockaddr *addr, socklen_t *addrlen, bool <API key>, Status &error); SocketProtocol m_protocol; NativeSocket m_socket; bool <API key>; }; } // namespace lldb_private #endif // <API key>
#* Dionaea #* - catches bugs - #* This program is free software; you can redistribute it and/or #* as published by the Free Software Foundation; either version 2 #* This program is distributed in the hope that it will be useful, #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #* along with this program; if not, write to the Free Software #* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #* contact nepenthesdev@gmail.com #* This file was part of Scapy from .packet import * class ASN1_Packet(Packet): ASN1_root = None ASN1_codec = None def init_fields(self): flist = self.ASN1_root.get_fields_list() self.do_init_fields(flist) self.fields_desc = flist def do_build(self): return self.ASN1_root.build(self) def do_dissect(self, x): return self.ASN1_root.dissect(self, x)
package ensemble.samples.animation.transitions.fadetransition; import javafx.animation.FadeTransition; import javafx.animation.Timeline; import javafx.application.Application; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; import javafx.util.Duration; public class FadeTransitionApp extends Application { private FadeTransition fade; public Parent createContent() { Pane root = new Pane(); root.setPrefSize(105, 105); root.setMinSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE); root.setMaxSize(Pane.USE_PREF_SIZE, Pane.USE_PREF_SIZE); Rectangle rect = new Rectangle(0, 0, 100, 100); rect.setArcHeight(20); rect.setArcWidth(20); rect.setFill(Color.DODGERBLUE); root.getChildren().add(rect); fade = new FadeTransition(Duration.seconds(4), rect); fade.setFromValue(1); fade.setToValue(0.2); fade.setCycleCount(Timeline.INDEFINITE); fade.setAutoReverse(true); return root; } public void play() { fade.play(); } @Override public void stop() { fade.stop(); } @Override public void start(Stage primaryStage) throws Exception { primaryStage.setResizable(false); primaryStage.setScene(new Scene(createContent())); primaryStage.show(); play(); } /** * Java main for when running without JavaFX launcher * @param args command line arguments */ public static void main(String[] args) { launch(args); } }
#!/bin/bash # check how deep does recursive 'fi du' go, currently it has to stop at # mountpoint and can continue to subvolumes source "$TEST_TOP/common" check_prereq mkfs.btrfs check_prereq btrfs setup_root_helper prepare_test_dev <API key> <API key> run_check truncate -s 0 img2 run_check truncate -s 1G img2 chmod a+w img2 # create second mount with btrfs, create a file in the target mount path, the # mount must hide that run_check $SUDO_HELPER mkdir -p "$TEST_MNT"/mnt2 run_check $SUDO_HELPER dd if=/dev/zero bs=1M count=10 of="$TEST_MNT"/mnt2/hiddenfile run_check $SUDO_HELPER "$TOP"/mkfs.btrfs -f img2 run_check $SUDO_HELPER mount -o loop img2 "$TEST_MNT"/mnt2 run_check $SUDO_HELPER dd if=/dev/zero bs=1M count=10 of="$TEST_MNT"/mnt2/file21 run_check $SUDO_HELPER dd if=/dev/zero bs=1M count=10 of="$TEST_MNT"/mnt2/file22 run_check $SUDO_HELPER dd if=/dev/zero bs=1M count=10 of="$TEST_MNT"/file1 run_check $SUDO_HELPER "$TOP/btrfs" subvolume create "$TEST_MNT"/subv1 run_check $SUDO_HELPER dd if=/dev/zero bs=1M count=10 of="$TEST_MNT"/subv1/file2 run_check $SUDO_HELPER "$TOP/btrfs" subvolume snapshot "$TEST_MNT"/subv1 "$TEST_MNT"/snap1 run_check $SUDO_HELPER dd if=/dev/zero bs=1M count=10 of="$TEST_MNT"/snap1/file3 run_check $SUDO_HELPER find "$TEST_MNT" run_check_stdout $SUDO_HELPER "$TOP/btrfs" filesystem du "$TEST_MNT" | grep -q 'mnt2' && _fail "recursive du went to another filesystem" run_check_stdout $SUDO_HELPER "$TOP/btrfs" filesystem du "$TEST_MNT"/mnt2 | grep -q 'hiddenfile' && _fail "du sees beneath mount point" run_check $SUDO_HELPER umount "$TEST_MNT"/mnt2 <API key> rm -- img2
#include "xmms2dprefmodel.h" #include <QMessageBox> #include "debug.h" /* The Item */ Xmms2dPrefItem::Xmms2dPrefItem (Xmms2dPrefItem* parent/* = NULL*/) { // DBGOUT("entered"); m_parent = parent; // DBGOUT("leaving"); } Xmms2dPrefItem::~Xmms2dPrefItem () { // DBGOUT("entered"); qDeleteAll(m_children); // DBGOUT("leaving"); } void Xmms2dPrefItem::appendChild(Xmms2dPrefItem *child) { // DBGOUT("entered"); if(child) m_children.append(child); // DBGOUT("leaving"); } QVariant Xmms2dPrefItem::data (int column) const { // DBGOUT("entered"); // to excessive QVariant ret; if (m_data.size () > column) { ret = m_data.value (column); // DBGOUT("column:" << column << ", data:" << ret.toString ()); } // DBGOUT("leaving"); // to excessive return ret; } Xmms2dPrefItem* Xmms2dPrefItem::child(int row) { // DBGOUT("entered; row:" << row); // to excessive Xmms2dPrefItem* ret = NULL; if (m_children.size () > row) { ret = m_children.at (row); // DBGOUT("child requested; row:" << row << ", child:" << ret); } else { // DBGOUT("ERROR: child requested, but with invalid row:" << row); } // DBGOUT("leaving; ret:" << ret); // to excessive return ret; } bool Xmms2dPrefItem::setData (int column, const QVariant &data, int role/* = Qt::DisplayRole*/) { // DBGOUT("entered - col:" << column << ", Data:" << data.toString ()); if (role == Qt::DisplayRole || role == Qt::EditRole) m_data.insert(column, data); // DBGOUT("leaving"); return true; } bool Xmms2dPrefItem::insertRow (int row) { // DBGOUT("entered; row:" << row); // to excessive bool ret = false; Xmms2dPrefItem *item = new Xmms2dPrefItem(this); if (item) { // DBGOUT("inserting item:" << item << " at row:" << row); m_children.insert(row, item); ret = true; } // DBGOUT("leaving; ret:" << ret); // to excessive return true; } int Xmms2dPrefItem::findItemRecursive (QVariant data, Xmms2dPrefItem **item) { // DBGOUT("entered"); // to excessive if(item) *item = NULL; int ret = -1; if (m_data.contains (data)) { *item = this; ret = m_data.indexOf (data); } else { for (int i = 0 ; i < m_children.size (); i++) { ret = m_children[i]->findItemRecursive (data, item); if(ret > -1 && *item) break; } } // DBGOUT("leaving"); // to excessive return ret; } int Xmms2dPrefItem::indexOfChild(Xmms2dPrefItem *child) { // DBGOUT("entered"); // to excessive int ret = -1; if (m_children.contains (child)) ret = m_children.indexOf (child); // DBGOUT("leaving"); // to excessive return ret; } void Xmms2dPrefItem::sort ( int column, Qt::SortOrder order) { QList<Xmms2dPrefItem*> new_children; Xmms2dPrefItem* item; Xmms2dPrefItem* tmp; while (m_children.size () > 0) { item = m_children.takeFirst (); for (int i=0; i < m_children.size (); i++) { if ( (item->data (column).toString () > m_children[i]->data (column).toString () && order == Qt::AscendingOrder) || (item->data (column).toString () < m_children[i]->data (column).toString () && order == Qt::DescendingOrder) ) { tmp = m_children[i]; m_children[i] = item; item = tmp; } } new_children.append (item); } for (int i=0; i < new_children.size (); i++) { new_children[i]->sort(column, order); m_children.append(new_children[i]); } } /* The Model */ Xmms2dPrefModel::Xmms2dPrefModel() { // DBGOUT("entered"); rootItem = new Xmms2dPrefItem (); rootItem->setData (0, QVariant("Name")); rootItem->setData (1, QVariant("Value")); // DBGOUT("leaving"); } Xmms2dPrefModel::~Xmms2dPrefModel() { // DBGOUT("entered"); delete rootItem; // DBGOUT("leaving"); } Qt::ItemFlags Xmms2dPrefModel::flags ( const QModelIndex & index ) const { // DBGOUT("entered"); // to excessive Qt::ItemFlags ret = 0; if (index.isValid ()) { ret = Qt::ItemIsEnabled | Qt::ItemIsSelectable; if (index.column () == 1) ret |= Qt::ItemIsEditable; } // DBGOUT("leaving"); // to excessive return ret; } QVariant Xmms2dPrefModel::data ( const QModelIndex & index, int role/* = Qt::DisplayRole*/) const { // DBGOUT("entered"); // to excessive QVariant ret; if (index.isValid () && (role == Qt::DisplayRole || role == Qt::EditRole)) { ret = static_cast<Xmms2dPrefItem*>(index.internalPointer ())->data (index.column ()); } // DBGOUT("leaving"); // to excessive return ret; } bool Xmms2dPrefModel::setData(const QModelIndex &index, const QVariant &value, int role/* = Qt::DisplayRole*/) { // DBGOUT("entered"); bool ret = false; if( index.isValid () ) { Xmms2dPrefItem *item = static_cast<Xmms2dPrefItem *>(index.internalPointer ()); if (item) { // DBGOUT("row:" << index.row () << ", column:" << index.column () << ", data:" << value.toString ()); ret = item->setData (index.column (), value, role); emit dataChanged (index, index); } } // DBGOUT("leaving"); return ret; } QVariant Xmms2dPrefModel::headerData ( int section, Qt::Orientation orientation, int role ) const { // DBGOUT("entered"); // to excessive Q_UNUSED(orientation); QVariant ret; if (role == Qt::DisplayRole) ret = rootItem->data (section); // DBGOUT("leaving"); // to excessive return ret; } int Xmms2dPrefModel::rowCount ( const QModelIndex & parent ) const { // DBGOUT("entered"); // to excessive int ret; Xmms2dPrefItem *item; if(parent.isValid ()) item = static_cast<Xmms2dPrefItem*> (parent.internalPointer ()); else item = rootItem; ret = item->rowCount (); // DBGOUT("data:" << item->data (0).toString () << ", rowCount:" << ret); // DBGOUT("leaving"); // to excessive return ret; } int Xmms2dPrefModel::columnCount ( const QModelIndex & parent ) const { // DBGOUT("entered"); int ret; Xmms2dPrefItem *item; if(parent.isValid ()) item = static_cast<Xmms2dPrefItem*>(parent.internalPointer ()); else item = rootItem; ret = item->columnCount (); // DBGOUT("data:" << item->data (0).toString () << ", columnCount:" << ret); // DBGOUT("leaving"); return ret; } QModelIndex Xmms2dPrefModel::index(int row, int column, const QModelIndex & parent) const { //DBGOUT("entered; row:" << row << ", column:" << column); // to excessive Xmms2dPrefItem *parentItem; if (!parent.isValid()) parentItem = rootItem; else parentItem = static_cast<Xmms2dPrefItem*>(parent.internalPointer()); Xmms2dPrefItem *childItem = parentItem->child(row); // DBGOUT("leaving"); // to excessive if (childItem) { // DBGOUT("row:" << row << ", column:" << column << ", data:" << childItem->data (column).toString ()); // to excessive return createIndex(row, column, childItem); } else { // DBGOUT("ERROR: childitem for row:" << row << "is invalid."); return QModelIndex(); } } bool Xmms2dPrefModel::insertRow (int row, const QModelIndex &parent/* = QModelIndex ()*/) { // DBGOUT("entered"); beginInsertRows (parent, row, row); bool ret = false; Xmms2dPrefItem *parentItem; if(!parent.isValid ()) parentItem = rootItem; else parentItem = static_cast<Xmms2dPrefItem *>(parent.internalPointer ()); if(parentItem) { ret = parentItem->insertRow (row); } endInsertRows (); // DBGOUT("leaving"); return ret; } QModelIndex Xmms2dPrefModel::findIndex (QVariant data, const QModelIndex & parent/* = QModelIndex()*/) const { // DBGOUT("entered"); Xmms2dPrefItem *parentItem = NULL, *item = NULL; QModelIndex ret; int column; if(parent.isValid ()) parentItem = static_cast<Xmms2dPrefItem *> (parent.internalPointer ()); else parentItem = rootItem; if (parentItem) { column = parentItem->findItemRecursive (data, &item); // DBGOUT("column:" << column << ",Item: " << item); if (column > -1 && item) ret = createIndex(item->row (), column, item); } // DBGOUT("leaving"); return ret; } QModelIndex Xmms2dPrefModel::parent(const QModelIndex &index) const { if (!index.isValid()) return QModelIndex(); Xmms2dPrefItem *childItem = static_cast<Xmms2dPrefItem *> (index.internalPointer()); Xmms2dPrefItem *parentItem = childItem->parent (); if (parentItem == rootItem) return QModelIndex (); return createIndex (parentItem->row(), 0, parentItem); } bool Xmms2dPrefModel::hasChildren ( const QModelIndex & parent/* = QModelIndex()*/) const { bool ret = false; Xmms2dPrefItem *parentItem; if(parent.isValid ()) parentItem = static_cast<Xmms2dPrefItem *> (parent.internalPointer ()); else parentItem = rootItem; ret = parentItem->childCount () > 0; // DBGOUT("returning:" << ret); return ret; } void Xmms2dPrefModel::sort ( int column, Qt::SortOrder order/* = Qt::AscendingOrder */) { rootItem->sort (column, order); reset (); }
<?php abstract class BaseCcconbalgerPeer { const DATABASE_NAME = 'propel'; const TABLE_NAME = 'ccconbalger'; const CLASS_DEFAULT = 'lib.model.creditos.Ccconbalger'; const NUM_COLUMNS = 6; const <API key> = 0; const ID = 'ccconbalger.ID'; const NOMCONBALGER = 'ccconbalger.NOMCONBALGER'; const CODIGO = 'ccconbalger.CODIGO'; const TIPO = 'ccconbalger.TIPO'; const SUMRES = 'ccconbalger.SUMRES'; const CCVARIAB_ID = 'ccconbalger.CCVARIAB_ID'; private static $phpNameMap = null; private static $fieldNames = array ( BasePeer::TYPE_PHPNAME => array ('Id', 'Nomconbalger', 'Codigo', 'Tipo', 'Sumres', 'CcvariabId', ), BasePeer::TYPE_COLNAME => array (CcconbalgerPeer::ID, CcconbalgerPeer::NOMCONBALGER, CcconbalgerPeer::CODIGO, CcconbalgerPeer::TIPO, CcconbalgerPeer::SUMRES, CcconbalgerPeer::CCVARIAB_ID, ), BasePeer::TYPE_FIELDNAME => array ('id', 'nomconbalger', 'codigo', 'tipo', 'sumres', 'ccvariab_id', ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) ); private static $fieldKeys = array ( BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Nomconbalger' => 1, 'Codigo' => 2, 'Tipo' => 3, 'Sumres' => 4, 'CcvariabId' => 5, ), BasePeer::TYPE_COLNAME => array (CcconbalgerPeer::ID => 0, CcconbalgerPeer::NOMCONBALGER => 1, CcconbalgerPeer::CODIGO => 2, CcconbalgerPeer::TIPO => 3, CcconbalgerPeer::SUMRES => 4, CcconbalgerPeer::CCVARIAB_ID => 5, ), BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'nomconbalger' => 1, 'codigo' => 2, 'tipo' => 3, 'sumres' => 4, 'ccvariab_id' => 5, ), BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) ); public static function getMapBuilder() { include_once 'lib/model/creditos/map/<API key>.php'; return BasePeer::getMapBuilder('lib.model.creditos.map.<API key>'); } public static function getPhpNameMap() { if (self::$phpNameMap === null) { $map = CcconbalgerPeer::getTableMap(); $columns = $map->getColumns(); $nameMap = array(); foreach ($columns as $column) { $nameMap[$column->getPhpName()] = $column->getColumnName(); } self::$phpNameMap = $nameMap; } return self::$phpNameMap; } static public function translateFieldName($name, $fromType, $toType) { $toNames = self::getFieldNames($toType); $key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null; if ($key === null) { throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true)); } return $toNames[$key]; } static public function getFieldNames($type = BasePeer::TYPE_PHPNAME) { if (!array_key_exists($type, self::$fieldNames)) { throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.'); } return self::$fieldNames[$type]; } public static function alias($alias, $column) { return str_replace(CcconbalgerPeer::TABLE_NAME.'.', $alias.'.', $column); } public static function addSelectColumns(Criteria $criteria) { $criteria->addSelectColumn(CcconbalgerPeer::ID); $criteria->addSelectColumn(CcconbalgerPeer::NOMCONBALGER); $criteria->addSelectColumn(CcconbalgerPeer::CODIGO); $criteria->addSelectColumn(CcconbalgerPeer::TIPO); $criteria->addSelectColumn(CcconbalgerPeer::SUMRES); $criteria->addSelectColumn(CcconbalgerPeer::CCVARIAB_ID); } const COUNT = 'COUNT(ccconbalger.ID)'; const COUNT_DISTINCT = 'COUNT(DISTINCT ccconbalger.ID)'; public static function doCount(Criteria $criteria, $distinct = false, $con = null) { $criteria = clone $criteria; $criteria->clearSelectColumns()->clearOrderByColumns(); if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->addSelectColumn(CcconbalgerPeer::COUNT_DISTINCT); } else { $criteria->addSelectColumn(CcconbalgerPeer::COUNT); } foreach($criteria->getGroupByColumns() as $column) { $criteria->addSelectColumn($column); } $rs = CcconbalgerPeer::doSelectRS($criteria, $con); if ($rs->next()) { return $rs->getInt(1); } else { return 0; } } public static function doSelectOne(Criteria $criteria, $con = null) { $critcopy = clone $criteria; $critcopy->setLimit(1); $objects = CcconbalgerPeer::doSelect($critcopy, $con); if ($objects) { return $objects[0]; } return null; } public static function doSelect(Criteria $criteria, $con = null) { return CcconbalgerPeer::populateObjects(CcconbalgerPeer::doSelectRS($criteria, $con)); } public static function doSelectRS(Criteria $criteria, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } if (!$criteria->getSelectColumns()) { $criteria = clone $criteria; CcconbalgerPeer::addSelectColumns($criteria); } $criteria->setDbName(self::DATABASE_NAME); return BasePeer::doSelect($criteria, $con); } public static function populateObjects(ResultSet $rs) { $results = array(); $cls = CcconbalgerPeer::getOMClass(); $cls = Propel::import($cls); while($rs->next()) { $obj = new $cls(); $obj->hydrate($rs); $results[] = $obj; } return $results; } public static function doCountJoinCcvariab(Criteria $criteria, $distinct = false, $con = null) { $criteria = clone $criteria; $criteria->clearSelectColumns()->clearOrderByColumns(); if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->addSelectColumn(CcconbalgerPeer::COUNT_DISTINCT); } else { $criteria->addSelectColumn(CcconbalgerPeer::COUNT); } foreach($criteria->getGroupByColumns() as $column) { $criteria->addSelectColumn($column); } $criteria->addJoin(CcconbalgerPeer::CCVARIAB_ID, CcvariabPeer::ID); $rs = CcconbalgerPeer::doSelectRS($criteria, $con); if ($rs->next()) { return $rs->getInt(1); } else { return 0; } } public static function <API key>(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } CcconbalgerPeer::addSelectColumns($c); $startcol = (CcconbalgerPeer::NUM_COLUMNS - CcconbalgerPeer::<API key>) + 1; CcvariabPeer::addSelectColumns($c); $c->addJoin(CcconbalgerPeer::CCVARIAB_ID, CcvariabPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while($rs->next()) { $omClass = CcconbalgerPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = CcvariabPeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol); $newObject = true; foreach($results as $temp_obj1) { $temp_obj2 = $temp_obj1->getCcvariab(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addCcconbalger($obj1); break; } } if ($newObject) { $obj2->initCcconbalgers(); $obj2->addCcconbalger($obj1); } $results[] = $obj1; } return $results; } public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null) { $criteria = clone $criteria; $criteria->clearSelectColumns()->clearOrderByColumns(); if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) { $criteria->addSelectColumn(CcconbalgerPeer::COUNT_DISTINCT); } else { $criteria->addSelectColumn(CcconbalgerPeer::COUNT); } foreach($criteria->getGroupByColumns() as $column) { $criteria->addSelectColumn($column); } $criteria->addJoin(CcconbalgerPeer::CCVARIAB_ID, CcvariabPeer::ID); $rs = CcconbalgerPeer::doSelectRS($criteria, $con); if ($rs->next()) { return $rs->getInt(1); } else { return 0; } } public static function doSelectJoinAll(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } CcconbalgerPeer::addSelectColumns($c); $startcol2 = (CcconbalgerPeer::NUM_COLUMNS - CcconbalgerPeer::<API key>) + 1; CcvariabPeer::addSelectColumns($c); $startcol3 = $startcol2 + CcvariabPeer::NUM_COLUMNS; $c->addJoin(CcconbalgerPeer::CCVARIAB_ID, CcvariabPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while($rs->next()) { $omClass = CcconbalgerPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = CcvariabPeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol2); $newObject = true; for ($j=0, $resCount=count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj2 = $temp_obj1->getCcvariab(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addCcconbalger($obj1); break; } } if ($newObject) { $obj2->initCcconbalgers(); $obj2->addCcconbalger($obj1); } $results[] = $obj1; } return $results; } public static function getTableMap() { return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME); } public static function getOMClass() { return CcconbalgerPeer::CLASS_DEFAULT; } public static function doInsert($values, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } if ($values instanceof Criteria) { $criteria = clone $values; } else { $criteria = $values->buildCriteria(); } $criteria->remove(CcconbalgerPeer::ID); $criteria->setDbName(self::DATABASE_NAME); try { $con->begin(); $pk = BasePeer::doInsert($criteria, $con); $con->commit(); } catch(PropelException $e) { $con->rollback(); throw $e; } return $pk; } public static function doUpdate($values, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $selectCriteria = new Criteria(self::DATABASE_NAME); if ($values instanceof Criteria) { $criteria = clone $values; $comparison = $criteria->getComparison(CcconbalgerPeer::ID); $selectCriteria->add(CcconbalgerPeer::ID, $criteria->remove(CcconbalgerPeer::ID), $comparison); } else { $criteria = $values->buildCriteria(); $selectCriteria = $values->buildPkeyCriteria(); } $criteria->setDbName(self::DATABASE_NAME); return BasePeer::doUpdate($selectCriteria, $criteria, $con); } public static function doDeleteAll($con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $affectedRows = 0; try { $con->begin(); $affectedRows += BasePeer::doDeleteAll(CcconbalgerPeer::TABLE_NAME, $con); $con->commit(); return $affectedRows; } catch (PropelException $e) { $con->rollback(); throw $e; } } public static function doDelete($values, $con = null) { if ($con === null) { $con = Propel::getConnection(CcconbalgerPeer::DATABASE_NAME); } if ($values instanceof Criteria) { $criteria = clone $values; } elseif ($values instanceof Ccconbalger) { $criteria = $values->buildPkeyCriteria(); } else { $criteria = new Criteria(self::DATABASE_NAME); $criteria->add(CcconbalgerPeer::ID, (array) $values, Criteria::IN); } $criteria->setDbName(self::DATABASE_NAME); $affectedRows = 0; try { $con->begin(); $affectedRows += BasePeer::doDelete($criteria, $con); $con->commit(); return $affectedRows; } catch (PropelException $e) { $con->rollback(); throw $e; } } public static function doValidate(Ccconbalger $obj, $cols = null) { $columns = array(); if ($cols) { $dbMap = Propel::getDatabaseMap(CcconbalgerPeer::DATABASE_NAME); $tableMap = $dbMap->getTable(CcconbalgerPeer::TABLE_NAME); if (! is_array($cols)) { $cols = array($cols); } foreach($cols as $colName) { if ($tableMap->containsColumn($colName)) { $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); $columns[$colName] = $obj->$get(); } } } else { } $res = BasePeer::doValidate(CcconbalgerPeer::DATABASE_NAME, CcconbalgerPeer::TABLE_NAME, $columns); if ($res !== true) { $request = sfContext::getInstance()->getRequest(); foreach ($res as $failed) { $col = CcconbalgerPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME); $request->setError($col, $failed->getMessage()); } } return $res; } public static function retrieveByPK($pk, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $criteria = new Criteria(CcconbalgerPeer::DATABASE_NAME); $criteria->add(CcconbalgerPeer::ID, $pk); $v = CcconbalgerPeer::doSelect($criteria, $con); return !empty($v) > 0 ? $v[0] : null; } public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(CcconbalgerPeer::ID, $pks, Criteria::IN); $objs = CcconbalgerPeer::doSelect($criteria, $con); } return $objs; } } if (Propel::isInit()) { try { BaseCcconbalgerPeer::getMapBuilder(); } catch (Exception $e) { Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR); } } else { require_once 'lib/model/creditos/map/<API key>.php'; Propel::registerMapBuilder('lib.model.creditos.map.<API key>'); }
package javax.swing; import java.awt.*; import java.awt.event.*; import java.beans.JavaBean; import java.beans.BeanProperty; import java.io.*; import java.util.*; import javax.swing.colorchooser.*; import javax.swing.plaf.ColorChooserUI; import javax.accessibility.*; import sun.swing.SwingUtilities2; @JavaBean(defaultProperty = "UI", description = "A component that supports selecting a Color.") @SwingContainer(false) @SuppressWarnings("serial") // Same-version serialization only public class JColorChooser extends JComponent implements Accessible { /** * @see #getUIClassID * @see #readObject */ private static final String uiClassID = "ColorChooserUI"; private ColorSelectionModel selectionModel; private JComponent previewPanel = <API key>.getPreviewPanel(); private <API key>[] chooserPanels = new <API key>[0]; private boolean dragEnabled; /** * The selection model property name. */ public static final String <API key> = "selectionModel"; /** * The preview panel property name. */ public static final String <API key> = "previewPanel"; /** * The chooserPanel array property name. */ public static final String <API key> = "chooserPanels"; /** * Shows a modal color-chooser dialog and blocks until the * dialog is hidden. If the user presses the "OK" button, then * this method hides/disposes the dialog and returns the selected color. * If the user presses the "Cancel" button or closes the dialog without * pressing "OK", then this method hides/disposes the dialog and returns * <code>null</code>. * * @param component the parent <code>Component</code> for the dialog * @param title the String containing the dialog's title * @param initialColor the initial Color set when the color-chooser is shown * @return the selected color or <code>null</code> if the user opted out * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ public static Color showDialog(Component component, String title, Color initialColor) throws HeadlessException { return showDialog(component, title, initialColor, true); } /** * Shows a modal color-chooser dialog and blocks until the * dialog is hidden. If the user presses the "OK" button, then * this method hides/disposes the dialog and returns the selected color. * If the user presses the "Cancel" button or closes the dialog without * pressing "OK", then this method hides/disposes the dialog and returns * <code>null</code>. * * @param component the parent <code>Component</code> for the dialog * @param title the String containing the dialog's title * @param initialColor the initial Color set when the color-chooser is shown * @param <API key> true if the transparency of * a color can be selected * @return the selected color or <code>null</code> if the user opted out * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ @SuppressWarnings("deprecation") public static Color showDialog(Component component, String title, Color initialColor, boolean <API key>) throws HeadlessException { final JColorChooser pane = new JColorChooser(initialColor != null? initialColor : Color.white); for (<API key> ccPanel : pane.getChooserPanels()) { ccPanel.<API key>( <API key>); } ColorTracker ok = new ColorTracker(pane); JDialog dialog = createDialog(component, title, true, pane, ok, null); dialog.<API key>(new ColorChooserDialog.DisposeOnClose()); dialog.show(); // blocks until user brings dialog down... return ok.getColor(); } /** * Creates and returns a new dialog containing the specified * <code>ColorChooser</code> pane along with "OK", "Cancel", and "Reset" * buttons. If the "OK" or "Cancel" buttons are pressed, the dialog is * automatically hidden (but not disposed). If the "Reset" * button is pressed, the color-chooser's color will be reset to the * color which was set the last time <code>show</code> was invoked on the * dialog and the dialog will remain showing. * * @param c the parent component for the dialog * @param title the title for the dialog * @param modal a boolean. When true, the remainder of the program * is inactive until the dialog is closed. * @param chooserPane the color-chooser to be placed inside the dialog * @param okListener the ActionListener invoked when "OK" is pressed * @param cancelListener the ActionListener invoked when "Cancel" is pressed * @return a new dialog containing the color-chooser pane * @exception HeadlessException if GraphicsEnvironment.isHeadless() * returns true. * @see java.awt.GraphicsEnvironment#isHeadless */ public static JDialog createDialog(Component c, String title, boolean modal, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) throws HeadlessException { Window window = JOptionPane.<API key>(c); ColorChooserDialog dialog; if (window instanceof Frame) { dialog = new ColorChooserDialog((Frame)window, title, modal, c, chooserPane, okListener, cancelListener); } else { dialog = new ColorChooserDialog((Dialog)window, title, modal, c, chooserPane, okListener, cancelListener); } dialog.<API key>().<API key>(title); return dialog; } /** * Creates a color chooser pane with an initial color of white. */ public JColorChooser() { this(Color.white); } /** * Creates a color chooser pane with the specified initial color. * * @param initialColor the initial color set in the chooser */ public JColorChooser(Color initialColor) { this( new <API key>(initialColor) ); } /** * Creates a color chooser pane with the specified * <code>ColorSelectionModel</code>. * * @param model the <code>ColorSelectionModel</code> to be used */ public JColorChooser(ColorSelectionModel model) { selectionModel = model; updateUI(); dragEnabled = false; } /** * Returns the L&amp;F object that renders this component. * * @return the <code>ColorChooserUI</code> object that renders * this component */ public ColorChooserUI getUI() { return (ColorChooserUI)ui; } /** * Sets the L&amp;F object that renders this component. * * @param ui the <code>ColorChooserUI</code> L&amp;F object * @see UIDefaults#getUI */ @BeanProperty(hidden = true, description = "The UI object that implements the color chooser's LookAndFeel.") public void setUI(ColorChooserUI ui) { super.setUI(ui); } /** * Notification from the <code>UIManager</code> that the L&amp;F has changed. * Replaces the current UI object with the latest version from the * <code>UIManager</code>. * * @see JComponent#updateUI */ public void updateUI() { setUI((ColorChooserUI)UIManager.getUI(this)); } /** * Returns the name of the L&amp;F class that renders this component. * * @return the string "ColorChooserUI" * @see JComponent#getUIClassID * @see UIDefaults#getUI */ @BeanProperty(bound = false) public String getUIClassID() { return uiClassID; } /** * Gets the current color value from the color chooser. * By default, this delegates to the model. * * @return the current color value of the color chooser */ public Color getColor() { return selectionModel.getSelectedColor(); } /** * Sets the current color of the color chooser to the specified color. * The <code>ColorSelectionModel</code> will fire a <code>ChangeEvent</code> * @param color the color to be set in the color chooser * @see JComponent#<API key> */ @BeanProperty(bound = false, description = "The current color the chooser is to display.") public void setColor(Color color) { selectionModel.setSelectedColor(color); } /** * Sets the current color of the color chooser to the * specified RGB color. Note that the values of red, green, * and blue should be between the numbers 0 and 255, inclusive. * * @param r an int specifying the amount of Red * @param g an int specifying the amount of Green * @param b an int specifying the amount of Blue * @exception <API key> if r,g,b values are out of range * @see java.awt.Color */ public void setColor(int r, int g, int b) { setColor(new Color(r,g,b)); } /** * Sets the current color of the color chooser to the * specified color. * * @param c an integer value that sets the current color in the chooser * where the low-order 8 bits specify the Blue value, * the next 8 bits specify the Green value, and the 8 bits * above that specify the Red value. */ public void setColor(int c) { setColor((c >> 16) & 0xFF, (c >> 8) & 0xFF, c & 0xFF); } /** * Sets the <code>dragEnabled</code> property, * which must be <code>true</code> to enable * automatic drag handling (the first part of drag and drop) * on this component. * The <code>transferHandler</code> property needs to be set * to a non-<code>null</code> value for the drag to do * anything. The default value of the <code>dragEnabled</code> * property * is <code>false</code>. * * <p> * * When automatic drag handling is enabled, * most look and feels begin a drag-and-drop operation * when the user presses the mouse button over the preview panel. * Some look and feels might not support automatic drag and drop; * they will ignore this property. You can work around such * look and feels by modifying the component * to directly call the <code>exportAsDrag</code> method of a * <code>TransferHandler</code>. * * @param b the value to set the <code>dragEnabled</code> property to * @exception HeadlessException if * <code>b</code> is <code>true</code> and * <code>GraphicsEnvironment.isHeadless()</code> * returns <code>true</code> * * @since 1.4 * * @see java.awt.GraphicsEnvironment#isHeadless * @see #getDragEnabled * @see #setTransferHandler * @see TransferHandler */ @BeanProperty(bound = false, description = "Determines whether automatic drag handling is enabled.") public void setDragEnabled(boolean b) { if (b && GraphicsEnvironment.isHeadless()) { throw new HeadlessException(); } dragEnabled = b; } /** * Gets the value of the <code>dragEnabled</code> property. * * @return the value of the <code>dragEnabled</code> property * @see #setDragEnabled * @since 1.4 */ public boolean getDragEnabled() { return dragEnabled; } /** * Sets the current preview panel. * This will fire a <code>PropertyChangeEvent</code> for the property * named "previewPanel". * * @param preview the <code>JComponent</code> which displays the current color * @see JComponent#<API key> */ @BeanProperty(hidden = true, description = "The UI component which displays the current color.") public void setPreviewPanel(JComponent preview) { if (previewPanel != preview) { JComponent oldPreview = previewPanel; previewPanel = preview; firePropertyChange(JColorChooser.<API key>, oldPreview, preview); } } /** * Returns the preview panel that shows a chosen color. * * @return a <code>JComponent</code> object -- the preview panel */ public JComponent getPreviewPanel() { return previewPanel; } /** * Adds a color chooser panel to the color chooser. * * @param panel the <code><API key></code> to be added */ public void addChooserPanel( <API key> panel ) { <API key>[] oldPanels = getChooserPanels(); <API key>[] newPanels = new <API key>[oldPanels.length+1]; System.arraycopy(oldPanels, 0, newPanels, 0, oldPanels.length); newPanels[newPanels.length-1] = panel; setChooserPanels(newPanels); } /** * Removes the Color Panel specified. * * @param panel a string that specifies the panel to be removed * @return the color panel * @exception <API key> if panel is not in list of * known chooser panels */ public <API key> removeChooserPanel( <API key> panel ) { int containedAt = -1; for (int i = 0; i < chooserPanels.length; i++) { if (chooserPanels[i] == panel) { containedAt = i; break; } } if (containedAt == -1) { throw new <API key>("chooser panel not in this chooser"); } <API key>[] newArray = new <API key>[chooserPanels.length-1]; if (containedAt == chooserPanels.length-1) { // at end System.arraycopy(chooserPanels, 0, newArray, 0, newArray.length); } else if (containedAt == 0) { // at start System.arraycopy(chooserPanels, 1, newArray, 0, newArray.length); } else { // in middle System.arraycopy(chooserPanels, 0, newArray, 0, containedAt); System.arraycopy(chooserPanels, containedAt+1, newArray, containedAt, (chooserPanels.length - containedAt - 1)); } setChooserPanels(newArray); return panel; } /** * Specifies the Color Panels used to choose a color value. * * @param panels an array of <code><API key></code> * objects */ @BeanProperty(hidden = true, description = "An array of different chooser types.") public void setChooserPanels( <API key>[] panels) { <API key>[] oldValue = chooserPanels; chooserPanels = Arrays.copyOf(panels, panels.length); firePropertyChange(<API key>, oldValue, panels); } /** * Returns the specified color panels. * * @return an array of <code><API key></code> objects */ public <API key>[] getChooserPanels() { return Arrays.copyOf(chooserPanels, chooserPanels.length); } /** * Returns the data model that handles color selections. * * @return a <code>ColorSelectionModel</code> object */ public ColorSelectionModel getSelectionModel() { return selectionModel; } /** * Sets the model containing the selected color. * * @param newModel the new <code>ColorSelectionModel</code> object */ @BeanProperty(hidden = true, description = "The model which contains the currently selected color.") public void setSelectionModel(ColorSelectionModel newModel ) { ColorSelectionModel oldModel = selectionModel; selectionModel = newModel; firePropertyChange(JColorChooser.<API key>, oldModel, newModel); } /** * See <code>readObject</code> and <code>writeObject</code> in * <code>JComponent</code> for more * information about serialization in Swing. */ private void writeObject(ObjectOutputStream s) throws IOException { s.defaultWriteObject(); if (getUIClassID().equals(uiClassID)) { byte count = JComponent.getWriteObjCounter(this); JComponent.setWriteObjCounter(this, --count); if (count == 0 && ui != null) { ui.installUI(this); } } } /** * Returns a string representation of this <code>JColorChooser</code>. * This method * is intended to be used only for debugging purposes, and the * content and format of the returned string may vary between * implementations. The returned string may be empty but may not * be <code>null</code>. * * @return a string representation of this <code>JColorChooser</code> */ protected String paramString() { StringBuilder chooserPanelsString = new StringBuilder(); for (<API key> panel : chooserPanels) { chooserPanelsString.append('[').append(panel) .append(']'); } String previewPanelString = (previewPanel != null ? previewPanel .toString() : ""); return super.paramString() + ",chooserPanels=" + chooserPanelsString.toString() + ",previewPanel=" + previewPanelString; } // Accessibility support /** * The accessible context. */ protected AccessibleContext accessibleContext = null; /** * Gets the AccessibleContext associated with this JColorChooser. * For color choosers, the AccessibleContext takes the form of an * <API key>. * A new <API key> instance is created if necessary. * * @return an <API key> that serves as the * AccessibleContext of this JColorChooser */ @BeanProperty(bound = false) public AccessibleContext <API key>() { if (accessibleContext == null) { accessibleContext = new <API key>(); } return accessibleContext; } /** * This class implements accessibility support for the * <code>JColorChooser</code> class. It provides an implementation of the * Java Accessibility API appropriate to color chooser user-interface * elements. */ protected class <API key> extends <API key> { /** * Get the role of this object. * * @return an instance of AccessibleRole describing the role of the * object * @see AccessibleRole */ public AccessibleRole getAccessibleRole() { return AccessibleRole.COLOR_CHOOSER; } } // inner class <API key> } /* * Class which builds a color chooser dialog consisting of * a JColorChooser with "Ok", "Cancel", and "Reset" buttons. * * Note: This needs to be fixed to deal with localization! */ @SuppressWarnings("serial") // Superclass is not serializable across versions class ColorChooserDialog extends JDialog { private Color initialColor; private JColorChooser chooserPane; private JButton cancelButton; public ColorChooserDialog(Dialog owner, String title, boolean modal, Component c, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) throws HeadlessException { super(owner, title, modal); <API key>(c, chooserPane, okListener, cancelListener); } public ColorChooserDialog(Frame owner, String title, boolean modal, Component c, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) throws HeadlessException { super(owner, title, modal); <API key>(c, chooserPane, okListener, cancelListener); } protected void <API key>(Component c, JColorChooser chooserPane, ActionListener okListener, ActionListener cancelListener) { //setResizable(false); this.chooserPane = chooserPane; Locale locale = getLocale(); String okString = UIManager.getString("ColorChooser.okText", locale); String cancelString = UIManager.getString("ColorChooser.cancelText", locale); String resetString = UIManager.getString("ColorChooser.resetText", locale); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); contentPane.add(chooserPane, BorderLayout.CENTER); /* * Create Lower button panel */ JPanel buttonPane = new JPanel(); buttonPane.setLayout(new FlowLayout(FlowLayout.CENTER)); JButton okButton = new JButton(okString); getRootPane().setDefaultButton(okButton); okButton.<API key>().<API key>(okString); okButton.setActionCommand("OK"); okButton.addActionListener(new ActionListener() { @SuppressWarnings("deprecation") public void actionPerformed(ActionEvent e) { hide(); } }); if (okListener != null) { okButton.addActionListener(okListener); } buttonPane.add(okButton); cancelButton = new JButton(cancelString); cancelButton.<API key>().<API key>(cancelString); // The following few lines are used to register esc to close the dialog @SuppressWarnings("serial") // anonymous class Action cancelKeyAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { ((AbstractButton)e.getSource()).fireActionPerformed(e); } }; KeyStroke cancelKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); InputMap inputMap = cancelButton.getInputMap(JComponent. <API key>); ActionMap actionMap = cancelButton.getActionMap(); if (inputMap != null && actionMap != null) { inputMap.put(cancelKeyStroke, "cancel"); actionMap.put("cancel", cancelKeyAction); } // end esc handling cancelButton.setActionCommand("cancel"); cancelButton.addActionListener(new ActionListener() { @SuppressWarnings("deprecation") public void actionPerformed(ActionEvent e) { hide(); } }); if (cancelListener != null) { cancelButton.addActionListener(cancelListener); } buttonPane.add(cancelButton); JButton resetButton = new JButton(resetString); resetButton.<API key>().<API key>(resetString); resetButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { reset(); } }); int mnemonic = SwingUtilities2.getUIDefaultsInt("ColorChooser.resetMnemonic", locale, -1); if (mnemonic != -1) { resetButton.setMnemonic(mnemonic); } buttonPane.add(resetButton); contentPane.add(buttonPane, BorderLayout.SOUTH); if (JDialog.<API key>()) { boolean <API key> = UIManager.getLookAndFeel().<API key>(); if (<API key>) { getRootPane().<API key>(JRootPane.<API key>); } } <API key>(((c == null) ? getRootPane() : c).<API key>()); pack(); <API key>(c); this.addWindowListener(new Closer()); } @SuppressWarnings("deprecation") public void show() { initialColor = chooserPane.getColor(); super.show(); } public void reset() { chooserPane.setColor(initialColor); } @SuppressWarnings("serial") // JDK-implementation class class Closer extends WindowAdapter implements Serializable{ @SuppressWarnings("deprecation") public void windowClosing(WindowEvent e) { cancelButton.doClick(0); Window w = e.getWindow(); w.hide(); } } @SuppressWarnings("serial") // JDK-implementation class static class DisposeOnClose extends ComponentAdapter implements Serializable{ public void componentHidden(ComponentEvent e) { Window w = (Window)e.getComponent(); w.dispose(); } } } @SuppressWarnings("serial") // JDK-implementation class class ColorTracker implements ActionListener, Serializable { JColorChooser chooser; Color color; public ColorTracker(JColorChooser c) { chooser = c; } public void actionPerformed(ActionEvent e) { color = chooser.getColor(); } public Color getColor() { return color; } }
/* This file can only be compiled on systems which use OSF/1 style core files. */ #include "sysdep.h" #include "bfd.h" #include "libbfd.h" #include <sys/user.h> #ifdef OSF_CORE #include <sys/core.h> #endif /* forward declarations */ #define <API key> <API key> #define <API key> <API key> /* These are stored in the bfd's tdata */ struct osf_core_struct { int sig; char cmd[MAXCOMLEN + 1]; }; #define core_hdr(bfd) ((bfd)->tdata.osf_core_data) #define core_signal(bfd) (core_hdr(bfd)->sig) #define core_command(bfd) (core_hdr(bfd)->cmd) static asection * make_bfd_asection (bfd *abfd, const char *name, flagword flags, bfd_size_type size, bfd_vma vma, file_ptr filepos) { asection *asect; asect = <API key> (abfd, name, flags); if (!asect) return NULL; asect->size = size; asect->vma = vma; asect->filepos = filepos; asect->alignment_power = 8; return asect; } static bfd_cleanup <API key> (bfd *abfd) { int val; int i; char *secname; struct core_filehdr core_header; size_t amt; amt = sizeof core_header; val = bfd_bread (& core_header, amt, abfd); if (val != sizeof core_header) return NULL; if (! CONST_STRNEQ (core_header.magic, "Core")) return NULL; core_hdr (abfd) = (struct osf_core_struct *) bfd_zalloc (abfd, (bfd_size_type) sizeof (struct osf_core_struct)); if (!core_hdr (abfd)) return NULL; strncpy (core_command (abfd), core_header.name, MAXCOMLEN + 1); core_signal (abfd) = core_header.signo; for (i = 0; i < core_header.nscns; i++) { struct core_scnhdr core_scnhdr; flagword flags; amt = sizeof core_scnhdr; val = bfd_bread (& core_scnhdr, amt, abfd); if (val != sizeof core_scnhdr) break; /* Skip empty sections. */ if (core_scnhdr.size == 0 || core_scnhdr.scnptr == 0) continue; switch (core_scnhdr.scntype) { case SCNRGN: secname = ".data"; flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; break; case SCNSTACK: secname = ".stack"; flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; break; case SCNREGS: secname = ".reg"; flags = SEC_HAS_CONTENTS; break; default: _bfd_error_handler (_("unhandled OSF/1 core file section type %d"), core_scnhdr.scntype); continue; } if (!make_bfd_asection (abfd, secname, flags, (bfd_size_type) core_scnhdr.size, (bfd_vma) core_scnhdr.vaddr, (file_ptr) core_scnhdr.scnptr)) goto fail; } /* OK, we believe you. You're a core file (sure, sure). */ return _bfd_no_cleanup; fail: bfd_release (abfd, core_hdr (abfd)); core_hdr (abfd) = NULL; <API key> (abfd); return NULL; } static char * <API key> (bfd *abfd) { return core_command (abfd); } static int <API key> (bfd *abfd) { return core_signal (abfd); } /* If somebody calls any byte-swapping routines, shoot them. */ static void swap_abort (void) { abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } #define NO_GET ((bfd_vma (*) (const void *)) swap_abort) #define NO_PUT ((void (*) (bfd_vma, void *)) swap_abort) #define NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort) #define NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort) #define NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort) #define NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort) const bfd_target core_osf_vec = { "osf-core", <API key>, BFD_ENDIAN_LITTLE, /* target byte order */ BFD_ENDIAN_LITTLE, /* target headers byte order */ (HAS_RELOC | EXEC_P | /* object flags */ HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED), (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ 0, /* symbol prefix */ ' ', /* ar_pad_char */ 16, /* ar_max_namelen */ 0, /* match priority. */ NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit data */ NO_GET, NO_GETS, NO_PUT, /* 32 bit data */ NO_GET, NO_GETS, NO_PUT, /* 16 bit data */ NO_GET64, NO_GETS64, NO_PUT64, /* 64 bit hdrs */ NO_GET, NO_GETS, NO_PUT, /* 32 bit hdrs */ NO_GET, NO_GETS, NO_PUT, /* 16 bit hdrs */ { /* bfd_check_format */ _bfd_dummy_target, /* unknown format */ _bfd_dummy_target, /* object file */ _bfd_dummy_target, /* archive */ <API key> /* a core file */ }, { /* bfd_set_format */ <API key>, <API key>, <API key>, <API key> }, { /* bfd_write_contents */ <API key>, <API key>, <API key>, <API key> }, <API key> (_bfd_generic), BFD_JUMP_TABLE_COPY (_bfd_generic), BFD_JUMP_TABLE_CORE (osf_core), <API key> (_bfd_noarchive), <API key> (_bfd_nosymbols), <API key> (_bfd_norelocs), <API key> (_bfd_generic), BFD_JUMP_TABLE_LINK (_bfd_nolink), <API key> (_bfd_nodynamic), NULL, NULL /* backend_data */ };
#include "MemoryChannel.hpp" #include "NdbThread.h" #include "NdbSleep.h" #include "NdbOut.hpp" #include "NdbMain.h" MemoryChannel<int>* theMemoryChannel; extern "C" void* runProducer(void*arg) { // The producer will items into the MemoryChannel int count = *(int*)arg; int* p; int i = 0; while (i <= count) { p = new int(i); ndbout << "P: " << *p << endl; theMemoryChannel->writeChannel(p); if (i%5==0) NdbSleep_MilliSleep(i); i++; } return NULL; } extern "C" void* runConsumer(void* arg) { // The producer will read items from MemoryChannel and print on screen int count = *(int*)arg; int* p; int i = 0; while (i < count) { p = theMemoryChannel->readChannel(); ndbout << "C: " << *p << endl; i = *p; delete p; } return NULL; } class ArgStruct { public: ArgStruct(int _items, int _no){ items=_items; no=_no; }; int items; int no; }; <API key><ArgStruct>* theMemoryChannel2; extern "C" void* runProducer2(void*arg) { // The producer will items into the MemoryChannel ArgStruct* pArg = (ArgStruct*)arg; int count = pArg->items; ArgStruct* p; int i = 0; while (i < count) { p = new ArgStruct(i, pArg->no); ndbout << "P"<<pArg->no<<": " << i << endl; theMemoryChannel2->writeChannel(p); NdbSleep_MilliSleep(i); i++; } return NULL; } extern "C" void* runConsumer2(void* arg) { // The producer will read items from MemoryChannel and print on screen ArgStruct* pArg = (ArgStruct*)arg; int count = pArg->items * pArg->no; ArgStruct* p; int i = 0; while (i < count) { p = theMemoryChannel2->readChannel(); ndbout << "C: "<< p->no << ", " << p->items << endl; i++; delete p; } ndbout << "Consumer2: " << count << " received" << endl; return NULL; } //#if defined MEMORYCHANNELTEST //int main(int argc, char **argv) NDB_COMMAND(mctest, "mctest", "mctest", "Test the memory channel used in Ndb", 32768) { ndbout << "==== testing MemoryChannel ====" << endl; theMemoryChannel = new MemoryChannel<int>; theMemoryChannel2 = new <API key><ArgStruct>; NdbThread* consumerThread; NdbThread* producerThread; <API key>(2); int numItems = 100; producerThread = NdbThread_Create(runProducer, (void**)&numItems, 4096, (char*)"producer"); consumerThread = NdbThread_Create(runConsumer, (void**)&numItems, 4096, (char*)"consumer"); void *status; NdbThread_WaitFor(consumerThread, &status); NdbThread_WaitFor(producerThread, &status); ndbout << "==== testing <API key> ====" << endl; #define NUM_THREADS2 5 <API key>(NUM_THREADS2+2); NdbThread* producerThreads[NUM_THREADS2]; ArgStruct *pArg; for (int j = 0; j < NUM_THREADS2; j++) { char buf[25]; sprintf((char*)&buf, "producer%d", j); pArg = new ArgStruct(numItems, j); producerThreads[j] = NdbThread_Create(runProducer2, (void**)pArg, 4096, (char*)&buf); } pArg = new ArgStruct(numItems, NUM_THREADS2); consumerThread = NdbThread_Create(runConsumer2, (void**)pArg, 4096, (char*)"consumer"); NdbThread_WaitFor(consumerThread, &status); for (int j = 0; j < NUM_THREADS2; j++) { NdbThread_WaitFor(producerThreads[j], &status); } return 0; } void ErrorReporter::handleError(ErrorCategory type, int messageID, const char* problemData, const char* objRef, NdbShutdownType nst) { ndbout << "ErrorReporter::handleError activated" << endl; exit(1); } //#endif
// MESSAGE VFR_HUD PACKING #define <API key> 74 MAVPACKED( typedef struct __mavlink_vfr_hud_t { float airspeed; /*< Current airspeed in m/s*/ float groundspeed; /*< Current ground speed in m/s*/ float alt; /*< Current altitude (MSL), in meters*/ float climb; /*< Current climb rate in meters/second*/ int16_t heading; /*< Current heading in degrees, in compass units (0..360, 0=north)*/ uint16_t throttle; /*< Current throttle setting in integer percent, 0 to 100*/ }) mavlink_vfr_hud_t; #define <API key> 20 #define <API key> 20 #define <API key> 20 #define <API key> 20 #define <API key> 20 #define <API key> 20 #if <API key> #define <API key> { \ 74, \ "VFR_HUD", \ 6, \ { { "airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_vfr_hud_t, airspeed) }, \ { "groundspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vfr_hud_t, groundspeed) }, \ { "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vfr_hud_t, alt) }, \ { "climb", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vfr_hud_t, climb) }, \ { "heading", NULL, <API key>, 0, 16, offsetof(mavlink_vfr_hud_t, heading) }, \ { "throttle", NULL, <API key>, 0, 18, offsetof(mavlink_vfr_hud_t, throttle) }, \ } \ } #else #define <API key> { \ "VFR_HUD", \ 6, \ { { "airspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_vfr_hud_t, airspeed) }, \ { "groundspeed", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vfr_hud_t, groundspeed) }, \ { "alt", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vfr_hud_t, alt) }, \ { "climb", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vfr_hud_t, climb) }, \ { "heading", NULL, <API key>, 0, 16, offsetof(mavlink_vfr_hud_t, heading) }, \ { "throttle", NULL, <API key>, 0, 18, offsetof(mavlink_vfr_hud_t, throttle) }, \ } \ } #endif /** * @brief Pack a vfr_hud message * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * * @param airspeed Current airspeed in m/s * @param groundspeed Current ground speed in m/s * @param heading Current heading in degrees, in compass units (0..360, 0=north) * @param throttle Current throttle setting in integer percent, 0 to 100 * @param alt Current altitude (MSL), in meters * @param climb Current climb rate in meters/second * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t <API key>(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, float airspeed, float groundspeed, int16_t heading, uint16_t throttle, float alt, float climb) { #if <API key> || !<API key> char buf[<API key>]; _mav_put_float(buf, 0, airspeed); _mav_put_float(buf, 4, groundspeed); _mav_put_float(buf, 8, alt); _mav_put_float(buf, 12, climb); _mav_put_int16_t(buf, 16, heading); _mav_put_uint16_t(buf, 18, throttle); memcpy(<API key>(msg), buf, <API key>); #else mavlink_vfr_hud_t packet; packet.airspeed = airspeed; packet.groundspeed = groundspeed; packet.alt = alt; packet.climb = climb; packet.heading = heading; packet.throttle = throttle; memcpy(<API key>(msg), &packet, <API key>); #endif msg->msgid = <API key>; return <API key>(msg, system_id, component_id, <API key>, <API key>, <API key>); } /** * @brief Pack a vfr_hud message on a channel * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param airspeed Current airspeed in m/s * @param groundspeed Current ground speed in m/s * @param heading Current heading in degrees, in compass units (0..360, 0=north) * @param throttle Current throttle setting in integer percent, 0 to 100 * @param alt Current altitude (MSL), in meters * @param climb Current climb rate in meters/second * @return length of the message in bytes (excluding serial stream start sign) */ static inline uint16_t <API key>(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, float airspeed,float groundspeed,int16_t heading,uint16_t throttle,float alt,float climb) { #if <API key> || !<API key> char buf[<API key>]; _mav_put_float(buf, 0, airspeed); _mav_put_float(buf, 4, groundspeed); _mav_put_float(buf, 8, alt); _mav_put_float(buf, 12, climb); _mav_put_int16_t(buf, 16, heading); _mav_put_uint16_t(buf, 18, throttle); memcpy(<API key>(msg), buf, <API key>); #else mavlink_vfr_hud_t packet; packet.airspeed = airspeed; packet.groundspeed = groundspeed; packet.alt = alt; packet.climb = climb; packet.heading = heading; packet.throttle = throttle; memcpy(<API key>(msg), &packet, <API key>); #endif msg->msgid = <API key>; return <API key>(msg, system_id, component_id, chan, <API key>, <API key>, <API key>); } /** * @brief Encode a vfr_hud struct * * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param msg The MAVLink message to compress the data into * @param vfr_hud C-struct to read the message contents from */ static inline uint16_t <API key>(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vfr_hud_t* vfr_hud) { return <API key>(system_id, component_id, msg, vfr_hud->airspeed, vfr_hud->groundspeed, vfr_hud->heading, vfr_hud->throttle, vfr_hud->alt, vfr_hud->climb); } /** * @brief Encode a vfr_hud struct on a channel * * @param system_id ID of this system * @param component_id ID of this component (e.g. 200 for IMU) * @param chan The MAVLink channel this message will be sent over * @param msg The MAVLink message to compress the data into * @param vfr_hud C-struct to read the message contents from */ static inline uint16_t <API key>(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vfr_hud_t* vfr_hud) { return <API key>(system_id, component_id, chan, msg, vfr_hud->airspeed, vfr_hud->groundspeed, vfr_hud->heading, vfr_hud->throttle, vfr_hud->alt, vfr_hud->climb); } /** * @brief Send a vfr_hud message * @param chan MAVLink channel to send the message * * @param airspeed Current airspeed in m/s * @param groundspeed Current ground speed in m/s * @param heading Current heading in degrees, in compass units (0..360, 0=north) * @param throttle Current throttle setting in integer percent, 0 to 100 * @param alt Current altitude (MSL), in meters * @param climb Current climb rate in meters/second */ #ifdef <API key> static inline void <API key>(mavlink_channel_t chan, float airspeed, float groundspeed, int16_t heading, uint16_t throttle, float alt, float climb) { #if <API key> || !<API key> char buf[<API key>]; _mav_put_float(buf, 0, airspeed); _mav_put_float(buf, 4, groundspeed); _mav_put_float(buf, 8, alt); _mav_put_float(buf, 12, climb); _mav_put_int16_t(buf, 16, heading); _mav_put_uint16_t(buf, 18, throttle); <API key>(chan, <API key>, buf, <API key>, <API key>, <API key>); #else mavlink_vfr_hud_t packet; packet.airspeed = airspeed; packet.groundspeed = groundspeed; packet.alt = alt; packet.climb = climb; packet.heading = heading; packet.throttle = throttle; <API key>(chan, <API key>, (const char *)&packet, <API key>, <API key>, <API key>); #endif } /** * @brief Send a vfr_hud message * @param chan MAVLink channel to send the message * @param struct The MAVLink struct to serialize */ static inline void <API key>(mavlink_channel_t chan, const mavlink_vfr_hud_t* vfr_hud) { #if <API key> || !<API key> <API key>(chan, vfr_hud->airspeed, vfr_hud->groundspeed, vfr_hud->heading, vfr_hud->throttle, vfr_hud->alt, vfr_hud->climb); #else <API key>(chan, <API key>, (const char *)vfr_hud, <API key>, <API key>, <API key>); #endif } #if <API key> <= <API key> /* This varient of _send() can be used to save stack space by re-using memory from the receive buffer. The caller provides a mavlink_message_t which is the size of a full mavlink message. This is usually the receive buffer for the channel, and allows a reply to an incoming message with minimum stack space usage. */ static inline void <API key>(mavlink_message_t *msgbuf, mavlink_channel_t chan, float airspeed, float groundspeed, int16_t heading, uint16_t throttle, float alt, float climb) { #if <API key> || !<API key> char *buf = (char *)msgbuf; _mav_put_float(buf, 0, airspeed); _mav_put_float(buf, 4, groundspeed); _mav_put_float(buf, 8, alt); _mav_put_float(buf, 12, climb); _mav_put_int16_t(buf, 16, heading); _mav_put_uint16_t(buf, 18, throttle); <API key>(chan, <API key>, buf, <API key>, <API key>, <API key>); #else mavlink_vfr_hud_t *packet = (mavlink_vfr_hud_t *)msgbuf; packet->airspeed = airspeed; packet->groundspeed = groundspeed; packet->alt = alt; packet->climb = climb; packet->heading = heading; packet->throttle = throttle; <API key>(chan, <API key>, (const char *)packet, <API key>, <API key>, <API key>); #endif } #endif #endif // MESSAGE VFR_HUD UNPACKING /** * @brief Get field airspeed from vfr_hud message * * @return Current airspeed in m/s */ static inline float <API key>(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 0); } /** * @brief Get field groundspeed from vfr_hud message * * @return Current ground speed in m/s */ static inline float <API key>(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 4); } /** * @brief Get field heading from vfr_hud message * * @return Current heading in degrees, in compass units (0..360, 0=north) */ static inline int16_t <API key>(const mavlink_message_t* msg) { return _MAV_RETURN_int16_t(msg, 16); } /** * @brief Get field throttle from vfr_hud message * * @return Current throttle setting in integer percent, 0 to 100 */ static inline uint16_t <API key>(const mavlink_message_t* msg) { return <API key>(msg, 18); } /** * @brief Get field alt from vfr_hud message * * @return Current altitude (MSL), in meters */ static inline float <API key>(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 8); } /** * @brief Get field climb from vfr_hud message * * @return Current climb rate in meters/second */ static inline float <API key>(const mavlink_message_t* msg) { return _MAV_RETURN_float(msg, 12); } /** * @brief Decode a vfr_hud message into a struct * * @param msg The message to decode * @param vfr_hud C-struct to decode the message contents into */ static inline void <API key>(const mavlink_message_t* msg, mavlink_vfr_hud_t* vfr_hud) { #if <API key> || !<API key> vfr_hud->airspeed = <API key>(msg); vfr_hud->groundspeed = <API key>(msg); vfr_hud->alt = <API key>(msg); vfr_hud->climb = <API key>(msg); vfr_hud->heading = <API key>(msg); vfr_hud->throttle = <API key>(msg); #else uint8_t len = msg->len < <API key>? msg->len : <API key>; memset(vfr_hud, 0, <API key>); memcpy(vfr_hud, _MAV_PAYLOAD(msg), len); #endif }
<?php // $Id: edit_sentence.class.php,v 1.7 2007/10/10 05:25:16 nicolasconnault Exp $ // Moodle - Modular Object-Oriented Dynamic Learning Environment // // This program is free software; you can redistribute it and/or modify // // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // This class will provide the interface for all the edit sentence actions class edit_sentence extends XMLDBAction { /** * Init method, every subclass will have its own */ function init() { parent::init(); Set own custom attributes Get needed strings $this->loadStrings(array( 'change' => 'xmldb', 'vieworiginal' => 'xmldb', 'viewedited' => 'xmldb', 'back' => 'xmldb' )); } /** * Invoke method, every class will have its own * returns true/false on completion, setting both * errormsg and output as necessary */ function invoke() { parent::invoke(); $result = true; Set own core attributes $this->does_generate = <API key>; These are always here global $CFG, $XMLDB; Do the job, setting result as needed Get the dir containing the file $dirpath = required_param('dir', PARAM_PATH); $dirpath = $CFG->dirroot . stripslashes_safe($dirpath); Get the correct dirs if (!empty($XMLDB->dbdirs)) { $dbdir =& $XMLDB->dbdirs[$dirpath]; } else { return false; } if (!empty($XMLDB->editeddirs)) { $editeddir =& $XMLDB->editeddirs[$dirpath]; $structure =& $editeddir->xml_file->getStructure(); } ADD YOUR CODE HERE Fetch request data $statementparam = required_param('statement', PARAM_CLEAN); $sentenceparam = optional_param('sentence', NULL, PARAM_CLEAN); if (!$statement =& $structure->getStatement($statementparam)) { $this->errormsg = 'Wrong statement specified: ' . $statementparam; return false; } $sentences =& $statement->getSentences(); If no sentence has been specified, edit the last one if ($sentenceparam === NULL) { end($sentences); $sentenceparam = key($sentences); } if (!$sentence =& $sentences[$sentenceparam]) { $this->errormsg = 'Wrong Sentence: ' . $sentenceparam; return false; } $dbdir =& $XMLDB->dbdirs[$dirpath]; $origstructure =& $dbdir->xml_file->getStructure(); Based in the type of statement, print different forms if ($statement->getType() != <API key>) { Only INSERT is allowed!! $this->errormsg = 'Wrong Statement Type. Only INSERT allowed'; return false; } else { Prepare INSERT sentence $fields = $statement-><API key>($sentence); $values = $statement-><API key>($sentence); Add the main form $o = '<form id="form" action="index.php" method="post">'; $o.= '<div>'; $o.= ' <input type="hidden" name ="dir" value="' . str_replace($CFG->dirroot, '', $dirpath) . '" />'; $o.= ' <input type="hidden" name ="statement" value="' . $statementparam .'" />'; $o.= ' <input type="hidden" name ="sentence" value="' . $sentenceparam .'" />'; $o.= ' <input type="hidden" name ="action" value="edit_sentence_save" />'; $o.= ' <input type="hidden" name ="postaction" value="edit_statement" />'; $o.= ' <table id="formelements" class="boxaligncenter">'; The fields box $o.= ' <tr><td>INSERT INTO ' . s($statement->getTable()) . '</td></tr>'; $o.= ' <tr><td><textarea name="fields" rows="2" cols="70" id="fields">' . s(implode(', ', $fields)) . '</textarea></td></tr>'; The values box $o.= ' <tr><td>VALUES</td></tr>'; $o.= ' <tr><td><textarea name="values" rows="2" cols="70" id="values">' . s(implode(', ', $values)) . '</textarea></td></tr>'; The submit button $o.= ' <tr valign="top"><td><input type="submit" value="' .$this->str['change'] . '" /></td></tr>'; $o.= ' </table>'; $o.= '</div></form>'; Calculate the buttons $b = ' <p class="centerpara buttons">'; The back to edit statement button $b .= '&nbsp;<a href="index.php?action=edit_statement&amp;statement=' . urlencode($statementparam) . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '">[' . $this->str['back'] . ']</a>'; $b .= '</p>'; $o .= $b; $this->output = $o; } Launch postaction if exists (leave this here!) if ($this->getPostAction() && $result) { return $this->launch($this->getPostAction()); } Return ok if arrived here return $result; } } ?>
#include <ec.h> #include <ec_gtk.h> #include <ec_mitm.h> /* proto */ void gtkui_arp_poisoning(void); void gtkui_icmp_redir(void); void gtkui_port_stealing(void); void gtkui_dhcp_spoofing(void); void gtkui_mitm_stop(void); static void gtkui_start_mitm(void); /* globals */ #define PARAMS_LEN 512 static char params[PARAMS_LEN+1]; void gtkui_arp_poisoning(void) { GtkWidget *dialog, *vbox, *hbox, *image, *button1, *button2, *frame; gint response = 0; gboolean remote = FALSE; gboolean oneway = FALSE; DEBUG_MSG("gtk_arp_poisoning"); // not needed, the \0 is already appended from snprintf // memset(params, '\0', PARAMS_LEN+1); dialog = <API key>("MITM Attack: ARP Poisoning", GTK_WINDOW (window), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); <API key>(GTK_CONTAINER (dialog), 5); <API key>(GTK_DIALOG (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); image = <API key> (<API key>, <API key>); <API key> (GTK_MISC (image), 0.5, 0.1); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 5); gtk_widget_show(image); frame = gtk_frame_new("Optional parameters"); <API key>(GTK_CONTAINER (frame), 5); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); vbox = gtk_vbox_new (FALSE, 2); <API key>(GTK_CONTAINER (vbox), 5); gtk_container_add(GTK_CONTAINER (frame), vbox); gtk_widget_show(vbox); button1 = <API key>("Sniff remote connections."); gtk_box_pack_start(GTK_BOX (vbox), button1, FALSE, FALSE, 0); gtk_widget_show(button1); button2 = <API key>("Only poison one-way."); gtk_box_pack_start(GTK_BOX (vbox), button2, FALSE, FALSE, 0); gtk_widget_show(button2); response = gtk_dialog_run(GTK_DIALOG(dialog)); if(response == GTK_RESPONSE_OK) { gtk_widget_hide(dialog); const char *s_remote = "", *comma = "", *s_oneway = ""; if(<API key>(GTK_TOGGLE_BUTTON (button1))) { s_remote="remote"; remote = TRUE; } if(<API key>(GTK_TOGGLE_BUTTON (button2))) { if(remote) comma = ","; s_oneway = "oneway"; oneway = TRUE; } if(!remote && !oneway) { ui_error("You must select at least one ARP mode"); return; } snprintf(params, PARAMS_LEN+1, "arp:%s%s%s", s_remote, comma, s_oneway); gtkui_start_mitm(); } gtk_widget_destroy(dialog); /* a simpler method: gtkui_input_call("Parameters :", params + strlen("arp:"), PARAMS_LEN - strlen("arp:"), gtkui_start_mitm); */ } void gtkui_icmp_redir(void) { GtkWidget *dialog, *table, *hbox, *image, *label, *entry1, *entry2, *frame; gint response = 0; DEBUG_MSG("gtk_icmp_redir"); dialog = <API key>("MITM Attack: ICMP Redirect", GTK_WINDOW (window), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); <API key>(GTK_CONTAINER (dialog), 5); <API key>(GTK_DIALOG (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); image = <API key> (<API key>, <API key>); <API key> (GTK_MISC (image), 0.5, 0.1); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 5); gtk_widget_show(image); frame = gtk_frame_new("Gateway Information"); <API key>(GTK_CONTAINER (frame), 5); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); table = gtk_table_new(2, 2, FALSE); <API key>(GTK_TABLE (table), 5); <API key>(GTK_TABLE (table), 5); <API key>(GTK_CONTAINER (table), 8); gtk_container_add(GTK_CONTAINER (frame), table); gtk_widget_show(table); label = gtk_label_new("MAC Address"); <API key>(GTK_MISC (label), 0, 0.5); gtk_table_attach(GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show(label); entry1 = gtk_entry_new(); <API key>(GTK_ENTRY (entry1), ETH_ASCII_ADDR_LEN); <API key>(GTK_TABLE (table), entry1, 1, 2, 0, 1); gtk_widget_show(entry1); label = gtk_label_new("IP Address"); <API key>(GTK_MISC (label), 0, 0.5); gtk_table_attach(GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show(label); entry2 = gtk_entry_new(); <API key>(GTK_ENTRY (entry2), IP6_ASCII_ADDR_LEN); <API key>(GTK_TABLE (table), entry2, 1, 2, 1, 2); gtk_widget_show(entry2); response = gtk_dialog_run(GTK_DIALOG(dialog)); if(response == GTK_RESPONSE_OK) { gtk_widget_hide(dialog); // memset(params, '\0', PARAMS_LEN); snprintf(params, PARAMS_LEN+1, "icmp:%s/%s", gtk_entry_get_text(GTK_ENTRY(entry1)), gtk_entry_get_text(GTK_ENTRY(entry2))); gtkui_start_mitm(); } gtk_widget_destroy(dialog); /* a simpler method: gtkui_input_call("Parameters :", params + strlen("icmp:"), PARAMS_LEN - strlen("icmp:"), gtkui_start_mitm); */ } void gtkui_port_stealing(void) { GtkWidget *dialog, *vbox, *hbox, *image, *button1, *button2, *frame; gint response = 0; gboolean remote = FALSE; DEBUG_MSG("gtk_port_stealing"); dialog = <API key>("MITM Attack: Port Stealing", GTK_WINDOW (window), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); <API key>(GTK_CONTAINER (dialog), 5); <API key>(GTK_DIALOG (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); image = <API key> (<API key>, <API key>); <API key> (GTK_MISC (image), 0.5, 0.1); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 5); gtk_widget_show(image); frame = gtk_frame_new("Optional parameters"); <API key>(GTK_CONTAINER (frame), 5); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); vbox = gtk_vbox_new (FALSE, 2); <API key>(GTK_CONTAINER (vbox), 5); gtk_container_add(GTK_CONTAINER (frame), vbox); gtk_widget_show(vbox); button1 = <API key>("Sniff remote connections."); gtk_box_pack_start(GTK_BOX (vbox), button1, FALSE, FALSE, 0); gtk_widget_show(button1); button2 = <API key>("Propagate to other switches."); gtk_box_pack_start(GTK_BOX (vbox), button2, FALSE, FALSE, 0); gtk_widget_show(button2); response = gtk_dialog_run(GTK_DIALOG(dialog)); if(response == GTK_RESPONSE_OK) { gtk_widget_hide(dialog); const char *s_remote= "", *tree = "", *comma = ""; if(<API key>(GTK_TOGGLE_BUTTON (button1))) { s_remote="remote"; remote = TRUE; } if(<API key>(GTK_TOGGLE_BUTTON (button2))) { if(remote) comma = ","; tree = "tree"; } snprintf(params, PARAMS_LEN+1, "port:%s%s%s", s_remote, comma, tree); gtkui_start_mitm(); } gtk_widget_destroy(dialog); /* a simpler method: gtkui_input_call("Parameters :", params + strlen("port:"), PARAMS_LEN - strlen("port:"), gtkui_start_mitm); */ } void gtkui_dhcp_spoofing(void) { GtkWidget *dialog, *table, *hbox, *image, *label, *entry1, *entry2, *entry3, *frame; gint response = 0; DEBUG_MSG("gtk_dhcp_spoofing"); // memset(params, '\0', PARAMS_LEN+1); dialog = <API key>("MITM Attack: DHCP Spoofing", GTK_WINDOW (window), GTK_DIALOG_MODAL, GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); <API key>(GTK_CONTAINER (dialog), 5); <API key>(GTK_DIALOG (dialog), FALSE); hbox = gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); image = <API key> (<API key>, <API key>); <API key> (GTK_MISC (image), 0.5, 0.1); gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 5); gtk_widget_show(image); frame = gtk_frame_new("Server Information"); <API key>(GTK_CONTAINER (frame), 5); gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); table = gtk_table_new(3, 2, FALSE); <API key>(GTK_TABLE (table), 5); <API key>(GTK_TABLE (table), 5); <API key>(GTK_CONTAINER (table), 8); gtk_container_add(GTK_CONTAINER (frame), table); gtk_widget_show(table); label = gtk_label_new("IP Pool (optional)"); <API key>(GTK_MISC (label), 0, 0.5); gtk_table_attach(GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show(label); entry1 = gtk_entry_new(); <API key>(GTK_TABLE (table), entry1, 1, 2, 0, 1); gtk_widget_show(entry1); label = gtk_label_new("Netmask"); <API key>(GTK_MISC (label), 0, 0.5); gtk_table_attach(GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show(label); entry2 = gtk_entry_new(); <API key>(GTK_ENTRY (entry2), IP6_ASCII_ADDR_LEN); <API key>(GTK_TABLE (table), entry2, 1, 2, 1, 2); gtk_widget_show(entry2); label = gtk_label_new("DNS Server IP"); <API key>(GTK_MISC (label), 0, 0.5); gtk_table_attach(GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); gtk_widget_show(label); entry3 = gtk_entry_new(); <API key>(GTK_ENTRY (entry3), IP6_ASCII_ADDR_LEN); <API key>(GTK_TABLE (table), entry3, 1, 2, 2, 3); gtk_widget_show(entry3); response = gtk_dialog_run(GTK_DIALOG(dialog)); if(response == GTK_RESPONSE_OK) { gtk_widget_hide(dialog); // memset(params, '\0', PARAMS_LEN); snprintf(params, PARAMS_LEN+1, "dhcp:%s/%s/%s", gtk_entry_get_text(GTK_ENTRY(entry1)), gtk_entry_get_text(GTK_ENTRY(entry2)), gtk_entry_get_text(GTK_ENTRY(entry3))); DEBUG_MSG("ec_gtk_dhcp: DHCP MITM %s", params); gtkui_start_mitm(); } gtk_widget_destroy(dialog); /* a simpler method: gtkui_input_call("Parameters :", params + strlen("dhcp:"), PARAMS_LEN - strlen("dhcp:"), gtkui_start_mitm); */ } /* * start the mitm attack by passing the name and parameters */ static void gtkui_start_mitm(void) { DEBUG_MSG("gtk_start_mitm"); mitm_set(params); mitm_start(); } /* * stop all the mitm attack(s) */ void gtkui_mitm_stop(void) { GtkWidget *dialog; DEBUG_MSG("gtk_mitm_stop"); /* create the dialog */ dialog = <API key>(GTK_WINDOW (window), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, 0, "Stopping the mitm attack..."); <API key>(GTK_WINDOW (dialog), GTK_WIN_POS_CENTER); <API key>(GTK_WINDOW (dialog), FALSE); gtk_widget_show(dialog); /* for GTK to display the dialog now */ while (gtk_events_pending ()) gtk_main_iteration (); /* stop the mitm process */ mitm_stop(); gtk_widget_destroy(dialog); gtkui_message("MITM attack(s) stopped"); } /* EOF */ // vim:ts=3:expandtab
#include <linux/config.h> #include <asm/mmu_context.h> #include <asm/bootinfo.h> #include <asm/cpu.h> extern char except_vec0_sb1[]; /* Dump the current entry* and pagemask registers */ static inline void dump_cur_tlb_regs(void) { unsigned int entryhihi, entryhilo, entrylo0hi, entrylo0lo, entrylo1hi; unsigned int entrylo1lo, pagemask; __asm__ __volatile__ ( ".set push \n" ".set noreorder \n" ".set mips64 \n" ".set noat \n" " dmfc0 $1, $10 \n" " dsrl32 %0, $1, 0 \n" " sll %1, $1, 0 \n" " dmfc0 $1, $2 \n" " dsrl32 %2, $1, 0 \n" " sll %3, $1, 0 \n" " dmfc0 $1, $3 \n" " dsrl32 %4, $1, 0 \n" " sll %5, $1, 0 \n" " mfc0 %6, $5 \n" ".set pop \n" : "=r" (entryhihi), "=r" (entryhilo), "=r" (entrylo0hi), "=r" (entrylo0lo), "=r" (entrylo1hi), "=r" (entrylo1lo), "=r" (pagemask)); printk("%08X%08X %08X%08X %08X%08X %08X", entryhihi, entryhilo, entrylo0hi, entrylo0lo, entrylo1hi, entrylo1lo, pagemask); } void sb1_dump_tlb(void) { unsigned long old_ctx; unsigned long flags; int entry; local_irq_save(flags); old_ctx = read_c0_entryhi(); printk("Current TLB registers state:\n" " EntryHi EntryLo0 EntryLo1 PageMask Index\n" " dump_cur_tlb_regs(); printk(" %08X\n", read_c0_index()); printk("\n\nFull TLB Dump:\n" "Idx EntryHi EntryLo0 EntryLo1 PageMask\n" " for (entry = 0; entry < current_cpu_data.tlbsize; entry++) { write_c0_index(entry); printk("\n%02i ", entry); tlb_read(); dump_cur_tlb_regs(); } printk("\n"); write_c0_entryhi(old_ctx); local_irq_restore(flags); } void local_flush_tlb_all(void) { unsigned long flags; unsigned long old_ctx; int entry; local_irq_save(flags); /* Save old context and create impossible VPN2 value */ old_ctx = read_c0_entryhi() & ASID_MASK; write_c0_entrylo0(0); write_c0_entrylo1(0); for (entry = 0; entry < current_cpu_data.tlbsize; entry++) { write_c0_entryhi(KSEG0 + (PAGE_SIZE << 1) * entry); write_c0_index(entry); tlb_write_indexed(); } write_c0_entryhi(old_ctx); local_irq_restore(flags); } /* * Use a bogus region of memory (starting at 0) to sanitize the TLB's. * Use increments of the maximum page size (16MB), and check for duplicate * entries before doing a given write. Then, when we're safe from collisions * with the firmware, go back and give all the entries invalid addresses with * the normal flush routine. */ void sb1_sanitize_tlb(void) { int entry; long addr = 0; long inc = 1<<24; /* 16MB */ /* Save old context and create impossible VPN2 value */ write_c0_entrylo0(0); write_c0_entrylo1(0); for (entry = 0; entry < current_cpu_data.tlbsize; entry++) { do { addr += inc; write_c0_entryhi(addr); tlb_probe(); } while ((int)(read_c0_index()) >= 0); write_c0_index(entry); tlb_write_indexed(); } /* Now that we know we're safe from collisions, we can safely flush the TLB with the "normal" routine. */ local_flush_tlb_all(); } void <API key>(struct mm_struct *mm, unsigned long start, unsigned long end) { unsigned long flags; int cpu; local_irq_save(flags); cpu = smp_processor_id(); if (cpu_context(cpu, mm) != 0) { int size; size = (end - start + (PAGE_SIZE - 1)) >> PAGE_SHIFT; size = (size + 1) >> 1; if (size <= (current_cpu_data.tlbsize/2)) { int oldpid = read_c0_entryhi() & ASID_MASK; int newpid = cpu_asid(cpu, mm); start &= (PAGE_MASK << 1); end += ((PAGE_SIZE << 1) - 1); end &= (PAGE_MASK << 1); while (start < end) { int idx; write_c0_entryhi(start | newpid); start += (PAGE_SIZE << 1); tlb_probe(); idx = read_c0_index(); write_c0_entrylo0(0); write_c0_entrylo1(0); write_c0_entryhi(KSEG0 + (idx << (PAGE_SHIFT+1))); if (idx < 0) continue; tlb_write_indexed(); } write_c0_entryhi(oldpid); } else { drop_mmu_context(mm, cpu); } } local_irq_restore(flags); } void <API key>(struct vm_area_struct *vma, unsigned long page) { unsigned long flags; int cpu = smp_processor_id(); local_irq_save(flags); if (cpu_context(cpu, vma->vm_mm) != 0) { int oldpid, newpid, idx; newpid = cpu_asid(cpu, vma->vm_mm); page &= (PAGE_MASK << 1); oldpid = read_c0_entryhi() & ASID_MASK; write_c0_entryhi(page | newpid); tlb_probe(); idx = read_c0_index(); write_c0_entrylo0(0); write_c0_entrylo1(0); if (idx < 0) goto finish; /* Make sure all entries differ. */ write_c0_entryhi(KSEG0+(idx<<(PAGE_SHIFT+1))); tlb_write_indexed(); finish: write_c0_entryhi(oldpid); } local_irq_restore(flags); } /* All entries common to a mm share an asid. To effectively flush these entries, we just bump the asid. */ void local_flush_tlb_mm(struct mm_struct *mm) { int cpu = smp_processor_id(); if (cpu_context(cpu, mm) != 0) { drop_mmu_context(mm, cpu); } } /* Stolen from mips32 routines */ void __update_tlb(struct vm_area_struct *vma, unsigned long address, pte_t pte) { unsigned long flags; pgd_t *pgdp; pmd_t *pmdp; pte_t *ptep; int idx, pid; /* * Handle debugger faulting in for debugee. */ if (current->active_mm != vma->vm_mm) return; local_irq_save(flags); pid = read_c0_entryhi() & ASID_MASK; address &= (PAGE_MASK << 1); write_c0_entryhi(address | (pid)); pgdp = pgd_offset(vma->vm_mm, address); tlb_probe(); pmdp = pmd_offset(pgdp, address); idx = read_c0_index(); ptep = pte_offset(pmdp, address); write_c0_entrylo0(pte_val(*ptep++) >> 6); write_c0_entrylo1(pte_val(*ptep) >> 6); if (idx < 0) { tlb_write_random(); } else { tlb_write_indexed(); } local_irq_restore(flags); } /* * This is called from loadmmu.c. We have to set up all the * memory management function pointers, as well as initialize * the caches and tlbs */ void sb1_tlb_init(void) { write_c0_pagemask(PM_4K); /* * We don't know what state the firmware left the TLB's in, so this is * the ultra-conservative way to flush the TLB's and avoid machine * check exceptions due to duplicate TLB entries */ sb1_sanitize_tlb(); memcpy((void *)KSEG0, except_vec0_sb1, 0x80); flush_icache_range(KSEG0, KSEG0 + 0x80); }
<?php ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id="nav-above" class="navigation"> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'smpl' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'smpl' ) ); ?></div> </div><!-- #nav-above --> <div class="clear"></div> <?php endif; ?> <?php /* If there are no posts to display, such as an empty archive page */ ?> <?php if ( ! have_posts() ) : ?> <div id="post-0" class="post error404 not-found"> <h1 class="entry-title"><?php _e( 'Not Found', 'smpl' ); ?></h1> <div class="entry-content"> <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'smpl' ); ?></p> <?php get_search_form(); ?> </div><!-- .entry-content --> </div><!-- #post-0 --> <?php endif; ?> <?php /* Start the Loop. * * In Skeleton we use the same loop in multiple contexts. * It is broken into three main parts: when we're displaying * posts that are in the gallery category, when we're displaying * posts in the asides category, and finally all other posts. * * Additionally, we sometimes check for whether we are on an * archive page, a search page, etc., allowing for small differences * in the loop on each template without actually duplicating * the rest of the loop that is shared. * * Without further ado, the loop: */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* How to display posts of the Gallery format. The gallery category is the old way. */ ?> <?php if ( ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) || in_category( _x( 'gallery', 'gallery category slug', 'smpl' ) ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'smpl' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <?php skeleton_posted_on(); ?> </div><!-- .entry-meta --> <div class="entry-content"> <?php if ( <API key>() ) : ?> <?php the_content(); ?> <?php else : ?> <?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = <API key>( $image->ID, 'thumbnail' ); ?> <div class="gallery-thumb"> <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> </div><!-- .gallery-thumb --> <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'smpl' ), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'smpl' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', number_format_i18n( $total_images ) ); ?></em></p> <?php endif; ?> <?php the_excerpt(); ?> <?php endif; ?> </div><!-- .entry-content --> <div class="entry-utility"> <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?> <a href="<?php echo <API key>( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'smpl' ); ?>"><?php _e( 'More Galleries', 'smpl' ); ?></a> <span class="meta-sep">|</span> <?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'smpl' ) ) ) : ?> <a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'smpl' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'smpl' ); ?>"><?php _e( 'More Galleries', 'smpl' ); ?></a> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'smpl' ), __( '1 Comment', 'smpl' ), __( '% Comments', 'smpl' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'smpl' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php /* How to display posts of the Aside format. The asides category is the old way. */ ?> <?php elseif ( ( function_exists( 'get_post_format' ) && 'aside' == get_post_format( $post->ID ) ) || in_category( _x( 'asides', 'asides category slug', 'smpl' ) ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'smpl' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <div class="entry-utility"> <?php skeleton_posted_on(); ?> <span class="meta-sep">|</span> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'smpl' ), __( '1 Comment', 'smpl' ), __( '% Comments', 'smpl' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'smpl' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php /* How to display all other posts. */ ?> <?php else : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'smpl' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-meta"> <?php skeleton_posted_on(); ?> </div><!-- .entry-meta --> <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div><!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'smpl' ) ); ?> <div class="clear"></div> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'smpl' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?> <div class="entry-utility"> <?php if ( count( get_the_category() ) ) : ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'smpl' ), 'entry-utility-prep <API key>', <API key>( ', ' ) ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <?php $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ): ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'smpl' ), 'entry-utility-prep <API key>', $tags_list ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'smpl' ), __( '1 Comment', 'smpl' ), __( '% Comments', 'smpl' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'smpl' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php comments_template( '', true ); ?> <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?> <?php endwhile; // End the loop. Whew. ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id="nav-below" class="navigation"> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'smpl' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'smpl' ) ); ?></div> </div><!-- #nav-below --> <?php endif; ?>
define( "dojox/editor/plugins/nls/hu/Preview", ({ "preview": "Előzetes" }) );
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Get user's global privileges and some db-specific privileges * * @package PhpMyAdmin */ if (! defined('PHPMYADMIN')) { exit; } use PhpMyAdmin\CheckUserPrivileges; list($username, $hostname) = $GLOBALS['dbi']-><API key>(); if ($username === '') { // MySQL is started with --skip-grant-tables $GLOBALS['is_create_db_priv'] = true; $GLOBALS['is_reload_priv'] = true; $GLOBALS['db_to_create'] = ''; $GLOBALS['<API key>'] = array('*'); $GLOBALS['dbs_to_test'] = false; $GLOBALS['db_priv'] = true; $GLOBALS['col_priv'] = true; $GLOBALS['table_priv'] = true; $GLOBALS['proc_priv'] = true; } else { CheckUserPrivileges::analyseShowGrant(); }
/* vi: set sw=4 ts=4: */ #include <stdio.h> #include <fcntl.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #include <sys/ioctl.h> #include "busybox.h" static FILE *cin; #ifdef <API key> #include <termios.h> #define setTermSettings(fd,argp) tcsetattr(fd,TCSANOW,argp) #define getTermSettings(fd,argp) tcgetattr(fd, argp); static struct termios initial_settings, new_settings; static void <API key>(void) { setTermSettings(fileno(cin), &initial_settings); } static void gotsig(int sig) { putchar('\n'); exit(EXIT_FAILURE); } #endif /* <API key> */ static int terminal_width = 79; /* not 80 in case terminal has linefold bug */ static int terminal_height = 24; extern int more_main(int argc, char **argv) { int c, lines, input = 0; int <API key> = -1; struct stat st; FILE *file; int len, page_height; #if defined <API key> && defined <API key> struct winsize win = { 0, 0, 0, 0 }; #endif argc argv++; /* not use inputing from terminal if usage: more > outfile */ if(isatty(fileno(stdout))) { cin = fopen(CURRENT_TTY, "r"); if (!cin) cin = xfopen(CONSOLE_DEV, "r"); <API key> = 0; #ifdef <API key> getTermSettings(fileno(cin), &initial_settings); new_settings = initial_settings; new_settings.c_lflag &= ~ICANON; new_settings.c_lflag &= ~ECHO; #ifndef linux /* Hmm, in linux c_cc[] not parsed if set ~ICANON */ new_settings.c_cc[VMIN] = 1; new_settings.c_cc[VTIME] = 0; #endif setTermSettings(fileno(cin), &new_settings); atexit(<API key>); (void) signal(SIGINT, gotsig); (void) signal(SIGQUIT, gotsig); (void) signal(SIGTERM, gotsig); #endif } do { if (argc == 0) { file = stdin; } else file = wfopen(*argv, "r"); if(file==0) goto loop; st.st_size = 0; fstat(fileno(file), &st); if(<API key>>0) <API key> = 0; #if defined <API key> && defined <API key> ioctl(fileno(stdout), TIOCGWINSZ, &win); if (win.ws_row > 4) terminal_height = win.ws_row - 2; if (win.ws_col > 0) terminal_width = win.ws_col - 1; #endif len=0; lines = 0; page_height = terminal_height; while ((c = getc(file)) != EOF) { if (<API key>>0) { len = printf("--More if (file != stdin && st.st_size > 0) { #if _FILE_OFFSET_BITS == 64 len += printf("(%d%% of %lld bytes)", (int) (100 * ((double) ftell(file) / (double) st.st_size)), (long long)st.st_size); #else len += printf("(%d%% of %ld bytes)", (int) (100 * ((double) ftell(file) / (double) st.st_size)), (long)st.st_size); #endif } fflush(stdout); /* * We've just displayed the "--More--" prompt, so now we need * to get input from the user. */ input = getc(cin); #ifndef <API key> printf("\033[A"); /* up cursor */ #endif /* Erase the "More" message */ putc('\r', stdout); while (--len >= 0) putc(' ', stdout); putc('\r', stdout); fflush(stdout); len=0; lines = 0; page_height = terminal_height; <API key> = 0; if (input == 'q') goto end; } /* * There are two input streams to worry about here: * * c : the character we are reading from the file being "mored" * input : a character received from the keyboard * * If we hit a newline in the _file_ stream, we want to test and * see if any characters have been hit in the _input_ stream. This * allows the user to quit while in the middle of a file. */ if (c == '\n') { /* increment by just one line if we are at * the end of this line */ if (input == '\n') if(<API key>==0) <API key> = 1; /* Adjust the terminal height for any overlap, so that * no lines get lost off the top. */ if (len >= terminal_width) { int quot, rem; quot = len / terminal_width; rem = len - (quot * terminal_width); if (quot) { if (rem) page_height-=quot; else page_height-=(quot-1); } } if (++lines >= page_height) { if(<API key>==0) <API key> = 1; } len=0; } /* * If we just read a newline from the file being 'mored' and any * key other than a return is hit, scroll by one page */ putc(c, stdout); len++; } fclose(file); fflush(stdout); loop: argv++; } while (--argc > 0); end: return 0; }
package de.siemens.quantarch.bugs.impl; import de.siemens.quantarch.bugs.IssueTracker; import de.siemens.quantarch.bugs.dao.IssueTrackerDao; import de.siemens.quantarch.bugs.utils.BugExtractorConfig; @SuppressWarnings("unused") public class JiraTracker implements IssueTracker { private IssueTrackerDao dao; private BugExtractorConfig config; @Override public void setDao(IssueTrackerDao dao) { this.dao = dao; } @Override public void setConfig(BugExtractorConfig config) { this.config = config; } @Override public void parseIssues() { System.out.println("Not yet implemented"); } }
#include <stdio.h> #include <sys/file.h> #include <sys/types.h> #include <fcntl.h> #include "mpv955ioctl.h" #define DEVICE "/dev/mpv955" int main(int argc, char *argv[]) { int fd = 0; int chan = 0; unsigned short buff; int ciclo = 0; fd = open(DEVICE, O_WRONLY); printf("il file descriptor e' %d\n", fd); if (ioctl(fd, STOP, NULL) != 0) perror("ioctl()"); if (ioctl(fd, SET_ONESHOT, NULL) != 0) perror("ioctl()"); if (ioctl(fd, GET_ZERO_VOLTS, (void *) &buff) != 0) perror("ioctl()"); do { printf("insert channel [0-7 ; 8=all_channel]: "); scanf("%d", &chan); getchar(); } while ( (chan < 0) || (chan > 8) ); if (chan == 8) { for (chan=0 ; chan<8 ; chan++) { if(write(fd, &buff, chan) <= -1) { printf("Errore nella scrittura\n"); } else { printf("channel %d <- %X\n", chan, buff); } } } else { if(write(fd, &buff, chan) <= -1) { printf("Errore nella scrittura\n"); } else { printf("channel %d <- %X\n", chan, buff); } } /* Diamo due volte il comando START perche' ogni canale del dispositivo e' doppiamente bufferizzato. */ if (ioctl(fd, START, NULL) != 0) perror("ioctl()"); ciclo = 0; while (ciclo == 0) { if (ioctl(fd, GET_CYCFIN, (void *) &ciclo) != 0) perror("ioctl"); } ciclo = 0; if (ioctl(fd, START, NULL) != 0) perror("ioctl()"); printf("close() ha restituito %d\n", close(fd)); exit(0); }
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } audio:not([controls]) { display: none; } html { font-size: 100%; -<API key>: 100%; -ms-text-size-adjust: 100%; } a:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } a:hover, a:active { outline: 0; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { width: auto\9; height: auto; max-width: 100%; vertical-align: middle; border: 0; -<API key>: bicubic; } #map_canvas img, .google-maps img { max-width: none; } button, input, select, textarea { margin: 0; font-size: 100%; vertical-align: middle; } button, input { *overflow: visible; line-height: normal; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } button, html input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-<API key>, input[type="search"]::-<API key> { -webkit-appearance: none; } textarea { overflow: auto; vertical-align: top; } .clearfix { *zoom: 1; } .clearfix:before, .clearfix:after { display: table; line-height: 0; content: ""; } .clearfix:after { clear: both; } .hide-text { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .input-block-level { display: block; width: 100%; min-height: 30px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; color: #333333; background-color: #ffffff; } a { color: #0088cc; text-decoration: none; } a:hover { color: #005580; text-decoration: underline; } .img-rounded { -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .img-polaroid { padding: 4px; background-color: #fff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .img-circle { -<API key>: 500px; -moz-border-radius: 500px; border-radius: 500px; } .row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; line-height: 0; content: ""; } .row:after { clear: both; } [class*="span"] { float: left; min-height: 1px; margin-left: 20px; } .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .span12 { width: 940px; } .span11 { width: 860px; } .span10 { width: 780px; } .span9 { width: 700px; } .span8 { width: 620px; } .span7 { width: 540px; } .span6 { width: 460px; } .span5 { width: 380px; } .span4 { width: 300px; } .span3 { width: 220px; } .span2 { width: 140px; } .span1 { width: 60px; } .offset12 { margin-left: 980px; } .offset11 { margin-left: 900px; } .offset10 { margin-left: 820px; } .offset9 { margin-left: 740px; } .offset8 { margin-left: 660px; } .offset7 { margin-left: 580px; } .offset6 { margin-left: 500px; } .offset5 { margin-left: 420px; } .offset4 { margin-left: 340px; } .offset3 { margin-left: 260px; } .offset2 { margin-left: 180px; } .offset1 { margin-left: 100px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; line-height: 0; content: ""; } .row-fluid:after { clear: both; } .row-fluid [class*="span"] { display: block; float: left; width: 100%; min-height: 30px; margin-left: 2.127659574468085%; *margin-left: 2.074468085106383%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .row-fluid [class*="span"]:first-child { margin-left: 0; } .row-fluid .controls-row [class*="span"] + [class*="span"] { margin-left: 2.127659574468085%; } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; } .row-fluid .span11 { width: 91.48936170212765%; *width: 91.43617021276594%; } .row-fluid .span10 { width: 82.97872340425532%; *width: 82.92553191489361%; } .row-fluid .span9 { width: 74.46808510638297%; *width: 74.41489361702126%; } .row-fluid .span8 { width: 65.95744680851064%; *width: 65.90425531914893%; } .row-fluid .span7 { width: 57.44680851063829%; *width: 57.39361702127659%; } .row-fluid .span6 { width: 48.93617021276595%; *width: 48.88297872340425%; } .row-fluid .span5 { width: 40.42553191489362%; *width: 40.37234042553192%; } .row-fluid .span4 { width: 31.914893617021278%; *width: 31.861702127659576%; } .row-fluid .span3 { width: 23.404255319148934%; *width: 23.351063829787233%; } .row-fluid .span2 { width: 14.893617021276595%; *width: 14.840425531914894%; } .row-fluid .span1 { width: 6.382978723404255%; *width: 6.329787234042553%; } .row-fluid .offset12 { margin-left: 104.25531914893617%; *margin-left: 104.14893617021275%; } .row-fluid .offset12:first-child { margin-left: 102.12765957446808%; *margin-left: 102.02127659574467%; } .row-fluid .offset11 { margin-left: 95.74468085106382%; *margin-left: 95.6382978723404%; } .row-fluid .offset11:first-child { margin-left: 93.61702127659574%; *margin-left: 93.51063829787232%; } .row-fluid .offset10 { margin-left: 87.23404255319149%; *margin-left: 87.12765957446807%; } .row-fluid .offset10:first-child { margin-left: 85.1063829787234%; *margin-left: 84.99999999999999%; } .row-fluid .offset9 { margin-left: 78.72340425531914%; *margin-left: 78.61702127659572%; } .row-fluid .offset9:first-child { margin-left: 76.59574468085106%; *margin-left: 76.48936170212764%; } .row-fluid .offset8 { margin-left: 70.2127659574468%; *margin-left: 70.10638297872339%; } .row-fluid .offset8:first-child { margin-left: 68.08510638297872%; *margin-left: 67.9787234042553%; } .row-fluid .offset7 { margin-left: 61.70212765957446%; *margin-left: 61.59574468085106%; } .row-fluid .offset7:first-child { margin-left: 59.574468085106375%; *margin-left: 59.46808510638297%; } .row-fluid .offset6 { margin-left: 53.191489361702125%; *margin-left: 53.085106382978715%; } .row-fluid .offset6:first-child { margin-left: 51.063829787234035%; *margin-left: 50.95744680851063%; } .row-fluid .offset5 { margin-left: 44.68085106382979%; *margin-left: 44.57446808510638%; } .row-fluid .offset5:first-child { margin-left: 42.5531914893617%; *margin-left: 42.4468085106383%; } .row-fluid .offset4 { margin-left: 36.170212765957444%; *margin-left: 36.06382978723405%; } .row-fluid .offset4:first-child { margin-left: 34.04255319148936%; *margin-left: 33.93617021276596%; } .row-fluid .offset3 { margin-left: 27.659574468085104%; *margin-left: 27.5531914893617%; } .row-fluid .offset3:first-child { margin-left: 25.53191489361702%; *margin-left: 25.425531914893618%; } .row-fluid .offset2 { margin-left: 19.148936170212764%; *margin-left: 19.04255319148936%; } .row-fluid .offset2:first-child { margin-left: 17.02127659574468%; *margin-left: 16.914893617021278%; } .row-fluid .offset1 { margin-left: 10.638297872340425%; *margin-left: 10.53191489361702%; } .row-fluid .offset1:first-child { margin-left: 8.51063829787234%; *margin-left: 8.404255319148938%; } [class*="span"].hide, .row-fluid [class*="span"].hide { display: none; } [class*="span"].pull-right, .row-fluid [class*="span"].pull-right { float: right; } .container { margin-right: auto; margin-left: auto; *zoom: 1; } .container:before, .container:after { display: table; line-height: 0; content: ""; } .container:after { clear: both; } .container-fluid { padding-right: 20px; padding-left: 20px; *zoom: 1; } .container-fluid:before, .container-fluid:after { display: table; line-height: 0; content: ""; } .container-fluid:after { clear: both; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 21px; font-weight: 200; line-height: 30px; } small { font-size: 85%; } strong { font-weight: bold; } em { font-style: italic; } cite { font-style: normal; } .muted { color: #999999; } .text-warning { color: #c09853; } a.text-warning:hover { color: #a47e3c; } .text-error { color: #b94a48; } a.text-error:hover { color: #953b39; } .text-info { color: #3a87ad; } a.text-info:hover { color: #2d6987; } .text-success { color: #468847; } a.text-success:hover { color: #356635; } h1, h2, h3, h4, h5, h6 { margin: 10px 0; font-family: inherit; font-weight: bold; line-height: 20px; color: inherit; text-rendering: optimizelegibility; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-weight: normal; line-height: 1; color: #999999; } h1, h2, h3 { line-height: 40px; } h1 { font-size: 38.5px; } h2 { font-size: 31.5px; } h3 { font-size: 24.5px; } h4 { font-size: 17.5px; } h5 { font-size: 14px; } h6 { font-size: 11.9px; } h1 small { font-size: 24.5px; } h2 small { font-size: 17.5px; } h3 small { font-size: 14px; } h4 small { font-size: 14px; } .page-header { padding-bottom: 9px; margin: 20px 0 30px; border-bottom: 1px solid #eeeeee; } ul, ol { padding: 0; margin: 0 0 10px 25px; } ul ul, ul ol, ol ol, ol ul { margin-bottom: 0; } li { line-height: 20px; } ul.unstyled, ol.unstyled { margin-left: 0; list-style: none; } dl { margin-bottom: 20px; } dt, dd { line-height: 20px; } dt { font-weight: bold; } dd { margin-left: 10px; } .dl-horizontal { *zoom: 1; } .dl-horizontal:before, .dl-horizontal:after { display: table; line-height: 0; content: ""; } .dl-horizontal:after { clear: both; } .dl-horizontal dt { float: left; width: 160px; overflow: hidden; clear: left; text-align: right; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } hr { margin: 20px 0; border: 0; border-top: 1px solid #eeeeee; border-bottom: 1px solid #ffffff; } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #999999; } abbr.initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 0 0 0 15px; margin: 0 0 20px; border-left: 5px solid #eeeeee; } blockquote p { margin-bottom: 0; font-size: 16px; font-weight: 300; line-height: 25px; } blockquote small { display: block; line-height: 20px; color: #999999; } blockquote small:before { content: '\2014 \00A0'; } blockquote.pull-right { float: right; padding-right: 15px; padding-left: 0; border-right: 5px solid #eeeeee; border-left: 0; } blockquote.pull-right p, blockquote.pull-right small { text-align: right; } blockquote.pull-right small:before { content: ''; } blockquote.pull-right small:after { content: '\00A0 \2014'; } q:before, q:after, blockquote:before, blockquote:after { content: ""; } address { display: block; margin-bottom: 20px; font-style: normal; line-height: 20px; } code, pre { padding: 0 3px 2px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; color: #333333; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } code { padding: 2px 4px; color: #d14; background-color: #f7f7f9; border: 1px solid #e1e1e8; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 20px; word-break: break-all; word-wrap: break-word; white-space: pre; white-space: pre-wrap; background-color: #f5f5f5; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.15); -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } pre.prettyprint { margin-bottom: 20px; } pre code { padding: 0; color: inherit; background-color: transparent; border: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } form { margin: 0 0 20px; } fieldset { padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: 40px; color: #333333; border: 0; border-bottom: 1px solid #e5e5e5; } legend small { font-size: 15px; color: #999999; } label, input, button, select, textarea { font-size: 14px; font-weight: normal; line-height: 20px; } input, button, select, textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } label { display: block; margin-bottom: 5px; } select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { display: inline-block; height: 20px; padding: 4px 6px; margin-bottom: 10px; font-size: 14px; line-height: 20px; color: #555555; vertical-align: middle; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } input, textarea, .uneditable-input { width: 206px; } textarea { height: auto; } textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { background-color: #ffffff; border: 1px solid #cccccc; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; -moz-transition: border linear 0.2s, box-shadow linear 0.2s; -o-transition: border linear 0.2s, box-shadow linear 0.2s; transition: border linear 0.2s, box-shadow linear 0.2s; } textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus { border-color: rgba(82, 168, 236, 0.8); outline: 0; outline: thin dotted \9; /* IE6-9 */ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; margin-top: 1px \9; *margin-top: 0; line-height: normal; cursor: pointer; } input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] { width: auto; } select, input[type="file"] { height: 30px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ *margin-top: 4px; /* For IE7, add top margin to align select with labels */ line-height: 30px; } select { width: 220px; background-color: #ffffff; border: 1px solid #cccccc; } select[multiple], select[size] { height: auto; } select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } .uneditable-input, .uneditable-textarea { color: #999999; cursor: not-allowed; background-color: #fcfcfc; border-color: #cccccc; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); } .uneditable-input { overflow: hidden; white-space: nowrap; } .uneditable-textarea { width: auto; height: auto; } input:-moz-placeholder, textarea:-moz-placeholder { color: #999999; } input:-<API key>, textarea:-<API key> { color: #999999; } input::-<API key>, textarea::-<API key> { color: #999999; } .radio, .checkbox { min-height: 20px; padding-left: 20px; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; margin-left: -20px; } .controls > .radio:first-child, .controls > .checkbox:first-child { padding-top: 5px; } .radio.inline, .checkbox.inline { display: inline-block; padding-top: 5px; margin-bottom: 0; vertical-align: middle; } .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { margin-left: 10px; } .input-mini { width: 60px; } .input-small { width: 90px; } .input-medium { width: 150px; } .input-large { width: 210px; } .input-xlarge { width: 270px; } .input-xxlarge { width: 530px; } input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] { float: none; margin-left: 0; } .input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] { display: inline-block; } input, textarea, .uneditable-input { margin-left: 0; } .controls-row [class*="span"] + [class*="span"] { margin-left: 20px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 926px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 846px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 766px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 686px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 606px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 526px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 446px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 366px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 286px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 206px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 126px; } input.span1, textarea.span1, .uneditable-input.span1 { width: 46px; } .controls-row { *zoom: 1; } .controls-row:before, .controls-row:after { display: table; line-height: 0; content: ""; } .controls-row:after { clear: both; } .controls-row [class*="span"], .row-fluid .controls-row [class*="span"] { float: left; } .controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] { padding-top: 5px; } input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] { cursor: not-allowed; background-color: #eeeeee; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] { background-color: transparent; } .control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline { color: #c09853; } .control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea { color: #c09853; } .control-group.warning input, .control-group.warning select, .control-group.warning textarea { border-color: #c09853; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { border-color: #a47e3c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; } .control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on { color: #c09853; background-color: #fcf8e3; border-color: #c09853; } .control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline { color: #b94a48; } .control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea { color: #b94a48; } .control-group.error input, .control-group.error select, .control-group.error textarea { border-color: #b94a48; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { border-color: #953b39; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; } .control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on { color: #b94a48; background-color: #f2dede; border-color: #b94a48; } .control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline { color: #468847; } .control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea { color: #468847; } .control-group.success input, .control-group.success select, .control-group.success textarea { border-color: #468847; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { border-color: #356635; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; } .control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on { color: #468847; background-color: #dff0d8; border-color: #468847; } .control-group.info > label, .control-group.info .help-block, .control-group.info .help-inline { color: #3a87ad; } .control-group.info .checkbox, .control-group.info .radio, .control-group.info input, .control-group.info select, .control-group.info textarea { color: #3a87ad; } .control-group.info input, .control-group.info select, .control-group.info textarea { border-color: #3a87ad; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.info input:focus, .control-group.info select:focus, .control-group.info textarea:focus { border-color: #2d6987; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; } .control-group.info .input-prepend .add-on, .control-group.info .input-append .add-on { color: #3a87ad; background-color: #d9edf7; border-color: #3a87ad; } input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid { color: #b94a48; border-color: #ee5f5b; } input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus { border-color: #e9322d; -webkit-box-shadow: 0 0 6px #f8b9b7; -moz-box-shadow: 0 0 6px #f8b9b7; box-shadow: 0 0 6px #f8b9b7; } .form-actions { padding: 19px 20px 20px; margin-top: 20px; margin-bottom: 20px; background-color: #f5f5f5; border-top: 1px solid #e5e5e5; *zoom: 1; } .form-actions:before, .form-actions:after { display: table; line-height: 0; content: ""; } .form-actions:after { clear: both; } .help-block, .help-inline { color: #595959; } .help-block { display: block; margin-bottom: 10px; } .help-inline { display: inline-block; *display: inline; padding-left: 5px; vertical-align: middle; *zoom: 1; } .input-append, .input-prepend { margin-bottom: 5px; font-size: 0; white-space: nowrap; } .input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, .input-prepend .dropdown-menu { font-size: 14px; } .input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input { position: relative; margin-bottom: 0; *margin-left: 0; vertical-align: top; -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-append input:focus, .input-prepend input:focus, .input-append select:focus, .input-prepend select:focus, .input-append .uneditable-input:focus, .input-prepend .uneditable-input:focus { z-index: 2; } .input-append .add-on, .input-prepend .add-on { display: inline-block; width: auto; height: 20px; min-width: 16px; padding: 4px 5px; font-size: 14px; font-weight: normal; line-height: 20px; text-align: center; text-shadow: 0 1px 0 #ffffff; background-color: #eeeeee; border: 1px solid #ccc; } .input-append .add-on, .input-prepend .add-on, .input-append .btn, .input-prepend .btn { vertical-align: top; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .input-append .active, .input-prepend .active { background-color: #a9dba9; border-color: #46a546; } .input-prepend .add-on, .input-prepend .btn { margin-right: -1px; } .input-prepend .add-on:first-child, .input-prepend .btn:first-child { -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-append input, .input-append select, .input-append .uneditable-input { -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-append input + .btn-group .btn, .input-append select + .btn-group .btn, .input-append .uneditable-input + .btn-group .btn { -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-append .add-on, .input-append .btn, .input-append .btn-group { margin-left: -1px; } .input-append .add-on:last-child, .input-append .btn:last-child { -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input { -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .input-prepend.input-append input + .btn-group .btn, .input-prepend.input-append select + .btn-group .btn, .input-prepend.input-append .uneditable-input + .btn-group .btn { -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child { margin-right: -1px; -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child { margin-left: -1px; -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append .btn-group:first-child { margin-left: 0; } input.search-query { padding-right: 14px; padding-right: 4px \9; padding-left: 14px; padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ margin-bottom: 0; -<API key>: 15px; -moz-border-radius: 15px; border-radius: 15px; } /* Allow for input prepend/append in search forms */ .form-search .input-append .search-query, .form-search .input-prepend .search-query { -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .form-search .input-append .search-query { -<API key>: 14px 0 0 14px; -moz-border-radius: 14px 0 0 14px; border-radius: 14px 0 0 14px; } .form-search .input-append .btn { -<API key>: 0 14px 14px 0; -moz-border-radius: 0 14px 14px 0; border-radius: 0 14px 14px 0; } .form-search .input-prepend .search-query { -<API key>: 0 14px 14px 0; -moz-border-radius: 0 14px 14px 0; border-radius: 0 14px 14px 0; } .form-search .input-prepend .btn { -<API key>: 14px 0 0 14px; -moz-border-radius: 14px 0 0 14px; border-radius: 14px 0 0 14px; } .form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append { display: inline-block; *display: inline; margin-bottom: 0; vertical-align: middle; *zoom: 1; } .form-search .hide, .form-inline .hide, .form-horizontal .hide { display: none; } .form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group { display: inline-block; } .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend { margin-bottom: 0; } .form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox { padding-left: 0; margin-bottom: 0; vertical-align: middle; } .form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { float: left; margin-right: 3px; margin-left: 0; } .control-group { margin-bottom: 10px; } legend + .control-group { margin-top: 20px; -<API key>: separate; } .form-horizontal .control-group { margin-bottom: 20px; *zoom: 1; } .form-horizontal .control-group:before, .form-horizontal .control-group:after { display: table; line-height: 0; content: ""; } .form-horizontal .control-group:after { clear: both; } .form-horizontal .control-label { float: left; width: 160px; padding-top: 5px; text-align: right; } .form-horizontal .controls { *display: inline-block; *padding-left: 20px; margin-left: 180px; *margin-left: 0; } .form-horizontal .controls:first-child { *padding-left: 180px; } .form-horizontal .help-block { margin-bottom: 0; } .form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block { margin-top: 10px; } .form-horizontal .form-actions { padding-left: 180px; } table { max-width: 100%; background-color: transparent; border-collapse: collapse; border-spacing: 0; } .table { width: 100%; margin-bottom: 20px; } .table th, .table td { padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border-top: 1px solid #dddddd; } .table th { font-weight: bold; } .table thead th { vertical-align: bottom; } .table caption + thead tr:first-child th, .table caption + thead tr:first-child td, .table colgroup + thead tr:first-child th, .table colgroup + thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td { border-top: 0; } .table tbody + tbody { border-top: 2px solid #dddddd; } .table-condensed th, .table-condensed td { padding: 4px 5px; } .table-bordered { border: 1px solid #dddddd; border-collapse: separate; *border-collapse: collapse; border-left: 0; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .table-bordered th, .table-bordered td { border-left: 1px solid #dddddd; } .table-bordered caption + thead tr:first-child th, .table-bordered caption + tbody tr:first-child th, .table-bordered caption + tbody tr:first-child td, .table-bordered colgroup + thead tr:first-child th, .table-bordered colgroup + tbody tr:first-child th, .table-bordered colgroup + tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td { border-top: 0; } .table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; } .table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; } .table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child, .table-bordered tfoot:last-child tr:last-child td:first-child { -<API key>: 0 0 0 4px; -moz-border-radius: 0 0 0 4px; border-radius: 0 0 0 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; } .table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child, .table-bordered tfoot:last-child tr:last-child td:last-child { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; } .table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + tbody tr:first-child td:first-child, .table-bordered colgroup + thead tr:first-child th:first-child, .table-bordered colgroup + tbody tr:first-child td:first-child { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; } .table-bordered caption + thead tr:first-child th:last-child, .table-bordered caption + tbody tr:first-child td:last-child, .table-bordered colgroup + thead tr:first-child th:last-child, .table-bordered colgroup + tbody tr:first-child td:last-child { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; } .table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th { background-color: #f9f9f9; } .table-hover tbody tr:hover td, .table-hover tbody tr:hover th { background-color: #f5f5f5; } table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], .row-fluid table th[class*="span"] { display: table-cell; float: none; margin-left: 0; } .table td.span1, .table th.span1 { float: none; width: 44px; margin-left: 0; } .table td.span2, .table th.span2 { float: none; width: 124px; margin-left: 0; } .table td.span3, .table th.span3 { float: none; width: 204px; margin-left: 0; } .table td.span4, .table th.span4 { float: none; width: 284px; margin-left: 0; } .table td.span5, .table th.span5 { float: none; width: 364px; margin-left: 0; } .table td.span6, .table th.span6 { float: none; width: 444px; margin-left: 0; } .table td.span7, .table th.span7 { float: none; width: 524px; margin-left: 0; } .table td.span8, .table th.span8 { float: none; width: 604px; margin-left: 0; } .table td.span9, .table th.span9 { float: none; width: 684px; margin-left: 0; } .table td.span10, .table th.span10 { float: none; width: 764px; margin-left: 0; } .table td.span11, .table th.span11 { float: none; width: 844px; margin-left: 0; } .table td.span12, .table th.span12 { float: none; width: 924px; margin-left: 0; } .table tbody tr.success td { background-color: #dff0d8; } .table tbody tr.error td { background-color: #f2dede; } .table tbody tr.warning td { background-color: #fcf8e3; } .table tbody tr.info td { background-color: #d9edf7; } .table-hover tbody tr.success:hover td { background-color: #d0e9c6; } .table-hover tbody tr.error:hover td { background-color: #ebcccc; } .table-hover tbody tr.warning:hover td { background-color: #faf2cc; } .table-hover tbody tr.info:hover td { background-color: #c4e3f3; } [class^="icon-"], [class*=" icon-"] { display: inline-block; width: 14px; height: 14px; margin-top: 1px; *margin-right: .3em; line-height: 14px; vertical-align: text-top; background-image: url("../img/<API key>.png"); background-position: 14px 14px; background-repeat: no-repeat; } /* White icons with optional class, or on hover/active states of certain elements */ .icon-white, .nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class*=" icon-"], .nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*=" icon-"], .dropdown-submenu:hover > a > [class^="icon-"], .dropdown-submenu:hover > a > [class*=" icon-"] { background-image: url("../img/<API key>.png"); } .icon-glass { background-position: 0 0; } .icon-music { background-position: -24px 0; } .icon-search { background-position: -48px 0; } .icon-envelope { background-position: -72px 0; } .icon-heart { background-position: -96px 0; } .icon-star { background-position: -120px 0; } .icon-star-empty { background-position: -144px 0; } .icon-user { background-position: -168px 0; } .icon-film { background-position: -192px 0; } .icon-th-large { background-position: -216px 0; } .icon-th { background-position: -240px 0; } .icon-th-list { background-position: -264px 0; } .icon-ok { background-position: -288px 0; } .icon-remove { background-position: -312px 0; } .icon-zoom-in { background-position: -336px 0; } .icon-zoom-out { background-position: -360px 0; } .icon-off { background-position: -384px 0; } .icon-signal { background-position: -408px 0; } .icon-cog { background-position: -432px 0; } .icon-trash { background-position: -456px 0; } .icon-home { background-position: 0 -24px; } .icon-file { background-position: -24px -24px; } .icon-time { background-position: -48px -24px; } .icon-road { background-position: -72px -24px; } .icon-download-alt { background-position: -96px -24px; } .icon-download { background-position: -120px -24px; } .icon-upload { background-position: -144px -24px; } .icon-inbox { background-position: -168px -24px; } .icon-play-circle { background-position: -192px -24px; } .icon-repeat { background-position: -216px -24px; } .icon-refresh { background-position: -240px -24px; } .icon-list-alt { background-position: -264px -24px; } .icon-lock { background-position: -287px -24px; } .icon-flag { background-position: -312px -24px; } .icon-headphones { background-position: -336px -24px; } .icon-volume-off { background-position: -360px -24px; } .icon-volume-down { background-position: -384px -24px; } .icon-volume-up { background-position: -408px -24px; } .icon-qrcode { background-position: -432px -24px; } .icon-barcode { background-position: -456px -24px; } .icon-tag { background-position: 0 -48px; } .icon-tags { background-position: -25px -48px; } .icon-book { background-position: -48px -48px; } .icon-bookmark { background-position: -72px -48px; } .icon-print { background-position: -96px -48px; } .icon-camera { background-position: -120px -48px; } .icon-font { background-position: -144px -48px; } .icon-bold { background-position: -167px -48px; } .icon-italic { background-position: -192px -48px; } .icon-text-height { background-position: -216px -48px; } .icon-text-width { background-position: -240px -48px; } .icon-align-left { background-position: -264px -48px; } .icon-align-center { background-position: -288px -48px; } .icon-align-right { background-position: -312px -48px; } .icon-align-justify { background-position: -336px -48px; } .icon-list { background-position: -360px -48px; } .icon-indent-left { background-position: -384px -48px; } .icon-indent-right { background-position: -408px -48px; } .icon-facetime-video { background-position: -432px -48px; } .icon-picture { background-position: -456px -48px; } .icon-pencil { background-position: 0 -72px; } .icon-map-marker { background-position: -24px -72px; } .icon-adjust { background-position: -48px -72px; } .icon-tint { background-position: -72px -72px; } .icon-edit { background-position: -96px -72px; } .icon-share { background-position: -120px -72px; } .icon-check { background-position: -144px -72px; } .icon-move { background-position: -168px -72px; } .icon-step-backward { background-position: -192px -72px; } .icon-fast-backward { background-position: -216px -72px; } .icon-backward { background-position: -240px -72px; } .icon-play { background-position: -264px -72px; } .icon-pause { background-position: -288px -72px; } .icon-stop { background-position: -312px -72px; } .icon-forward { background-position: -336px -72px; } .icon-fast-forward { background-position: -360px -72px; } .icon-step-forward { background-position: -384px -72px; } .icon-eject { background-position: -408px -72px; } .icon-chevron-left { background-position: -432px -72px; } .icon-chevron-right { background-position: -456px -72px; } .icon-plus-sign { background-position: 0 -96px; } .icon-minus-sign { background-position: -24px -96px; } .icon-remove-sign { background-position: -48px -96px; } .icon-ok-sign { background-position: -72px -96px; } .icon-question-sign { background-position: -96px -96px; } .icon-info-sign { background-position: -120px -96px; } .icon-screenshot { background-position: -144px -96px; } .icon-remove-circle { background-position: -168px -96px; } .icon-ok-circle { background-position: -192px -96px; } .icon-ban-circle { background-position: -216px -96px; } .icon-arrow-left { background-position: -240px -96px; } .icon-arrow-right { background-position: -264px -96px; } .icon-arrow-up { background-position: -289px -96px; } .icon-arrow-down { background-position: -312px -96px; } .icon-share-alt { background-position: -336px -96px; } .icon-resize-full { background-position: -360px -96px; } .icon-resize-small { background-position: -384px -96px; } .icon-plus { background-position: -408px -96px; } .icon-minus { background-position: -433px -96px; } .icon-asterisk { background-position: -456px -96px; } .<API key> { background-position: 0 -120px; } .icon-gift { background-position: -24px -120px; } .icon-leaf { background-position: -48px -120px; } .icon-fire { background-position: -72px -120px; } .icon-eye-open { background-position: -96px -120px; } .icon-eye-close { background-position: -120px -120px; } .icon-warning-sign { background-position: -144px -120px; } .icon-plane { background-position: -168px -120px; } .icon-calendar { background-position: -192px -120px; } .icon-random { width: 16px; background-position: -216px -120px; } .icon-comment { background-position: -240px -120px; } .icon-magnet { background-position: -264px -120px; } .icon-chevron-up { background-position: -288px -120px; } .icon-chevron-down { background-position: -313px -119px; } .icon-retweet { background-position: -336px -120px; } .icon-shopping-cart { background-position: -360px -120px; } .icon-folder-close { background-position: -384px -120px; } .icon-folder-open { width: 16px; background-position: -408px -120px; } .<API key> { background-position: -432px -119px; } .<API key> { background-position: -456px -118px; } .icon-hdd { background-position: 0 -144px; } .icon-bullhorn { background-position: -24px -144px; } .icon-bell { background-position: -48px -144px; } .icon-certificate { background-position: -72px -144px; } .icon-thumbs-up { background-position: -96px -144px; } .icon-thumbs-down { background-position: -120px -144px; } .icon-hand-right { background-position: -144px -144px; } .icon-hand-left { background-position: -168px -144px; } .icon-hand-up { background-position: -192px -144px; } .icon-hand-down { background-position: -216px -144px; } .<API key> { background-position: -240px -144px; } .<API key> { background-position: -264px -144px; } .<API key> { background-position: -288px -144px; } .<API key> { background-position: -312px -144px; } .icon-globe { background-position: -336px -144px; } .icon-wrench { background-position: -360px -144px; } .icon-tasks { background-position: -384px -144px; } .icon-filter { background-position: -408px -144px; } .icon-briefcase { background-position: -432px -144px; } .icon-fullscreen { background-position: -456px -144px; } .dropup, .dropdown { position: relative; } .dropdown-toggle { *margin-bottom: -3px; } .dropdown-toggle:active, .open .dropdown-toggle { outline: 0; } .caret { display: inline-block; width: 0; height: 0; vertical-align: top; border-top: 4px solid #000000; border-right: 4px solid transparent; border-left: 4px solid transparent; content: ""; } .dropdown .caret { margin-top: 8px; margin-left: 2px; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; background-color: #ffffff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); *border-right-width: 2px; *border-bottom-width: 2px; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -<API key>: padding-box; -moz-background-clip: padding; background-clip: padding-box; } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { *width: 100%; height: 1px; margin: 9px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .dropdown-menu li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 20px; color: #333333; white-space: nowrap; } .dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a { color: #ffffff; text-decoration: none; background-color: #0081c2; background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -<API key>(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu .active > a, .dropdown-menu .active > a:hover { color: #333333; text-decoration: none; background-color: #0081c2; background-image: -moz-linear-gradient(top, #0088cc, #0077b3); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); background-image: -<API key>(top, #0088cc, #0077b3); background-image: -o-linear-gradient(top, #0088cc, #0077b3); background-image: linear-gradient(to bottom, #0088cc, #0077b3); background-repeat: repeat-x; outline: 0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); } .dropdown-menu .disabled > a, .dropdown-menu .disabled > a:hover { color: #999999; } .dropdown-menu .disabled > a:hover { text-decoration: none; cursor: default; background-color: transparent; background-image: none; } .open { *z-index: 1000; } .open > .dropdown-menu { display: block; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid #000000; content: ""; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } .dropdown-submenu { position: relative; } .dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-top: -6px; margin-left: -1px; -<API key>: 0 6px 6px 6px; -moz-border-radius: 0 6px 6px 6px; border-radius: 0 6px 6px 6px; } .dropdown-submenu:hover > .dropdown-menu { display: block; } .dropup .dropdown-submenu > .dropdown-menu { top: auto; bottom: 0; margin-top: 0; margin-bottom: -2px; -<API key>: 5px 5px 5px 0; -moz-border-radius: 5px 5px 5px 0; border-radius: 5px 5px 5px 0; } .dropdown-submenu > a:after { display: block; float: right; width: 0; height: 0; margin-top: 5px; margin-right: -10px; border-color: transparent; border-left-color: #cccccc; border-style: solid; border-width: 5px 0 5px 5px; content: " "; } .dropdown-submenu:hover > a:after { border-left-color: #ffffff; } .dropdown-submenu.pull-left { float: none; } .dropdown-submenu.pull-left > .dropdown-menu { left: -100%; margin-left: 10px; -<API key>: 6px 0 6px 6px; -moz-border-radius: 6px 0 6px 6px; border-radius: 6px 0 6px 6px; } .dropdown .dropdown-menu .nav-header { padding-right: 20px; padding-left: 20px; } .typeahead { margin-top: 2px; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } .well-large { padding: 24px; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .well-small { padding: 9px; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .collapse { position: relative; height: 0; overflow: hidden; -webkit-transition: height 0.35s ease; -moz-transition: height 0.35s ease; -o-transition: height 0.35s ease; transition: height 0.35s ease; } .collapse.in { height: auto; } .close { float: right; font-size: 20px; font-weight: bold; line-height: 20px; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.2; filter: alpha(opacity=20); } .close:hover { color: #000000; text-decoration: none; cursor: pointer; opacity: 0.4; filter: alpha(opacity=40); } button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } .btn { display: inline-block; *display: inline; padding: 4px 12px; margin-bottom: 0; *margin-left: .3em; font-size: 14px; line-height: 20px; *line-height: 20px; color: #333333; text-align: center; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); vertical-align: middle; cursor: pointer; background-color: #f5f5f5; *background-color: #e6e6e6; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -<API key>(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; border: 1px solid #bbbbbb; *border: 0; border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); border-bottom-color: #a2a2a2; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); *zoom: 1; -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { color: #333333; background-color: #e6e6e6; *background-color: #d9d9d9; } .btn:active, .btn.active { background-color: #cccccc \9; } .btn:first-child { *margin-left: 0; } .btn:hover { color: #333333; text-decoration: none; background-color: #e6e6e6; *background-color: #d9d9d9; /* Buttons in IE7 don't get borders, so darken on hover */ background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } .btn:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } .btn.active, .btn:active { background-color: #e6e6e6; background-color: #d9d9d9 \9; background-image: none; outline: 0; -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn.disabled, .btn[disabled] { cursor: default; background-color: #e6e6e6; background-image: none; opacity: 0.65; filter: alpha(opacity=65); -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-large { padding: 11px 19px; font-size: 17.5px; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .btn-large [class^="icon-"], .btn-large [class*=" icon-"] { margin-top: 2px; } .btn-small { padding: 2px 10px; font-size: 11.9px; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .btn-small [class^="icon-"], .btn-small [class*=" icon-"] { margin-top: 0; } .btn-mini { padding: 1px 6px; font-size: 10.5px; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .btn-block { display: block; width: 100%; padding-right: 0; padding-left: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active { color: rgba(255, 255, 255, 0.34); } .btn { border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); } .btn-primary { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #006dcc; *background-color: #0044cc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -<API key>(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(to bottom, #0088cc, #0044cc); background-repeat: repeat-x; border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-primary:hover, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { color: #ffffff; background-color: #0044cc; *background-color: #003bb3; } .btn-primary:active, .btn-primary.active { background-color: #003399 \9; } .btn-warning { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #faa732; *background-color: #f89406; background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -<API key>(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; border-color: #f89406 #f89406 #ad6704; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-warning:hover, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] { color: #ffffff; background-color: #f89406; *background-color: #df8505; } .btn-warning:active, .btn-warning.active { background-color: #c67605 \9; } .btn-danger { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #da4f49; *background-color: #bd362f; background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image: -<API key>(top, #ee5f5b, #bd362f); background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); background-repeat: repeat-x; border-color: #bd362f #bd362f #802420; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-danger:hover, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] { color: #ffffff; background-color: #bd362f; *background-color: #a9302a; } .btn-danger:active, .btn-danger.active { background-color: #942a25 \9; } .btn-success { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; *background-color: #51a351; background-image: -moz-linear-gradient(top, #62c462, #51a351); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image: -<API key>(top, #62c462, #51a351); background-image: -o-linear-gradient(top, #62c462, #51a351); background-image: linear-gradient(to bottom, #62c462, #51a351); background-repeat: repeat-x; border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-success:hover, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] { color: #ffffff; background-color: #51a351; *background-color: #499249; } .btn-success:active, .btn-success.active { background-color: #408140 \9; } .btn-info { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #49afcd; *background-color: #2f96b4; background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -<API key>(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); background-repeat: repeat-x; border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-info:hover, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] { color: #ffffff; background-color: #2f96b4; *background-color: #2a85a0; } .btn-info:active, .btn-info.active { background-color: #24748c \9; } .btn-inverse { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #363636; *background-color: #222222; background-image: -moz-linear-gradient(top, #444444, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); background-image: -<API key>(top, #444444, #222222); background-image: -o-linear-gradient(top, #444444, #222222); background-image: linear-gradient(to bottom, #444444, #222222); background-repeat: repeat-x; border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .btn-inverse:hover, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] { color: #ffffff; background-color: #222222; *background-color: #151515; } .btn-inverse:active, .btn-inverse.active { background-color: #080808 \9; } button.btn, input[type="submit"].btn { *padding-top: 3px; *padding-bottom: 3px; } button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { padding: 0; border: 0; } button.btn.btn-large, input[type="submit"].btn.btn-large { *padding-top: 7px; *padding-bottom: 7px; } button.btn.btn-small, input[type="submit"].btn.btn-small { *padding-top: 3px; *padding-bottom: 3px; } button.btn.btn-mini, input[type="submit"].btn.btn-mini { *padding-top: 1px; *padding-bottom: 1px; } .btn-link, .btn-link:active, .btn-link[disabled] { background-color: transparent; background-image: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-link { color: #0088cc; cursor: pointer; border-color: transparent; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .btn-link:hover { color: #005580; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover { color: #333333; text-decoration: none; } .btn-group { position: relative; display: inline-block; *display: inline; *margin-left: .3em; font-size: 0; white-space: nowrap; vertical-align: middle; *zoom: 1; } .btn-group:first-child { *margin-left: 0; } .btn-group + .btn-group { margin-left: 5px; } .btn-toolbar { margin-top: 10px; margin-bottom: 10px; font-size: 0; } .btn-toolbar .btn + .btn, .btn-toolbar .btn-group + .btn, .btn-toolbar .btn + .btn-group { margin-left: 5px; } .btn-group > .btn { position: relative; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group > .btn + .btn { margin-left: -1px; } .btn-group > .btn, .btn-group > .dropdown-menu { font-size: 14px; } .btn-group > .btn-mini { font-size: 11px; } .btn-group > .btn-small { font-size: 12px; } .btn-group > .btn-large { font-size: 16px; } .btn-group > .btn:first-child { margin-left: 0; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; } .btn-group > .btn:last-child, .btn-group > .dropdown-toggle { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; } .btn-group > .btn.large:first-child { margin-left: 0; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; } .btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle { -<API key>: 6px; <API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; } .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active { z-index: 2; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { *padding-top: 5px; padding-right: 8px; *padding-bottom: 5px; padding-left: 8px; -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn-group > .btn-mini + .dropdown-toggle { *padding-top: 2px; padding-right: 5px; *padding-bottom: 2px; padding-left: 5px; } .btn-group > .btn-small + .dropdown-toggle { *padding-top: 5px; *padding-bottom: 4px; } .btn-group > .btn-large + .dropdown-toggle { *padding-top: 7px; padding-right: 12px; *padding-bottom: 7px; padding-left: 12px; } .btn-group.open .dropdown-toggle { background-image: none; -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); } .btn-group.open .btn.dropdown-toggle { background-color: #e6e6e6; } .btn-group.open .btn-primary.dropdown-toggle { background-color: #0044cc; } .btn-group.open .btn-warning.dropdown-toggle { background-color: #f89406; } .btn-group.open .btn-danger.dropdown-toggle { background-color: #bd362f; } .btn-group.open .btn-success.dropdown-toggle { background-color: #51a351; } .btn-group.open .btn-info.dropdown-toggle { background-color: #2f96b4; } .btn-group.open .btn-inverse.dropdown-toggle { background-color: #222222; } .btn .caret { margin-top: 8px; margin-left: 0; } .btn-mini .caret, .btn-small .caret, .btn-large .caret { margin-top: 6px; } .btn-large .caret { border-top-width: 5px; border-right-width: 5px; border-left-width: 5px; } .dropup .btn-large .caret { border-bottom-width: 5px; } .btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .btn-group-vertical { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; } .btn-group-vertical .btn { display: block; float: none; width: 100%; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group-vertical .btn + .btn { margin-top: -1px; margin-left: 0; } .btn-group-vertical .btn:first-child { -<API key>: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .btn-group-vertical .btn:last-child { -<API key>: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .btn-group-vertical .btn-large:first-child { -<API key>: 6px 6px 0 0; -moz-border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0; } .btn-group-vertical .btn-large:last-child { -<API key>: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; } .alert { padding: 8px 35px 8px 14px; margin-bottom: 20px; color: #c09853; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); background-color: #fcf8e3; border: 1px solid #fbeed5; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .alert h4 { margin: 0; } .alert .close { position: relative; top: -2px; right: -21px; line-height: 20px; } .alert-success { color: #468847; background-color: #dff0d8; border-color: #d6e9c6; } .alert-danger, .alert-error { color: #b94a48; background-color: #f2dede; border-color: #eed3d7; } .alert-info { color: #3a87ad; background-color: #d9edf7; border-color: #bce8f1; } .alert-block { padding-top: 14px; padding-bottom: 14px; } .alert-block > p, .alert-block > ul { margin-bottom: 0; } .alert-block p + p { margin-top: 5px; } .nav { margin-bottom: 20px; margin-left: 0; list-style: none; } .nav > li > a { display: block; } .nav > li > a:hover { text-decoration: none; background-color: #eeeeee; } .nav > .pull-right { float: right; } .nav-header { display: block; padding: 3px 15px; font-size: 11px; font-weight: bold; line-height: 20px; color: #999999; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); text-transform: uppercase; } .nav li + .nav-header { margin-top: 9px; } .nav-list { padding-right: 15px; padding-left: 15px; margin-bottom: 0; } .nav-list > li > a, .nav-list .nav-header { margin-right: -15px; margin-left: -15px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } .nav-list > li > a { padding: 3px 15px; } .nav-list > .active > a, .nav-list > .active > a:hover { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); background-color: #0088cc; } .nav-list [class^="icon-"], .nav-list [class*=" icon-"] { margin-right: 2px; } .nav-list .divider { *width: 100%; height: 1px; margin: 9px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .nav-tabs, .nav-pills { *zoom: 1; } .nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after { display: table; line-height: 0; content: ""; } .nav-tabs:after, .nav-pills:after { clear: both; } .nav-tabs > li, .nav-pills > li { float: left; } .nav-tabs > li > a, .nav-pills > li > a { padding-right: 12px; padding-left: 12px; margin-right: 2px; line-height: 14px; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { margin-bottom: -1px; } .nav-tabs > li > a { padding-top: 8px; padding-bottom: 8px; line-height: 20px; border: 1px solid transparent; -<API key>: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover { border-color: #eeeeee #eeeeee #dddddd; } .nav-tabs > .active > a, .nav-tabs > .active > a:hover { color: #555555; cursor: default; background-color: #ffffff; border: 1px solid #ddd; border-bottom-color: transparent; } .nav-pills > li > a { padding-top: 8px; padding-bottom: 8px; margin-top: 2px; margin-bottom: 2px; -<API key>: 5px; -moz-border-radius: 5px; border-radius: 5px; } .nav-pills > .active > a, .nav-pills > .active > a:hover { color: #ffffff; background-color: #0088cc; } .nav-stacked > li { float: none; } .nav-stacked > li > a { margin-right: 0; } .nav-tabs.nav-stacked { border-bottom: 0; } .nav-tabs.nav-stacked > li > a { border: 1px solid #ddd; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .nav-tabs.nav-stacked > li:first-child > a { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; } .nav-tabs.nav-stacked > li:last-child > a { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; } .nav-tabs.nav-stacked > li > a:hover { z-index: 2; border-color: #ddd; } .nav-pills.nav-stacked > li > a { margin-bottom: 3px; } .nav-pills.nav-stacked > li:last-child > a { margin-bottom: 1px; } .nav-tabs .dropdown-menu { -<API key>: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; } .nav-pills .dropdown-menu { -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .nav .dropdown-toggle .caret { margin-top: 6px; border-top-color: #0088cc; border-bottom-color: #0088cc; } .nav .dropdown-toggle:hover .caret { border-top-color: #005580; border-bottom-color: #005580; } /* move down carets for tabs */ .nav-tabs .dropdown-toggle .caret { margin-top: 8px; } .nav .active .dropdown-toggle .caret { border-top-color: #fff; border-bottom-color: #fff; } .nav-tabs .active .dropdown-toggle .caret { border-top-color: #555555; border-bottom-color: #555555; } .nav > .dropdown.active > a:hover { cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover { color: #ffffff; background-color: #999999; border-color: #999999; } .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; opacity: 1; filter: alpha(opacity=100); } .tabs-stacked .open > a:hover { border-color: #999999; } .tabbable { *zoom: 1; } .tabbable:before, .tabbable:after { display: table; line-height: 0; content: ""; } .tabbable:after { clear: both; } .tab-content { overflow: auto; } .tabs-below > .nav-tabs, .tabs-right > .nav-tabs, .tabs-left > .nav-tabs { border-bottom: 0; } .tab-content > .tab-pane, .pill-content > .pill-pane { display: none; } .tab-content > .active, .pill-content > .active { display: block; } .tabs-below > .nav-tabs { border-top: 1px solid #ddd; } .tabs-below > .nav-tabs > li { margin-top: -1px; margin-bottom: 0; } .tabs-below > .nav-tabs > li > a { -<API key>: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .tabs-below > .nav-tabs > li > a:hover { border-top-color: #ddd; border-bottom-color: transparent; } .tabs-below > .nav-tabs > .active > a, .tabs-below > .nav-tabs > .active > a:hover { border-color: transparent #ddd #ddd #ddd; } .tabs-left > .nav-tabs > li, .tabs-right > .nav-tabs > li { float: none; } .tabs-left > .nav-tabs > li > a, .tabs-right > .nav-tabs > li > a { min-width: 74px; margin-right: 0; margin-bottom: 3px; } .tabs-left > .nav-tabs { float: left; margin-right: 19px; border-right: 1px solid #ddd; } .tabs-left > .nav-tabs > li > a { margin-right: -1px; -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .tabs-left > .nav-tabs > li > a:hover { border-color: #eeeeee #dddddd #eeeeee #eeeeee; } .tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover { border-color: #ddd transparent #ddd #ddd; *border-right-color: #ffffff; } .tabs-right > .nav-tabs { float: right; margin-left: 19px; border-left: 1px solid #ddd; } .tabs-right > .nav-tabs > li > a { margin-left: -1px; -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .tabs-right > .nav-tabs > li > a:hover { border-color: #eeeeee #eeeeee #eeeeee #dddddd; } .tabs-right > .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a:hover { border-color: #ddd #ddd #ddd transparent; *border-left-color: #ffffff; } .nav > .disabled > a { color: #999999; } .nav > .disabled > a:hover { text-decoration: none; cursor: default; background-color: transparent; } .navbar { *position: relative; *z-index: 2; margin-bottom: 20px; overflow: visible; color: #777777; } .navbar-inner { min-height: 40px; padding-right: 20px; padding-left: 20px; background-color: #fafafa; background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); background-image: -<API key>(top, #ffffff, #f2f2f2); background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); background-repeat: repeat-x; border: 1px solid #d4d4d4; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); *zoom: 1; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); } .navbar-inner:before, .navbar-inner:after { display: table; line-height: 0; content: ""; } .navbar-inner:after { clear: both; } .navbar .container { width: auto; } .nav-collapse.collapse { height: auto; overflow: visible; } .navbar .brand { display: block; float: left; padding: 10px 20px 10px; margin-left: -20px; font-size: 20px; font-weight: 200; color: #777777; text-shadow: 0 1px 0 #ffffff; } .navbar .brand:hover { text-decoration: none; } .navbar-text { margin-bottom: 0; line-height: 40px; } .navbar-link { color: #777777; } .navbar-link:hover { color: #333333; } .navbar .divider-vertical { height: 40px; margin: 0 9px; border-right: 1px solid #ffffff; border-left: 1px solid #f2f2f2; } .navbar .btn, .navbar .btn-group { margin-top: 5px; } .navbar .btn-group .btn, .navbar .input-prepend .btn, .navbar .input-append .btn { margin-top: 0; } .navbar-form { margin-bottom: 0; *zoom: 1; } .navbar-form:before, .navbar-form:after { display: table; line-height: 0; content: ""; } .navbar-form:after { clear: both; } .navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox { margin-top: 5px; } .navbar-form input, .navbar-form select, .navbar-form .btn { display: inline-block; margin-bottom: 0; } .navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] { margin-top: 3px; } .navbar-form .input-append, .navbar-form .input-prepend { margin-top: 6px; white-space: nowrap; } .navbar-form .input-append input, .navbar-form .input-prepend input { margin-top: 0; } .navbar-search { position: relative; float: left; margin-top: 5px; margin-bottom: 0; } .navbar-search .search-query { padding: 4px 14px; margin-bottom: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; line-height: 1; -<API key>: 15px; -moz-border-radius: 15px; border-radius: 15px; } .navbar-static-top { position: static; margin-bottom: 0; } .navbar-static-top .navbar-inner { -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; margin-bottom: 0; } .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { border-width: 0 0 1px; } .navbar-fixed-bottom .navbar-inner { border-width: 1px 0 0; } .navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner { padding-right: 0; padding-left: 0; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .navbar-fixed-top { top: 0; } .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); } .navbar-fixed-bottom { bottom: 0; } .navbar-fixed-bottom .navbar-inner { -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); } .navbar .nav { position: relative; left: 0; display: block; float: left; margin: 0 10px 0 0; } .navbar .nav.pull-right { float: right; margin-right: 0; } .navbar .nav > li { float: left; } .navbar .nav > li > a { float: none; padding: 10px 15px 10px; color: #777777; text-decoration: none; text-shadow: 0 1px 0 #ffffff; } .navbar .nav .dropdown-toggle .caret { margin-top: 8px; } .navbar .nav > li > a:focus, .navbar .nav > li > a:hover { color: #333333; text-decoration: none; background-color: transparent; } .navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus { color: #555555; text-decoration: none; background-color: #e5e5e5; -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); } .navbar .btn-navbar { display: none; float: right; padding: 7px 10px; margin-right: 5px; margin-left: 5px; color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #ededed; *background-color: #e5e5e5; background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); background-image: -<API key>(top, #f2f2f2, #e5e5e5); background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); background-repeat: repeat-x; border-color: #e5e5e5 #e5e5e5 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); } .navbar .btn-navbar:hover, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, .navbar .btn-navbar[disabled] { color: #ffffff; background-color: #e5e5e5; *background-color: #d9d9d9; } .navbar .btn-navbar:active, .navbar .btn-navbar.active { background-color: #cccccc \9; } .navbar .btn-navbar .icon-bar { display: block; width: 18px; height: 2px; background-color: #f5f5f5; -<API key>: 1px; -moz-border-radius: 1px; border-radius: 1px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); } .btn-navbar .icon-bar + .icon-bar { margin-top: 3px; } .navbar .nav > li > .dropdown-menu:before { position: absolute; top: -7px; left: 9px; display: inline-block; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-left: 7px solid transparent; border-bottom-color: rgba(0, 0, 0, 0.2); content: ''; } .navbar .nav > li > .dropdown-menu:after { position: absolute; top: -6px; left: 10px; display: inline-block; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; border-left: 6px solid transparent; content: ''; } .navbar-fixed-bottom .nav > li > .dropdown-menu:before { top: auto; bottom: -7px; border-top: 7px solid #ccc; border-bottom: 0; border-top-color: rgba(0, 0, 0, 0.2); } .navbar-fixed-bottom .nav > li > .dropdown-menu:after { top: auto; bottom: -6px; border-top: 6px solid #ffffff; border-bottom: 0; } .navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle { color: #555555; background-color: #e5e5e5; } .navbar .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #777777; border-bottom-color: #777777; } .navbar .nav li.dropdown.open > .dropdown-toggle .caret, .navbar .nav li.dropdown.active > .dropdown-toggle .caret, .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { border-top-color: #555555; border-bottom-color: #555555; } .navbar .pull-right > li > .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right { right: 0; left: auto; } .navbar .pull-right > li > .dropdown-menu:before, .navbar .nav > li > .dropdown-menu.pull-right:before { right: 12px; left: auto; } .navbar .pull-right > li > .dropdown-menu:after, .navbar .nav > li > .dropdown-menu.pull-right:after { right: 13px; left: auto; } .navbar .pull-right > li > .dropdown-menu .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { right: 100%; left: auto; margin-right: -1px; margin-left: 0; -<API key>: 6px 0 6px 6px; -moz-border-radius: 6px 0 6px 6px; border-radius: 6px 0 6px 6px; } .navbar-inverse { color: #999999; } .navbar-inverse .navbar-inner { background-color: #1b1b1b; background-image: -moz-linear-gradient(top, #222222, #111111); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); background-image: -<API key>(top, #222222, #111111); background-image: -o-linear-gradient(top, #222222, #111111); background-image: linear-gradient(to bottom, #222222, #111111); background-repeat: repeat-x; border-color: #252525; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); } .navbar-inverse .brand, .navbar-inverse .nav > li > a { color: #999999; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .navbar-inverse .brand:hover, .navbar-inverse .nav > li > a:hover { color: #ffffff; } .navbar-inverse .nav > li > a:focus, .navbar-inverse .nav > li > a:hover { color: #ffffff; background-color: transparent; } .navbar-inverse .nav .active > a, .navbar-inverse .nav .active > a:hover, .navbar-inverse .nav .active > a:focus { color: #ffffff; background-color: #111111; } .navbar-inverse .navbar-link { color: #999999; } .navbar-inverse .navbar-link:hover { color: #ffffff; } .navbar-inverse .divider-vertical { border-right-color: #222222; border-left-color: #111111; } .navbar-inverse .nav li.dropdown.open > .dropdown-toggle, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { color: #ffffff; background-color: #111111; } .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #999999; border-bottom-color: #999999; } .navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar-inverse .navbar-search .search-query { color: #ffffff; background-color: #515151; border-color: #111111; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); -webkit-transition: none; -moz-transition: none; -o-transition: none; transition: none; } .navbar-inverse .navbar-search .search-query:-moz-placeholder { color: #cccccc; } .navbar-inverse .navbar-search .search-query:-<API key> { color: #cccccc; } .navbar-inverse .navbar-search .search-query::-<API key> { color: #cccccc; } .navbar-inverse .navbar-search .search-query:focus, .navbar-inverse .navbar-search .search-query.focused { padding: 5px 15px; color: #333333; text-shadow: 0 1px 0 #ffffff; background-color: #ffffff; border: 0; outline: 0; -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); } .navbar-inverse .btn-navbar { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e0e0e; *background-color: #040404; background-image: -moz-linear-gradient(top, #151515, #040404); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); background-image: -<API key>(top, #151515, #040404); background-image: -o-linear-gradient(top, #151515, #040404); background-image: linear-gradient(to bottom, #151515, #040404); background-repeat: repeat-x; border-color: #040404 #040404 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); } .navbar-inverse .btn-navbar:hover, .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active, .navbar-inverse .btn-navbar.disabled, .navbar-inverse .btn-navbar[disabled] { color: #ffffff; background-color: #040404; *background-color: #000000; } .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active { background-color: #000000 \9; } .breadcrumb { padding: 8px 15px; margin: 0 0 20px; list-style: none; background-color: #f5f5f5; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .breadcrumb li { display: inline-block; *display: inline; text-shadow: 0 1px 0 #ffffff; *zoom: 1; } .breadcrumb .divider { padding: 0 5px; color: #ccc; } .breadcrumb .active { color: #999999; } .pagination { margin: 20px 0; } .pagination ul { display: inline-block; *display: inline; margin-bottom: 0; margin-left: 0; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; *zoom: 1; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .pagination ul > li { display: inline; } .pagination ul > li > a, .pagination ul > li > span { float: left; padding: 4px 12px; line-height: 20px; text-decoration: none; background-color: #ffffff; border: 1px solid #dddddd; border-left-width: 0; } .pagination ul > li > a:hover, .pagination ul > .active > a, .pagination ul > .active > span { background-color: #f5f5f5; } .pagination ul > .active > a, .pagination ul > .active > span { color: #999999; cursor: default; } .pagination ul > .disabled > span, .pagination ul > .disabled > a, .pagination ul > .disabled > a:hover { color: #999999; cursor: default; background-color: transparent; } .pagination ul > li:first-child > a, .pagination ul > li:first-child > span { border-left-width: 1px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; } .pagination ul > li:last-child > a, .pagination ul > li:last-child > span { -<API key>: 4px; <API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; } .pagination-centered { text-align: center; } .pagination-right { text-align: right; } .pagination-large ul > li > a, .pagination-large ul > li > span { padding: 11px 19px; font-size: 17.5px; } .pagination-large ul > li:first-child > a, .pagination-large ul > li:first-child > span { -<API key>: 6px; <API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; } .pagination-large ul > li:last-child > a, .pagination-large ul > li:last-child > span { -<API key>: 6px; <API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; } .pagination-mini ul > li:first-child > a, .pagination-small ul > li:first-child > a, .pagination-mini ul > li:first-child > span, .pagination-small ul > li:first-child > span { -<API key>: 3px; <API key>: 3px; -<API key>: 3px; <API key>: 3px; -<API key>: 3px; -<API key>: 3px; } .pagination-mini ul > li:last-child > a, .pagination-small ul > li:last-child > a, .pagination-mini ul > li:last-child > span, .pagination-small ul > li:last-child > span { -<API key>: 3px; <API key>: 3px; -<API key>: 3px; <API key>: 3px; -<API key>: 3px; -<API key>: 3px; } .pagination-small ul > li > a, .pagination-small ul > li > span { padding: 2px 10px; font-size: 11.9px; } .pagination-mini ul > li > a, .pagination-mini ul > li > span { padding: 1px 6px; font-size: 10.5px; } .pager { margin: 20px 0; text-align: center; list-style: none; *zoom: 1; } .pager:before, .pager:after { display: table; line-height: 0; content: ""; } .pager:after { clear: both; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; -<API key>: 15px; -moz-border-radius: 15px; border-radius: 15px; } .pager li > a:hover { text-decoration: none; background-color: #f5f5f5; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > span { color: #999999; cursor: default; background-color: #fff; } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000000; } .modal-backdrop.fade { opacity: 0; } .modal-backdrop, .modal-backdrop.fade.in { opacity: 0.8; filter: alpha(opacity=80); } .modal { position: fixed; top: 50%; left: 50%; z-index: 1050; width: 560px; margin: -250px 0 0 -280px; background-color: #ffffff; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, 0.3); *border: 1px solid #999; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; outline: none; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -<API key>: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .modal.fade { top: -25%; -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; -moz-transition: opacity 0.3s linear, top 0.3s ease-out; -o-transition: opacity 0.3s linear, top 0.3s ease-out; transition: opacity 0.3s linear, top 0.3s ease-out; } .modal.fade.in { top: 50%; } .modal-header { padding: 9px 15px; border-bottom: 1px solid #eee; } .modal-header .close { margin-top: 2px; } .modal-header h3 { margin: 0; line-height: 30px; } .modal-body { max-height: 400px; padding: 15px; overflow-y: auto; } .modal-form { margin-bottom: 0; } .modal-footer { padding: 14px 15px 15px; margin-bottom: 0; text-align: right; background-color: #f5f5f5; border-top: 1px solid #ddd; -<API key>: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; *zoom: 1; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; } .modal-footer:before, .modal-footer:after { display: table; line-height: 0; content: ""; } .modal-footer:after { clear: both; } .modal-footer .btn + .btn { margin-bottom: 0; margin-left: 5px; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .tooltip { position: absolute; z-index: 1030; display: block; padding: 5px; font-size: 11px; opacity: 0; filter: alpha(opacity=0); visibility: visible; } .tooltip.in { opacity: 0.8; filter: alpha(opacity=80); } .tooltip.top { margin-top: -3px; } .tooltip.right { margin-left: 3px; } .tooltip.bottom { margin-top: 3px; } .tooltip.left { margin-left: -3px; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: #000000; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-color: #000000; border-width: 5px 5px 0; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-right-color: #000000; border-width: 5px 5px 5px 0; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-left-color: #000000; border-width: 5px 0 5px 5px; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-bottom-color: #000000; border-width: 0 5px 5px; } .popover { position: absolute; top: 0; left: 0; z-index: 1010; display: none; width: 236px; padding: 1px; background-color: #ffffff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -<API key>: padding-box; -moz-background-clip: padding; background-clip: padding-box; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { padding: 8px 14px; margin: 0; font-size: 14px; font-weight: normal; line-height: 18px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; -<API key>: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; } .popover-content { padding: 9px 14px; } .popover-content p, .popover-content ul, .popover-content ol { margin-bottom: 0; } .popover .arrow, .popover .arrow:after { position: absolute; display: inline-block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover .arrow:after { z-index: -1; content: ""; } .popover.top .arrow { bottom: -10px; left: 50%; margin-left: -10px; border-top-color: #ffffff; border-width: 10px 10px 0; } .popover.top .arrow:after { bottom: -1px; left: -11px; border-top-color: rgba(0, 0, 0, 0.25); border-width: 11px 11px 0; } .popover.right .arrow { top: 50%; left: -10px; margin-top: -10px; border-right-color: #ffffff; border-width: 10px 10px 10px 0; } .popover.right .arrow:after { bottom: -11px; left: -1px; border-right-color: rgba(0, 0, 0, 0.25); border-width: 11px 11px 11px 0; } .popover.bottom .arrow { top: -10px; left: 50%; margin-left: -10px; border-bottom-color: #ffffff; border-width: 0 10px 10px; } .popover.bottom .arrow:after { top: -1px; left: -11px; border-bottom-color: rgba(0, 0, 0, 0.25); border-width: 0 11px 11px; } .popover.left .arrow { top: 50%; right: -10px; margin-top: -10px; border-left-color: #ffffff; border-width: 10px 0 10px 10px; } .popover.left .arrow:after { right: -1px; bottom: -11px; border-left-color: rgba(0, 0, 0, 0.25); border-width: 11px 0 11px 11px; } .thumbnails { margin-left: -20px; list-style: none; *zoom: 1; } .thumbnails:before, .thumbnails:after { display: table; line-height: 0; content: ""; } .thumbnails:after { clear: both; } .row-fluid .thumbnails { margin-left: 0; } .thumbnails > li { float: left; margin-bottom: 20px; margin-left: 20px; } .thumbnail { display: block; padding: 4px; line-height: 20px; border: 1px solid #ddd; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } a.thumbnail:hover { border-color: #0088cc; -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); } .thumbnail > img { display: block; max-width: 100%; margin-right: auto; margin-left: auto; } .thumbnail .caption { padding: 9px; color: #555555; } .media, .media-body { overflow: hidden; *overflow: visible; zoom: 1; } .media, .media .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media-object { display: block; } .media-heading { margin: 0 0 5px; } .media .pull-left { margin-right: 10px; } .media .pull-right { margin-left: 10px; } .media-list { margin-left: 0; list-style: none; } .label, .badge { display: inline-block; padding: 2px 4px; font-size: 11.844px; font-weight: bold; line-height: 14px; color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); white-space: nowrap; vertical-align: baseline; background-color: #999999; } .label { -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .badge { padding-right: 9px; padding-left: 9px; -<API key>: 9px; -moz-border-radius: 9px; border-radius: 9px; } a.label:hover, a.badge:hover { color: #ffffff; text-decoration: none; cursor: pointer; } .label-important, .badge-important { background-color: #b94a48; } .label-important[href], .badge-important[href] { background-color: #953b39; } .label-warning, .badge-warning { background-color: #f89406; } .label-warning[href], .badge-warning[href] { background-color: #c67605; } .label-success, .badge-success { background-color: #468847; } .label-success[href], .badge-success[href] { background-color: #356635; } .label-info, .badge-info { background-color: #3a87ad; } .label-info[href], .badge-info[href] { background-color: #2d6987; } .label-inverse, .badge-inverse { background-color: #333333; } .label-inverse[href], .badge-inverse[href] { background-color: #1a1a1a; } .btn .label, .btn .badge { position: relative; top: -1px; } .btn-mini .label, .btn-mini .badge { top: 0; } @-webkit-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-moz-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-ms-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes <API key> { from { background-position: 0 0; } to { background-position: 40px 0; } } @keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { height: 20px; margin-bottom: 20px; overflow: hidden; background-color: #f7f7f7; background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); background-image: -<API key>(top, #f5f5f5, #f9f9f9); background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); background-repeat: repeat-x; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); } .progress .bar { float: left; width: 0; height: 100%; font-size: 12px; color: #ffffff; text-align: center; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e90d2; background-image: -moz-linear-gradient(top, #149bdf, #0480be); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); background-image: -<API key>(top, #149bdf, #0480be); background-image: -o-linear-gradient(top, #149bdf, #0480be); background-image: linear-gradient(to bottom, #149bdf, #0480be); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: width 0.6s ease; -moz-transition: width 0.6s ease; -o-transition: width 0.6s ease; transition: width 0.6s ease; } .progress .bar + .bar { -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); } .progress-striped .bar { background-color: #149bdf; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -<API key>: 40px 40px; -moz-background-size: 40px 40px; -o-background-size: 40px 40px; background-size: 40px 40px; } .progress.active .bar { -webkit-animation: <API key> 2s linear infinite; -moz-animation: <API key> 2s linear infinite; -ms-animation: <API key> 2s linear infinite; -o-animation: <API key> 2s linear infinite; animation: <API key> 2s linear infinite; } .progress-danger .bar, .progress .bar-danger { background-color: #dd514c; background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); background-image: -<API key>(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); } .progress-danger.progress-striped .bar, .progress-striped .bar-danger { background-color: #ee5f5b; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-success .bar, .progress .bar-success { background-color: #5eb95e; background-image: -moz-linear-gradient(top, #62c462, #57a957); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); background-image: -<API key>(top, #62c462, #57a957); background-image: -o-linear-gradient(top, #62c462, #57a957); background-image: linear-gradient(to bottom, #62c462, #57a957); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); } .progress-success.progress-striped .bar, .progress-striped .bar-success { background-color: #62c462; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-info .bar, .progress .bar-info { background-color: #4bb1cf; background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); background-image: -<API key>(top, #5bc0de, #339bb9); background-image: -o-linear-gradient(top, #5bc0de, #339bb9); background-image: linear-gradient(to bottom, #5bc0de, #339bb9); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); } .progress-info.progress-striped .bar, .progress-striped .bar-info { background-color: #5bc0de; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-warning .bar, .progress .bar-warning { background-color: #faa732; background-image: -moz-linear-gradient(top, #fbb450, #f89406); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image: -<API key>(top, #fbb450, #f89406); background-image: -o-linear-gradient(top, #fbb450, #f89406); background-image: linear-gradient(to bottom, #fbb450, #f89406); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); } .progress-warning.progress-striped .bar, .progress-striped .bar-warning { background-color: #fbb450; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .accordion { margin-bottom: 20px; } .accordion-group { margin-bottom: 2px; border: 1px solid #e5e5e5; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .accordion-heading { border-bottom: 0; } .accordion-heading .accordion-toggle { display: block; padding: 8px 15px; } .accordion-toggle { cursor: pointer; } .accordion-inner { padding: 9px 15px; border-top: 1px solid #e5e5e5; } .carousel { position: relative; margin-bottom: 20px; line-height: 1; } .carousel-inner { position: relative; width: 100%; overflow: hidden; } .carousel .item { position: relative; display: none; -webkit-transition: 0.6s ease-in-out left; -moz-transition: 0.6s ease-in-out left; -o-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } .carousel .item > img { display: block; line-height: 1; } .carousel .active, .carousel .next, .carousel .prev { display: block; } .carousel .active { left: 0; } .carousel .next, .carousel .prev { position: absolute; top: 0; width: 100%; } .carousel .next { left: 100%; } .carousel .prev { left: -100%; } .carousel .next.left, .carousel .prev.right { left: 0; } .carousel .active.left { left: -100%; } .carousel .active.right { left: 100%; } .carousel-control { position: absolute; top: 40%; left: 15px; width: 40px; height: 40px; margin-top: -20px; font-size: 60px; font-weight: 100; line-height: 30px; color: #ffffff; text-align: center; background: #222222; border: 3px solid #ffffff; -<API key>: 23px; -moz-border-radius: 23px; border-radius: 23px; opacity: 0.5; filter: alpha(opacity=50); } .carousel-control.right { right: 15px; left: auto; } .carousel-control:hover { color: #ffffff; text-decoration: none; opacity: 0.9; filter: alpha(opacity=90); } .carousel-caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 15px; background: #333333; background: rgba(0, 0, 0, 0.75); } .carousel-caption h4, .carousel-caption p { line-height: 20px; color: #ffffff; } .carousel-caption h4 { margin: 0 0 5px; } .carousel-caption p { margin-bottom: 0; } .hero-unit { padding: 60px; margin-bottom: 30px; font-size: 18px; font-weight: 200; line-height: 30px; color: inherit; background-color: #eeeeee; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .hero-unit h1 { margin-bottom: 0; font-size: 60px; line-height: 1; letter-spacing: -1px; color: inherit; } .hero-unit li { line-height: 30px; } .pull-right { float: right; } .pull-left { float: left; } .hide { display: none; } .show { display: block; } .invisible { visibility: hidden; } .affix { position: fixed; }
/* * BITMAP UNPLUGGING: * * The sequencing for updating the bitmap reliably is a little * subtle (and I got it wrong the first time) so it deserves some * explanation. * * We group bitmap updates into batches. Each batch has a number. * We may write out several batches at once, but that isn't very important. * conf->bm_write is the number of the last batch successfully written. * conf->bm_flush is the number of the last batch that was closed to * new additions. * When we discover that we will need to write to any block in a stripe * (in add_stripe_bio) we update the in-memory bitmap and record in sh->bm_seq * the number of the batch it will be in. This is bm_flush+1. * When we are ready to do a write, if that batch hasn't been written yet, * we plug the array and queue the stripe for later. * When an unplug happens, we increment bm_flush, thus closing the current * batch. * When we notice that bm_flush > bm_write, we write out all pending updates * to the bitmap, and advance bm_write to where bm_flush was. * This may occasionally write a bit out twice, but is sure never to * miss any bits. */ #include <linux/blkdev.h> #include <linux/kthread.h> #include <linux/raid/pq.h> #include <linux/async_tx.h> #include <linux/async.h> #include <linux/seq_file.h> #include <linux/cpu.h> #include <linux/slab.h> #include "md.h" #include "raid5.h" #include "raid0.h" #include "bitmap.h" /* * Stripe cache */ #define NR_STRIPES 256 #define STRIPE_SIZE PAGE_SIZE #define STRIPE_SHIFT (PAGE_SHIFT - 9) #define STRIPE_SECTORS (STRIPE_SIZE>>9) #define IO_THRESHOLD 1 #define BYPASS_THRESHOLD 1 #define NR_HASH (PAGE_SIZE / sizeof(struct hlist_head)) #define HASH_MASK (NR_HASH - 1) #define stripe_hash(conf, sect) (&((conf)->stripe_hashtbl[((sect) >> STRIPE_SHIFT) & HASH_MASK])) /* bio's attached to a stripe+device for I/O are linked together in bi_sector * order without overlap. There may be several bio's per stripe+device, and * a bio could span several devices. * When walking this list for a particular stripe+device, we must never proceed * beyond a bio that extends past this device, as the next bio might no longer * be valid. * This macro is used to determine the 'next' bio in the list, given the sector * of the current stripe+device */ #define r5_next_bio(bio, sect) ( ( (bio)->bi_sector + ((bio)->bi_size>>9) < sect + STRIPE_SECTORS) ? (bio)->bi_next : NULL) /* * The following can be used to debug the driver */ #define RAID5_PARANOIA 1 #if RAID5_PARANOIA && defined(CONFIG_SMP) # define CHECK_DEVLOCK() assert_spin_locked(&conf->device_lock) #else # define CHECK_DEVLOCK() #endif #ifdef DEBUG #define inline #define __inline__ #endif #define printk_rl(args...) ((void) (printk_ratelimit() && printk(args))) /* * We maintain a biased count of active stripes in the bottom 16 bits of * bi_phys_segments, and a count of processed stripes in the upper 16 bits */ static inline int <API key>(struct bio *bio) { return bio->bi_phys_segments & 0xffff; } static inline int <API key>(struct bio *bio) { return (bio->bi_phys_segments >> 16) & 0xffff; } static inline int <API key>(struct bio *bio) { --bio->bi_phys_segments; return <API key>(bio); } static inline int <API key>(struct bio *bio) { unsigned short val = <API key>(bio); --val; bio->bi_phys_segments = (val << 16) | <API key>(bio); return val; } static inline void <API key>(struct bio *bio, unsigned int cnt) { bio->bi_phys_segments = <API key>(bio) | (cnt << 16); } /* Find first data disk in a raid6 stripe */ static inline int raid6_d0(struct stripe_head *sh) { if (sh->ddf_layout) /* ddf always start from first device */ return 0; /* md starts just after Q block */ if (sh->qd_idx == sh->disks - 1) return 0; else return sh->qd_idx + 1; } static inline int raid6_next_disk(int disk, int raid_disks) { disk++; return (disk < raid_disks) ? disk : 0; } /* When walking through the disks in a raid5, starting at raid6_d0, * We need to map each disk to a 'slot', where the data disks are slot * 0 .. raid_disks-3, the parity disk is raid_disks-2 and the Q disk * is raid_disks-1. This help does that mapping. */ static int raid6_idx_to_slot(int idx, struct stripe_head *sh, int *count, int syndrome_disks) { int slot = *count; if (sh->ddf_layout) (*count)++; if (idx == sh->pd_idx) return syndrome_disks; if (idx == sh->qd_idx) return syndrome_disks + 1; if (!sh->ddf_layout) (*count)++; return slot; } static void return_io(struct bio *return_bi) { struct bio *bi = return_bi; while (bi) { return_bi = bi->bi_next; bi->bi_next = NULL; bi->bi_size = 0; bio_endio(bi, 0); bi = return_bi; } } static void print_raid5_conf (raid5_conf_t *conf); static int <API key>(struct stripe_head *sh) { return sh->check_state || sh->reconstruct_state || test_bit(STRIPE_BIOFILL_RUN, &sh->state) || test_bit(STRIPE_COMPUTE_RUN, &sh->state); } static void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh) { if (atomic_dec_and_test(&sh->count)) { BUG_ON(!list_empty(&sh->lru)); BUG_ON(atomic_read(&conf->active_stripes)==0); if (test_bit(STRIPE_HANDLE, &sh->state)) { if (test_bit(STRIPE_DELAYED, &sh->state)) { list_add_tail(&sh->lru, &conf->delayed_list); plugger_set_plug(&conf->plug); } else if (test_bit(STRIPE_BIT_DELAY, &sh->state) && sh->bm_seq - conf->seq_write > 0) { list_add_tail(&sh->lru, &conf->bitmap_list); plugger_set_plug(&conf->plug); } else { clear_bit(STRIPE_BIT_DELAY, &sh->state); list_add_tail(&sh->lru, &conf->handle_list); } md_wakeup_thread(conf->mddev->thread); } else { BUG_ON(<API key>(sh)); if (test_and_clear_bit(<API key>, &sh->state)) { atomic_dec(&conf-><API key>); if (atomic_read(&conf-><API key>) < IO_THRESHOLD) md_wakeup_thread(conf->mddev->thread); } atomic_dec(&conf->active_stripes); if (!test_bit(STRIPE_EXPANDING, &sh->state)) { list_add_tail(&sh->lru, &conf->inactive_list); wake_up(&conf->wait_for_stripe); if (conf->retry_read_aligned) md_wakeup_thread(conf->mddev->thread); } } } } static void release_stripe(struct stripe_head *sh) { raid5_conf_t *conf = sh->raid_conf; unsigned long flags; spin_lock_irqsave(&conf->device_lock, flags); __release_stripe(conf, sh); <API key>(&conf->device_lock, flags); } static inline void remove_hash(struct stripe_head *sh) { pr_debug("remove_hash(), stripe %llu\n", (unsigned long long)sh->sector); hlist_del_init(&sh->hash); } static inline void insert_hash(raid5_conf_t *conf, struct stripe_head *sh) { struct hlist_head *hp = stripe_hash(conf, sh->sector); pr_debug("insert_hash(), stripe %llu\n", (unsigned long long)sh->sector); CHECK_DEVLOCK(); hlist_add_head(&sh->hash, hp); } /* find an idle stripe, make sure it is unhashed, and return it. */ static struct stripe_head *get_free_stripe(raid5_conf_t *conf) { struct stripe_head *sh = NULL; struct list_head *first; CHECK_DEVLOCK(); if (list_empty(&conf->inactive_list)) goto out; first = conf->inactive_list.next; sh = list_entry(first, struct stripe_head, lru); list_del_init(first); remove_hash(sh); atomic_inc(&conf->active_stripes); out: return sh; } static void shrink_buffers(struct stripe_head *sh) { struct page *p; int i; int num = sh->raid_conf->pool_size; for (i = 0; i < num ; i++) { p = sh->dev[i].page; if (!p) continue; sh->dev[i].page = NULL; put_page(p); } } static int grow_buffers(struct stripe_head *sh) { int i; int num = sh->raid_conf->pool_size; for (i = 0; i < num; i++) { struct page *page; if (!(page = alloc_page(GFP_KERNEL))) { return 1; } sh->dev[i].page = page; } return 0; } static void raid5_build_block(struct stripe_head *sh, int i, int previous); static void stripe_set_idx(sector_t stripe, raid5_conf_t *conf, int previous, struct stripe_head *sh); static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) { raid5_conf_t *conf = sh->raid_conf; int i; BUG_ON(atomic_read(&sh->count) != 0); BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); BUG_ON(<API key>(sh)); CHECK_DEVLOCK(); pr_debug("init_stripe called, stripe %llu\n", (unsigned long long)sh->sector); remove_hash(sh); sh->generation = conf->generation - previous; sh->disks = previous ? conf->previous_raid_disks : conf->raid_disks; sh->sector = sector; stripe_set_idx(sector, conf, previous, sh); sh->state = 0; for (i = sh->disks; i struct r5dev *dev = &sh->dev[i]; if (dev->toread || dev->read || dev->towrite || dev->written || test_bit(R5_LOCKED, &dev->flags)) { printk(KERN_ERR "sector=%llx i=%d %p %p %p %p %d\n", (unsigned long long)sh->sector, i, dev->toread, dev->read, dev->towrite, dev->written, test_bit(R5_LOCKED, &dev->flags)); BUG(); } dev->flags = 0; raid5_build_block(sh, i, previous); } insert_hash(conf, sh); } static struct stripe_head *__find_stripe(raid5_conf_t *conf, sector_t sector, short generation) { struct stripe_head *sh; struct hlist_node *hn; CHECK_DEVLOCK(); pr_debug("__find_stripe, sector %llu\n", (unsigned long long)sector); <API key>(sh, hn, stripe_hash(conf, sector), hash) if (sh->sector == sector && sh->generation == generation) return sh; pr_debug("__stripe %llu not in cache\n", (unsigned long long)sector); return NULL; } /* * Need to check if array has failed when deciding whether to: * - start an array * - remove non-faulty devices * - add a spare * - allow a reshape * This determination is simple when no reshape is happening. * However if there is a reshape, we need to carefully check * both the before and after sections. * This is because some failed devices may only affect one * of the two sections, and some non-in_sync devices may * be insync in the section most affected by failed devices. */ static int has_failed(raid5_conf_t *conf) { int degraded; int i; if (conf->mddev->reshape_position == MaxSector) return conf->mddev->degraded > conf->max_degraded; rcu_read_lock(); degraded = 0; for (i = 0; i < conf->previous_raid_disks; i++) { mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); if (!rdev || test_bit(Faulty, &rdev->flags)) degraded++; else if (test_bit(In_sync, &rdev->flags)) ; else /* not in-sync or faulty. * If the reshape increases the number of devices, * this is being recovered by the reshape, so * this 'previous' section is not in_sync. * If the number of devices is being reduced however, * the device can only be part of the array if * we are reverting a reshape, so this section will * be in-sync. */ if (conf->raid_disks >= conf->previous_raid_disks) degraded++; } rcu_read_unlock(); if (degraded > conf->max_degraded) return 1; rcu_read_lock(); degraded = 0; for (i = 0; i < conf->raid_disks; i++) { mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); if (!rdev || test_bit(Faulty, &rdev->flags)) degraded++; else if (test_bit(In_sync, &rdev->flags)) ; else /* not in-sync or faulty. * If reshape increases the number of devices, this * section has already been recovered, else it * almost certainly hasn't. */ if (conf->raid_disks <= conf->previous_raid_disks) degraded++; } rcu_read_unlock(); if (degraded > conf->max_degraded) return 1; return 0; } static void unplug_slaves(mddev_t *mddev); static struct stripe_head * get_active_stripe(raid5_conf_t *conf, sector_t sector, int previous, int noblock, int noquiesce) { struct stripe_head *sh; pr_debug("get_stripe, sector %llu\n", (unsigned long long)sector); spin_lock_irq(&conf->device_lock); do { wait_event_lock_irq(conf->wait_for_stripe, conf->quiesce == 0 || noquiesce, conf->device_lock, /* nothing */); sh = __find_stripe(conf, sector, conf->generation - previous); if (!sh) { if (!conf->inactive_blocked) sh = get_free_stripe(conf); if (noblock && sh == NULL) break; if (!sh) { conf->inactive_blocked = 1; wait_event_lock_irq(conf->wait_for_stripe, !list_empty(&conf->inactive_list) && (atomic_read(&conf->active_stripes) < (conf->max_nr_stripes *3/4) || !conf->inactive_blocked), conf->device_lock, <API key>(conf) ); conf->inactive_blocked = 0; } else init_stripe(sh, sector, previous); } else { if (atomic_read(&sh->count)) { BUG_ON(!list_empty(&sh->lru) && !test_bit(STRIPE_EXPANDING, &sh->state)); } else { if (!test_bit(STRIPE_HANDLE, &sh->state)) atomic_inc(&conf->active_stripes); if (list_empty(&sh->lru) && !test_bit(STRIPE_EXPANDING, &sh->state)) BUG(); list_del_init(&sh->lru); } } } while (sh == NULL); if (sh) atomic_inc(&sh->count); spin_unlock_irq(&conf->device_lock); return sh; } static void <API key>(struct bio *bi, int error); static void <API key>(struct bio *bi, int error); static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) { raid5_conf_t *conf = sh->raid_conf; int i, disks = sh->disks; might_sleep(); for (i = disks; i int rw; struct bio *bi; mdk_rdev_t *rdev; if (test_and_clear_bit(R5_Wantwrite, &sh->dev[i].flags)) { if (test_and_clear_bit(R5_WantFUA, &sh->dev[i].flags)) rw = WRITE_FUA; else rw = WRITE; } else if (test_and_clear_bit(R5_Wantread, &sh->dev[i].flags)) rw = READ; else continue; bi = &sh->dev[i].req; bi->bi_rw = rw; if (rw & WRITE) bi->bi_end_io = <API key>; else bi->bi_end_io = <API key>; rcu_read_lock(); rdev = rcu_dereference(conf->disks[i].rdev); if (rdev && test_bit(Faulty, &rdev->flags)) rdev = NULL; if (rdev) atomic_inc(&rdev->nr_pending); rcu_read_unlock(); if (rdev) { if (s->syncing || s->expanding || s->expanded) md_sync_acct(rdev->bdev, STRIPE_SECTORS); set_bit(STRIPE_IO_STARTED, &sh->state); bi->bi_bdev = rdev->bdev; pr_debug("%s: for %llu schedule op %ld on disc %d\n", __func__, (unsigned long long)sh->sector, bi->bi_rw, i); atomic_inc(&sh->count); bi->bi_sector = sh->sector + rdev->data_offset; bi->bi_flags = 1 << BIO_UPTODATE; bi->bi_vcnt = 1; bi->bi_max_vecs = 1; bi->bi_idx = 0; bi->bi_io_vec = &sh->dev[i].vec; bi->bi_io_vec[0].bv_len = STRIPE_SIZE; bi->bi_io_vec[0].bv_offset = 0; bi->bi_size = STRIPE_SIZE; bi->bi_next = NULL; if ((rw & WRITE) && test_bit(R5_ReWrite, &sh->dev[i].flags)) atomic_add(STRIPE_SECTORS, &rdev->corrected_errors); <API key>(bi); } else { if (rw & WRITE) set_bit(STRIPE_DEGRADED, &sh->state); pr_debug("skip op %ld on disc %d for sector %llu\n", bi->bi_rw, i, (unsigned long long)sh->sector); clear_bit(R5_LOCKED, &sh->dev[i].flags); set_bit(STRIPE_HANDLE, &sh->state); } } } static struct <API key> * async_copy_data(int frombio, struct bio *bio, struct page *page, sector_t sector, struct <API key> *tx) { struct bio_vec *bvl; struct page *bio_page; int i; int page_offset; struct async_submit_ctl submit; enum async_tx_flags flags = 0; if (bio->bi_sector >= sector) page_offset = (signed)(bio->bi_sector - sector) * 512; else page_offset = (signed)(sector - bio->bi_sector) * -512; if (frombio) flags |= ASYNC_TX_FENCE; init_async_submit(&submit, flags, tx, NULL, NULL, NULL); <API key>(bvl, bio, i) { int len = bvl->bv_len; int clen; int b_offset = 0; if (page_offset < 0) { b_offset = -page_offset; page_offset += b_offset; len -= b_offset; } if (len > 0 && page_offset + len > STRIPE_SIZE) clen = STRIPE_SIZE - page_offset; else clen = len; if (clen > 0) { b_offset += bvl->bv_offset; bio_page = bvl->bv_page; if (frombio) tx = async_memcpy(page, bio_page, page_offset, b_offset, clen, &submit); else tx = async_memcpy(bio_page, page, b_offset, page_offset, clen, &submit); } /* chain the operations */ submit.depend_tx = tx; if (clen < len) /* hit end of page */ break; page_offset += len; } return tx; } static void <API key>(void *stripe_head_ref) { struct stripe_head *sh = stripe_head_ref; struct bio *return_bi = NULL; raid5_conf_t *conf = sh->raid_conf; int i; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); /* clear completed biofills */ spin_lock_irq(&conf->device_lock); for (i = sh->disks; i struct r5dev *dev = &sh->dev[i]; /* acknowledge completion of a biofill operation */ /* and check if we need to reply to a read request, * new R5_Wantfill requests are held off until * !STRIPE_BIOFILL_RUN */ if (test_and_clear_bit(R5_Wantfill, &dev->flags)) { struct bio *rbi, *rbi2; BUG_ON(!dev->read); rbi = dev->read; dev->read = NULL; while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { rbi2 = r5_next_bio(rbi, dev->sector); if (!<API key>(rbi)) { rbi->bi_next = return_bi; return_bi = rbi; } rbi = rbi2; } } } spin_unlock_irq(&conf->device_lock); clear_bit(STRIPE_BIOFILL_RUN, &sh->state); return_io(return_bi); set_bit(STRIPE_HANDLE, &sh->state); release_stripe(sh); } static void ops_run_biofill(struct stripe_head *sh) { struct <API key> *tx = NULL; raid5_conf_t *conf = sh->raid_conf; struct async_submit_ctl submit; int i; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); for (i = sh->disks; i struct r5dev *dev = &sh->dev[i]; if (test_bit(R5_Wantfill, &dev->flags)) { struct bio *rbi; spin_lock_irq(&conf->device_lock); dev->read = rbi = dev->toread; dev->toread = NULL; spin_unlock_irq(&conf->device_lock); while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) { tx = async_copy_data(0, rbi, dev->page, dev->sector, tx); rbi = r5_next_bio(rbi, dev->sector); } } } atomic_inc(&sh->count); init_async_submit(&submit, ASYNC_TX_ACK, tx, <API key>, sh, NULL); <API key>(&submit); } static void <API key>(struct stripe_head *sh, int target) { struct r5dev *tgt; if (target < 0) return; tgt = &sh->dev[target]; set_bit(R5_UPTODATE, &tgt->flags); BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); clear_bit(R5_Wantcompute, &tgt->flags); } static void <API key>(void *stripe_head_ref) { struct stripe_head *sh = stripe_head_ref; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); /* mark the computed target(s) as uptodate */ <API key>(sh, sh->ops.target); <API key>(sh, sh->ops.target2); clear_bit(STRIPE_COMPUTE_RUN, &sh->state); if (sh->check_state == <API key>) sh->check_state = <API key>; set_bit(STRIPE_HANDLE, &sh->state); release_stripe(sh); } /* return a pointer to the address conversion region of the scribble buffer */ static addr_conv_t *to_addr_conv(struct stripe_head *sh, struct raid5_percpu *percpu) { return percpu->scribble + sizeof(struct page *) * (sh->disks + 2); } static struct <API key> * ops_run_compute5(struct stripe_head *sh, struct raid5_percpu *percpu) { int disks = sh->disks; struct page **xor_srcs = percpu->scribble; int target = sh->ops.target; struct r5dev *tgt = &sh->dev[target]; struct page *xor_dest = tgt->page; int count = 0; struct <API key> *tx; struct async_submit_ctl submit; int i; pr_debug("%s: stripe %llu block: %d\n", __func__, (unsigned long long)sh->sector, target); BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); for (i = disks; i if (i != target) xor_srcs[count++] = sh->dev[i].page; atomic_inc(&sh->count); init_async_submit(&submit, ASYNC_TX_FENCE|<API key>, NULL, <API key>, sh, to_addr_conv(sh, percpu)); if (unlikely(count == 1)) tx = async_memcpy(xor_dest, xor_srcs[0], 0, 0, STRIPE_SIZE, &submit); else tx = async_xor(xor_dest, xor_srcs, 0, count, STRIPE_SIZE, &submit); return tx; } /* <API key> - populate source buffers for gen_syndrome * @srcs - (struct page *) array of size sh->disks * @sh - stripe_head to parse * * Populates srcs in proper layout order for the stripe and returns the * 'count' of sources to be used in a call to async_gen_syndrome. The P * destination buffer is recorded in srcs[count] and the Q destination * is recorded in srcs[count+1]]. */ static int <API key>(struct page **srcs, struct stripe_head *sh) { int disks = sh->disks; int syndrome_disks = sh->ddf_layout ? disks : (disks - 2); int d0_idx = raid6_d0(sh); int count; int i; for (i = 0; i < disks; i++) srcs[i] = NULL; count = 0; i = d0_idx; do { int slot = raid6_idx_to_slot(i, sh, &count, syndrome_disks); srcs[slot] = sh->dev[i].page; i = raid6_next_disk(i, disks); } while (i != d0_idx); return syndrome_disks; } static struct <API key> * ops_run_compute6_1(struct stripe_head *sh, struct raid5_percpu *percpu) { int disks = sh->disks; struct page **blocks = percpu->scribble; int target; int qd_idx = sh->qd_idx; struct <API key> *tx; struct async_submit_ctl submit; struct r5dev *tgt; struct page *dest; int i; int count; if (sh->ops.target < 0) target = sh->ops.target2; else if (sh->ops.target2 < 0) target = sh->ops.target; else /* we should only have one valid target */ BUG(); BUG_ON(target < 0); pr_debug("%s: stripe %llu block: %d\n", __func__, (unsigned long long)sh->sector, target); tgt = &sh->dev[target]; BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); dest = tgt->page; atomic_inc(&sh->count); if (target == qd_idx) { count = <API key>(blocks, sh); blocks[count] = NULL; /* regenerating p is not necessary */ BUG_ON(blocks[count+1] != dest); /* q should already be set */ init_async_submit(&submit, ASYNC_TX_FENCE, NULL, <API key>, sh, to_addr_conv(sh, percpu)); tx = async_gen_syndrome(blocks, 0, count+2, STRIPE_SIZE, &submit); } else { /* Compute any data- or p-drive using XOR */ count = 0; for (i = disks; i if (i == target || i == qd_idx) continue; blocks[count++] = sh->dev[i].page; } init_async_submit(&submit, ASYNC_TX_FENCE|<API key>, NULL, <API key>, sh, to_addr_conv(sh, percpu)); tx = async_xor(dest, blocks, 0, count, STRIPE_SIZE, &submit); } return tx; } static struct <API key> * ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu) { int i, count, disks = sh->disks; int syndrome_disks = sh->ddf_layout ? disks : disks-2; int d0_idx = raid6_d0(sh); int faila = -1, failb = -1; int target = sh->ops.target; int target2 = sh->ops.target2; struct r5dev *tgt = &sh->dev[target]; struct r5dev *tgt2 = &sh->dev[target2]; struct <API key> *tx; struct page **blocks = percpu->scribble; struct async_submit_ctl submit; pr_debug("%s: stripe %llu block1: %d block2: %d\n", __func__, (unsigned long long)sh->sector, target, target2); BUG_ON(target < 0 || target2 < 0); BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); BUG_ON(!test_bit(R5_Wantcompute, &tgt2->flags)); /* we need to open-code <API key> to handle the * slot number conversion for 'faila' and 'failb' */ for (i = 0; i < disks ; i++) blocks[i] = NULL; count = 0; i = d0_idx; do { int slot = raid6_idx_to_slot(i, sh, &count, syndrome_disks); blocks[slot] = sh->dev[i].page; if (i == target) faila = slot; if (i == target2) failb = slot; i = raid6_next_disk(i, disks); } while (i != d0_idx); BUG_ON(faila == failb); if (failb < faila) swap(faila, failb); pr_debug("%s: stripe: %llu faila: %d failb: %d\n", __func__, (unsigned long long)sh->sector, faila, failb); atomic_inc(&sh->count); if (failb == syndrome_disks+1) { /* Q disk is one of the missing disks */ if (faila == syndrome_disks) { /* Missing P+Q, just recompute */ init_async_submit(&submit, ASYNC_TX_FENCE, NULL, <API key>, sh, to_addr_conv(sh, percpu)); return async_gen_syndrome(blocks, 0, syndrome_disks+2, STRIPE_SIZE, &submit); } else { struct page *dest; int data_target; int qd_idx = sh->qd_idx; /* Missing D+Q: recompute D from P, then recompute Q */ if (target == qd_idx) data_target = target2; else data_target = target; count = 0; for (i = disks; i if (i == data_target || i == qd_idx) continue; blocks[count++] = sh->dev[i].page; } dest = sh->dev[data_target].page; init_async_submit(&submit, ASYNC_TX_FENCE|<API key>, NULL, NULL, NULL, to_addr_conv(sh, percpu)); tx = async_xor(dest, blocks, 0, count, STRIPE_SIZE, &submit); count = <API key>(blocks, sh); init_async_submit(&submit, ASYNC_TX_FENCE, tx, <API key>, sh, to_addr_conv(sh, percpu)); return async_gen_syndrome(blocks, 0, count+2, STRIPE_SIZE, &submit); } } else { init_async_submit(&submit, ASYNC_TX_FENCE, NULL, <API key>, sh, to_addr_conv(sh, percpu)); if (failb == syndrome_disks) { /* We're missing D+P. */ return <API key>(syndrome_disks+2, STRIPE_SIZE, faila, blocks, &submit); } else { /* We're missing D+D. */ return <API key>(syndrome_disks+2, STRIPE_SIZE, faila, failb, blocks, &submit); } } } static void ops_complete_prexor(void *stripe_head_ref) { struct stripe_head *sh = stripe_head_ref; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); } static struct <API key> * ops_run_prexor(struct stripe_head *sh, struct raid5_percpu *percpu, struct <API key> *tx) { int disks = sh->disks; struct page **xor_srcs = percpu->scribble; int count = 0, pd_idx = sh->pd_idx, i; struct async_submit_ctl submit; /* existing parity data subtracted */ struct page *xor_dest = xor_srcs[count++] = sh->dev[pd_idx].page; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); for (i = disks; i struct r5dev *dev = &sh->dev[i]; /* Only process blocks that are known to be uptodate */ if (test_bit(R5_Wantdrain, &dev->flags)) xor_srcs[count++] = dev->page; } init_async_submit(&submit, ASYNC_TX_FENCE|<API key>, tx, ops_complete_prexor, sh, to_addr_conv(sh, percpu)); tx = async_xor(xor_dest, xor_srcs, 0, count, STRIPE_SIZE, &submit); return tx; } static struct <API key> * ops_run_biodrain(struct stripe_head *sh, struct <API key> *tx) { int disks = sh->disks; int i; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); for (i = disks; i struct r5dev *dev = &sh->dev[i]; struct bio *chosen; if (test_and_clear_bit(R5_Wantdrain, &dev->flags)) { struct bio *wbi; spin_lock(&sh->lock); chosen = dev->towrite; dev->towrite = NULL; BUG_ON(dev->written); wbi = dev->written = chosen; spin_unlock(&sh->lock); while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { if (wbi->bi_rw & BIO_FUA) set_bit(R5_WantFUA, &dev->flags); tx = async_copy_data(1, wbi, dev->page, dev->sector, tx); wbi = r5_next_bio(wbi, dev->sector); } } } return tx; } static void <API key>(void *stripe_head_ref) { struct stripe_head *sh = stripe_head_ref; int disks = sh->disks; int pd_idx = sh->pd_idx; int qd_idx = sh->qd_idx; int i; bool fua = false; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); for (i = disks; i fua |= test_bit(R5_WantFUA, &sh->dev[i].flags); for (i = disks; i struct r5dev *dev = &sh->dev[i]; if (dev->written || i == pd_idx || i == qd_idx) { set_bit(R5_UPTODATE, &dev->flags); if (fua) set_bit(R5_WantFUA, &dev->flags); } } if (sh->reconstruct_state == <API key>) sh->reconstruct_state = <API key>; else if (sh->reconstruct_state == <API key>) sh->reconstruct_state = <API key>; else { BUG_ON(sh->reconstruct_state != <API key>); sh->reconstruct_state = <API key>; } set_bit(STRIPE_HANDLE, &sh->state); release_stripe(sh); } static void <API key>(struct stripe_head *sh, struct raid5_percpu *percpu, struct <API key> *tx) { int disks = sh->disks; struct page **xor_srcs = percpu->scribble; struct async_submit_ctl submit; int count = 0, pd_idx = sh->pd_idx, i; struct page *xor_dest; int prexor = 0; unsigned long flags; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); /* check if prexor is active which means only process blocks * that are part of a read-modify-write (written) */ if (sh->reconstruct_state == <API key>) { prexor = 1; xor_dest = xor_srcs[count++] = sh->dev[pd_idx].page; for (i = disks; i struct r5dev *dev = &sh->dev[i]; if (dev->written) xor_srcs[count++] = dev->page; } } else { xor_dest = sh->dev[pd_idx].page; for (i = disks; i struct r5dev *dev = &sh->dev[i]; if (i != pd_idx) xor_srcs[count++] = dev->page; } } /* 1/ if we prexor'd then the dest is reused as a source * 2/ if we did not prexor then we are redoing the parity * set <API key> and <API key> * for the synchronous xor case */ flags = ASYNC_TX_ACK | (prexor ? <API key> : <API key>); atomic_inc(&sh->count); init_async_submit(&submit, flags, tx, <API key>, sh, to_addr_conv(sh, percpu)); if (unlikely(count == 1)) tx = async_memcpy(xor_dest, xor_srcs[0], 0, 0, STRIPE_SIZE, &submit); else tx = async_xor(xor_dest, xor_srcs, 0, count, STRIPE_SIZE, &submit); } static void <API key>(struct stripe_head *sh, struct raid5_percpu *percpu, struct <API key> *tx) { struct async_submit_ctl submit; struct page **blocks = percpu->scribble; int count; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); count = <API key>(blocks, sh); atomic_inc(&sh->count); init_async_submit(&submit, ASYNC_TX_ACK, tx, <API key>, sh, to_addr_conv(sh, percpu)); async_gen_syndrome(blocks, 0, count+2, STRIPE_SIZE, &submit); } static void ops_complete_check(void *stripe_head_ref) { struct stripe_head *sh = stripe_head_ref; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); sh->check_state = <API key>; set_bit(STRIPE_HANDLE, &sh->state); release_stripe(sh); } static void ops_run_check_p(struct stripe_head *sh, struct raid5_percpu *percpu) { int disks = sh->disks; int pd_idx = sh->pd_idx; int qd_idx = sh->qd_idx; struct page *xor_dest; struct page **xor_srcs = percpu->scribble; struct <API key> *tx; struct async_submit_ctl submit; int count; int i; pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); count = 0; xor_dest = sh->dev[pd_idx].page; xor_srcs[count++] = xor_dest; for (i = disks; i if (i == pd_idx || i == qd_idx) continue; xor_srcs[count++] = sh->dev[i].page; } init_async_submit(&submit, 0, NULL, NULL, NULL, to_addr_conv(sh, percpu)); tx = async_xor_val(xor_dest, xor_srcs, 0, count, STRIPE_SIZE, &sh->ops.zero_sum_result, &submit); atomic_inc(&sh->count); init_async_submit(&submit, ASYNC_TX_ACK, tx, ops_complete_check, sh, NULL); tx = <API key>(&submit); } static void ops_run_check_pq(struct stripe_head *sh, struct raid5_percpu *percpu, int checkp) { struct page **srcs = percpu->scribble; struct async_submit_ctl submit; int count; pr_debug("%s: stripe %llu checkp: %d\n", __func__, (unsigned long long)sh->sector, checkp); count = <API key>(srcs, sh); if (!checkp) srcs[count] = NULL; atomic_inc(&sh->count); init_async_submit(&submit, ASYNC_TX_ACK, NULL, ops_complete_check, sh, to_addr_conv(sh, percpu)); async_syndrome_val(srcs, 0, count+2, STRIPE_SIZE, &sh->ops.zero_sum_result, percpu->spare_page, &submit); } static void __raid_run_ops(struct stripe_head *sh, unsigned long ops_request) { int overlap_clear = 0, i, disks = sh->disks; struct <API key> *tx = NULL; raid5_conf_t *conf = sh->raid_conf; int level = conf->level; struct raid5_percpu *percpu; unsigned long cpu; cpu = get_cpu(); percpu = per_cpu_ptr(conf->percpu, cpu); if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) { ops_run_biofill(sh); overlap_clear++; } if (test_bit(<API key>, &ops_request)) { if (level < 6) tx = ops_run_compute5(sh, percpu); else { if (sh->ops.target2 < 0 || sh->ops.target < 0) tx = ops_run_compute6_1(sh, percpu); else tx = ops_run_compute6_2(sh, percpu); } /* terminate the chain if reconstruct is not set to be run */ if (tx && !test_bit(<API key>, &ops_request)) async_tx_ack(tx); } if (test_bit(STRIPE_OP_PREXOR, &ops_request)) tx = ops_run_prexor(sh, percpu, tx); if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) { tx = ops_run_biodrain(sh, tx); overlap_clear++; } if (test_bit(<API key>, &ops_request)) { if (level < 6) <API key>(sh, percpu, tx); else <API key>(sh, percpu, tx); } if (test_bit(STRIPE_OP_CHECK, &ops_request)) { if (sh->check_state == check_state_run) ops_run_check_p(sh, percpu); else if (sh->check_state == check_state_run_q) ops_run_check_pq(sh, percpu, 0); else if (sh->check_state == check_state_run_pq) ops_run_check_pq(sh, percpu, 1); else BUG(); } if (overlap_clear) for (i = disks; i struct r5dev *dev = &sh->dev[i]; if (test_and_clear_bit(R5_Overlap, &dev->flags)) wake_up(&sh->raid_conf->wait_for_overlap); } put_cpu(); } #ifdef <API key> static void async_run_ops(void *param, async_cookie_t cookie) { struct stripe_head *sh = param; unsigned long ops_request = sh->ops.request; clear_bit_unlock(<API key>, &sh->state); wake_up(&sh->ops.wait_for_ops); __raid_run_ops(sh, ops_request); release_stripe(sh); } static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request) { /* since handle_stripe can be called outside of raid5d context * we need to ensure sh->ops.request is de-staged before another * request arrives */ wait_event(sh->ops.wait_for_ops, !<API key>(<API key>, &sh->state)); sh->ops.request = ops_request; atomic_inc(&sh->count); async_schedule(async_run_ops, sh); } #else #define raid_run_ops __raid_run_ops #endif static int grow_one_stripe(raid5_conf_t *conf) { struct stripe_head *sh; sh = kmem_cache_zalloc(conf->slab_cache, GFP_KERNEL); if (!sh) return 0; sh->raid_conf = conf; spin_lock_init(&sh->lock); #ifdef <API key> init_waitqueue_head(&sh->ops.wait_for_ops); #endif if (grow_buffers(sh)) { shrink_buffers(sh); kmem_cache_free(conf->slab_cache, sh); return 0; } /* we just created an active stripe so... */ atomic_set(&sh->count, 1); atomic_inc(&conf->active_stripes); INIT_LIST_HEAD(&sh->lru); release_stripe(sh); return 1; } static int grow_stripes(raid5_conf_t *conf, int num) { struct kmem_cache *sc; int devs = max(conf->raid_disks, conf->previous_raid_disks); if (conf->mddev->gendisk) sprintf(conf->cache_name[0], "raid%d-%s", conf->level, mdname(conf->mddev)); else sprintf(conf->cache_name[0], "raid%d-%p", conf->level, conf->mddev); sprintf(conf->cache_name[1], "%s-alt", conf->cache_name[0]); conf->active_name = 0; sc = kmem_cache_create(conf->cache_name[conf->active_name], sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev), 0, 0, NULL); if (!sc) return 1; conf->slab_cache = sc; conf->pool_size = devs; while (num if (!grow_one_stripe(conf)) return 1; return 0; } /** * scribble_len - return the required size of the scribble region * @num - total number of disks in the array * * The size must be enough to contain: * 1/ a struct page pointer for each device in the array +2 * 2/ room to convert each entry in (1) to its corresponding dma * (dma_map_page()) or page (page_address()) address. * * Note: the +2 is for the destination buffers of the ddf/raid6 case where we * calculate over all devices (not just the data blocks), using zeros in place * of the P and Q blocks. */ static size_t scribble_len(int num) { size_t len; len = sizeof(struct page *) * (num+2) + sizeof(addr_conv_t) * (num+2); return len; } static int resize_stripes(raid5_conf_t *conf, int newsize) { /* Make all the stripes able to hold 'newsize' devices. * New slots in each stripe get 'page' set to a new page. * * This happens in stages: * 1/ create a new kmem_cache and allocate the required number of * stripe_heads. * 2/ gather all the old stripe_heads and tranfer the pages across * to the new stripe_heads. This will have the side effect of * freezing the array as once all stripe_heads have been collected, * no IO will be possible. Old stripe heads are freed once their * pages have been transferred over, and the old kmem_cache is * freed when all stripes are done. * 3/ reallocate conf->disks to be suitable bigger. If this fails, * we simple return a failre status - no need to clean anything up. * 4/ allocate new pages for the new slots in the new stripe_heads. * If this fails, we don't bother trying the shrink the * stripe_heads down again, we just leave them as they are. * As each stripe_head is processed the new one is released into * active service. * * Once step2 is started, we cannot afford to wait for a write, * so we use GFP_NOIO allocations. */ struct stripe_head *osh, *nsh; LIST_HEAD(newstripes); struct disk_info *ndisks; unsigned long cpu; int err; struct kmem_cache *sc; int i; if (newsize <= conf->pool_size) return 0; /* never bother to shrink */ err = md_allow_write(conf->mddev); if (err) return err; /* Step 1 */ sc = kmem_cache_create(conf->cache_name[1-conf->active_name], sizeof(struct stripe_head)+(newsize-1)*sizeof(struct r5dev), 0, 0, NULL); if (!sc) return -ENOMEM; for (i = conf->max_nr_stripes; i; i nsh = kmem_cache_zalloc(sc, GFP_KERNEL); if (!nsh) break; nsh->raid_conf = conf; spin_lock_init(&nsh->lock); #ifdef <API key> init_waitqueue_head(&nsh->ops.wait_for_ops); #endif list_add(&nsh->lru, &newstripes); } if (i) { /* didn't get enough, give up */ while (!list_empty(&newstripes)) { nsh = list_entry(newstripes.next, struct stripe_head, lru); list_del(&nsh->lru); kmem_cache_free(sc, nsh); } kmem_cache_destroy(sc); return -ENOMEM; } /* Step 2 - Must use GFP_NOIO now. * OK, we have enough stripes, start collecting inactive * stripes and copying them over */ list_for_each_entry(nsh, &newstripes, lru) { spin_lock_irq(&conf->device_lock); wait_event_lock_irq(conf->wait_for_stripe, !list_empty(&conf->inactive_list), conf->device_lock, unplug_slaves(conf->mddev) ); osh = get_free_stripe(conf); spin_unlock_irq(&conf->device_lock); atomic_set(&nsh->count, 1); for(i=0; i<conf->pool_size; i++) nsh->dev[i].page = osh->dev[i].page; for( ; i<newsize; i++) nsh->dev[i].page = NULL; kmem_cache_free(conf->slab_cache, osh); } kmem_cache_destroy(conf->slab_cache); /* Step 3. * At this point, we are holding all the stripes so the array * is completely stalled, so now is a good time to resize * conf->disks and the scribble region */ ndisks = kzalloc(newsize * sizeof(struct disk_info), GFP_NOIO); if (ndisks) { for (i=0; i<conf->raid_disks; i++) ndisks[i] = conf->disks[i]; kfree(conf->disks); conf->disks = ndisks; } else err = -ENOMEM; get_online_cpus(); conf->scribble_len = scribble_len(newsize); <API key>(cpu) { struct raid5_percpu *percpu; void *scribble; percpu = per_cpu_ptr(conf->percpu, cpu); scribble = kmalloc(conf->scribble_len, GFP_NOIO); if (scribble) { kfree(percpu->scribble); percpu->scribble = scribble; } else { err = -ENOMEM; break; } } put_online_cpus(); /* Step 4, return new stripes to service */ while(!list_empty(&newstripes)) { nsh = list_entry(newstripes.next, struct stripe_head, lru); list_del_init(&nsh->lru); for (i=conf->raid_disks; i < newsize; i++) if (nsh->dev[i].page == NULL) { struct page *p = alloc_page(GFP_NOIO); nsh->dev[i].page = p; if (!p) err = -ENOMEM; } release_stripe(nsh); } /* critical section pass, GFP_NOIO no longer needed */ conf->slab_cache = sc; conf->active_name = 1-conf->active_name; conf->pool_size = newsize; return err; } static int drop_one_stripe(raid5_conf_t *conf) { struct stripe_head *sh; spin_lock_irq(&conf->device_lock); sh = get_free_stripe(conf); spin_unlock_irq(&conf->device_lock); if (!sh) return 0; BUG_ON(atomic_read(&sh->count)); shrink_buffers(sh); kmem_cache_free(conf->slab_cache, sh); atomic_dec(&conf->active_stripes); return 1; } static void shrink_stripes(raid5_conf_t *conf) { while (drop_one_stripe(conf)) ; if (conf->slab_cache) kmem_cache_destroy(conf->slab_cache); conf->slab_cache = NULL; } static void <API key>(struct bio * bi, int error) { struct stripe_head *sh = bi->bi_private; raid5_conf_t *conf = sh->raid_conf; int disks = sh->disks, i; int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); char b[BDEVNAME_SIZE]; mdk_rdev_t *rdev; for (i=0 ; i<disks; i++) if (bi == &sh->dev[i].req) break; pr_debug("end_read_request %llu/%d, count: %d, uptodate %d.\n", (unsigned long long)sh->sector, i, atomic_read(&sh->count), uptodate); if (i == disks) { BUG(); return; } if (uptodate) { set_bit(R5_UPTODATE, &sh->dev[i].flags); if (test_bit(R5_ReadError, &sh->dev[i].flags)) { rdev = conf->disks[i].rdev; printk_rl(KERN_INFO "md/raid:%s: read error corrected" " (%lu sectors at %llu on %s)\n", mdname(conf->mddev), STRIPE_SECTORS, (unsigned long long)(sh->sector + rdev->data_offset), bdevname(rdev->bdev, b)); clear_bit(R5_ReadError, &sh->dev[i].flags); clear_bit(R5_ReWrite, &sh->dev[i].flags); } if (atomic_read(&conf->disks[i].rdev->read_errors)) atomic_set(&conf->disks[i].rdev->read_errors, 0); } else { const char *bdn = bdevname(conf->disks[i].rdev->bdev, b); int retry = 0; rdev = conf->disks[i].rdev; clear_bit(R5_UPTODATE, &sh->dev[i].flags); atomic_inc(&rdev->read_errors); if (conf->mddev->degraded >= conf->max_degraded) printk_rl(KERN_WARNING "md/raid:%s: read error not correctable " "(sector %llu on %s).\n", mdname(conf->mddev), (unsigned long long)(sh->sector + rdev->data_offset), bdn); else if (test_bit(R5_ReWrite, &sh->dev[i].flags)) /* Oh, no!!! */ printk_rl(KERN_WARNING "md/raid:%s: read error NOT corrected!! " "(sector %llu on %s).\n", mdname(conf->mddev), (unsigned long long)(sh->sector + rdev->data_offset), bdn); else if (atomic_read(&rdev->read_errors) > conf->max_nr_stripes) printk(KERN_WARNING "md/raid:%s: Too many read errors, failing device %s.\n", mdname(conf->mddev), bdn); else retry = 1; if (retry) set_bit(R5_ReadError, &sh->dev[i].flags); else { clear_bit(R5_ReadError, &sh->dev[i].flags); clear_bit(R5_ReWrite, &sh->dev[i].flags); md_error(conf->mddev, rdev); } } rdev_dec_pending(conf->disks[i].rdev, conf->mddev); clear_bit(R5_LOCKED, &sh->dev[i].flags); set_bit(STRIPE_HANDLE, &sh->state); release_stripe(sh); } static void <API key>(struct bio *bi, int error) { struct stripe_head *sh = bi->bi_private; raid5_conf_t *conf = sh->raid_conf; int disks = sh->disks, i; int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); for (i=0 ; i<disks; i++) if (bi == &sh->dev[i].req) break; pr_debug("end_write_request %llu/%d, count %d, uptodate: %d.\n", (unsigned long long)sh->sector, i, atomic_read(&sh->count), uptodate); if (i == disks) { BUG(); return; } if (!uptodate) md_error(conf->mddev, conf->disks[i].rdev); rdev_dec_pending(conf->disks[i].rdev, conf->mddev); clear_bit(R5_LOCKED, &sh->dev[i].flags); set_bit(STRIPE_HANDLE, &sh->state); release_stripe(sh); } static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous); static void raid5_build_block(struct stripe_head *sh, int i, int previous) { struct r5dev *dev = &sh->dev[i]; bio_init(&dev->req); dev->req.bi_io_vec = &dev->vec; dev->req.bi_vcnt++; dev->req.bi_max_vecs++; dev->vec.bv_page = dev->page; dev->vec.bv_len = STRIPE_SIZE; dev->vec.bv_offset = 0; dev->req.bi_sector = sh->sector; dev->req.bi_private = sh; dev->flags = 0; dev->sector = compute_blocknr(sh, i, previous); } static void error(mddev_t *mddev, mdk_rdev_t *rdev) { char b[BDEVNAME_SIZE]; raid5_conf_t *conf = mddev->private; pr_debug("raid456: error called\n"); if (test_and_clear_bit(In_sync, &rdev->flags)) { unsigned long flags; spin_lock_irqsave(&conf->device_lock, flags); mddev->degraded++; <API key>(&conf->device_lock, flags); /* * if recovery was running, make sure it aborts. */ set_bit(MD_RECOVERY_INTR, &mddev->recovery); } set_bit(Faulty, &rdev->flags); set_bit(MD_CHANGE_DEVS, &mddev->flags); printk(KERN_ALERT "md/raid:%s: Disk failure on %s, disabling device.\n" "md/raid:%s: Operation continuing on %d devices.\n", mdname(mddev), bdevname(rdev->bdev, b), mdname(mddev), conf->raid_disks - mddev->degraded); } /* * Input: a 'big' sector number, * Output: index of the data and parity disk, and the sector # in them. */ static sector_t <API key>(raid5_conf_t *conf, sector_t r_sector, int previous, int *dd_idx, struct stripe_head *sh) { sector_t stripe, stripe2; sector_t chunk_number; unsigned int chunk_offset; int pd_idx, qd_idx; int ddf_layout = 0; sector_t new_sector; int algorithm = previous ? conf->prev_algo : conf->algorithm; int sectors_per_chunk = previous ? conf->prev_chunk_sectors : conf->chunk_sectors; int raid_disks = previous ? conf->previous_raid_disks : conf->raid_disks; int data_disks = raid_disks - conf->max_degraded; /* First compute the information on this sector */ /* * Compute the chunk number and the sector offset inside the chunk */ chunk_offset = sector_div(r_sector, sectors_per_chunk); chunk_number = r_sector; /* * Compute the stripe number */ stripe = chunk_number; *dd_idx = sector_div(stripe, data_disks); stripe2 = stripe; /* * Select the parity disk based on the user selected algorithm. */ pd_idx = qd_idx = ~0; switch(conf->level) { case 4: pd_idx = data_disks; break; case 5: switch (algorithm) { case <API key>: pd_idx = data_disks - sector_div(stripe2, raid_disks); if (*dd_idx >= pd_idx) (*dd_idx)++; break; case <API key>: pd_idx = sector_div(stripe2, raid_disks); if (*dd_idx >= pd_idx) (*dd_idx)++; break; case <API key>: pd_idx = data_disks - sector_div(stripe2, raid_disks); *dd_idx = (pd_idx + 1 + *dd_idx) % raid_disks; break; case <API key>: pd_idx = sector_div(stripe2, raid_disks); *dd_idx = (pd_idx + 1 + *dd_idx) % raid_disks; break; case ALGORITHM_PARITY_0: pd_idx = 0; (*dd_idx)++; break; case ALGORITHM_PARITY_N: pd_idx = data_disks; break; default: BUG(); } break; case 6: switch (algorithm) { case <API key>: pd_idx = raid_disks - 1 - sector_div(stripe2, raid_disks); qd_idx = pd_idx + 1; if (pd_idx == raid_disks-1) { (*dd_idx)++; /* Q D D D P */ qd_idx = 0; } else if (*dd_idx >= pd_idx) (*dd_idx) += 2; /* D D P Q D */ break; case <API key>: pd_idx = sector_div(stripe2, raid_disks); qd_idx = pd_idx + 1; if (pd_idx == raid_disks-1) { (*dd_idx)++; /* Q D D D P */ qd_idx = 0; } else if (*dd_idx >= pd_idx) (*dd_idx) += 2; /* D D P Q D */ break; case <API key>: pd_idx = raid_disks - 1 - sector_div(stripe2, raid_disks); qd_idx = (pd_idx + 1) % raid_disks; *dd_idx = (pd_idx + 2 + *dd_idx) % raid_disks; break; case <API key>: pd_idx = sector_div(stripe2, raid_disks); qd_idx = (pd_idx + 1) % raid_disks; *dd_idx = (pd_idx + 2 + *dd_idx) % raid_disks; break; case ALGORITHM_PARITY_0: pd_idx = 0; qd_idx = 1; (*dd_idx) += 2; break; case ALGORITHM_PARITY_N: pd_idx = data_disks; qd_idx = data_disks + 1; break; case <API key>: /* Exactly the same as RIGHT_ASYMMETRIC, but or * of blocks for computing Q is different. */ pd_idx = sector_div(stripe2, raid_disks); qd_idx = pd_idx + 1; if (pd_idx == raid_disks-1) { (*dd_idx)++; /* Q D D D P */ qd_idx = 0; } else if (*dd_idx >= pd_idx) (*dd_idx) += 2; /* D D P Q D */ ddf_layout = 1; break; case <API key>: /* Same a left_asymmetric, by first stripe is * D D D P Q rather than * Q D D D P */ stripe2 += 1; pd_idx = raid_disks - 1 - sector_div(stripe2, raid_disks); qd_idx = pd_idx + 1; if (pd_idx == raid_disks-1) { (*dd_idx)++; /* Q D D D P */ qd_idx = 0; } else if (*dd_idx >= pd_idx) (*dd_idx) += 2; /* D D P Q D */ ddf_layout = 1; break; case <API key>: /* Same as left_symmetric but Q is before P */ pd_idx = raid_disks - 1 - sector_div(stripe2, raid_disks); qd_idx = (pd_idx + raid_disks - 1) % raid_disks; *dd_idx = (pd_idx + 1 + *dd_idx) % raid_disks; ddf_layout = 1; break; case <API key>: /* RAID5 left_asymmetric, with Q on last device */ pd_idx = data_disks - sector_div(stripe2, raid_disks-1); if (*dd_idx >= pd_idx) (*dd_idx)++; qd_idx = raid_disks - 1; break; case <API key>: pd_idx = sector_div(stripe2, raid_disks-1); if (*dd_idx >= pd_idx) (*dd_idx)++; qd_idx = raid_disks - 1; break; case <API key>: pd_idx = data_disks - sector_div(stripe2, raid_disks-1); *dd_idx = (pd_idx + 1 + *dd_idx) % (raid_disks-1); qd_idx = raid_disks - 1; break; case <API key>: pd_idx = sector_div(stripe2, raid_disks-1); *dd_idx = (pd_idx + 1 + *dd_idx) % (raid_disks-1); qd_idx = raid_disks - 1; break; case <API key>: pd_idx = 0; (*dd_idx)++; qd_idx = raid_disks - 1; break; default: BUG(); } break; } if (sh) { sh->pd_idx = pd_idx; sh->qd_idx = qd_idx; sh->ddf_layout = ddf_layout; } /* * Finally, compute the new sector number */ new_sector = (sector_t)stripe * sectors_per_chunk + chunk_offset; return new_sector; } static sector_t compute_blocknr(struct stripe_head *sh, int i, int previous) { raid5_conf_t *conf = sh->raid_conf; int raid_disks = sh->disks; int data_disks = raid_disks - conf->max_degraded; sector_t new_sector = sh->sector, check; int sectors_per_chunk = previous ? conf->prev_chunk_sectors : conf->chunk_sectors; int algorithm = previous ? conf->prev_algo : conf->algorithm; sector_t stripe; int chunk_offset; sector_t chunk_number; int dummy1, dd_idx = i; sector_t r_sector; struct stripe_head sh2; chunk_offset = sector_div(new_sector, sectors_per_chunk); stripe = new_sector; if (i == sh->pd_idx) return 0; switch(conf->level) { case 4: break; case 5: switch (algorithm) { case <API key>: case <API key>: if (i > sh->pd_idx) i break; case <API key>: case <API key>: if (i < sh->pd_idx) i += raid_disks; i -= (sh->pd_idx + 1); break; case ALGORITHM_PARITY_0: i -= 1; break; case ALGORITHM_PARITY_N: break; default: BUG(); } break; case 6: if (i == sh->qd_idx) return 0; /* It is the Q disk */ switch (algorithm) { case <API key>: case <API key>: case <API key>: case <API key>: if (sh->pd_idx == raid_disks-1) i--; /* Q D D D P */ else if (i > sh->pd_idx) i -= 2; /* D D P Q D */ break; case <API key>: case <API key>: if (sh->pd_idx == raid_disks-1) i--; /* Q D D D P */ else { /* D D P Q D */ if (i < sh->pd_idx) i += raid_disks; i -= (sh->pd_idx + 2); } break; case ALGORITHM_PARITY_0: i -= 2; break; case ALGORITHM_PARITY_N: break; case <API key>: /* Like left_symmetric, but P is before Q */ if (sh->pd_idx == 0) i--; /* P D D D Q */ else { /* D D Q P D */ if (i < sh->pd_idx) i += raid_disks; i -= (sh->pd_idx + 1); } break; case <API key>: case <API key>: if (i > sh->pd_idx) i break; case <API key>: case <API key>: if (i < sh->pd_idx) i += data_disks + 1; i -= (sh->pd_idx + 1); break; case <API key>: i -= 1; break; default: BUG(); } break; } chunk_number = stripe * data_disks + i; r_sector = chunk_number * sectors_per_chunk + chunk_offset; check = <API key>(conf, r_sector, previous, &dummy1, &sh2); if (check != sh->sector || dummy1 != dd_idx || sh2.pd_idx != sh->pd_idx || sh2.qd_idx != sh->qd_idx) { printk(KERN_ERR "md/raid:%s: compute_blocknr: map not correct\n", mdname(conf->mddev)); return 0; } return r_sector; } static void <API key>(struct stripe_head *sh, struct stripe_head_state *s, int rcw, int expand) { int i, pd_idx = sh->pd_idx, disks = sh->disks; raid5_conf_t *conf = sh->raid_conf; int level = conf->level; if (rcw) { /* if we are not expanding this is a proper write request, and * there will be bios with new data to be drained into the * stripe cache */ if (!expand) { sh->reconstruct_state = <API key>; set_bit(STRIPE_OP_BIODRAIN, &s->ops_request); } else sh->reconstruct_state = <API key>; set_bit(<API key>, &s->ops_request); for (i = disks; i struct r5dev *dev = &sh->dev[i]; if (dev->towrite) { set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantdrain, &dev->flags); if (!expand) clear_bit(R5_UPTODATE, &dev->flags); s->locked++; } } if (s->locked + conf->max_degraded == disks) if (!test_and_set_bit(STRIPE_FULL_WRITE, &sh->state)) atomic_inc(&conf->pending_full_writes); } else { BUG_ON(level == 6); BUG_ON(!(test_bit(R5_UPTODATE, &sh->dev[pd_idx].flags) || test_bit(R5_Wantcompute, &sh->dev[pd_idx].flags))); sh->reconstruct_state = <API key>; set_bit(STRIPE_OP_PREXOR, &s->ops_request); set_bit(STRIPE_OP_BIODRAIN, &s->ops_request); set_bit(<API key>, &s->ops_request); for (i = disks; i struct r5dev *dev = &sh->dev[i]; if (i == pd_idx) continue; if (dev->towrite && (test_bit(R5_UPTODATE, &dev->flags) || test_bit(R5_Wantcompute, &dev->flags))) { set_bit(R5_Wantdrain, &dev->flags); set_bit(R5_LOCKED, &dev->flags); clear_bit(R5_UPTODATE, &dev->flags); s->locked++; } } } /* keep the parity disk(s) locked while asynchronous operations * are in flight */ set_bit(R5_LOCKED, &sh->dev[pd_idx].flags); clear_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); s->locked++; if (level == 6) { int qd_idx = sh->qd_idx; struct r5dev *dev = &sh->dev[qd_idx]; set_bit(R5_LOCKED, &dev->flags); clear_bit(R5_UPTODATE, &dev->flags); s->locked++; } pr_debug("%s: stripe %llu locked: %d ops_request: %lx\n", __func__, (unsigned long long)sh->sector, s->locked, s->ops_request); } /* * Each stripe/dev can have one or more bion attached. * toread/towrite point to the first in a chain. * The bi_next chain must be in order. */ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite) { struct bio **bip; raid5_conf_t *conf = sh->raid_conf; int firstwrite=0; pr_debug("adding bh b#%llu to stripe s#%llu\n", (unsigned long long)bi->bi_sector, (unsigned long long)sh->sector); spin_lock(&sh->lock); spin_lock_irq(&conf->device_lock); if (forwrite) { bip = &sh->dev[dd_idx].towrite; if (*bip == NULL && sh->dev[dd_idx].written == NULL) firstwrite = 1; } else bip = &sh->dev[dd_idx].toread; while (*bip && (*bip)->bi_sector < bi->bi_sector) { if ((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector) goto overlap; bip = & (*bip)->bi_next; } if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9)) goto overlap; BUG_ON(*bip && bi->bi_next && (*bip) != bi->bi_next); if (*bip) bi->bi_next = *bip; *bip = bi; bi->bi_phys_segments++; spin_unlock_irq(&conf->device_lock); spin_unlock(&sh->lock); pr_debug("added bi b#%llu to stripe s#%llu, disk %d.\n", (unsigned long long)bi->bi_sector, (unsigned long long)sh->sector, dd_idx); if (conf->mddev->bitmap && firstwrite) { bitmap_startwrite(conf->mddev->bitmap, sh->sector, STRIPE_SECTORS, 0); sh->bm_seq = conf->seq_flush+1; set_bit(STRIPE_BIT_DELAY, &sh->state); } if (forwrite) { /* check if page is covered */ sector_t sector = sh->dev[dd_idx].sector; for (bi=sh->dev[dd_idx].towrite; sector < sh->dev[dd_idx].sector + STRIPE_SECTORS && bi && bi->bi_sector <= sector; bi = r5_next_bio(bi, sh->dev[dd_idx].sector)) { if (bi->bi_sector + (bi->bi_size>>9) >= sector) sector = bi->bi_sector + (bi->bi_size>>9); } if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS) set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags); } return 1; overlap: set_bit(R5_Overlap, &sh->dev[dd_idx].flags); spin_unlock_irq(&conf->device_lock); spin_unlock(&sh->lock); return 0; } static void end_reshape(raid5_conf_t *conf); static void stripe_set_idx(sector_t stripe, raid5_conf_t *conf, int previous, struct stripe_head *sh) { int sectors_per_chunk = previous ? conf->prev_chunk_sectors : conf->chunk_sectors; int dd_idx; int chunk_offset = sector_div(stripe, sectors_per_chunk); int disks = previous ? conf->previous_raid_disks : conf->raid_disks; <API key>(conf, stripe * (disks - conf->max_degraded) *sectors_per_chunk + chunk_offset, previous, &dd_idx, sh); } static void <API key>(raid5_conf_t *conf, struct stripe_head *sh, struct stripe_head_state *s, int disks, struct bio **return_bi) { int i; for (i = disks; i struct bio *bi; int bitmap_end = 0; if (test_bit(R5_ReadError, &sh->dev[i].flags)) { mdk_rdev_t *rdev; rcu_read_lock(); rdev = rcu_dereference(conf->disks[i].rdev); if (rdev && test_bit(In_sync, &rdev->flags)) /* multiple read failures in one stripe */ md_error(conf->mddev, rdev); rcu_read_unlock(); } spin_lock_irq(&conf->device_lock); /* fail all writes first */ bi = sh->dev[i].towrite; sh->dev[i].towrite = NULL; if (bi) { s->to_write bitmap_end = 1; } if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) wake_up(&conf->wait_for_overlap); while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS) { struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); clear_bit(BIO_UPTODATE, &bi->bi_flags); if (!<API key>(bi)) { md_write_end(conf->mddev); bi->bi_next = *return_bi; *return_bi = bi; } bi = nextbi; } /* and fail all 'written' */ bi = sh->dev[i].written; sh->dev[i].written = NULL; if (bi) bitmap_end = 1; while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS) { struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); clear_bit(BIO_UPTODATE, &bi->bi_flags); if (!<API key>(bi)) { md_write_end(conf->mddev); bi->bi_next = *return_bi; *return_bi = bi; } bi = bi2; } /* fail any reads if this device is non-operational and * the data has not reached the cache yet. */ if (!test_bit(R5_Wantfill, &sh->dev[i].flags) && (!test_bit(R5_Insync, &sh->dev[i].flags) || test_bit(R5_ReadError, &sh->dev[i].flags))) { bi = sh->dev[i].toread; sh->dev[i].toread = NULL; if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags)) wake_up(&conf->wait_for_overlap); if (bi) s->to_read while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS) { struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); clear_bit(BIO_UPTODATE, &bi->bi_flags); if (!<API key>(bi)) { bi->bi_next = *return_bi; *return_bi = bi; } bi = nextbi; } } spin_unlock_irq(&conf->device_lock); if (bitmap_end) bitmap_endwrite(conf->mddev->bitmap, sh->sector, STRIPE_SECTORS, 0, 0); } if (test_and_clear_bit(STRIPE_FULL_WRITE, &sh->state)) if (atomic_dec_and_test(&conf->pending_full_writes)) md_wakeup_thread(conf->mddev->thread); } /* fetch_block5 - checks the given member device to see if its data needs * to be read or computed to satisfy a request. * * Returns 1 when no more member devices need to be checked, otherwise returns * 0 to tell the loop in handle_stripe_fill5 to continue */ static int fetch_block5(struct stripe_head *sh, struct stripe_head_state *s, int disk_idx, int disks) { struct r5dev *dev = &sh->dev[disk_idx]; struct r5dev *failed_dev = &sh->dev[s->failed_num]; /* is the data in this block needed, and can we get it? */ if (!test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) && (dev->toread || (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags)) || s->syncing || s->expanding || (s->failed && (failed_dev->toread || (failed_dev->towrite && !test_bit(R5_OVERWRITE, &failed_dev->flags)))))) { /* We would like to get this block, possibly by computing it, * otherwise read it if the backing disk is insync */ if ((s->uptodate == disks - 1) && (s->failed && disk_idx == s->failed_num)) { set_bit(STRIPE_COMPUTE_RUN, &sh->state); set_bit(<API key>, &s->ops_request); set_bit(R5_Wantcompute, &dev->flags); sh->ops.target = disk_idx; sh->ops.target2 = -1; s->req_compute = 1; /* Careful: from this point on 'uptodate' is in the eye * of raid_run_ops which services 'compute' operations * before writes. R5_Wantcompute flags a block that will * be R5_UPTODATE by the time it is needed for a * subsequent operation. */ s->uptodate++; return 1; /* uptodate + compute == disks */ } else if (test_bit(R5_Insync, &dev->flags)) { set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantread, &dev->flags); s->locked++; pr_debug("Reading block %d (sync=%d)\n", disk_idx, s->syncing); } } return 0; } /** * handle_stripe_fill5 - read or compute data to satisfy pending requests. */ static void handle_stripe_fill5(struct stripe_head *sh, struct stripe_head_state *s, int disks) { int i; /* look for blocks to read/compute, skip this if a compute * is already in flight, or if the stripe contents are in the * midst of changing due to a write */ if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && !sh->reconstruct_state) for (i = disks; i if (fetch_block5(sh, s, i, disks)) break; set_bit(STRIPE_HANDLE, &sh->state); } /* fetch_block6 - checks the given member device to see if its data needs * to be read or computed to satisfy a request. * * Returns 1 when no more member devices need to be checked, otherwise returns * 0 to tell the loop in handle_stripe_fill6 to continue */ static int fetch_block6(struct stripe_head *sh, struct stripe_head_state *s, struct r6_state *r6s, int disk_idx, int disks) { struct r5dev *dev = &sh->dev[disk_idx]; struct r5dev *fdev[2] = { &sh->dev[r6s->failed_num[0]], &sh->dev[r6s->failed_num[1]] }; if (!test_bit(R5_LOCKED, &dev->flags) && !test_bit(R5_UPTODATE, &dev->flags) && (dev->toread || (dev->towrite && !test_bit(R5_OVERWRITE, &dev->flags)) || s->syncing || s->expanding || (s->failed >= 1 && (fdev[0]->toread || s->to_write)) || (s->failed >= 2 && (fdev[1]->toread || s->to_write)))) { /* we would like to get this block, possibly by computing it, * otherwise read it if the backing disk is insync */ BUG_ON(test_bit(R5_Wantcompute, &dev->flags)); BUG_ON(test_bit(R5_Wantread, &dev->flags)); if ((s->uptodate == disks - 1) && (s->failed && (disk_idx == r6s->failed_num[0] || disk_idx == r6s->failed_num[1]))) { /* have disk failed, and we're requested to fetch it; * do compute it */ pr_debug("Computing stripe %llu block %d\n", (unsigned long long)sh->sector, disk_idx); set_bit(STRIPE_COMPUTE_RUN, &sh->state); set_bit(<API key>, &s->ops_request); set_bit(R5_Wantcompute, &dev->flags); sh->ops.target = disk_idx; sh->ops.target2 = -1; /* no 2nd target */ s->req_compute = 1; s->uptodate++; return 1; } else if (s->uptodate == disks-2 && s->failed >= 2) { /* Computing 2-failure is *very* expensive; only * do it if failed >= 2 */ int other; for (other = disks; other if (other == disk_idx) continue; if (!test_bit(R5_UPTODATE, &sh->dev[other].flags)) break; } BUG_ON(other < 0); pr_debug("Computing stripe %llu blocks %d,%d\n", (unsigned long long)sh->sector, disk_idx, other); set_bit(STRIPE_COMPUTE_RUN, &sh->state); set_bit(<API key>, &s->ops_request); set_bit(R5_Wantcompute, &sh->dev[disk_idx].flags); set_bit(R5_Wantcompute, &sh->dev[other].flags); sh->ops.target = disk_idx; sh->ops.target2 = other; s->uptodate += 2; s->req_compute = 1; return 1; } else if (test_bit(R5_Insync, &dev->flags)) { set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantread, &dev->flags); s->locked++; pr_debug("Reading block %d (sync=%d)\n", disk_idx, s->syncing); } } return 0; } /** * handle_stripe_fill6 - read or compute data to satisfy pending requests. */ static void handle_stripe_fill6(struct stripe_head *sh, struct stripe_head_state *s, struct r6_state *r6s, int disks) { int i; /* look for blocks to read/compute, skip this if a compute * is already in flight, or if the stripe contents are in the * midst of changing due to a write */ if (!test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !sh->check_state && !sh->reconstruct_state) for (i = disks; i if (fetch_block6(sh, s, r6s, i, disks)) break; set_bit(STRIPE_HANDLE, &sh->state); } /* <API key> * any written block on an uptodate or failed drive can be returned. * Note that if we 'wrote' to a failed drive, it will be UPTODATE, but * never LOCKED, so we don't need to test 'failed' directly. */ static void <API key>(raid5_conf_t *conf, struct stripe_head *sh, int disks, struct bio **return_bi) { int i; struct r5dev *dev; for (i = disks; i if (sh->dev[i].written) { dev = &sh->dev[i]; if (!test_bit(R5_LOCKED, &dev->flags) && test_bit(R5_UPTODATE, &dev->flags)) { /* We can return any write requests */ struct bio *wbi, *wbi2; int bitmap_end = 0; pr_debug("Return write for disc %d\n", i); spin_lock_irq(&conf->device_lock); wbi = dev->written; dev->written = NULL; while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) { wbi2 = r5_next_bio(wbi, dev->sector); if (!<API key>(wbi)) { md_write_end(conf->mddev); wbi->bi_next = *return_bi; *return_bi = wbi; } wbi = wbi2; } if (dev->towrite == NULL) bitmap_end = 1; spin_unlock_irq(&conf->device_lock); if (bitmap_end) bitmap_endwrite(conf->mddev->bitmap, sh->sector, STRIPE_SECTORS, !test_bit(STRIPE_DEGRADED, &sh->state), 0); } } if (test_and_clear_bit(STRIPE_FULL_WRITE, &sh->state)) if (atomic_dec_and_test(&conf->pending_full_writes)) md_wakeup_thread(conf->mddev->thread); } static void <API key>(raid5_conf_t *conf, struct stripe_head *sh, struct stripe_head_state *s, int disks) { int rmw = 0, rcw = 0, i; for (i = disks; i /* would I have to read this buffer for read_modify_write */ struct r5dev *dev = &sh->dev[i]; if ((dev->towrite || i == sh->pd_idx) && !test_bit(R5_LOCKED, &dev->flags) && !(test_bit(R5_UPTODATE, &dev->flags) || test_bit(R5_Wantcompute, &dev->flags))) { if (test_bit(R5_Insync, &dev->flags)) rmw++; else rmw += 2*disks; /* cannot read it */ } /* Would I have to read this buffer for reconstruct_write */ if (!test_bit(R5_OVERWRITE, &dev->flags) && i != sh->pd_idx && !test_bit(R5_LOCKED, &dev->flags) && !(test_bit(R5_UPTODATE, &dev->flags) || test_bit(R5_Wantcompute, &dev->flags))) { if (test_bit(R5_Insync, &dev->flags)) rcw++; else rcw += 2*disks; } } pr_debug("for sector %llu, rmw=%d rcw=%d\n", (unsigned long long)sh->sector, rmw, rcw); set_bit(STRIPE_HANDLE, &sh->state); if (rmw < rcw && rmw > 0) /* prefer read-modify-write, but need to get some data */ for (i = disks; i struct r5dev *dev = &sh->dev[i]; if ((dev->towrite || i == sh->pd_idx) && !test_bit(R5_LOCKED, &dev->flags) && !(test_bit(R5_UPTODATE, &dev->flags) || test_bit(R5_Wantcompute, &dev->flags)) && test_bit(R5_Insync, &dev->flags)) { if ( test_bit(<API key>, &sh->state)) { pr_debug("Read_old block " "%d for r-m-w\n", i); set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantread, &dev->flags); s->locked++; } else { set_bit(STRIPE_DELAYED, &sh->state); set_bit(STRIPE_HANDLE, &sh->state); } } } if (rcw <= rmw && rcw > 0) /* want reconstruct write, but need to get some data */ for (i = disks; i struct r5dev *dev = &sh->dev[i]; if (!test_bit(R5_OVERWRITE, &dev->flags) && i != sh->pd_idx && !test_bit(R5_LOCKED, &dev->flags) && !(test_bit(R5_UPTODATE, &dev->flags) || test_bit(R5_Wantcompute, &dev->flags)) && test_bit(R5_Insync, &dev->flags)) { if ( test_bit(<API key>, &sh->state)) { pr_debug("Read_old block " "%d for Reconstruct\n", i); set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantread, &dev->flags); s->locked++; } else { set_bit(STRIPE_DELAYED, &sh->state); set_bit(STRIPE_HANDLE, &sh->state); } } } /* now if nothing is locked, and if we have enough data, * we can start a write request */ /* since handle_stripe can be called at any time we need to handle the * case where a compute block operation has been submitted and then a * subsequent call wants to start a write request. raid_run_ops only * handles the case where compute block and reconstruct are requested * simultaneously. If this is not the case then new writes need to be * held off until the compute completes. */ if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && (s->locked == 0 && (rcw == 0 || rmw == 0) && !test_bit(STRIPE_BIT_DELAY, &sh->state))) <API key>(sh, s, rcw == 0, 0); } static void <API key>(raid5_conf_t *conf, struct stripe_head *sh, struct stripe_head_state *s, struct r6_state *r6s, int disks) { int rcw = 0, pd_idx = sh->pd_idx, i; int qd_idx = sh->qd_idx; set_bit(STRIPE_HANDLE, &sh->state); for (i = disks; i struct r5dev *dev = &sh->dev[i]; /* check if we haven't enough data */ if (!test_bit(R5_OVERWRITE, &dev->flags) && i != pd_idx && i != qd_idx && !test_bit(R5_LOCKED, &dev->flags) && !(test_bit(R5_UPTODATE, &dev->flags) || test_bit(R5_Wantcompute, &dev->flags))) { rcw++; if (!test_bit(R5_Insync, &dev->flags)) continue; /* it's a failed drive */ if ( test_bit(<API key>, &sh->state)) { pr_debug("Read_old stripe %llu " "block %d for Reconstruct\n", (unsigned long long)sh->sector, i); set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantread, &dev->flags); s->locked++; } else { pr_debug("Request delayed stripe %llu " "block %d for Reconstruct\n", (unsigned long long)sh->sector, i); set_bit(STRIPE_DELAYED, &sh->state); set_bit(STRIPE_HANDLE, &sh->state); } } } /* now if nothing is locked, and if we have enough data, we can start a * write request */ if ((s->req_compute || !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) && s->locked == 0 && rcw == 0 && !test_bit(STRIPE_BIT_DELAY, &sh->state)) { <API key>(sh, s, 1, 0); } } static void <API key>(raid5_conf_t *conf, struct stripe_head *sh, struct stripe_head_state *s, int disks) { struct r5dev *dev = NULL; set_bit(STRIPE_HANDLE, &sh->state); switch (sh->check_state) { case check_state_idle: /* start a new check operation if there are no failures */ if (s->failed == 0) { BUG_ON(s->uptodate != disks); sh->check_state = check_state_run; set_bit(STRIPE_OP_CHECK, &s->ops_request); clear_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags); s->uptodate break; } dev = &sh->dev[s->failed_num]; /* fall through */ case <API key>: sh->check_state = check_state_idle; if (!dev) dev = &sh->dev[sh->pd_idx]; /* check that a write has not made the stripe insync */ if (test_bit(STRIPE_INSYNC, &sh->state)) break; /* either failed parity check, or recovery is happening */ BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); BUG_ON(s->uptodate != disks); set_bit(R5_LOCKED, &dev->flags); s->locked++; set_bit(R5_Wantwrite, &dev->flags); clear_bit(STRIPE_DEGRADED, &sh->state); set_bit(STRIPE_INSYNC, &sh->state); break; case check_state_run: break; /* we will be called again upon completion */ case <API key>: sh->check_state = check_state_idle; /* if a failure occurred during the check operation, leave * STRIPE_INSYNC not set and let the stripe be handled again */ if (s->failed) break; /* handle a successful check operation, if parity is correct * we are done. Otherwise update the mismatch count and repair * parity if !MD_RECOVERY_CHECK */ if ((sh->ops.zero_sum_result & SUM_CHECK_P_RESULT) == 0) /* parity is correct (on disc, * not in buffer any more) */ set_bit(STRIPE_INSYNC, &sh->state); else { conf->mddev->resync_mismatches += STRIPE_SECTORS; if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) /* don't try to repair!! */ set_bit(STRIPE_INSYNC, &sh->state); else { sh->check_state = <API key>; set_bit(STRIPE_COMPUTE_RUN, &sh->state); set_bit(<API key>, &s->ops_request); set_bit(R5_Wantcompute, &sh->dev[sh->pd_idx].flags); sh->ops.target = sh->pd_idx; sh->ops.target2 = -1; s->uptodate++; } } break; case <API key>: break; default: printk(KERN_ERR "%s: unknown check_state: %d sector: %llu\n", __func__, sh->check_state, (unsigned long long) sh->sector); BUG(); } } static void <API key>(raid5_conf_t *conf, struct stripe_head *sh, struct stripe_head_state *s, struct r6_state *r6s, int disks) { int pd_idx = sh->pd_idx; int qd_idx = sh->qd_idx; struct r5dev *dev; set_bit(STRIPE_HANDLE, &sh->state); BUG_ON(s->failed > 2); /* Want to check and possibly repair P and Q. * However there could be one 'failed' device, in which * case we can only check one of them, possibly using the * other to generate missing data */ switch (sh->check_state) { case check_state_idle: /* start a new check operation if there are < 2 failures */ if (s->failed == r6s->q_failed) { /* The only possible failed device holds Q, so it * makes sense to check P (If anything else were failed, * we would have used P to recreate it). */ sh->check_state = check_state_run; } if (!r6s->q_failed && s->failed < 2) { /* Q is not failed, and we didn't use it to generate * anything, so it makes sense to check it */ if (sh->check_state == check_state_run) sh->check_state = check_state_run_pq; else sh->check_state = check_state_run_q; } /* discard potentially stale zero_sum_result */ sh->ops.zero_sum_result = 0; if (sh->check_state == check_state_run) { /* async_xor_zero_sum destroys the contents of P */ clear_bit(R5_UPTODATE, &sh->dev[pd_idx].flags); s->uptodate } if (sh->check_state >= check_state_run && sh->check_state <= check_state_run_pq) { /* <API key> preserves P and Q, so * no need to mark them !uptodate here */ set_bit(STRIPE_OP_CHECK, &s->ops_request); break; } /* we have 2-disk failure */ BUG_ON(s->failed != 2); /* fall through */ case <API key>: sh->check_state = check_state_idle; /* check that a write has not made the stripe insync */ if (test_bit(STRIPE_INSYNC, &sh->state)) break; /* now write out any block on a failed drive, * or P or Q if they were recomputed */ BUG_ON(s->uptodate < disks - 1); /* We don't need Q to recover */ if (s->failed == 2) { dev = &sh->dev[r6s->failed_num[1]]; s->locked++; set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantwrite, &dev->flags); } if (s->failed >= 1) { dev = &sh->dev[r6s->failed_num[0]]; s->locked++; set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantwrite, &dev->flags); } if (sh->ops.zero_sum_result & SUM_CHECK_P_RESULT) { dev = &sh->dev[pd_idx]; s->locked++; set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantwrite, &dev->flags); } if (sh->ops.zero_sum_result & SUM_CHECK_Q_RESULT) { dev = &sh->dev[qd_idx]; s->locked++; set_bit(R5_LOCKED, &dev->flags); set_bit(R5_Wantwrite, &dev->flags); } clear_bit(STRIPE_DEGRADED, &sh->state); set_bit(STRIPE_INSYNC, &sh->state); break; case check_state_run: case check_state_run_q: case check_state_run_pq: break; /* we will be called again upon completion */ case <API key>: sh->check_state = check_state_idle; /* handle a successful check operation, if parity is correct * we are done. Otherwise update the mismatch count and repair * parity if !MD_RECOVERY_CHECK */ if (sh->ops.zero_sum_result == 0) { /* both parities are correct */ if (!s->failed) set_bit(STRIPE_INSYNC, &sh->state); else { /* in contrast to the raid5 case we can validate * parity, but still have a failure to write * back */ sh->check_state = <API key>; /* Returning at this point means that we may go * off and bring p and/or q uptodate again so * we make sure to check zero_sum_result again * to verify if p or q need writeback */ } } else { conf->mddev->resync_mismatches += STRIPE_SECTORS; if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) /* don't try to repair!! */ set_bit(STRIPE_INSYNC, &sh->state); else { int *target = &sh->ops.target; sh->ops.target = -1; sh->ops.target2 = -1; sh->check_state = <API key>; set_bit(STRIPE_COMPUTE_RUN, &sh->state); set_bit(<API key>, &s->ops_request); if (sh->ops.zero_sum_result & SUM_CHECK_P_RESULT) { set_bit(R5_Wantcompute, &sh->dev[pd_idx].flags); *target = pd_idx; target = &sh->ops.target2; s->uptodate++; } if (sh->ops.zero_sum_result & SUM_CHECK_Q_RESULT) { set_bit(R5_Wantcompute, &sh->dev[qd_idx].flags); *target = qd_idx; s->uptodate++; } } } break; case <API key>: break; default: printk(KERN_ERR "%s: unknown check_state: %d sector: %llu\n", __func__, sh->check_state, (unsigned long long) sh->sector); BUG(); } } static void <API key>(raid5_conf_t *conf, struct stripe_head *sh, struct r6_state *r6s) { int i; /* We have read all the blocks in this stripe and now we need to * copy some of them into a target stripe for expand. */ struct <API key> *tx = NULL; clear_bit(<API key>, &sh->state); for (i = 0; i < sh->disks; i++) if (i != sh->pd_idx && i != sh->qd_idx) { int dd_idx, j; struct stripe_head *sh2; struct async_submit_ctl submit; sector_t bn = compute_blocknr(sh, i, 1); sector_t s = <API key>(conf, bn, 0, &dd_idx, NULL); sh2 = get_active_stripe(conf, s, 0, 1, 1); if (sh2 == NULL) /* so far only the early blocks of this stripe * have been requested. When later blocks * get requested, we will try again */ continue; if (!test_bit(STRIPE_EXPANDING, &sh2->state) || test_bit(R5_Expanded, &sh2->dev[dd_idx].flags)) { /* must have already done this block */ release_stripe(sh2); continue; } /* place all the copies on one channel */ init_async_submit(&submit, 0, tx, NULL, NULL, NULL); tx = async_memcpy(sh2->dev[dd_idx].page, sh->dev[i].page, 0, 0, STRIPE_SIZE, &submit); set_bit(R5_Expanded, &sh2->dev[dd_idx].flags); set_bit(R5_UPTODATE, &sh2->dev[dd_idx].flags); for (j = 0; j < conf->raid_disks; j++) if (j != sh2->pd_idx && (!r6s || j != sh2->qd_idx) && !test_bit(R5_Expanded, &sh2->dev[j].flags)) break; if (j == conf->raid_disks) { set_bit(STRIPE_EXPAND_READY, &sh2->state); set_bit(STRIPE_HANDLE, &sh2->state); } release_stripe(sh2); } /* done submitting copies, wait for them to complete */ if (tx) { async_tx_ack(tx); <API key>(tx); } } /* * handle_stripe - do things to a stripe. * * We lock the stripe and then examine the state of various bits * to see what needs to be done. * Possible results: * return some read request which now have data * return some write requests which are safely on disc * schedule a read on some buffers * schedule a write of some buffers * return confirmation of parity correctness * * buffers are taken off read_list or write_list, and bh_cache buffers * get BH_Lock set before the stripe lock is released. * */ static void handle_stripe5(struct stripe_head *sh) { raid5_conf_t *conf = sh->raid_conf; int disks = sh->disks, i; struct bio *return_bi = NULL; struct stripe_head_state s; struct r5dev *dev; mdk_rdev_t *blocked_rdev = NULL; int prexor; int dec_preread_active = 0; memset(&s, 0, sizeof(s)); pr_debug("handling stripe %llu, state=%#lx cnt=%d, pd_idx=%d check:%d " "reconstruct:%d\n", (unsigned long long)sh->sector, sh->state, atomic_read(&sh->count), sh->pd_idx, sh->check_state, sh->reconstruct_state); spin_lock(&sh->lock); clear_bit(STRIPE_HANDLE, &sh->state); clear_bit(STRIPE_DELAYED, &sh->state); s.syncing = test_bit(STRIPE_SYNCING, &sh->state); s.expanding = test_bit(<API key>, &sh->state); s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); /* Now to look around and see what can be done */ rcu_read_lock(); for (i=disks; i mdk_rdev_t *rdev; dev = &sh->dev[i]; pr_debug("check %d: state 0x%lx toread %p read %p write %p " "written %p\n", i, dev->flags, dev->toread, dev->read, dev->towrite, dev->written); /* maybe we can request a biofill operation * * new wantfill requests are only permitted while * <API key> is guaranteed to be inactive */ if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) set_bit(R5_Wantfill, &dev->flags); /* now count some things */ if (test_bit(R5_LOCKED, &dev->flags)) s.locked++; if (test_bit(R5_UPTODATE, &dev->flags)) s.uptodate++; if (test_bit(R5_Wantcompute, &dev->flags)) s.compute++; if (test_bit(R5_Wantfill, &dev->flags)) s.to_fill++; else if (dev->toread) s.to_read++; if (dev->towrite) { s.to_write++; if (!test_bit(R5_OVERWRITE, &dev->flags)) s.non_overwrite++; } if (dev->written) s.written++; rdev = rcu_dereference(conf->disks[i].rdev); if (blocked_rdev == NULL && rdev && unlikely(test_bit(Blocked, &rdev->flags))) { blocked_rdev = rdev; atomic_inc(&rdev->nr_pending); } clear_bit(R5_Insync, &dev->flags); if (!rdev) /* Not in-sync */; else if (test_bit(In_sync, &rdev->flags)) set_bit(R5_Insync, &dev->flags); else { /* could be in-sync depending on recovery/reshape status */ if (sh->sector + STRIPE_SECTORS <= rdev->recovery_offset) set_bit(R5_Insync, &dev->flags); } if (!test_bit(R5_Insync, &dev->flags)) { /* The ReadError flag will just be confusing now */ clear_bit(R5_ReadError, &dev->flags); clear_bit(R5_ReWrite, &dev->flags); } if (test_bit(R5_ReadError, &dev->flags)) clear_bit(R5_Insync, &dev->flags); if (!test_bit(R5_Insync, &dev->flags)) { s.failed++; s.failed_num = i; } } rcu_read_unlock(); if (unlikely(blocked_rdev)) { if (s.syncing || s.expanding || s.expanded || s.to_write || s.written) { set_bit(STRIPE_HANDLE, &sh->state); goto unlock; } /* There is nothing for the blocked_rdev to block */ rdev_dec_pending(blocked_rdev, conf->mddev); blocked_rdev = NULL; } if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { set_bit(STRIPE_OP_BIOFILL, &s.ops_request); set_bit(STRIPE_BIOFILL_RUN, &sh->state); } pr_debug("locked=%d uptodate=%d to_read=%d" " to_write=%d failed=%d failed_num=%d\n", s.locked, s.uptodate, s.to_read, s.to_write, s.failed, s.failed_num); /* check if the array has lost two devices and, if so, some requests might * need to be failed */ if (s.failed > 1 && s.to_read+s.to_write+s.written) <API key>(conf, sh, &s, disks, &return_bi); if (s.failed > 1 && s.syncing) { md_done_sync(conf->mddev, STRIPE_SECTORS,0); clear_bit(STRIPE_SYNCING, &sh->state); s.syncing = 0; } /* might be able to return some write requests if the parity block * is safe, or on a failed drive */ dev = &sh->dev[sh->pd_idx]; if ( s.written && ((test_bit(R5_Insync, &dev->flags) && !test_bit(R5_LOCKED, &dev->flags) && test_bit(R5_UPTODATE, &dev->flags)) || (s.failed == 1 && s.failed_num == sh->pd_idx))) <API key>(conf, sh, disks, &return_bi); /* Now we might consider reading some blocks, either to check/generate * parity, or to satisfy requests * or to load a block that is being partially written. */ if (s.to_read || s.non_overwrite || (s.syncing && (s.uptodate + s.compute < disks)) || s.expanding) handle_stripe_fill5(sh, &s, disks); /* Now we check to see if any write operations have recently * completed */ prexor = 0; if (sh->reconstruct_state == <API key>) prexor = 1; if (sh->reconstruct_state == <API key> || sh->reconstruct_state == <API key>) { sh->reconstruct_state = <API key>; /* All the 'written' buffers and the parity block are ready to * be written back to disk */ BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags)); for (i = disks; i dev = &sh->dev[i]; if (test_bit(R5_LOCKED, &dev->flags) && (i == sh->pd_idx || dev->written)) { pr_debug("Writing block %d\n", i); set_bit(R5_Wantwrite, &dev->flags); if (prexor) continue; if (!test_bit(R5_Insync, &dev->flags) || (i == sh->pd_idx && s.failed == 0)) set_bit(STRIPE_INSYNC, &sh->state); } } if (test_and_clear_bit(<API key>, &sh->state)) dec_preread_active = 1; } /* Now to consider new write requests and what else, if anything * should be read. We do not handle new writes when: * 1/ A 'write' operation (copy+xor) is already in flight. * 2/ A 'check' operation is in flight, as it may clobber the parity * block. */ if (s.to_write && !sh->reconstruct_state && !sh->check_state) <API key>(conf, sh, &s, disks); /* maybe we need to check and possibly fix the parity for this stripe * Any reads will already have been scheduled, so we just see if enough * data is available. The parity check is held off while parity * dependent operations are in flight. */ if (sh->check_state || (s.syncing && s.locked == 0 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !test_bit(STRIPE_INSYNC, &sh->state))) <API key>(conf, sh, &s, disks); if (s.syncing && s.locked == 0 && test_bit(STRIPE_INSYNC, &sh->state)) { md_done_sync(conf->mddev, STRIPE_SECTORS,1); clear_bit(STRIPE_SYNCING, &sh->state); } /* If the failed drive is just a ReadError, then we might need to progress * the repair/check process */ if (s.failed == 1 && !conf->mddev->ro && test_bit(R5_ReadError, &sh->dev[s.failed_num].flags) && !test_bit(R5_LOCKED, &sh->dev[s.failed_num].flags) && test_bit(R5_UPTODATE, &sh->dev[s.failed_num].flags) ) { dev = &sh->dev[s.failed_num]; if (!test_bit(R5_ReWrite, &dev->flags)) { set_bit(R5_Wantwrite, &dev->flags); set_bit(R5_ReWrite, &dev->flags); set_bit(R5_LOCKED, &dev->flags); s.locked++; } else { /* let's read it back */ set_bit(R5_Wantread, &dev->flags); set_bit(R5_LOCKED, &dev->flags); s.locked++; } } /* Finish reconstruct operations initiated by the expansion process */ if (sh->reconstruct_state == <API key>) { struct stripe_head *sh2 = get_active_stripe(conf, sh->sector, 1, 1, 1); if (sh2 && test_bit(<API key>, &sh2->state)) { /* sh cannot be written until sh2 has been read. * so arrange for sh to be delayed a little */ set_bit(STRIPE_DELAYED, &sh->state); set_bit(STRIPE_HANDLE, &sh->state); if (!test_and_set_bit(<API key>, &sh2->state)) atomic_inc(&conf-><API key>); release_stripe(sh2); goto unlock; } if (sh2) release_stripe(sh2); sh->reconstruct_state = <API key>; clear_bit(STRIPE_EXPANDING, &sh->state); for (i = conf->raid_disks; i set_bit(R5_Wantwrite, &sh->dev[i].flags); set_bit(R5_LOCKED, &sh->dev[i].flags); s.locked++; } } if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && !sh->reconstruct_state) { /* Need to write out all blocks after computing parity */ sh->disks = conf->raid_disks; stripe_set_idx(sh->sector, conf, 0, sh); <API key>(sh, &s, 1, 1); } else if (s.expanded && !sh->reconstruct_state && s.locked == 0) { clear_bit(STRIPE_EXPAND_READY, &sh->state); atomic_dec(&conf->reshape_stripes); wake_up(&conf->wait_for_overlap); md_done_sync(conf->mddev, STRIPE_SECTORS, 1); } if (s.expanding && s.locked == 0 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) <API key>(conf, sh, NULL); unlock: spin_unlock(&sh->lock); /* wait for this device to become unblocked */ if (unlikely(blocked_rdev)) <API key>(blocked_rdev, conf->mddev); if (s.ops_request) raid_run_ops(sh, s.ops_request); ops_run_io(sh, &s); if (dec_preread_active) { /* We delay this until after ops_run_io so that if make_request * is waiting on a flush, it won't continue until the writes * have actually been submitted. */ atomic_dec(&conf-><API key>); if (atomic_read(&conf-><API key>) < IO_THRESHOLD) md_wakeup_thread(conf->mddev->thread); } return_io(return_bi); } static void handle_stripe6(struct stripe_head *sh) { raid5_conf_t *conf = sh->raid_conf; int disks = sh->disks; struct bio *return_bi = NULL; int i, pd_idx = sh->pd_idx, qd_idx = sh->qd_idx; struct stripe_head_state s; struct r6_state r6s; struct r5dev *dev, *pdev, *qdev; mdk_rdev_t *blocked_rdev = NULL; int dec_preread_active = 0; pr_debug("handling stripe %llu, state=%#lx cnt=%d, " "pd_idx=%d, qd_idx=%d\n, check:%d, reconstruct:%d\n", (unsigned long long)sh->sector, sh->state, atomic_read(&sh->count), pd_idx, qd_idx, sh->check_state, sh->reconstruct_state); memset(&s, 0, sizeof(s)); spin_lock(&sh->lock); clear_bit(STRIPE_HANDLE, &sh->state); clear_bit(STRIPE_DELAYED, &sh->state); s.syncing = test_bit(STRIPE_SYNCING, &sh->state); s.expanding = test_bit(<API key>, &sh->state); s.expanded = test_bit(STRIPE_EXPAND_READY, &sh->state); /* Now to look around and see what can be done */ rcu_read_lock(); for (i=disks; i mdk_rdev_t *rdev; dev = &sh->dev[i]; pr_debug("check %d: state 0x%lx read %p write %p written %p\n", i, dev->flags, dev->toread, dev->towrite, dev->written); /* maybe we can reply to a read * * new wantfill requests are only permitted while * <API key> is guaranteed to be inactive */ if (test_bit(R5_UPTODATE, &dev->flags) && dev->toread && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) set_bit(R5_Wantfill, &dev->flags); /* now count some things */ if (test_bit(R5_LOCKED, &dev->flags)) s.locked++; if (test_bit(R5_UPTODATE, &dev->flags)) s.uptodate++; if (test_bit(R5_Wantcompute, &dev->flags)) { s.compute++; BUG_ON(s.compute > 2); } if (test_bit(R5_Wantfill, &dev->flags)) { s.to_fill++; } else if (dev->toread) s.to_read++; if (dev->towrite) { s.to_write++; if (!test_bit(R5_OVERWRITE, &dev->flags)) s.non_overwrite++; } if (dev->written) s.written++; rdev = rcu_dereference(conf->disks[i].rdev); if (blocked_rdev == NULL && rdev && unlikely(test_bit(Blocked, &rdev->flags))) { blocked_rdev = rdev; atomic_inc(&rdev->nr_pending); } clear_bit(R5_Insync, &dev->flags); if (!rdev) /* Not in-sync */; else if (test_bit(In_sync, &rdev->flags)) set_bit(R5_Insync, &dev->flags); else { /* in sync if before recovery_offset */ if (sh->sector + STRIPE_SECTORS <= rdev->recovery_offset) set_bit(R5_Insync, &dev->flags); } if (!test_bit(R5_Insync, &dev->flags)) { /* The ReadError flag will just be confusing now */ clear_bit(R5_ReadError, &dev->flags); clear_bit(R5_ReWrite, &dev->flags); } if (test_bit(R5_ReadError, &dev->flags)) clear_bit(R5_Insync, &dev->flags); if (!test_bit(R5_Insync, &dev->flags)) { if (s.failed < 2) r6s.failed_num[s.failed] = i; s.failed++; } } rcu_read_unlock(); if (unlikely(blocked_rdev)) { if (s.syncing || s.expanding || s.expanded || s.to_write || s.written) { set_bit(STRIPE_HANDLE, &sh->state); goto unlock; } /* There is nothing for the blocked_rdev to block */ rdev_dec_pending(blocked_rdev, conf->mddev); blocked_rdev = NULL; } if (s.to_fill && !test_bit(STRIPE_BIOFILL_RUN, &sh->state)) { set_bit(STRIPE_OP_BIOFILL, &s.ops_request); set_bit(STRIPE_BIOFILL_RUN, &sh->state); } pr_debug("locked=%d uptodate=%d to_read=%d" " to_write=%d failed=%d failed_num=%d,%d\n", s.locked, s.uptodate, s.to_read, s.to_write, s.failed, r6s.failed_num[0], r6s.failed_num[1]); /* check if the array has lost >2 devices and, if so, some requests * might need to be failed */ if (s.failed > 2 && s.to_read+s.to_write+s.written) <API key>(conf, sh, &s, disks, &return_bi); if (s.failed > 2 && s.syncing) { md_done_sync(conf->mddev, STRIPE_SECTORS,0); clear_bit(STRIPE_SYNCING, &sh->state); s.syncing = 0; } /* * might be able to return some write requests if the parity blocks * are safe, or on a failed drive */ pdev = &sh->dev[pd_idx]; r6s.p_failed = (s.failed >= 1 && r6s.failed_num[0] == pd_idx) || (s.failed >= 2 && r6s.failed_num[1] == pd_idx); qdev = &sh->dev[qd_idx]; r6s.q_failed = (s.failed >= 1 && r6s.failed_num[0] == qd_idx) || (s.failed >= 2 && r6s.failed_num[1] == qd_idx); if ( s.written && ( r6s.p_failed || ((test_bit(R5_Insync, &pdev->flags) && !test_bit(R5_LOCKED, &pdev->flags) && test_bit(R5_UPTODATE, &pdev->flags)))) && ( r6s.q_failed || ((test_bit(R5_Insync, &qdev->flags) && !test_bit(R5_LOCKED, &qdev->flags) && test_bit(R5_UPTODATE, &qdev->flags))))) <API key>(conf, sh, disks, &return_bi); /* Now we might consider reading some blocks, either to check/generate * parity, or to satisfy requests * or to load a block that is being partially written. */ if (s.to_read || s.non_overwrite || (s.to_write && s.failed) || (s.syncing && (s.uptodate + s.compute < disks)) || s.expanding) handle_stripe_fill6(sh, &s, &r6s, disks); /* Now we check to see if any write operations have recently * completed */ if (sh->reconstruct_state == <API key>) { int qd_idx = sh->qd_idx; sh->reconstruct_state = <API key>; /* All the 'written' buffers and the parity blocks are ready to * be written back to disk */ BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[sh->pd_idx].flags)); BUG_ON(!test_bit(R5_UPTODATE, &sh->dev[qd_idx].flags)); for (i = disks; i dev = &sh->dev[i]; if (test_bit(R5_LOCKED, &dev->flags) && (i == sh->pd_idx || i == qd_idx || dev->written)) { pr_debug("Writing block %d\n", i); BUG_ON(!test_bit(R5_UPTODATE, &dev->flags)); set_bit(R5_Wantwrite, &dev->flags); if (!test_bit(R5_Insync, &dev->flags) || ((i == sh->pd_idx || i == qd_idx) && s.failed == 0)) set_bit(STRIPE_INSYNC, &sh->state); } } if (test_and_clear_bit(<API key>, &sh->state)) dec_preread_active = 1; } /* Now to consider new write requests and what else, if anything * should be read. We do not handle new writes when: * 1/ A 'write' operation (copy+gen_syndrome) is already in flight. * 2/ A 'check' operation is in flight, as it may clobber the parity * block. */ if (s.to_write && !sh->reconstruct_state && !sh->check_state) <API key>(conf, sh, &s, &r6s, disks); /* maybe we need to check and possibly fix the parity for this stripe * Any reads will already have been scheduled, so we just see if enough * data is available. The parity check is held off while parity * dependent operations are in flight. */ if (sh->check_state || (s.syncing && s.locked == 0 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state) && !test_bit(STRIPE_INSYNC, &sh->state))) <API key>(conf, sh, &s, &r6s, disks); if (s.syncing && s.locked == 0 && test_bit(STRIPE_INSYNC, &sh->state)) { md_done_sync(conf->mddev, STRIPE_SECTORS,1); clear_bit(STRIPE_SYNCING, &sh->state); } /* If the failed drives are just a ReadError, then we might need * to progress the repair/check process */ if (s.failed <= 2 && !conf->mddev->ro) for (i = 0; i < s.failed; i++) { dev = &sh->dev[r6s.failed_num[i]]; if (test_bit(R5_ReadError, &dev->flags) && !test_bit(R5_LOCKED, &dev->flags) && test_bit(R5_UPTODATE, &dev->flags) ) { if (!test_bit(R5_ReWrite, &dev->flags)) { set_bit(R5_Wantwrite, &dev->flags); set_bit(R5_ReWrite, &dev->flags); set_bit(R5_LOCKED, &dev->flags); s.locked++; } else { /* let's read it back */ set_bit(R5_Wantread, &dev->flags); set_bit(R5_LOCKED, &dev->flags); s.locked++; } } } /* Finish reconstruct operations initiated by the expansion process */ if (sh->reconstruct_state == <API key>) { sh->reconstruct_state = <API key>; clear_bit(STRIPE_EXPANDING, &sh->state); for (i = conf->raid_disks; i set_bit(R5_Wantwrite, &sh->dev[i].flags); set_bit(R5_LOCKED, &sh->dev[i].flags); s.locked++; } } if (s.expanded && test_bit(STRIPE_EXPANDING, &sh->state) && !sh->reconstruct_state) { struct stripe_head *sh2 = get_active_stripe(conf, sh->sector, 1, 1, 1); if (sh2 && test_bit(<API key>, &sh2->state)) { /* sh cannot be written until sh2 has been read. * so arrange for sh to be delayed a little */ set_bit(STRIPE_DELAYED, &sh->state); set_bit(STRIPE_HANDLE, &sh->state); if (!test_and_set_bit(<API key>, &sh2->state)) atomic_inc(&conf-><API key>); release_stripe(sh2); goto unlock; } if (sh2) release_stripe(sh2); /* Need to write out all blocks after computing P&Q */ sh->disks = conf->raid_disks; stripe_set_idx(sh->sector, conf, 0, sh); <API key>(sh, &s, 1, 1); } else if (s.expanded && !sh->reconstruct_state && s.locked == 0) { clear_bit(STRIPE_EXPAND_READY, &sh->state); atomic_dec(&conf->reshape_stripes); wake_up(&conf->wait_for_overlap); md_done_sync(conf->mddev, STRIPE_SECTORS, 1); } if (s.expanding && s.locked == 0 && !test_bit(STRIPE_COMPUTE_RUN, &sh->state)) <API key>(conf, sh, &r6s); unlock: spin_unlock(&sh->lock); /* wait for this device to become unblocked */ if (unlikely(blocked_rdev)) <API key>(blocked_rdev, conf->mddev); if (s.ops_request) raid_run_ops(sh, s.ops_request); ops_run_io(sh, &s); if (dec_preread_active) { /* We delay this until after ops_run_io so that if make_request * is waiting on a flush, it won't continue until the writes * have actually been submitted. */ atomic_dec(&conf-><API key>); if (atomic_read(&conf-><API key>) < IO_THRESHOLD) md_wakeup_thread(conf->mddev->thread); } return_io(return_bi); } static void handle_stripe(struct stripe_head *sh) { if (sh->raid_conf->level == 6) handle_stripe6(sh); else handle_stripe5(sh); } static void <API key>(raid5_conf_t *conf) { if (atomic_read(&conf-><API key>) < IO_THRESHOLD) { while (!list_empty(&conf->delayed_list)) { struct list_head *l = conf->delayed_list.next; struct stripe_head *sh; sh = list_entry(l, struct stripe_head, lru); list_del_init(l); clear_bit(STRIPE_DELAYED, &sh->state); if (!test_and_set_bit(<API key>, &sh->state)) atomic_inc(&conf-><API key>); list_add_tail(&sh->lru, &conf->hold_list); } } else plugger_set_plug(&conf->plug); } static void activate_bit_delay(raid5_conf_t *conf) { /* device_lock is held */ struct list_head head; list_add(&head, &conf->bitmap_list); list_del_init(&conf->bitmap_list); while (!list_empty(&head)) { struct stripe_head *sh = list_entry(head.next, struct stripe_head, lru); list_del_init(&sh->lru); atomic_inc(&sh->count); __release_stripe(conf, sh); } } static void unplug_slaves(mddev_t *mddev) { raid5_conf_t *conf = mddev->private; int i; int devs = max(conf->raid_disks, conf->previous_raid_disks); rcu_read_lock(); for (i = 0; i < devs; i++) { mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev); if (rdev && !test_bit(Faulty, &rdev->flags) && atomic_read(&rdev->nr_pending)) { struct request_queue *r_queue = bdev_get_queue(rdev->bdev); atomic_inc(&rdev->nr_pending); rcu_read_unlock(); blk_unplug(r_queue); rdev_dec_pending(rdev, mddev); rcu_read_lock(); } } rcu_read_unlock(); } void <API key>(raid5_conf_t *conf) { unsigned long flags; spin_lock_irqsave(&conf->device_lock, flags); if (plugger_remove_plug(&conf->plug)) { conf->seq_flush++; <API key>(conf); } md_wakeup_thread(conf->mddev->thread); <API key>(&conf->device_lock, flags); unplug_slaves(conf->mddev); } EXPORT_SYMBOL_GPL(<API key>); static void raid5_unplug(struct plug_handle *plug) { raid5_conf_t *conf = container_of(plug, raid5_conf_t, plug); <API key>(conf); } static void raid5_unplug_queue(struct request_queue *q) { mddev_t *mddev = q->queuedata; <API key>(mddev->private); } int md_raid5_congested(mddev_t *mddev, int bits) { raid5_conf_t *conf = mddev->private; /* No difference between reads and writes. Just check * how busy the stripe_cache is */ if (conf->inactive_blocked) return 1; if (conf->quiesce) return 1; if (list_empty_careful(&conf->inactive_list)) return 1; return 0; } EXPORT_SYMBOL_GPL(md_raid5_congested); static int raid5_congested(void *data, int bits) { mddev_t *mddev = data; return mddev_congested(mddev, bits) || md_raid5_congested(mddev, bits); } /* We want read requests to align with chunks where possible, * but write requests don't need to. */ static int <API key>(struct request_queue *q, struct bvec_merge_data *bvm, struct bio_vec *biovec) { mddev_t *mddev = q->queuedata; sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); int max; unsigned int chunk_sectors = mddev->chunk_sectors; unsigned int bio_sectors = bvm->bi_size >> 9; if ((bvm->bi_rw & 1) == WRITE) return biovec->bv_len; /* always allow writes to be mergeable */ if (mddev->new_chunk_sectors < mddev->chunk_sectors) chunk_sectors = mddev->new_chunk_sectors; max = (chunk_sectors - ((sector & (chunk_sectors - 1)) + bio_sectors)) << 9; if (max < 0) max = 0; if (max <= biovec->bv_len && bio_sectors == 0) return biovec->bv_len; else return max; } static int in_chunk_boundary(mddev_t *mddev, struct bio *bio) { sector_t sector = bio->bi_sector + get_start_sect(bio->bi_bdev); unsigned int chunk_sectors = mddev->chunk_sectors; unsigned int bio_sectors = bio->bi_size >> 9; if (mddev->new_chunk_sectors < mddev->chunk_sectors) chunk_sectors = mddev->new_chunk_sectors; return chunk_sectors >= ((sector & (chunk_sectors - 1)) + bio_sectors); } /* * add bio to the retry LIFO ( in O(1) ... we are in interrupt ) * later sampled by raid5d. */ static void add_bio_to_retry(struct bio *bi,raid5_conf_t *conf) { unsigned long flags; spin_lock_irqsave(&conf->device_lock, flags); bi->bi_next = conf-><API key>; conf-><API key> = bi; <API key>(&conf->device_lock, flags); md_wakeup_thread(conf->mddev->thread); } static struct bio *<API key>(raid5_conf_t *conf) { struct bio *bi; bi = conf->retry_read_aligned; if (bi) { conf->retry_read_aligned = NULL; return bi; } bi = conf-><API key>; if(bi) { conf-><API key> = bi->bi_next; bi->bi_next = NULL; /* * this sets the active strip count to 1 and the processed * strip count to zero (upper 8 bits) */ bi->bi_phys_segments = 1; /* biased count of active stripes */ } return bi; } /* * The "raid5_align_endio" should check if the read succeeded and if it * did, call bio_endio on the original bio (having bio_put the new bio * first). * If the read failed.. */ static void raid5_align_endio(struct bio *bi, int error) { struct bio* raid_bi = bi->bi_private; mddev_t *mddev; raid5_conf_t *conf; int uptodate = test_bit(BIO_UPTODATE, &bi->bi_flags); mdk_rdev_t *rdev; bio_put(bi); rdev = (void*)raid_bi->bi_next; raid_bi->bi_next = NULL; mddev = rdev->mddev; conf = mddev->private; rdev_dec_pending(rdev, conf->mddev); if (!error && uptodate) { bio_endio(raid_bi, 0); if (atomic_dec_and_test(&conf-><API key>)) wake_up(&conf->wait_for_stripe); return; } pr_debug("raid5_align_endio : io error...handing IO for a retry\n"); add_bio_to_retry(raid_bi, conf); } static int bio_fits_rdev(struct bio *bi) { struct request_queue *q = bdev_get_queue(bi->bi_bdev); if ((bi->bi_size>>9) > queue_max_sectors(q)) return 0; <API key>(q, bi); if (bi->bi_phys_segments > queue_max_segments(q)) return 0; if (q->merge_bvec_fn) /* it's too hard to apply the merge_bvec_fn at this stage, * just just give up */ return 0; return 1; } static int chunk_aligned_read(mddev_t *mddev, struct bio * raid_bio) { raid5_conf_t *conf = mddev->private; unsigned int dd_idx; struct bio* align_bi; mdk_rdev_t *rdev; if (!in_chunk_boundary(mddev, raid_bio)) { pr_debug("chunk_aligned_read : non aligned\n"); return 0; } /* * use bio_clone_mddev to make a copy of the bio */ align_bi = bio_clone_mddev(raid_bio, GFP_NOIO, mddev); if (!align_bi) return 0; /* * set bi_end_io to a new function, and set bi_private to the * original bio. */ align_bi->bi_end_io = raid5_align_endio; align_bi->bi_private = raid_bio; /* * compute position */ align_bi->bi_sector = <API key>(conf, raid_bio->bi_sector, 0, &dd_idx, NULL); rcu_read_lock(); rdev = rcu_dereference(conf->disks[dd_idx].rdev); if (rdev && test_bit(In_sync, &rdev->flags)) { atomic_inc(&rdev->nr_pending); rcu_read_unlock(); raid_bio->bi_next = (void*)rdev; align_bi->bi_bdev = rdev->bdev; align_bi->bi_flags &= ~(1 << BIO_SEG_VALID); align_bi->bi_sector += rdev->data_offset; if (!bio_fits_rdev(align_bi)) { /* too big in some way */ bio_put(align_bi); rdev_dec_pending(rdev, mddev); return 0; } spin_lock_irq(&conf->device_lock); wait_event_lock_irq(conf->wait_for_stripe, conf->quiesce == 0, conf->device_lock, /* nothing */); atomic_inc(&conf-><API key>); spin_unlock_irq(&conf->device_lock); <API key>(align_bi); return 1; } else { rcu_read_unlock(); bio_put(align_bi); return 0; } } /* <API key> - get the next stripe to process * * Full stripe writes are allowed to pass preread active stripes up until * the bypass_threshold is exceeded. In general the bypass_count * increments when the handle_list is handled before the hold_list; however, it * will not be incremented when STRIPE_IO_STARTED is sampled set signifying a * stripe with in flight i/o. The bypass_count will be reset when the * head of the hold_list has changed, i.e. the head was promoted to the * handle_list. */ static struct stripe_head *<API key>(raid5_conf_t *conf) { struct stripe_head *sh; pr_debug("%s: handle: %s hold: %s full_writes: %d bypass_count: %d\n", __func__, list_empty(&conf->handle_list) ? "empty" : "busy", list_empty(&conf->hold_list) ? "empty" : "busy", atomic_read(&conf->pending_full_writes), conf->bypass_count); if (!list_empty(&conf->handle_list)) { sh = list_entry(conf->handle_list.next, typeof(*sh), lru); if (list_empty(&conf->hold_list)) conf->bypass_count = 0; else if (!test_bit(STRIPE_IO_STARTED, &sh->state)) { if (conf->hold_list.next == conf->last_hold) conf->bypass_count++; else { conf->last_hold = conf->hold_list.next; conf->bypass_count -= conf->bypass_threshold; if (conf->bypass_count < 0) conf->bypass_count = 0; } } } else if (!list_empty(&conf->hold_list) && ((conf->bypass_threshold && conf->bypass_count > conf->bypass_threshold) || atomic_read(&conf->pending_full_writes) == 0)) { sh = list_entry(conf->hold_list.next, typeof(*sh), lru); conf->bypass_count -= conf->bypass_threshold; if (conf->bypass_count < 0) conf->bypass_count = 0; } else return NULL; list_del_init(&sh->lru); atomic_inc(&sh->count); BUG_ON(atomic_read(&sh->count) != 1); return sh; } static int make_request(mddev_t *mddev, struct bio * bi) { raid5_conf_t *conf = mddev->private; int dd_idx; sector_t new_sector; sector_t logical_sector, last_sector; struct stripe_head *sh; const int rw = bio_data_dir(bi); int remaining; if (unlikely(bi->bi_rw & BIO_FLUSH)) { md_flush_request(mddev, bi); return 0; } md_write_start(mddev, bi); if (rw == READ && mddev->reshape_position == MaxSector && chunk_aligned_read(mddev,bi)) return 0; logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); last_sector = bi->bi_sector + (bi->bi_size>>9); bi->bi_next = NULL; bi->bi_phys_segments = 1; /* over-loaded to count active stripes */ for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) { DEFINE_WAIT(w); int disks, data_disks; int previous; retry: previous = 0; disks = conf->raid_disks; prepare_to_wait(&conf->wait_for_overlap, &w, <API key>); if (unlikely(conf->reshape_progress != MaxSector)) { /* spinlock is needed as reshape_progress may be * 64bit on a 32bit platform, and so it might be * possible to see a half-updated value * Ofcourse reshape_progress could change after * the lock is dropped, so once we get a reference * to the stripe that we think it is, we will have * to check again. */ spin_lock_irq(&conf->device_lock); if (mddev->delta_disks < 0 ? logical_sector < conf->reshape_progress : logical_sector >= conf->reshape_progress) { disks = conf->previous_raid_disks; previous = 1; } else { if (mddev->delta_disks < 0 ? logical_sector < conf->reshape_safe : logical_sector >= conf->reshape_safe) { spin_unlock_irq(&conf->device_lock); schedule(); goto retry; } } spin_unlock_irq(&conf->device_lock); } data_disks = disks - conf->max_degraded; new_sector = <API key>(conf, logical_sector, previous, &dd_idx, NULL); pr_debug("raid456: make_request, sector %llu logical %llu\n", (unsigned long long)new_sector, (unsigned long long)logical_sector); sh = get_active_stripe(conf, new_sector, previous, (bi->bi_rw&RWA_MASK), 0); if (sh) { if (unlikely(previous)) { /* expansion might have moved on while waiting for a * stripe, so we must do the range check again. * Expansion could still move past after this * test, but as we are holding a reference to * 'sh', we know that if that happens, * STRIPE_EXPANDING will get set and the expansion * won't proceed until we finish with the stripe. */ int must_retry = 0; spin_lock_irq(&conf->device_lock); if (mddev->delta_disks < 0 ? logical_sector >= conf->reshape_progress : logical_sector < conf->reshape_progress) /* mismatch, need to try again */ must_retry = 1; spin_unlock_irq(&conf->device_lock); if (must_retry) { release_stripe(sh); schedule(); goto retry; } } if (rw == WRITE && logical_sector >= mddev->suspend_lo && logical_sector < mddev->suspend_hi) { release_stripe(sh); /* As the suspend_* range is controlled by * userspace, we want an interruptible * wait. */ flush_signals(current); prepare_to_wait(&conf->wait_for_overlap, &w, TASK_INTERRUPTIBLE); if (logical_sector >= mddev->suspend_lo && logical_sector < mddev->suspend_hi) schedule(); goto retry; } if (test_bit(STRIPE_EXPANDING, &sh->state) || !add_stripe_bio(sh, bi, dd_idx, rw)) { /* Stripe is busy expanding or * add failed due to overlap. Flush everything * and wait a while */ <API key>(conf); release_stripe(sh); schedule(); goto retry; } finish_wait(&conf->wait_for_overlap, &w); set_bit(STRIPE_HANDLE, &sh->state); clear_bit(STRIPE_DELAYED, &sh->state); if (bio_rw_flagged(bi, BIO_RW_SYNCIO) && !test_and_set_bit(<API key>, &sh->state)) atomic_inc(&conf-><API key>); release_stripe(sh); } else { /* cannot get stripe for read-ahead, just give-up */ clear_bit(BIO_UPTODATE, &bi->bi_flags); finish_wait(&conf->wait_for_overlap, &w); break; } } spin_lock_irq(&conf->device_lock); remaining = <API key>(bi); spin_unlock_irq(&conf->device_lock); if (remaining == 0) { if ( rw == WRITE ) md_write_end(mddev); bio_endio(bi, 0); } return 0; } static sector_t raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks); static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped) { /* reshaping is quite different to recovery/resync so it is * handled quite separately ... here. * * On each call to sync_request, we gather one chunk worth of * destination stripes and flag them as expanding. * Then we find all the source stripes and request reads. * As the reads complete, handle_stripe will copy the data * into the destination stripe and release that stripe. */ raid5_conf_t *conf = mddev->private; struct stripe_head *sh; sector_t first_sector, last_sector; int raid_disks = conf->previous_raid_disks; int data_disks = raid_disks - conf->max_degraded; int new_data_disks = conf->raid_disks - conf->max_degraded; int i; int dd_idx; sector_t writepos, readpos, safepos; sector_t stripe_addr; int reshape_sectors; struct list_head stripes; if (sector_nr == 0) { /* If restarting in the middle, skip the initial sectors */ if (mddev->delta_disks < 0 && conf->reshape_progress < raid5_size(mddev, 0, 0)) { sector_nr = raid5_size(mddev, 0, 0) - conf->reshape_progress; } else if (mddev->delta_disks >= 0 && conf->reshape_progress > 0) sector_nr = conf->reshape_progress; sector_div(sector_nr, new_data_disks); if (sector_nr) { mddev-><API key> = sector_nr; sysfs_notify(&mddev->kobj, NULL, "sync_completed"); *skipped = 1; return sector_nr; } } /* We need to process a full chunk at a time. * If old and new chunk sizes differ, we need to process the * largest of these */ if (mddev->new_chunk_sectors > mddev->chunk_sectors) reshape_sectors = mddev->new_chunk_sectors; else reshape_sectors = mddev->chunk_sectors; /* we update the metadata when there is more than 3Meg * in the block range (that is rather arbitrary, should * probably be time based) or when the data about to be * copied would over-write the source of the data at * the front of the range. * i.e. one new_stripe along from reshape_progress new_maps * to after where reshape_safe old_maps to */ writepos = conf->reshape_progress; sector_div(writepos, new_data_disks); readpos = conf->reshape_progress; sector_div(readpos, data_disks); safepos = conf->reshape_safe; sector_div(safepos, data_disks); if (mddev->delta_disks < 0) { writepos -= min_t(sector_t, reshape_sectors, writepos); readpos += reshape_sectors; safepos += reshape_sectors; } else { writepos += reshape_sectors; readpos -= min_t(sector_t, reshape_sectors, readpos); safepos -= min_t(sector_t, reshape_sectors, safepos); } /* 'writepos' is the most advanced device address we might write. * 'readpos' is the least advanced device address we might read. * 'safepos' is the least address recorded in the metadata as having * been reshaped. * If 'readpos' is behind 'writepos', then there is no way that we can * ensure safety in the face of a crash - that must be done by userspace * making a backup of the data. So in that case there is no particular * rush to update metadata. * Otherwise if 'safepos' is behind 'writepos', then we really need to * update the metadata to advance 'safepos' to match 'readpos' so that * we can be safe in the event of a crash. * So we insist on updating metadata if safepos is behind writepos and * readpos is beyond writepos. * In any case, update the metadata every 10 seconds. * Maybe that number should be configurable, but I'm not sure it is * worth it.... maybe it could be a multiple of safemode_delay??? */ if ((mddev->delta_disks < 0 ? (safepos > writepos && readpos < writepos) : (safepos < writepos && readpos > writepos)) || time_after(jiffies, conf->reshape_checkpoint + 10*HZ)) { /* Cannot proceed until we've updated the superblock... */ wait_event(conf->wait_for_overlap, atomic_read(&conf->reshape_stripes)==0); mddev->reshape_position = conf->reshape_progress; mddev-><API key> = sector_nr; conf->reshape_checkpoint = jiffies; set_bit(MD_CHANGE_DEVS, &mddev->flags); md_wakeup_thread(mddev->thread); wait_event(mddev->sb_wait, mddev->flags == 0 || kthread_should_stop()); spin_lock_irq(&conf->device_lock); conf->reshape_safe = mddev->reshape_position; spin_unlock_irq(&conf->device_lock); wake_up(&conf->wait_for_overlap); sysfs_notify(&mddev->kobj, NULL, "sync_completed"); } if (mddev->delta_disks < 0) { BUG_ON(conf->reshape_progress == 0); stripe_addr = writepos; BUG_ON((mddev->dev_sectors & ~((sector_t)reshape_sectors - 1)) - reshape_sectors - stripe_addr != sector_nr); } else { BUG_ON(writepos != sector_nr + reshape_sectors); stripe_addr = sector_nr; } INIT_LIST_HEAD(&stripes); for (i = 0; i < reshape_sectors; i += STRIPE_SECTORS) { int j; int skipped_disk = 0; sh = get_active_stripe(conf, stripe_addr+i, 0, 0, 1); set_bit(STRIPE_EXPANDING, &sh->state); atomic_inc(&conf->reshape_stripes); /* If any of this stripe is beyond the end of the old * array, then we need to zero those blocks */ for (j=sh->disks; j sector_t s; if (j == sh->pd_idx) continue; if (conf->level == 6 && j == sh->qd_idx) continue; s = compute_blocknr(sh, j, 0); if (s < raid5_size(mddev, 0, 0)) { skipped_disk = 1; continue; } memset(page_address(sh->dev[j].page), 0, STRIPE_SIZE); set_bit(R5_Expanded, &sh->dev[j].flags); set_bit(R5_UPTODATE, &sh->dev[j].flags); } if (!skipped_disk) { set_bit(STRIPE_EXPAND_READY, &sh->state); set_bit(STRIPE_HANDLE, &sh->state); } list_add(&sh->lru, &stripes); } spin_lock_irq(&conf->device_lock); if (mddev->delta_disks < 0) conf->reshape_progress -= reshape_sectors * new_data_disks; else conf->reshape_progress += reshape_sectors * new_data_disks; spin_unlock_irq(&conf->device_lock); /* Ok, those stripe are ready. We can start scheduling * reads on the source stripes. * The source stripes are determined by mapping the first and last * block on the destination stripes. */ first_sector = <API key>(conf, stripe_addr*(new_data_disks), 1, &dd_idx, NULL); last_sector = <API key>(conf, ((stripe_addr+reshape_sectors) * new_data_disks - 1), 1, &dd_idx, NULL); if (last_sector >= mddev->dev_sectors) last_sector = mddev->dev_sectors - 1; while (first_sector <= last_sector) { sh = get_active_stripe(conf, first_sector, 1, 0, 1); set_bit(<API key>, &sh->state); set_bit(STRIPE_HANDLE, &sh->state); release_stripe(sh); first_sector += STRIPE_SECTORS; } /* Now that the sources are clearly marked, we can release * the destination stripes */ while (!list_empty(&stripes)) { sh = list_entry(stripes.next, struct stripe_head, lru); list_del_init(&sh->lru); release_stripe(sh); } /* If this takes us to the resync_max point where we have to pause, * then we need to write out the superblock. */ sector_nr += reshape_sectors; if ((sector_nr - mddev-><API key>) * 2 >= mddev->resync_max - mddev-><API key>) { /* Cannot proceed until we've updated the superblock... */ wait_event(conf->wait_for_overlap, atomic_read(&conf->reshape_stripes) == 0); mddev->reshape_position = conf->reshape_progress; mddev-><API key> = sector_nr; conf->reshape_checkpoint = jiffies; set_bit(MD_CHANGE_DEVS, &mddev->flags); md_wakeup_thread(mddev->thread); wait_event(mddev->sb_wait, !test_bit(MD_CHANGE_DEVS, &mddev->flags) || kthread_should_stop()); spin_lock_irq(&conf->device_lock); conf->reshape_safe = mddev->reshape_position; spin_unlock_irq(&conf->device_lock); wake_up(&conf->wait_for_overlap); sysfs_notify(&mddev->kobj, NULL, "sync_completed"); } return reshape_sectors; } /* FIXME go_faster isn't used */ static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) { raid5_conf_t *conf = mddev->private; struct stripe_head *sh; sector_t max_sector = mddev->dev_sectors; sector_t sync_blocks; int still_degraded = 0; int i; if (sector_nr >= max_sector) { /* just being told to finish up .. nothing much to do */ unplug_slaves(mddev); if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) { end_reshape(conf); return 0; } if (mddev->curr_resync < max_sector) /* aborted */ bitmap_end_sync(mddev->bitmap, mddev->curr_resync, &sync_blocks, 1); else /* completed sync */ conf->fullsync = 0; bitmap_close_sync(mddev->bitmap); return 0; } /* Allow raid5_quiesce to complete */ wait_event(conf->wait_for_overlap, conf->quiesce != 2); if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery)) return reshape_request(mddev, sector_nr, skipped); /* No need to check resync_max as we never do more than one * stripe, and as resync_max will always be on a chunk boundary, * if the check in md_do_sync didn't fire, there is no chance * of overstepping resync_max here */ /* if there is too many failed drives and we are trying * to resync, then assert that we are finished, because there is * nothing we can do. */ if (mddev->degraded >= conf->max_degraded && test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { sector_t rv = mddev->dev_sectors - sector_nr; *skipped = 1; return rv; } if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) && !test_bit(<API key>, &mddev->recovery) && !conf->fullsync && sync_blocks >= STRIPE_SECTORS) { /* we can skip this block, and probably more */ sync_blocks /= STRIPE_SECTORS; *skipped = 1; return sync_blocks * STRIPE_SECTORS; /* keep things rounded to whole stripes */ } <API key>(mddev->bitmap, sector_nr); sh = get_active_stripe(conf, sector_nr, 0, 1, 0); if (sh == NULL) { sh = get_active_stripe(conf, sector_nr, 0, 0, 0); /* make sure we don't swamp the stripe cache if someone else * is trying to get access */ <API key>(1); } /* Need to check if array will still be degraded after recovery/resync * We don't need to check the 'failed' flag as when that gets set, * recovery aborts. */ for (i = 0; i < conf->raid_disks; i++) if (conf->disks[i].rdev == NULL) still_degraded = 1; bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, still_degraded); spin_lock(&sh->lock); set_bit(STRIPE_SYNCING, &sh->state); clear_bit(STRIPE_INSYNC, &sh->state); spin_unlock(&sh->lock); handle_stripe(sh); release_stripe(sh); return STRIPE_SECTORS; } static int retry_aligned_read(raid5_conf_t *conf, struct bio *raid_bio) { /* We may not be able to submit a whole bio at once as there * may not be enough stripe_heads available. * We cannot pre-allocate enough stripe_heads as we may need * more than exist in the cache (if we allow ever large chunks). * So we do one stripe head at a time and record in * ->bi_hw_segments how many have been done. * * We *know* that this entire raid_bio is in one chunk, so * it will be only one 'dd_idx' and only need one call to <API key>. */ struct stripe_head *sh; int dd_idx; sector_t sector, logical_sector, last_sector; int scnt = 0; int remaining; int handled = 0; logical_sector = raid_bio->bi_sector & ~((sector_t)STRIPE_SECTORS-1); sector = <API key>(conf, logical_sector, 0, &dd_idx, NULL); last_sector = raid_bio->bi_sector + (raid_bio->bi_size>>9); for (; logical_sector < last_sector; logical_sector += STRIPE_SECTORS, sector += STRIPE_SECTORS, scnt++) { if (scnt < <API key>(raid_bio)) /* already done this stripe */ continue; sh = get_active_stripe(conf, sector, 0, 1, 0); if (!sh) { /* failed to get a stripe - must wait */ <API key>(raid_bio, scnt); conf->retry_read_aligned = raid_bio; return handled; } set_bit(R5_ReadError, &sh->dev[dd_idx].flags); if (!add_stripe_bio(sh, raid_bio, dd_idx, 0)) { release_stripe(sh); <API key>(raid_bio, scnt); conf->retry_read_aligned = raid_bio; return handled; } handle_stripe(sh); release_stripe(sh); handled++; } spin_lock_irq(&conf->device_lock); remaining = <API key>(raid_bio); spin_unlock_irq(&conf->device_lock); if (remaining == 0) bio_endio(raid_bio, 0); if (atomic_dec_and_test(&conf-><API key>)) wake_up(&conf->wait_for_stripe); return handled; } /* * This is our raid5 kernel thread. * * We scan the hash table for stripes which can be handled now. * During the scan, completed stripes are saved for us by the interrupt * handler, so that they will not have to wait for our next wakeup. */ static void raid5d(mddev_t *mddev) { struct stripe_head *sh; raid5_conf_t *conf = mddev->private; int handled; pr_debug("+++ raid5d active\n"); md_check_recovery(mddev); handled = 0; spin_lock_irq(&conf->device_lock); while (1) { struct bio *bio; if (conf->seq_flush != conf->seq_write) { int seq = conf->seq_flush; spin_unlock_irq(&conf->device_lock); bitmap_unplug(mddev->bitmap); spin_lock_irq(&conf->device_lock); conf->seq_write = seq; activate_bit_delay(conf); } while ((bio = <API key>(conf))) { int ok; spin_unlock_irq(&conf->device_lock); ok = retry_aligned_read(conf, bio); spin_lock_irq(&conf->device_lock); if (!ok) break; handled++; } sh = <API key>(conf); if (!sh) break; spin_unlock_irq(&conf->device_lock); handled++; handle_stripe(sh); release_stripe(sh); cond_resched(); spin_lock_irq(&conf->device_lock); } pr_debug("%d stripes handled\n", handled); spin_unlock_irq(&conf->device_lock); <API key>(); unplug_slaves(mddev); pr_debug("--- raid5d inactive\n"); } static ssize_t <API key>(mddev_t *mddev, char *page) { raid5_conf_t *conf = mddev->private; if (conf) return sprintf(page, "%d\n", conf->max_nr_stripes); else return 0; } int <API key>(mddev_t *mddev, int size) { raid5_conf_t *conf = mddev->private; int err; if (size <= 16 || size > 32768) return -EINVAL; while (size < conf->max_nr_stripes) { if (drop_one_stripe(conf)) conf->max_nr_stripes else break; } err = md_allow_write(mddev); if (err) return err; while (size > conf->max_nr_stripes) { if (grow_one_stripe(conf)) conf->max_nr_stripes++; else break; } return 0; } EXPORT_SYMBOL(<API key>); static ssize_t <API key>(mddev_t *mddev, const char *page, size_t len) { raid5_conf_t *conf = mddev->private; unsigned long new; int err; if (len >= PAGE_SIZE) return -EINVAL; if (!conf) return -ENODEV; if (strict_strtoul(page, 10, &new)) return -EINVAL; err = <API key>(mddev, new); if (err) return err; return len; } static struct md_sysfs_entry <API key> = __ATTR(stripe_cache_size, S_IRUGO | S_IWUSR, <API key>, <API key>); static ssize_t <API key>(mddev_t *mddev, char *page) { raid5_conf_t *conf = mddev->private; if (conf) return sprintf(page, "%d\n", conf->bypass_threshold); else return 0; } static ssize_t <API key>(mddev_t *mddev, const char *page, size_t len) { raid5_conf_t *conf = mddev->private; unsigned long new; if (len >= PAGE_SIZE) return -EINVAL; if (!conf) return -ENODEV; if (strict_strtoul(page, 10, &new)) return -EINVAL; if (new > conf->max_nr_stripes) return -EINVAL; conf->bypass_threshold = new; return len; } static struct md_sysfs_entry <API key> = __ATTR(<API key>, S_IRUGO | S_IWUSR, <API key>, <API key>); static ssize_t <API key>(mddev_t *mddev, char *page) { raid5_conf_t *conf = mddev->private; if (conf) return sprintf(page, "%d\n", atomic_read(&conf->active_stripes)); else return 0; } static struct md_sysfs_entry <API key> = __ATTR_RO(stripe_cache_active); static struct attribute *raid5_attrs[] = { &<API key>.attr, &<API key>.attr, &<API key>.attr, NULL, }; static struct attribute_group raid5_attrs_group = { .name = NULL, .attrs = raid5_attrs, }; static sector_t raid5_size(mddev_t *mddev, sector_t sectors, int raid_disks) { raid5_conf_t *conf = mddev->private; if (!sectors) sectors = mddev->dev_sectors; if (!raid_disks) /* size is defined by the smallest of previous and new size */ raid_disks = min(conf->raid_disks, conf->previous_raid_disks); sectors &= ~((sector_t)mddev->chunk_sectors - 1); sectors &= ~((sector_t)mddev->new_chunk_sectors - 1); return sectors * (raid_disks - conf->max_degraded); } static void raid5_free_percpu(raid5_conf_t *conf) { struct raid5_percpu *percpu; unsigned long cpu; if (!conf->percpu) return; get_online_cpus(); <API key>(cpu) { percpu = per_cpu_ptr(conf->percpu, cpu); safe_put_page(percpu->spare_page); kfree(percpu->scribble); } #ifdef CONFIG_HOTPLUG_CPU <API key>(&conf->cpu_notify); #endif put_online_cpus(); free_percpu(conf->percpu); } static void free_conf(raid5_conf_t *conf) { shrink_stripes(conf); raid5_free_percpu(conf); kfree(conf->disks); kfree(conf->stripe_hashtbl); kfree(conf); } #ifdef CONFIG_HOTPLUG_CPU static int raid456_cpu_notify(struct notifier_block *nfb, unsigned long action, void *hcpu) { raid5_conf_t *conf = container_of(nfb, raid5_conf_t, cpu_notify); long cpu = (long)hcpu; struct raid5_percpu *percpu = per_cpu_ptr(conf->percpu, cpu); switch (action) { case CPU_UP_PREPARE: case <API key>: if (conf->level == 6 && !percpu->spare_page) percpu->spare_page = alloc_page(GFP_KERNEL); if (!percpu->scribble) percpu->scribble = kmalloc(conf->scribble_len, GFP_KERNEL); if (!percpu->scribble || (conf->level == 6 && !percpu->spare_page)) { safe_put_page(percpu->spare_page); kfree(percpu->scribble); pr_err("%s: failed memory allocation for cpu%ld\n", __func__, cpu); return notifier_from_errno(-ENOMEM); } break; case CPU_DEAD: case CPU_DEAD_FROZEN: safe_put_page(percpu->spare_page); kfree(percpu->scribble); percpu->spare_page = NULL; percpu->scribble = NULL; break; default: break; } return NOTIFY_OK; } #endif static int raid5_alloc_percpu(raid5_conf_t *conf) { unsigned long cpu; struct page *spare_page; struct raid5_percpu __percpu *allcpus; void *scribble; int err; allcpus = alloc_percpu(struct raid5_percpu); if (!allcpus) return -ENOMEM; conf->percpu = allcpus; get_online_cpus(); err = 0; <API key>(cpu) { if (conf->level == 6) { spare_page = alloc_page(GFP_KERNEL); if (!spare_page) { err = -ENOMEM; break; } per_cpu_ptr(conf->percpu, cpu)->spare_page = spare_page; } scribble = kmalloc(conf->scribble_len, GFP_KERNEL); if (!scribble) { err = -ENOMEM; break; } per_cpu_ptr(conf->percpu, cpu)->scribble = scribble; } #ifdef CONFIG_HOTPLUG_CPU conf->cpu_notify.notifier_call = raid456_cpu_notify; conf->cpu_notify.priority = 0; if (err == 0) err = <API key>(&conf->cpu_notify); #endif put_online_cpus(); return err; } static raid5_conf_t *setup_conf(mddev_t *mddev) { raid5_conf_t *conf; int raid_disk, memory, max_disks; mdk_rdev_t *rdev; struct disk_info *disk; if (mddev->new_level != 5 && mddev->new_level != 4 && mddev->new_level != 6) { printk(KERN_ERR "md/raid:%s: raid level not set to 4/5/6 (%d)\n", mdname(mddev), mddev->new_level); return ERR_PTR(-EIO); } if ((mddev->new_level == 5 && !<API key>(mddev->new_layout)) || (mddev->new_level == 6 && !<API key>(mddev->new_layout))) { printk(KERN_ERR "md/raid:%s: layout %d not supported\n", mdname(mddev), mddev->new_layout); return ERR_PTR(-EIO); } if (mddev->new_level == 6 && mddev->raid_disks < 4) { printk(KERN_ERR "md/raid:%s: not enough configured devices (%d, minimum 4)\n", mdname(mddev), mddev->raid_disks); return ERR_PTR(-EINVAL); } if (!mddev->new_chunk_sectors || (mddev->new_chunk_sectors << 9) % PAGE_SIZE || !is_power_of_2(mddev->new_chunk_sectors)) { printk(KERN_ERR "md/raid:%s: invalid chunk size %d\n", mdname(mddev), mddev->new_chunk_sectors << 9); return ERR_PTR(-EINVAL); } conf = kzalloc(sizeof(raid5_conf_t), GFP_KERNEL); if (conf == NULL) goto abort; spin_lock_init(&conf->device_lock); init_waitqueue_head(&conf->wait_for_stripe); init_waitqueue_head(&conf->wait_for_overlap); INIT_LIST_HEAD(&conf->handle_list); INIT_LIST_HEAD(&conf->hold_list); INIT_LIST_HEAD(&conf->delayed_list); INIT_LIST_HEAD(&conf->bitmap_list); INIT_LIST_HEAD(&conf->inactive_list); atomic_set(&conf->active_stripes, 0); atomic_set(&conf-><API key>, 0); atomic_set(&conf-><API key>, 0); conf->bypass_threshold = BYPASS_THRESHOLD; conf->raid_disks = mddev->raid_disks; if (mddev->reshape_position == MaxSector) conf->previous_raid_disks = mddev->raid_disks; else conf->previous_raid_disks = mddev->raid_disks - mddev->delta_disks; max_disks = max(conf->raid_disks, conf->previous_raid_disks); conf->scribble_len = scribble_len(max_disks); conf->disks = kzalloc(max_disks * sizeof(struct disk_info), GFP_KERNEL); if (!conf->disks) goto abort; conf->mddev = mddev; if ((conf->stripe_hashtbl = kzalloc(PAGE_SIZE, GFP_KERNEL)) == NULL) goto abort; conf->level = mddev->new_level; if (raid5_alloc_percpu(conf) != 0) goto abort; pr_debug("raid456: run(%s) called.\n", mdname(mddev)); list_for_each_entry(rdev, &mddev->disks, same_set) { raid_disk = rdev->raid_disk; if (raid_disk >= max_disks || raid_disk < 0) continue; disk = conf->disks + raid_disk; disk->rdev = rdev; if (test_bit(In_sync, &rdev->flags)) { char b[BDEVNAME_SIZE]; printk(KERN_INFO "md/raid:%s: device %s operational as raid" " disk %d\n", mdname(mddev), bdevname(rdev->bdev, b), raid_disk); } else if (rdev->saved_raid_disk != raid_disk) /* Cannot rely on bitmap to complete recovery */ conf->fullsync = 1; } conf->chunk_sectors = mddev->new_chunk_sectors; conf->level = mddev->new_level; if (conf->level == 6) conf->max_degraded = 2; else conf->max_degraded = 1; conf->algorithm = mddev->new_layout; conf->max_nr_stripes = NR_STRIPES; conf->reshape_progress = mddev->reshape_position; if (conf->reshape_progress != MaxSector) { conf->prev_chunk_sectors = mddev->chunk_sectors; conf->prev_algo = mddev->layout; } memory = conf->max_nr_stripes * (sizeof(struct stripe_head) + max_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024; if (grow_stripes(conf, conf->max_nr_stripes)) { printk(KERN_ERR "md/raid:%s: couldn't allocate %dkB for buffers\n", mdname(mddev), memory); goto abort; } else printk(KERN_INFO "md/raid:%s: allocated %dkB\n", mdname(mddev), memory); conf->thread = md_register_thread(raid5d, mddev, NULL); if (!conf->thread) { printk(KERN_ERR "md/raid:%s: couldn't allocate thread.\n", mdname(mddev)); goto abort; } return conf; abort: if (conf) { free_conf(conf); return ERR_PTR(-EIO); } else return ERR_PTR(-ENOMEM); } static int only_parity(int raid_disk, int algo, int raid_disks, int max_degraded) { switch (algo) { case ALGORITHM_PARITY_0: if (raid_disk < max_degraded) return 1; break; case ALGORITHM_PARITY_N: if (raid_disk >= raid_disks - max_degraded) return 1; break; case <API key>: if (raid_disk == 0 || raid_disk == raid_disks - 1) return 1; break; case <API key>: case <API key>: case <API key>: case <API key>: if (raid_disk == raid_disks - 1) return 1; } return 0; } static int run(mddev_t *mddev) { raid5_conf_t *conf; int working_disks = 0; int dirty_parity_disks = 0; mdk_rdev_t *rdev; sector_t reshape_offset = 0; if (mddev->recovery_cp != MaxSector) printk(KERN_NOTICE "md/raid:%s: not clean" " -- starting background reconstruction\n", mdname(mddev)); if (mddev->reshape_position != MaxSector) { /* Check that we can continue the reshape. * Currently only disks can change, it must * increase, and we must be past the point where * a stripe over-writes itself */ sector_t here_new, here_old; int old_disks; int max_degraded = (mddev->level == 6 ? 2 : 1); if (mddev->new_level != mddev->level) { printk(KERN_ERR "md/raid:%s: unsupported reshape " "required - aborting.\n", mdname(mddev)); return -EINVAL; } old_disks = mddev->raid_disks - mddev->delta_disks; /* reshape_position must be on a new-stripe boundary, and one * further up in new geometry must map after here in old * geometry. */ here_new = mddev->reshape_position; if (sector_div(here_new, mddev->new_chunk_sectors * (mddev->raid_disks - max_degraded))) { printk(KERN_ERR "md/raid:%s: reshape_position not " "on a stripe boundary\n", mdname(mddev)); return -EINVAL; } reshape_offset = here_new * mddev->new_chunk_sectors; /* here_new is the stripe we will write to */ here_old = mddev->reshape_position; sector_div(here_old, mddev->chunk_sectors * (<API key>)); /* here_old is the first stripe that we might need to read * from */ if (mddev->delta_disks == 0) { /* We cannot be sure it is safe to start an in-place * reshape. It is only safe if user-space if monitoring * and taking constant backups. * mdadm always starts a situation like this in * readonly mode so it can take control before * allowing any writes. So just check for that. */ if ((here_new * mddev->new_chunk_sectors != here_old * mddev->chunk_sectors) || mddev->ro == 0) { printk(KERN_ERR "md/raid:%s: in-place reshape must be started" " in read-only mode - aborting\n", mdname(mddev)); return -EINVAL; } } else if (mddev->delta_disks < 0 ? (here_new * mddev->new_chunk_sectors <= here_old * mddev->chunk_sectors) : (here_new * mddev->new_chunk_sectors >= here_old * mddev->chunk_sectors)) { /* Reading from the same stripe as writing to - bad */ printk(KERN_ERR "md/raid:%s: reshape_position too early for " "auto-recovery - aborting.\n", mdname(mddev)); return -EINVAL; } printk(KERN_INFO "md/raid:%s: reshape will continue\n", mdname(mddev)); /* OK, we should be able to continue; */ } else { BUG_ON(mddev->level != mddev->new_level); BUG_ON(mddev->layout != mddev->new_layout); BUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors); BUG_ON(mddev->delta_disks != 0); } if (mddev->private == NULL) conf = setup_conf(mddev); else conf = mddev->private; if (IS_ERR(conf)) return PTR_ERR(conf); mddev->thread = conf->thread; conf->thread = NULL; mddev->private = conf; /* * 0 for a fully functional array, 1 or 2 for a degraded array. */ list_for_each_entry(rdev, &mddev->disks, same_set) { if (rdev->raid_disk < 0) continue; if (test_bit(In_sync, &rdev->flags)) { working_disks++; continue; } /* This disc is not fully in-sync. However if it * just stored parity (beyond the recovery_offset), * when we don't need to be concerned about the * array being dirty. * When reshape goes 'backwards', we never have * partially completed devices, so we only need * to worry about reshape going forwards. */ /* Hack because v0.91 doesn't store recovery_offset properly. */ if (mddev->major_version == 0 && mddev->minor_version > 90) rdev->recovery_offset = reshape_offset; if (rdev->recovery_offset < reshape_offset) { /* We need to check old and new layout */ if (!only_parity(rdev->raid_disk, conf->algorithm, conf->raid_disks, conf->max_degraded)) continue; } if (!only_parity(rdev->raid_disk, conf->prev_algo, conf->previous_raid_disks, conf->max_degraded)) continue; dirty_parity_disks++; } mddev->degraded = (max(conf->raid_disks, conf->previous_raid_disks) - working_disks); if (has_failed(conf)) { printk(KERN_ERR "md/raid:%s: not enough operational devices" " (%d/%d failed)\n", mdname(mddev), mddev->degraded, conf->raid_disks); goto abort; } /* device size must be a multiple of chunk size */ mddev->dev_sectors &= ~(mddev->chunk_sectors - 1); mddev->resync_max_sectors = mddev->dev_sectors; if (mddev->degraded > dirty_parity_disks && mddev->recovery_cp != MaxSector) { if (mddev->ok_start_degraded) printk(KERN_WARNING "md/raid:%s: starting dirty degraded array" " - data corruption possible.\n", mdname(mddev)); else { printk(KERN_ERR "md/raid:%s: cannot start dirty degraded array.\n", mdname(mddev)); goto abort; } } if (mddev->degraded == 0) printk(KERN_INFO "md/raid:%s: raid level %d active with %d out of %d" " devices, algorithm %d\n", mdname(mddev), conf->level, mddev->raid_disks-mddev->degraded, mddev->raid_disks, mddev->new_layout); else printk(KERN_ALERT "md/raid:%s: raid level %d active with %d" " out of %d devices, algorithm %d\n", mdname(mddev), conf->level, mddev->raid_disks - mddev->degraded, mddev->raid_disks, mddev->new_layout); print_raid5_conf(conf); if (conf->reshape_progress != MaxSector) { conf->reshape_safe = conf->reshape_progress; atomic_set(&conf->reshape_stripes, 0); clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); clear_bit(MD_RECOVERY_CHECK, &mddev->recovery); set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); mddev->sync_thread = md_register_thread(md_do_sync, mddev, "reshape"); } /* Ok, everything is just fine now */ if (mddev->to_remove == &raid5_attrs_group) mddev->to_remove = NULL; else if (mddev->kobj.sd && sysfs_create_group(&mddev->kobj, &raid5_attrs_group)) printk(KERN_WARNING "md/raid:%s: failed to create sysfs attributes.\n", mdname(mddev)); <API key>(mddev, raid5_size(mddev, 0, 0)); plugger_init(&conf->plug, raid5_unplug); mddev->plug = &conf->plug; if (mddev->queue) { int chunk_size; /* read-ahead size must cover two whole stripes, which * is 2 * (datadisks) * chunksize where 'n' is the * number of raid devices */ int data_disks = conf->previous_raid_disks - conf->max_degraded; int stripe = data_disks * ((mddev->chunk_sectors << 9) / PAGE_SIZE); if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe) mddev->queue->backing_dev_info.ra_pages = 2 * stripe; <API key>(mddev->queue, <API key>); mddev->queue->backing_dev_info.congested_data = mddev; mddev->queue->backing_dev_info.congested_fn = raid5_congested; mddev->queue->unplug_fn = raid5_unplug_queue; chunk_size = mddev->chunk_sectors << 9; blk_queue_io_min(mddev->queue, chunk_size); blk_queue_io_opt(mddev->queue, chunk_size * (conf->raid_disks - conf->max_degraded)); list_for_each_entry(rdev, &mddev->disks, same_set) disk_stack_limits(mddev->gendisk, rdev->bdev, rdev->data_offset << 9); } return 0; abort: <API key>(&mddev->thread); if (conf) { print_raid5_conf(conf); free_conf(conf); } mddev->private = NULL; printk(KERN_ALERT "md/raid:%s: failed to run raid set.\n", mdname(mddev)); return -EIO; } static int stop(mddev_t *mddev) { raid5_conf_t *conf = mddev->private; <API key>(&mddev->thread); if (mddev->queue) mddev->queue->backing_dev_info.congested_fn = NULL; plugger_flush(&conf->plug); /* the unplug fn references 'conf'*/ free_conf(conf); mddev->private = NULL; mddev->plug = NULL; mddev->to_remove = &raid5_attrs_group; return 0; } #ifdef DEBUG static void print_sh(struct seq_file *seq, struct stripe_head *sh) { int i; seq_printf(seq, "sh %llu, pd_idx %d, state %ld.\n", (unsigned long long)sh->sector, sh->pd_idx, sh->state); seq_printf(seq, "sh %llu, count %d.\n", (unsigned long long)sh->sector, atomic_read(&sh->count)); seq_printf(seq, "sh %llu, ", (unsigned long long)sh->sector); for (i = 0; i < sh->disks; i++) { seq_printf(seq, "(cache%d: %p %ld) ", i, sh->dev[i].page, sh->dev[i].flags); } seq_printf(seq, "\n"); } static void printall(struct seq_file *seq, raid5_conf_t *conf) { struct stripe_head *sh; struct hlist_node *hn; int i; spin_lock_irq(&conf->device_lock); for (i = 0; i < NR_HASH; i++) { <API key>(sh, hn, &conf->stripe_hashtbl[i], hash) { if (sh->raid_conf != conf) continue; print_sh(seq, sh); } } spin_unlock_irq(&conf->device_lock); } #endif static void status(struct seq_file *seq, mddev_t *mddev) { raid5_conf_t *conf = mddev->private; int i; seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level, mddev->chunk_sectors / 2, mddev->layout); seq_printf (seq, " [%d/%d] [", conf->raid_disks, conf->raid_disks - mddev->degraded); for (i = 0; i < conf->raid_disks; i++) seq_printf (seq, "%s", conf->disks[i].rdev && test_bit(In_sync, &conf->disks[i].rdev->flags) ? "U" : "_"); seq_printf (seq, "]"); #ifdef DEBUG seq_printf (seq, "\n"); printall(seq, conf); #endif } static void print_raid5_conf (raid5_conf_t *conf) { int i; struct disk_info *tmp; printk(KERN_DEBUG "RAID conf printout:\n"); if (!conf) { printk("(conf==NULL)\n"); return; } printk(KERN_DEBUG " --- level:%d rd:%d wd:%d\n", conf->level, conf->raid_disks, conf->raid_disks - conf->mddev->degraded); for (i = 0; i < conf->raid_disks; i++) { char b[BDEVNAME_SIZE]; tmp = conf->disks + i; if (tmp->rdev) printk(KERN_DEBUG " disk %d, o:%d, dev:%s\n", i, !test_bit(Faulty, &tmp->rdev->flags), bdevname(tmp->rdev->bdev, b)); } } static int raid5_spare_active(mddev_t *mddev) { int i; raid5_conf_t *conf = mddev->private; struct disk_info *tmp; int count = 0; unsigned long flags; for (i = 0; i < conf->raid_disks; i++) { tmp = conf->disks + i; if (tmp->rdev && tmp->rdev->recovery_offset == MaxSector && !test_bit(Faulty, &tmp->rdev->flags) && !test_and_set_bit(In_sync, &tmp->rdev->flags)) { count++; <API key>(tmp->rdev->sysfs_state); } } spin_lock_irqsave(&conf->device_lock, flags); mddev->degraded -= count; <API key>(&conf->device_lock, flags); print_raid5_conf(conf); return count; } static int raid5_remove_disk(mddev_t *mddev, int number) { raid5_conf_t *conf = mddev->private; int err = 0; mdk_rdev_t *rdev; struct disk_info *p = conf->disks + number; print_raid5_conf(conf); rdev = p->rdev; if (rdev) { if (number >= conf->raid_disks && conf->reshape_progress == MaxSector) clear_bit(In_sync, &rdev->flags); if (test_bit(In_sync, &rdev->flags) || atomic_read(&rdev->nr_pending)) { err = -EBUSY; goto abort; } /* Only remove non-faulty devices if recovery * isn't possible. */ if (!test_bit(Faulty, &rdev->flags) && !has_failed(conf) && number < conf->raid_disks) { err = -EBUSY; goto abort; } p->rdev = NULL; synchronize_rcu(); if (atomic_read(&rdev->nr_pending)) { /* lost the race, try later */ err = -EBUSY; p->rdev = rdev; } } abort: print_raid5_conf(conf); return err; } static int raid5_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) { raid5_conf_t *conf = mddev->private; int err = -EEXIST; int disk; struct disk_info *p; int first = 0; int last = conf->raid_disks - 1; if (has_failed(conf)) /* no point adding a device */ return -EINVAL; if (rdev->raid_disk >= 0) first = last = rdev->raid_disk; /* * find the disk ... but prefer rdev->saved_raid_disk * if possible. */ if (rdev->saved_raid_disk >= 0 && rdev->saved_raid_disk >= first && conf->disks[rdev->saved_raid_disk].rdev == NULL) disk = rdev->saved_raid_disk; else disk = first; for ( ; disk <= last ; disk++) if ((p=conf->disks + disk)->rdev == NULL) { clear_bit(In_sync, &rdev->flags); rdev->raid_disk = disk; err = 0; if (rdev->saved_raid_disk != disk) conf->fullsync = 1; rcu_assign_pointer(p->rdev, rdev); break; } print_raid5_conf(conf); return err; } static int raid5_resize(mddev_t *mddev, sector_t sectors) { /* no resync is happening, and there is enough space * on all devices, so we can resize. * We need to make sure resync covers any new space. * If the array is shrinking we should possibly wait until * any io in the removed space completes, but it hardly seems * worth it. */ sectors &= ~((sector_t)mddev->chunk_sectors - 1); <API key>(mddev, raid5_size(mddev, sectors, mddev->raid_disks)); if (mddev->array_sectors > raid5_size(mddev, sectors, mddev->raid_disks)) return -EINVAL; set_capacity(mddev->gendisk, mddev->array_sectors); revalidate_disk(mddev->gendisk); if (sectors > mddev->dev_sectors && mddev->recovery_cp > mddev->dev_sectors) { mddev->recovery_cp = mddev->dev_sectors; set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); } mddev->dev_sectors = sectors; mddev->resync_max_sectors = sectors; return 0; } static int check_stripe_cache(mddev_t *mddev) { /* Can only proceed if there are plenty of stripe_heads. * We need a minimum of one full stripe,, and for sensible progress * it is best to have about 4 times that. * If we require 4 times, then the default 256 4K stripe_heads will * allow for chunk sizes up to 256K, which is probably OK. * If the chunk size is greater, user-space should request more * stripe_heads first. */ raid5_conf_t *conf = mddev->private; if (((mddev->chunk_sectors << 9) / STRIPE_SIZE) * 4 > conf->max_nr_stripes || ((mddev->new_chunk_sectors << 9) / STRIPE_SIZE) * 4 > conf->max_nr_stripes) { printk(KERN_WARNING "md/raid:%s: reshape: not enough stripes. Needed %lu\n", mdname(mddev), ((max(mddev->chunk_sectors, mddev->new_chunk_sectors) << 9) / STRIPE_SIZE)*4); return 0; } return 1; } static int check_reshape(mddev_t *mddev) { raid5_conf_t *conf = mddev->private; if (mddev->delta_disks == 0 && mddev->new_layout == mddev->layout && mddev->new_chunk_sectors == mddev->chunk_sectors) return 0; /* nothing to do */ if (mddev->bitmap) /* Cannot grow a bitmap yet */ return -EBUSY; if (has_failed(conf)) return -EINVAL; if (mddev->delta_disks < 0) { /* We might be able to shrink, but the devices must * be made bigger first. * For raid6, 4 is the minimum size. * Otherwise 2 is the minimum */ int min = 2; if (mddev->level == 6) min = 4; if (mddev->raid_disks + mddev->delta_disks < min) return -EINVAL; } if (!check_stripe_cache(mddev)) return -ENOSPC; return resize_stripes(conf, conf->raid_disks + mddev->delta_disks); } static int raid5_start_reshape(mddev_t *mddev) { raid5_conf_t *conf = mddev->private; mdk_rdev_t *rdev; int spares = 0; unsigned long flags; if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) return -EBUSY; if (!check_stripe_cache(mddev)) return -ENOSPC; list_for_each_entry(rdev, &mddev->disks, same_set) if (!test_bit(In_sync, &rdev->flags) && !test_bit(Faulty, &rdev->flags)) spares++; if (spares - mddev->degraded < mddev->delta_disks - conf->max_degraded) /* Not enough devices even to make a degraded array * of that size */ return -EINVAL; /* Refuse to reduce size of the array. Any reductions in * array size must be through explicit setting of array_size * attribute. */ if (raid5_size(mddev, 0, conf->raid_disks + mddev->delta_disks) < mddev->array_sectors) { printk(KERN_ERR "md/raid:%s: array size must be reduced " "before number of disks\n", mdname(mddev)); return -EINVAL; } atomic_set(&conf->reshape_stripes, 0); spin_lock_irq(&conf->device_lock); conf->previous_raid_disks = conf->raid_disks; conf->raid_disks += mddev->delta_disks; conf->prev_chunk_sectors = conf->chunk_sectors; conf->chunk_sectors = mddev->new_chunk_sectors; conf->prev_algo = conf->algorithm; conf->algorithm = mddev->new_layout; if (mddev->delta_disks < 0) conf->reshape_progress = raid5_size(mddev, 0, 0); else conf->reshape_progress = 0; conf->reshape_safe = conf->reshape_progress; conf->generation++; spin_unlock_irq(&conf->device_lock); /* Add some new drives, as many as will fit. * We know there are enough to make the newly sized array work. * Don't add devices if we are reducing the number of * devices in the array. This is because it is not possible * to correctly record the "partially reconstructed" state of * such devices during the reshape and confusion could result. */ if (mddev->delta_disks >= 0) { int added_devices = 0; list_for_each_entry(rdev, &mddev->disks, same_set) if (rdev->raid_disk < 0 && !test_bit(Faulty, &rdev->flags)) { if (raid5_add_disk(mddev, rdev) == 0) { char nm[20]; if (rdev->raid_disk >= conf->previous_raid_disks) { set_bit(In_sync, &rdev->flags); added_devices++; } else rdev->recovery_offset = 0; sprintf(nm, "rd%d", rdev->raid_disk); if (sysfs_create_link(&mddev->kobj, &rdev->kobj, nm)) /* Failure here is OK */; } } else if (rdev->raid_disk >= conf->previous_raid_disks && !test_bit(Faulty, &rdev->flags)) { /* This is a spare that was manually added */ set_bit(In_sync, &rdev->flags); added_devices++; } /* When a reshape changes the number of devices, * ->degraded is measured against the larger of the * pre and post number of devices. */ spin_lock_irqsave(&conf->device_lock, flags); mddev->degraded += (conf->raid_disks - conf->previous_raid_disks) - added_devices; <API key>(&conf->device_lock, flags); } mddev->raid_disks = conf->raid_disks; mddev->reshape_position = conf->reshape_progress; set_bit(MD_CHANGE_DEVS, &mddev->flags); clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); clear_bit(MD_RECOVERY_CHECK, &mddev->recovery); set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); mddev->sync_thread = md_register_thread(md_do_sync, mddev, "reshape"); if (!mddev->sync_thread) { mddev->recovery = 0; spin_lock_irq(&conf->device_lock); mddev->raid_disks = conf->raid_disks = conf->previous_raid_disks; conf->reshape_progress = MaxSector; spin_unlock_irq(&conf->device_lock); return -EAGAIN; } conf->reshape_checkpoint = jiffies; md_wakeup_thread(mddev->sync_thread); md_new_event(mddev); return 0; } /* This is called from the reshape thread and should make any * changes needed in 'conf' */ static void end_reshape(raid5_conf_t *conf) { if (!test_bit(MD_RECOVERY_INTR, &conf->mddev->recovery)) { spin_lock_irq(&conf->device_lock); conf->previous_raid_disks = conf->raid_disks; conf->reshape_progress = MaxSector; spin_unlock_irq(&conf->device_lock); wake_up(&conf->wait_for_overlap); /* read-ahead size must cover two whole stripes, which is * 2 * (datadisks) * chunksize where 'n' is the number of raid devices */ if (conf->mddev->queue) { int data_disks = conf->raid_disks - conf->max_degraded; int stripe = data_disks * ((conf->chunk_sectors << 9) / PAGE_SIZE); if (conf->mddev->queue->backing_dev_info.ra_pages < 2 * stripe) conf->mddev->queue->backing_dev_info.ra_pages = 2 * stripe; } } } /* This is called from the raid5d thread with mddev_lock held. * It makes config changes to the device. */ static void <API key>(mddev_t *mddev) { raid5_conf_t *conf = mddev->private; if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery)) { if (mddev->delta_disks > 0) { <API key>(mddev, raid5_size(mddev, 0, 0)); set_capacity(mddev->gendisk, mddev->array_sectors); revalidate_disk(mddev->gendisk); } else { int d; mddev->degraded = conf->raid_disks; for (d = 0; d < conf->raid_disks ; d++) if (conf->disks[d].rdev && test_bit(In_sync, &conf->disks[d].rdev->flags)) mddev->degraded for (d = conf->raid_disks ; d < conf->raid_disks - mddev->delta_disks; d++) { mdk_rdev_t *rdev = conf->disks[d].rdev; if (rdev && raid5_remove_disk(mddev, d) == 0) { char nm[20]; sprintf(nm, "rd%d", rdev->raid_disk); sysfs_remove_link(&mddev->kobj, nm); rdev->raid_disk = -1; } } } mddev->layout = conf->algorithm; mddev->chunk_sectors = conf->chunk_sectors; mddev->reshape_position = MaxSector; mddev->delta_disks = 0; } } static void raid5_quiesce(mddev_t *mddev, int state) { raid5_conf_t *conf = mddev->private; switch(state) { case 2: /* resume for a suspend */ wake_up(&conf->wait_for_overlap); break; case 1: /* stop all writes */ spin_lock_irq(&conf->device_lock); /* '2' tells resync/reshape to pause so that all * active stripes can drain */ conf->quiesce = 2; wait_event_lock_irq(conf->wait_for_stripe, atomic_read(&conf->active_stripes) == 0 && atomic_read(&conf-><API key>) == 0, conf->device_lock, /* nothing */); conf->quiesce = 1; spin_unlock_irq(&conf->device_lock); /* allow reshape to continue */ wake_up(&conf->wait_for_overlap); break; case 0: /* re-enable writes */ spin_lock_irq(&conf->device_lock); conf->quiesce = 0; wake_up(&conf->wait_for_stripe); wake_up(&conf->wait_for_overlap); spin_unlock_irq(&conf->device_lock); break; } } static void *<API key>(mddev_t *mddev, int level) { struct raid0_private_data *raid0_priv = mddev->private; sector_t sectors; /* for raid0 takeover only one zone is supported */ if (raid0_priv->nr_strip_zones > 1) { printk(KERN_ERR "md/raid:%s: cannot takeover raid0 with more than one zone.\n", mdname(mddev)); return ERR_PTR(-EINVAL); } sectors = raid0_priv->strip_zone[0].zone_end; sector_div(sectors, raid0_priv->strip_zone[0].nb_dev); mddev->dev_sectors = sectors; mddev->new_level = level; mddev->new_layout = ALGORITHM_PARITY_N; mddev->new_chunk_sectors = mddev->chunk_sectors; mddev->raid_disks += 1; mddev->delta_disks = 1; /* make sure it will be not marked as dirty */ mddev->recovery_cp = MaxSector; return setup_conf(mddev); } static void *<API key>(mddev_t *mddev) { int chunksect; if (mddev->raid_disks != 2 || mddev->degraded > 1) return ERR_PTR(-EINVAL); /* Should check if there are write-behind devices? */ chunksect = 64*2; /* 64K by default */ /* The array must be an exact multiple of chunksize */ while (chunksect && (mddev->array_sectors & (chunksect-1))) chunksect >>= 1; if ((chunksect<<9) < STRIPE_SIZE) /* array size does not allow a suitable chunk size */ return ERR_PTR(-EINVAL); mddev->new_level = 5; mddev->new_layout = <API key>; mddev->new_chunk_sectors = chunksect; return setup_conf(mddev); } static void *<API key>(mddev_t *mddev) { int new_layout; switch (mddev->layout) { case <API key>: new_layout = <API key>; break; case <API key>: new_layout = <API key>; break; case <API key>: new_layout = <API key>; break; case <API key>: new_layout = <API key>; break; case <API key>: new_layout = ALGORITHM_PARITY_0; break; case ALGORITHM_PARITY_N: new_layout = ALGORITHM_PARITY_N; break; default: return ERR_PTR(-EINVAL); } mddev->new_level = 5; mddev->new_layout = new_layout; mddev->delta_disks = -1; mddev->raid_disks -= 1; return setup_conf(mddev); } static int raid5_check_reshape(mddev_t *mddev) { /* For a 2-drive array, the layout and chunk size can be changed * immediately as not restriping is needed. * For larger arrays we record the new value - after validation * to be used by a reshape pass. */ raid5_conf_t *conf = mddev->private; int new_chunk = mddev->new_chunk_sectors; if (mddev->new_layout >= 0 && !<API key>(mddev->new_layout)) return -EINVAL; if (new_chunk > 0) { if (!is_power_of_2(new_chunk)) return -EINVAL; if (new_chunk < (PAGE_SIZE>>9)) return -EINVAL; if (mddev->array_sectors & (new_chunk-1)) /* not factor of array size */ return -EINVAL; } /* They look valid */ if (mddev->raid_disks == 2) { /* can make the change immediately */ if (mddev->new_layout >= 0) { conf->algorithm = mddev->new_layout; mddev->layout = mddev->new_layout; } if (new_chunk > 0) { conf->chunk_sectors = new_chunk ; mddev->chunk_sectors = new_chunk; } set_bit(MD_CHANGE_DEVS, &mddev->flags); md_wakeup_thread(mddev->thread); } return check_reshape(mddev); } static int raid6_check_reshape(mddev_t *mddev) { int new_chunk = mddev->new_chunk_sectors; if (mddev->new_layout >= 0 && !<API key>(mddev->new_layout)) return -EINVAL; if (new_chunk > 0) { if (!is_power_of_2(new_chunk)) return -EINVAL; if (new_chunk < (PAGE_SIZE >> 9)) return -EINVAL; if (mddev->array_sectors & (new_chunk-1)) /* not factor of array size */ return -EINVAL; } /* They look valid */ return check_reshape(mddev); } static void *raid5_takeover(mddev_t *mddev) { /* raid5 can take over: * raid0 - if there is only one strip zone - make it a raid4 layout * raid1 - if there are two drives. We need to know the chunk size * raid4 - trivial - just use a raid4 layout. * raid6 - Providing it is a *_6 layout */ if (mddev->level == 0) return <API key>(mddev, 5); if (mddev->level == 1) return <API key>(mddev); if (mddev->level == 4) { mddev->new_layout = ALGORITHM_PARITY_N; mddev->new_level = 5; return setup_conf(mddev); } if (mddev->level == 6) return <API key>(mddev); return ERR_PTR(-EINVAL); } static void *raid4_takeover(mddev_t *mddev) { /* raid4 can take over: * raid0 - if there is only one strip zone * raid5 - if layout is right */ if (mddev->level == 0) return <API key>(mddev, 4); if (mddev->level == 5 && mddev->layout == ALGORITHM_PARITY_N) { mddev->new_layout = 0; mddev->new_level = 4; return setup_conf(mddev); } return ERR_PTR(-EINVAL); } static struct mdk_personality raid5_personality; static void *raid6_takeover(mddev_t *mddev) { /* Currently can only take over a raid5. We map the * personality to an equivalent raid6 personality * with the Q block at the end. */ int new_layout; if (mddev->pers != &raid5_personality) return ERR_PTR(-EINVAL); if (mddev->degraded > 1) return ERR_PTR(-EINVAL); if (mddev->raid_disks > 253) return ERR_PTR(-EINVAL); if (mddev->raid_disks < 3) return ERR_PTR(-EINVAL); switch (mddev->layout) { case <API key>: new_layout = <API key>; break; case <API key>: new_layout = <API key>; break; case <API key>: new_layout = <API key>; break; case <API key>: new_layout = <API key>; break; case ALGORITHM_PARITY_0: new_layout = <API key>; break; case ALGORITHM_PARITY_N: new_layout = ALGORITHM_PARITY_N; break; default: return ERR_PTR(-EINVAL); } mddev->new_level = 6; mddev->new_layout = new_layout; mddev->delta_disks = 1; mddev->raid_disks += 1; return setup_conf(mddev); } static struct mdk_personality raid6_personality = { .name = "raid6", .level = 6, .owner = THIS_MODULE, .make_request = make_request, .run = run, .stop = stop, .status = status, .error_handler = error, .hot_add_disk = raid5_add_disk, .hot_remove_disk= raid5_remove_disk, .spare_active = raid5_spare_active, .sync_request = sync_request, .resize = raid5_resize, .size = raid5_size, .check_reshape = raid6_check_reshape, .start_reshape = raid5_start_reshape, .finish_reshape = <API key>, .quiesce = raid5_quiesce, .takeover = raid6_takeover, }; static struct mdk_personality raid5_personality = { .name = "raid5", .level = 5, .owner = THIS_MODULE, .make_request = make_request, .run = run, .stop = stop, .status = status, .error_handler = error, .hot_add_disk = raid5_add_disk, .hot_remove_disk= raid5_remove_disk, .spare_active = raid5_spare_active, .sync_request = sync_request, .resize = raid5_resize, .size = raid5_size, .check_reshape = raid5_check_reshape, .start_reshape = raid5_start_reshape, .finish_reshape = <API key>, .quiesce = raid5_quiesce, .takeover = raid5_takeover, }; static struct mdk_personality raid4_personality = { .name = "raid4", .level = 4, .owner = THIS_MODULE, .make_request = make_request, .run = run, .stop = stop, .status = status, .error_handler = error, .hot_add_disk = raid5_add_disk, .hot_remove_disk= raid5_remove_disk, .spare_active = raid5_spare_active, .sync_request = sync_request, .resize = raid5_resize, .size = raid5_size, .check_reshape = raid5_check_reshape, .start_reshape = raid5_start_reshape, .finish_reshape = <API key>, .quiesce = raid5_quiesce, .takeover = raid4_takeover, }; static int __init raid5_init(void) { <API key>(&raid6_personality); <API key>(&raid5_personality); <API key>(&raid4_personality); return 0; } static void raid5_exit(void) { <API key>(&raid6_personality); <API key>(&raid5_personality); <API key>(&raid4_personality); } module_init(raid5_init); module_exit(raid5_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("RAID4/5/6 (striping with parity) personality for MD"); MODULE_ALIAS("md-personality-4"); /* RAID5 */ MODULE_ALIAS("md-raid5"); MODULE_ALIAS("md-raid4"); MODULE_ALIAS("md-level-5"); MODULE_ALIAS("md-level-4"); MODULE_ALIAS("md-personality-8"); /* RAID6 */ MODULE_ALIAS("md-raid6"); MODULE_ALIAS("md-level-6"); /* This used to be two separate modules, they were: */ MODULE_ALIAS("raid5"); MODULE_ALIAS("raid6");
#include "Common.h" #include "SharedDefines.h" #include "WorldPacket.h" #include "Opcodes.h" #include "Log.h" #include "World.h" #include "Object.h" #include "Creature.h" #include "Player.h" #include "Vehicle.h" #include "ObjectMgr.h" #include "UpdateData.h" #include "UpdateMask.h" #include "Util.h" #include "MapManager.h" #include "ObjectAccessor.h" #include "Log.h" #include "Transport.h" #include "<API key>.h" #include "<API key>.h" #include "VMapFactory.h" #include "CellImpl.h" #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "SpellAuraEffects.h" #include "UpdateFieldFlags.h" #include "TemporarySummon.h" #include "Totem.h" #include "OutdoorPvPMgr.h" #include "<API key>.h" #include "DynamicTree.h" #include "Unit.h" #include "Group.h" #include "Battlefield.h" #include "BattlefieldMgr.h" uint32 GuidHigh2TypeId(uint32 guid_hi) { switch (guid_hi) { case HIGHGUID_ITEM: return TYPEID_ITEM; //case HIGHGUID_CONTAINER: return TYPEID_CONTAINER; HIGHGUID_CONTAINER == HIGHGUID_ITEM currently case HIGHGUID_UNIT: return TYPEID_UNIT; case HIGHGUID_PET: return TYPEID_UNIT; case HIGHGUID_PLAYER: return TYPEID_PLAYER; case HIGHGUID_GAMEOBJECT: return TYPEID_GAMEOBJECT; case <API key>:return <API key>; case HIGHGUID_CORPSE: return TYPEID_CORPSE; case <API key>: return TYPEID_GAMEOBJECT; case HIGHGUID_VEHICLE: return TYPEID_UNIT; } return <API key>; // unknown } Object::Object() : m_PackGUID(sizeof(uint64)+1) { m_objectTypeId = TYPEID_OBJECT; m_objectType = TYPEMASK_OBJECT; m_uint32Values = NULL; _changedFields = NULL; m_valuesCount = 0; _fieldNotifyFlags = UF_FLAG_DYNAMIC; m_inWorld = false; m_objectUpdated = false; m_PackGUID.appendPackGUID(0); } WorldObject::~WorldObject() { // this may happen because there are many !create/delete if (IsWorldObject() && m_currMap) { if (GetTypeId() == TYPEID_CORPSE) { sLog->outFatal(LOG_FILTER_GENERAL, "Object::~Object Corpse guid="UI64FMTD", type=%d, entry=%u deleted but still in map!!", GetGUID(), ((Corpse*)this)->GetType(), GetEntry()); ASSERT(false); } ResetMap(); } } Object::~Object() { if (IsInWorld()) { sLog->outFatal(LOG_FILTER_GENERAL, "Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry()); if (isType(TYPEMASK_ITEM)) sLog->outFatal(LOG_FILTER_GENERAL, "Item slot %u", ((Item*)this)->GetSlot()); ASSERT(false); RemoveFromWorld(); } if (m_objectUpdated) { sLog->outFatal(LOG_FILTER_GENERAL, "Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry()); ASSERT(false); sObjectAccessor->RemoveUpdateObject(this); } delete [] m_uint32Values; delete [] _changedFields; } void Object::_InitValues() { m_uint32Values = new uint32[m_valuesCount]; memset(m_uint32Values, 0, m_valuesCount*sizeof(uint32)); _changedFields = new bool[m_valuesCount]; memset(_changedFields, 0, m_valuesCount*sizeof(bool)); m_objectUpdated = false; } void Object::_Create(uint32 guidlow, uint32 entry, HighGuid guidhigh) { if (!m_uint32Values) _InitValues(); uint64 guid = MAKE_NEW_GUID(guidlow, entry, guidhigh); SetUInt64Value(OBJECT_FIELD_GUID, guid); SetUInt16Value(OBJECT_FIELD_TYPE, 0, m_objectType); m_PackGUID.clear(); m_PackGUID.appendPackGUID(GetGUID()); } std::string Object::_ConcatFields(uint16 startIndex, uint16 size) const { std::ostringstream ss; for (uint16 index = 0; index < size; ++index) ss << GetUInt32Value(index + startIndex) << ' '; return ss.str(); } void Object::AddToWorld() { if (m_inWorld) return; ASSERT(m_uint32Values); m_inWorld = true; // synchronize values mirror with values array (changes will send in updatecreate opcode any way ClearUpdateMask(true); } void Object::RemoveFromWorld() { if (!m_inWorld) return; m_inWorld = false; // if we remove from world then sending changes not required ClearUpdateMask(true); } void Object::<API key>(UpdateData* data, Player* target) const { if (!target) return; uint8 updateType = <API key>; uint16 flags = m_updateFlag; uint32 valCount = m_valuesCount; /** lower flag1 **/ if (target == this) // building packet for yourself flags |= UPDATEFLAG_SELF; else if (GetTypeId() == TYPEID_PLAYER) valCount = PLAYER_END_NOT_SELF; switch (GetGUIDHigh()) { case HIGHGUID_PLAYER: case HIGHGUID_PET: case HIGHGUID_CORPSE: case <API key>: updateType = <API key>; break; case HIGHGUID_UNIT: if (ToUnit()->ToTempSummon() && IS_PLAYER_GUID(ToUnit()->ToTempSummon()->GetSummonerGUID())) updateType = <API key>; break; case HIGHGUID_GAMEOBJECT: if (IS_PLAYER_GUID(ToGameObject()->GetOwnerGUID())) updateType = <API key>; break; } if (flags & <API key>) { // <API key> for some gameobject types... if (isType(TYPEMASK_GAMEOBJECT)) { switch (((GameObject*)this)->GetGoType()) { case <API key>: case <API key>: case <API key>: case <API key>: updateType = <API key>; break; case <API key>: flags |= <API key>; break; default: break; } } } if (ToUnit() && ToUnit()->getVictim()) flags |= <API key>; ByteBuffer buf(500); buf << uint8(updateType); buf.append(GetPackGUID()); buf << uint8(m_objectTypeId); <API key>(&buf, flags); UpdateMask updateMask; updateMask.SetCount(valCount); _SetCreateBits(&updateMask, target); _BuildValuesUpdate(updateType, &buf, &updateMask, target); data->AddUpdateBlock(buf); } void Object::SendUpdateToPlayer(Player* player) { // send create update to player UpdateData upd(player->GetMapId()); WorldPacket packet; <API key>(&upd, player); upd.BuildPacket(&packet); player->GetSession()->SendPacket(&packet); } void Object::<API key>(UpdateData* data, Player* target) const { ByteBuffer buf(500); buf << uint8(UPDATETYPE_VALUES); buf.append(GetPackGUID()); UpdateMask updateMask; uint32 valCount = m_valuesCount; if (GetTypeId() == TYPEID_PLAYER && target != this) valCount = PLAYER_END_NOT_SELF; updateMask.SetCount(valCount); _SetUpdateBits(&updateMask, target); _BuildValuesUpdate(UPDATETYPE_VALUES, &buf, &updateMask, target); data->AddUpdateBlock(buf); } void Object::<API key>(UpdateData* data) const { data->AddOutOfRangeGUID(GetGUID()); } void Object::DestroyForPlayer(Player* target, bool onDeath) const { ASSERT(target); if (isType(TYPEMASK_UNIT) || isType(TYPEMASK_PLAYER)) { if (Battleground* bg = target->GetBattleground()) { if (bg->isArena()) { WorldPacket data(<API key>, 8); data << uint64(GetGUID()); target->GetSession()->SendPacket(&data); } } } WorldPacket data(SMSG_DESTROY_OBJECT, 8 + 1); data << uint64(GetGUID()); //! If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object. //! OnDeath() does for eg trigger death animation and interrupts certain spells/missiles/auras/sounds... data << uint8(onDeath ? 1 : 0); target->GetSession()->SendPacket(&data); } void Object::<API key>(ByteBuffer* data, uint16 flags) const { uint32 unkLoopCounter = 0; uint32 unkLoopNewer1 = 0; // Bit content data->WriteBit(flags & <API key>); data->WriteBit(flags & UPDATEFLAG_VEHICLE); data->WriteBits(unkLoopCounter, 24); data->WriteBit(false); data->WriteBit(flags & <API key>); data->WriteBit(flags & <API key>); data->WriteBits(0, 21); data->WriteBit(flags & <API key>); data->WriteBit(false); //data->WriteBit(false); data->WriteBit(true); data->WriteBit(flags & UPDATEFLAG_LIVING); data->WriteBit(false); data->WriteBit(false); data->WriteBit(false); //data->WriteBit(flags & UPDATEFLAG_ROTATION); data->WriteBit(true); data->WriteBit(flags & UPDATEFLAG_ANIMKITS); data->WriteBit(false); data->WriteBit(flags & UPDATEFLAG_SELF); if (flags & <API key>) { WorldObject const* self = static_cast<WorldObject const*>(this); ObjectGuid transGuid = self->m_movementInfo.t_guid; data->WriteBit(transGuid[4]); data->WriteBit(transGuid[3]); data->WriteBit(transGuid[6]); data->WriteBit(transGuid[0]); data->WriteBit(transGuid[5]); data->WriteBit(transGuid[1]); data->WriteBit(0); // Has GO transport time 2 data->WriteBit(0); // Has GO transport time 3 data->WriteBit(transGuid[2]); data->WriteBit(transGuid[7]); } if (flags & UPDATEFLAG_UNK3) { //not implement //data->WriteBit(0); } if (flags & UPDATEFLAG_LIVING) { Unit const* self = ToUnit(); ObjectGuid guid = GetGUID(); uint32 movementFlags = self->m_movementInfo.GetMovementFlags(); uint16 movementFlagsExtra = self->m_movementInfo.<API key>(); if (GetTypeId() == TYPEID_UNIT) movementFlags &= <API key>; data->WriteBit(guid[3]); data->WriteBit(self->IsSplineEnabled()); // Has spline data data->WriteBits(unkLoopNewer1, 24); data->WriteBit(guid[4]); data->WriteBit(!((movementFlags & (<API key> | MOVEMENTFLAG_FLYING)) || (movementFlagsExtra & <API key>))); // hasPitch data->WriteBit(self->m_movementInfo.t_guid); // Has transport data data->WriteBit(movementFlagsExtra & <API key>);// Has fall data data->WriteBit(!(flags & UPDATEFLAG_LIVING)); // Is missing time if (self->m_movementInfo.t_guid) { ObjectGuid transGuid = self->m_movementInfo.t_guid; data->WriteBit(transGuid[3]); data->WriteBit(0); // Has transport time 3 data->WriteBit(transGuid[7]); data->WriteBit(transGuid[0]); data->WriteBit(transGuid[6]); data->WriteBit(0); // Has transport time 2 data->WriteBit(transGuid[4]); data->WriteBit(transGuid[1]); data->WriteBit(transGuid[2]); data->WriteBit(transGuid[5]); } data->WriteBit(1); //??????????????????????????? cause client error//The instruction at "0x005D578A" referenced memory at "0xC4840003". data->WriteBit(guid[7]); data->WriteBit(!movementFlagsExtra); data->WriteBit(guid[0]); data->WriteBit(0); data->WriteBit(guid[5]); if (movementFlagsExtra) data->WriteBits(movementFlagsExtra, 13); data->WriteBit(guid[2]); data->WriteBit(guid[6]); data->WriteBit(!movementFlags); if (movementFlagsExtra & <API key>) //Has fall direction data->WriteBit(movementFlags & <API key>); if (movementFlags) data->WriteBits(movementFlags, 30); data->WriteBit(G3D::fuzzyEq(self->GetOrientation(), 0.0f)); data->WriteBit(0); data->WriteBit(0); if (self->IsSplineEnabled()) { //Not implement Movement::PacketBuilder::WriteCreateBits(*self->movespline, *data); } data->WriteBit(guid[1]); data->WriteBit(!(movementFlags & <API key>)); // Has spline elevation } if (flags & <API key>) { ObjectGuid victimGuid = ToUnit()->getVictim()->GetGUID(); // checked in <API key> data->WriteBit(victimGuid[2]); data->WriteBit(victimGuid[6]); data->WriteBit(victimGuid[5]); data->WriteBit(victimGuid[1]); data->WriteBit(victimGuid[7]); data->WriteBit(victimGuid[3]); data->WriteBit(victimGuid[4]); data->WriteBit(victimGuid[0]); } if (flags & UPDATEFLAG_ANIMKITS) { data->WriteBit(1); // Missing AnimKit1 data->WriteBit(1); // Missing AnimKit2 data->WriteBit(1); // Missing AnimKit3 } if (flags & UPDATEFLAG_UNK2) data->WriteBit(9); data->FlushBits(); // Data for (uint32 i = 0; i < unkLoopCounter; ++i) *data << uint32(0); if (flags & UPDATEFLAG_LIVING) { Unit const* self = ToUnit(); ObjectGuid guid = GetGUID(); uint32 movementFlags = self->m_movementInfo.GetMovementFlags(); uint16 movementFlagsExtra = self->m_movementInfo.<API key>(); if (GetTypeId() == TYPEID_UNIT) movementFlags &= <API key>; if (self->IsSplineEnabled()) { //Not implement Movement::PacketBuilder::WriteCreateData(*self->movespline, *data); } for (uint32 i = 0; i < unkLoopNewer1; ++i) { //Not implement *data << uint32(0); } *data << self->GetSpeed(MOVE_WALK); if (self->m_movementInfo.t_guid) { ObjectGuid transGuid = self->m_movementInfo.t_guid; data->WriteByteSeq(transGuid[4]); data->WriteByteSeq(transGuid[0]); *data << float(self->GetTransOffsetY()); *data << float(self->GetTransOffsetX()); *data << int8(self->GetTransSeat()); data->WriteByteSeq(transGuid[7]); data->WriteByteSeq(transGuid[3]); //if (hasTransportTime3) // *data << uint32(0); data->WriteByteSeq(transGuid[6]); *data << float(self->GetTransOffsetO()); *data << uint32(self->GetTransTime()); data->WriteByteSeq(transGuid[2]); data->WriteByteSeq(transGuid[1]); *data << float(self->GetTransOffsetZ()); data->WriteByteSeq(transGuid[5]); //if (hasTransportTime2) // *data << uint32(0); } data->WriteByteSeq(guid[2]); if (movementFlagsExtra & <API key>) { *data << uint32(self->m_movementInfo.fallTime); if (movementFlags & <API key>) { *data << float(self->m_movementInfo.j_sinAngle); *data << float(self->m_movementInfo.j_cosAngle); *data << float(self->m_movementInfo.j_xyspeed); } *data << float(self->m_movementInfo.j_zspeed); } data->WriteByteSeq(guid[7]); //if (true) // Has time, controlled by bit just after HasTransport *data << uint32(getMSTime()); *data << self->GetSpeed(MOVE_FLIGHT_BACK); *data << float(self->GetPositionX()); *data << (m_uint32Values[index] & ((<API key> /*| <API key> | <API key>*/) << 8)); // this flag is at uint8 offset 1 !! void WorldObject::<API key>(bool /*finalCleanup*/) /*float x, y, z; GetPosition(x, y, z); VMAP::IVMapManager* vMapManager = VMAP::VMapFactory::<API key>(); return vMapManager->isInLineOfSight(GetMapId(), x, y, z+2.0f, ox, oy, oz+2.0f);*/ if (IsInWorld()) return GetMap()->isInLineOfSight(GetPositionX(), GetPositionY(), GetPositionZ()+2.f, ox, oy, oz+2.f, GetPhaseMask()); return true; } bool WorldObject::GetDistanceOrder(WorldObject const* obj1, WorldObject const* obj2, bool is3D /* = true */) const { float dx1 = GetPositionX() - obj1->GetPositionX(); float dy1 = GetPositionY() - obj1->GetPositionY(); float distsq1 = dx1*dx1 + dy1*dy1; if (is3D) { float dz1 = GetPositionZ() - obj1->GetPositionZ(); distsq1 += dz1*dz1; } float dx2 = GetPositionX() - obj2->GetPositionX(); float dy2 = GetPositionY() - obj2->GetPositionY(); float distsq2 = dx2*dx2 + dy2*dy2; if (is3D) { float dz2 = GetPositionZ() - obj2->GetPositionZ(); distsq2 += dz2*dz2; } return distsq1 < distsq2; } bool WorldObject::IsInRange(WorldObject const* obj, float minRange, float maxRange, bool is3D /* = true */) const { float dx = GetPositionX() - obj->GetPositionX(); float dy = GetPositionY() - obj->GetPositionY(); float distsq = dx*dx + dy*dy; if (is3D) { float dz = GetPositionZ() - obj->GetPositionZ(); distsq += dz*dz; } float sizefactor = GetObjectSize() + obj->GetObjectSize(); // check only for real range if (minRange > 0.0f) { float mindist = minRange + sizefactor; if (distsq < mindist * mindist) return false; } float maxdist = maxRange + sizefactor; return distsq < maxdist * maxdist; } bool WorldObject::IsInRange2d(float x, float y, float minRange, float maxRange) const { float dx = GetPositionX() - x; float dy = GetPositionY() - y; float distsq = dx*dx + dy*dy; float sizefactor = GetObjectSize(); // check only for real range if (minRange > 0.0f) { float mindist = minRange + sizefactor; if (distsq < mindist * mindist) return false; } float maxdist = maxRange + sizefactor; return distsq < maxdist * maxdist; } bool WorldObject::IsInRange3d(float x, float y, float z, float minRange, float maxRange) const { float dx = GetPositionX() - x; float dy = GetPositionY() - y; float dz = GetPositionZ() - z; float distsq = dx*dx + dy*dy + dz*dz; float sizefactor = GetObjectSize(); // check only for real range if (minRange > 0.0f) { float mindist = minRange + sizefactor; if (distsq < mindist * mindist) return false; } float maxdist = maxRange + sizefactor; return distsq < maxdist * maxdist; } void Position::RelocateOffset(const Position & offset) { m_positionX = GetPositionX() + (offset.GetPositionX() * std::cos(GetOrientation()) + offset.GetPositionY() * std::sin(GetOrientation() + M_PI)); m_positionY = GetPositionY() + (offset.GetPositionY() * std::cos(GetOrientation()) + offset.GetPositionX() * std::sin(GetOrientation())); m_positionZ = GetPositionZ() + offset.GetPositionZ(); SetOrientation(GetOrientation() + offset.GetOrientation()); } void Position::GetPositionOffsetTo(const Position & endPos, Position & retOffset) const { float dx = endPos.GetPositionX() - GetPositionX(); float dy = endPos.GetPositionY() - GetPositionY(); retOffset.m_positionX = dx * std::cos(GetOrientation()) + dy * std::sin(GetOrientation()); retOffset.m_positionY = dy * std::cos(GetOrientation()) - dx * std::sin(GetOrientation()); retOffset.m_positionZ = endPos.GetPositionZ() - GetPositionZ(); retOffset.SetOrientation(endPos.GetOrientation() - GetOrientation()); } float Position::GetAngle(const Position* obj) const { if (!obj) return 0; return GetAngle(obj->GetPositionX(), obj->GetPositionY()); } // Return angle in range 0..2*pi float Position::GetAngle(const float x, const float y) const { float dx = x - GetPositionX(); float dy = y - GetPositionY(); float ang = atan2(dy, dx); ang = (ang >= 0) ? ang : 2 * M_PI + ang; return ang; } void Position::GetSinCos(const float x, const float y, float &vsin, float &vcos) const { float dx = GetPositionX() - x; float dy = GetPositionY() - y; if (fabs(dx) < 0.001f && fabs(dy) < 0.001f) { float angle = (float)rand_norm()*static_cast<float>(2*M_PI); vcos = std::cos(angle); vsin = std::sin(angle); } else { float dist = sqrt((dx*dx) + (dy*dy)); vcos = dx / dist; vsin = dy / dist; } } bool Position::HasInArc(float arc, const Position* obj, float border) const { // always have self in arc if (obj == this) return true; // move arc to range 0.. 2*pi arc = <API key>(arc); float angle = GetAngle(obj); angle -= m_orientation; // move angle to range -pi ... +pi angle = <API key>(angle); if (angle > M_PI) angle -= 2.0f*M_PI; float lborder = -1 * (arc/border); // in range -pi..0 float rborder = (arc/border); // in range 0..pi return ((angle >= lborder) && (angle <= rborder)); } bool WorldObject::IsInBetween(const WorldObject* obj1, const WorldObject* obj2, float size) const { if (!obj1 || !obj2) return false; float dist = GetExactDist2d(obj1->GetPositionX(), obj1->GetPositionY()); // not using sqrt() for performance if ((dist * dist) >= obj1->GetExactDist2dSq(obj2->GetPositionX(), obj2->GetPositionY())) return false; if (!size) size = GetObjectSize() / 2; float angle = obj1->GetAngle(obj2); // not using sqrt() for performance return (size * size) >= GetExactDist2dSq(obj1->GetPositionX() + std::cos(angle) * dist, obj1->GetPositionY() + std::sin(angle) * dist); } bool WorldObject::isInFront(WorldObject const* target, float arc) const { return HasInArc(arc, target); } bool WorldObject::isInBack(WorldObject const* target, float arc) const { return !HasInArc(2 * M_PI - arc, target); } void WorldObject::GetRandomPoint(const Position &pos, float distance, float &rand_x, float &rand_y, float &rand_z) const { if (!distance) { pos.GetPosition(rand_x, rand_y, rand_z); return; } // angle to face `obj` to `this` float angle = (float)rand_norm()*static_cast<float>(2*M_PI); float new_dist = (float)rand_norm()*static_cast<float>(distance); rand_x = pos.m_positionX + new_dist * std::cos(angle); rand_y = pos.m_positionY + new_dist * std::sin(angle); rand_z = pos.m_positionZ; Trinity::NormalizeMapCoord(rand_x); Trinity::NormalizeMapCoord(rand_y); <API key>(rand_x, rand_y, rand_z); // update to LOS height if available } void WorldObject::<API key>(float x, float y, float &z) const { float new_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true); if (new_z > INVALID_HEIGHT) z = new_z+ 0.05f; // just to be sure that we are not a few pixel under the surface } void WorldObject::<API key>(float x, float y, float &z) const { switch (GetTypeId()) { case TYPEID_UNIT: { // non fly unit don't must be in air // non swim unit must be at ground (mostly speedup, because it don't must be in water and water level check less fast if (!ToCreature()->CanFly()) { bool canSwim = ToCreature()->canSwim(); float ground_z = z; float max_z = canSwim ? GetBaseMap()-><API key>(x, y, z, &ground_z, !ToUnit()->HasAuraType(<API key>)) : ((ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true))); if (max_z > INVALID_HEIGHT) { if (z > max_z) z = max_z; else if (z < ground_z) z = ground_z; } } else { float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true); if (z < ground_z) z = ground_z; } break; } case TYPEID_PLAYER: { // for server controlled moves playr work same as creature (but it can always swim) if (!ToPlayer()->CanFly()) { float ground_z = z; float max_z = GetBaseMap()-><API key>(x, y, z, &ground_z, !ToUnit()->HasAuraType(<API key>)); if (max_z > INVALID_HEIGHT) { if (z > max_z) z = max_z; else if (z < ground_z) z = ground_z; } } else { float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true); if (z < ground_z) z = ground_z; } break; } default: { float ground_z = GetBaseMap()->GetHeight(GetPhaseMask(), x, y, z, true); if (ground_z > INVALID_HEIGHT) z = ground_z; break; } } } bool Position::IsPositionValid() const { return Trinity::IsValidMapCoord(m_positionX, m_positionY, m_positionZ, m_orientation); } float WorldObject::<API key>() const { if (ToPlayer()) return GetMap()->GetVisibilityRange(); else if (ToCreature()) return ToCreature()->m_SightDistance; else return 0.0f; } float WorldObject::GetVisibilityRange() const { if (isActiveObject() && !ToPlayer()) return <API key>; else return GetMap()->GetVisibilityRange(); } float WorldObject::GetSightRange(const WorldObject* target) const { if (ToUnit()) { if (ToPlayer()) { if (target && target->isActiveObject() && !target->ToPlayer()) return <API key>; else return GetMap()->GetVisibilityRange(); } else if (ToCreature()) return ToCreature()->m_SightDistance; else return SIGHT_RANGE_UNIT; } return 0.0f; } bool WorldObject::canSeeOrDetect(WorldObject const* obj, bool ignoreStealth, bool distanceCheck) const { if (this == obj) return true; if (obj->IsNeverVisible() || CanNeverSee(obj)) return false; if (obj->IsAlwaysVisibleFor(this) || CanAlwaysSee(obj)) return true; bool corpseVisibility = false; if (distanceCheck) { bool corpseCheck = false; if (Player const* thisPlayer = ToPlayer()) { if (thisPlayer->isDead() && thisPlayer->GetHealth() > 0 && // Cheap way to check for ghost state !(obj-><API key>.GetValue(<API key>) & <API key>.GetValue(<API key>) & <API key>)) { if (Corpse* corpse = thisPlayer->GetCorpse()) { corpseCheck = true; if (corpse->IsWithinDist(thisPlayer, GetSightRange(obj), false)) if (corpse->IsWithinDist(obj, GetSightRange(obj), false)) corpseVisibility = true; } } } WorldObject const* viewpoint = this; if (Player const* player = this->ToPlayer()) viewpoint = player->GetViewpoint(); if (!viewpoint) viewpoint = this; if (!corpseCheck && !viewpoint->IsWithinDist(obj, GetSightRange(obj), false)) return false; } // GM visibility off or hidden NPC if (!obj-><API key>.GetValue(<API key>)) { // Stop checking other things for GMs if (<API key>.GetValue(<API key>)) return true; } else return <API key>.GetValue(<API key>) >= obj-><API key>.GetValue(<API key>); // Ghost players, Spirit Healers, and some other NPCs if (!corpseVisibility && !(obj-><API key>.GetValue(<API key>) & <API key>.GetValue(<API key>))) { // Alive players can see dead players in some cases, but other objects can't do that if (Player const* thisPlayer = ToPlayer()) { if (Player const* objPlayer = obj->ToPlayer()) { if (thisPlayer->GetTeam() != objPlayer->GetTeam() || !thisPlayer->IsGroupVisibleFor(objPlayer)) return false; } else return false; } else return false; } if (obj-><API key>()) return false; if (!CanDetect(obj, ignoreStealth)) return false; return true; } bool WorldObject::CanDetect(WorldObject const* obj, bool ignoreStealth) const { const WorldObject* seer = this; // Pets don't have detection, they use the detection of their masters if (const Unit* thisUnit = ToUnit()) if (Unit* controller = thisUnit->GetCharmerOrOwner()) seer = controller; if (obj-><API key>(seer)) return true; if (!ignoreStealth && !seer-><API key>(obj)) return false; if (!ignoreStealth && !seer->CanDetectStealthOf(obj)) return false; return true; } bool WorldObject::<API key>(WorldObject const* obj) const { uint32 mask = obj->m_invisibility.GetFlags() & <API key>.GetFlags(); // Check for not detected types if (mask != obj->m_invisibility.GetFlags()) return false; // It isn't possible in invisibility to detect something that can't detect the invisible object // (it's at least true for spell: 66) // It seems like that only Units are affected by this check (couldn't see arena doors with preparation invisibility) if (obj->ToUnit()) if ((m_invisibility.GetFlags() & obj-><API key>.GetFlags()) != m_invisibility.GetFlags()) return false; for (uint32 i = 0; i < <API key>; ++i) { if (!(mask & (1 << i))) continue; int32 <API key> = obj->m_invisibility.GetValue(InvisibilityType(i)); int32 <API key> = <API key>.GetValue(InvisibilityType(i)); // Too low value to detect if (<API key> < <API key>) return false; } return true; } bool WorldObject::CanDetectStealthOf(WorldObject const* obj) const { // Combat reach is the minimal distance (both in front and behind), // and it is also used in the range calculation. // One stealth point increases the visibility range by 0.3 yard. if (!obj->m_stealth.GetFlags()) return true; float distance = GetExactDist(obj); float combatReach = 0.0f; if (isType(TYPEMASK_UNIT)) combatReach = ((Unit*)this)->GetCombatReach(); if (distance < combatReach) return true; if (!HasInArc(M_PI, obj)) return false; for (uint32 i = 0; i < TOTAL_STEALTH_TYPES; ++i) { if (!(obj->m_stealth.GetFlags() & (1 << i))) continue; if (isType(TYPEMASK_UNIT)) if (((Unit*)this)-><API key>(<API key>, i)) return true; // Starting points int32 detectionValue = 30; // Level difference: 5 point / level, starting from level 1. // There may be spells for this and the starting points too, but // not in the DBCs of the client. detectionValue += int32(getLevelForTarget(obj) - 1) * 5; // Apply modifiers detectionValue += m_stealthDetect.GetValue(StealthType(i)); if (obj->isType(TYPEMASK_GAMEOBJECT)) if (Unit* owner = ((GameObject*)obj)->GetOwner()) detectionValue -= int32(owner->getLevelForTarget(this) - 1) * 5; detectionValue -= obj->m_stealth.GetValue(StealthType(i)); // Calculate max distance float visibilityRange = float(detectionValue) * 0.3f + combatReach; if (visibilityRange > <API key>) visibilityRange = <API key>; if (distance > visibilityRange) return false; } return true; } void WorldObject::SendPlaySound(uint32 Sound, bool OnlySelf) { WorldPacket data(SMSG_PLAY_SOUND, 4); data << Sound; if (OnlySelf && GetTypeId() == TYPEID_PLAYER) this->ToPlayer()->GetSession()->SendPacket(&data); else SendMessageToSet(&data, true); // ToSelf ignored in this case } void Object::<API key>(uint32 i) { _changedFields[i] = true; if (m_inWorld && !m_objectUpdated) { sObjectAccessor->AddUpdateObject(this); m_objectUpdated = true; } } namespace Trinity { class MonsterChatBuilder { public: MonsterChatBuilder(WorldObject const& obj, ChatMsg msgtype, int32 textId, uint32 language, uint64 targetGUID) : i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {} void operator()(WorldPacket& data, LocaleConstant loc_idx) { char const* text = sObjectMgr->GetTrinityString(i_textId, loc_idx); // TODO: i_object.GetName() also must be localized? i_object.BuildMonsterChat(&data, i_msgtype, text, i_language, i_object.GetNameForLocaleIdx(loc_idx), i_targetGUID); } private: WorldObject const& i_object; ChatMsg i_msgtype; int32 i_textId; uint32 i_language; uint64 i_targetGUID; }; class <API key> { public: <API key>(WorldObject const& obj, ChatMsg msgtype, const char* text, uint32 language, uint64 targetGUID) : i_object(obj), i_msgtype(msgtype), i_text(text), i_language(language), i_targetGUID(targetGUID) {} void operator()(WorldPacket& data, LocaleConstant loc_idx) { // TODO: i_object.GetName() also must be localized? i_object.BuildMonsterChat(&data, i_msgtype, i_text, i_language, i_object.GetNameForLocaleIdx(loc_idx), i_targetGUID); } private: WorldObject const& i_object; ChatMsg i_msgtype; const char* i_text; uint32 i_language; uint64 i_targetGUID; }; } // namespace Trinity void WorldObject::MonsterSay(const char* text, uint32 language, uint64 TargetGuid) { CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()); Cell cell(p); cell.SetNoCreate(); Trinity::<API key> say_build(*this, <API key>, text, language, TargetGuid); Trinity::LocalizedPacketDo<Trinity::<API key>> say_do(say_build); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::<API key>> > say_worker(this, sWorld->getFloatConfig(<API key>), say_do); <API key><Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::<API key>> >, <API key> > message(say_worker); cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(<API key>)); } void WorldObject::MonsterSay(int32 textId, uint32 language, uint64 TargetGuid) { CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()); Cell cell(p); cell.SetNoCreate(); Trinity::MonsterChatBuilder say_build(*this, <API key>, textId, language, TargetGuid); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this, sWorld->getFloatConfig(<API key>), say_do); <API key><Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, <API key> > message(say_worker); cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(<API key>)); } void WorldObject::MonsterYell(const char* text, uint32 language, uint64 TargetGuid) { CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()); Cell cell(p); cell.SetNoCreate(); Trinity::<API key> say_build(*this, <API key>, text, language, TargetGuid); Trinity::LocalizedPacketDo<Trinity::<API key>> say_do(say_build); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::<API key>> > say_worker(this, sWorld->getFloatConfig(<API key>), say_do); <API key><Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::<API key>> >, <API key> > message(say_worker); cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(<API key>)); } void WorldObject::MonsterYell(int32 textId, uint32 language, uint64 TargetGuid) { CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()); Cell cell(p); cell.SetNoCreate(); Trinity::MonsterChatBuilder say_build(*this, <API key>, textId, language, TargetGuid); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this, sWorld->getFloatConfig(<API key>), say_do); <API key><Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, <API key> > message(say_worker); cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(<API key>)); } void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 TargetGuid) { Trinity::MonsterChatBuilder say_build(*this, <API key>, textId, language, TargetGuid); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build); uint32 zoneid = GetZoneId(); Map::PlayerList const& pList = GetMap()->GetPlayers(); for (Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr) if (itr->getSource()->GetZoneId() == zoneid) say_do(itr->getSource()); } void WorldObject::MonsterTextEmote(const char* text, uint64 TargetGuid, bool IsBossEmote) { WorldPacket data(SMSG_MESSAGECHAT, 200); BuildMonsterChat(&data, IsBossEmote ? <API key> : <API key>, text, LANG_UNIVERSAL, GetName(), TargetGuid); <API key>(&data, sWorld->getFloatConfig(<API key>), true); } void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossEmote) { CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()); Cell cell(p); cell.SetNoCreate(); Trinity::MonsterChatBuilder say_build(*this, IsBossEmote ? <API key> : <API key>, textId, LANG_UNIVERSAL, TargetGuid); Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> say_do(say_build); Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> > say_worker(this, sWorld->getFloatConfig(<API key>), say_do); <API key><Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::MonsterChatBuilder> >, <API key> > message(say_worker); cell.Visit(p, message, *GetMap(), *this, sWorld->getFloatConfig(<API key>)); } void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossWhisper) { Player* player = ObjectAccessor::FindPlayer(receiver); if (!player || !player->GetSession()) return; LocaleConstant loc_idx = player->GetSession()-><API key>(); WorldPacket data(SMSG_MESSAGECHAT, 200); BuildMonsterChat(&data, IsBossWhisper ? <API key> : <API key>, text, LANG_UNIVERSAL, GetNameForLocaleIdx(loc_idx), receiver); player->GetSession()->SendPacket(&data); } void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisper) { Player* player = ObjectAccessor::FindPlayer(receiver); if (!player || !player->GetSession()) return; LocaleConstant loc_idx = player->GetSession()-><API key>(); char const* text = sObjectMgr->GetTrinityString(textId, loc_idx); WorldPacket data(SMSG_MESSAGECHAT, 200); BuildMonsterChat(&data, IsBossWhisper ? <API key> : <API key>, text, LANG_UNIVERSAL, GetNameForLocaleIdx(loc_idx), receiver); player->GetSession()->SendPacket(&data); } void WorldObject::BuildMonsterChat(WorldPacket* data, uint8 msgtype, char const* text, uint32 language, std::string const &name, uint64 targetGuid) const { *data << (uint8)msgtype; *data << (uint32)language; *data << (uint64)GetGUID(); *data << (uint32)0; // 2.1.0 *data << (uint32)(name.size()+1); *data << name; *data << (uint64)targetGuid; // Unit Target if (targetGuid && !IS_PLAYER_GUID(targetGuid)) { *data << (uint32)1; // target name length *data << (uint8)0; // target name } *data << (uint32)(strlen(text)+1); *data << text; *data << (uint8)0; // ChatTag if (msgtype == <API key> || msgtype == <API key>) { *data << float(0); *data << uint8(0); } } void Unit::BuildHeartBeatMsg(WorldPacket* data) const { data->Initialize(MSG_MOVE_HEARTBEAT, 32); data->append(GetPackGUID()); BuildMovementPacket(data); } void WorldObject::SendMessageToSet(WorldPacket* data, bool self) { if (IsInWorld()) <API key>(data, GetVisibilityRange(), self); } void WorldObject::<API key>(WorldPacket* data, float dist, bool /*self*/) { Trinity::<API key> notifier(this, data, dist); <API key>(dist, notifier); } void WorldObject::SendMessageToSet(WorldPacket* data, Player const* skipped_rcvr) { Trinity::<API key> notifier(this, data, GetVisibilityRange(), false, skipped_rcvr); <API key>(GetVisibilityRange(), notifier); } void WorldObject::<API key>(uint64 guid) { WorldPacket data(<API key>, 8); data << uint64(guid); SendMessageToSet(&data, true); } void WorldObject::SetMap(Map* map) { ASSERT(map); ASSERT(!IsInWorld() || GetTypeId() == TYPEID_CORPSE); if (m_currMap == map) // command add npc: first create, than loadfromdb return; if (m_currMap) { sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::SetMap: obj %u new map %u %u, old map %u %u", (uint32)GetTypeId(), map->GetId(), map->GetInstanceId(), m_currMap->GetId(), m_currMap->GetInstanceId()); ASSERT(false); } m_currMap = map; m_mapId = map->GetId(); m_InstanceId = map->GetInstanceId(); if (IsWorldObject()) m_currMap->AddWorldObject(this); } void WorldObject::ResetMap() { ASSERT(m_currMap); ASSERT(!IsInWorld()); if (IsWorldObject()) m_currMap->RemoveWorldObject(this); m_currMap = NULL; //maybe not for corpse //m_mapId = 0; //m_InstanceId = 0; } Map const* WorldObject::GetBaseMap() const { ASSERT(m_currMap); return m_currMap->GetParent(); } void WorldObject::<API key>() { ASSERT(m_uint32Values); Map* map = FindMap(); if (!map) { sLog->outError(LOG_FILTER_GENERAL, "Object (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).", GetTypeId(), GetEntry(), GetGUIDLow(), GetMapId()); return; } map-><API key>(this); } TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, <API key> const* properties /*= NULL*/, uint32 duration /*= 0*/, Unit* summoner /*= NULL*/, uint32 spellId /*= 0*/, uint32 vehId /*= 0*/) { uint32 mask = UNIT_MASK_SUMMON; if (properties) { switch (properties->Category) { case SUMMON_CATEGORY_PET: mask = UNIT_MASK_GUARDIAN; break; case <API key>: mask = UNIT_MASK_PUPPET; break; case <API key>: mask = UNIT_MASK_MINION; break; case <API key>: case <API key>: case SUMMON_CATEGORY_UNK: { switch (properties->Type) { case SUMMON_TYPE_MINION: case <API key>: case <API key>: mask = UNIT_MASK_GUARDIAN; break; case SUMMON_TYPE_TOTEM: case <API key>: mask = UNIT_MASK_TOTEM; break; case SUMMON_TYPE_VEHICLE: case <API key>: mask = UNIT_MASK_SUMMON; break; case SUMMON_TYPE_MINIPET: mask = UNIT_MASK_MINION; break; default: if (properties->Flags & 512) // Mirror Image, Summon Gargoyle mask = UNIT_MASK_GUARDIAN; break; } break; } default: return NULL; } } uint32 phase = PHASEMASK_NORMAL; uint32 team = 0; if (summoner) { phase = summoner->GetPhaseMask(); if (summoner->GetTypeId() == TYPEID_PLAYER) team = summoner->ToPlayer()->GetTeam(); } TempSummon* summon = NULL; switch (mask) { case UNIT_MASK_SUMMON: summon = new TempSummon(properties, summoner, false); break; case UNIT_MASK_GUARDIAN: summon = new Guardian(properties, summoner, false); break; case UNIT_MASK_PUPPET: summon = new Puppet(properties, summoner); break; case UNIT_MASK_TOTEM: summon = new Totem(properties, summoner); break; case UNIT_MASK_MINION: summon = new Minion(properties, summoner, false); break; default: return NULL; } if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation())) { delete summon; return NULL; } summon->SetUInt32Value(<API key>, spellId); summon->SetHomePosition(pos); summon->InitStats(duration); AddToMap(summon->ToCreature()); summon->InitSummon(); //ObjectAccessor::<API key>(summon); return summon; } void WorldObject::SetZoneScript() { if (Map* map = FindMap()) { if (map->IsDungeon()) m_zoneScript = (ZoneScript*)((InstanceMap*)map)->GetInstanceScript(); else if (!map-><API key>()) { if (Battlefield* bf = sBattlefieldMgr-><API key>(GetZoneId())) m_zoneScript = bf; else m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId()); } } } TempSummon* WorldObject::SummonCreature(uint32 entry, const Position &pos, TempSummonType spwtype, uint32 duration, uint32 /*vehId*/) const { if (Map* map = FindMap()) { if (TempSummon* summon = map->SummonCreature(entry, pos, NULL, duration, isType(TYPEMASK_UNIT) ? (Unit*)this : NULL)) { summon->SetTempSummonType(spwtype); return summon; } } return NULL; } GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime) { if (!IsInWorld()) return NULL; GameObjectTemplate const* goinfo = sObjectMgr-><API key>(entry); if (!goinfo) { sLog->outError(LOG_FILTER_SQL, "Gameobject template %u not found in database!", entry); return NULL; } Map* map = GetMap(); GameObject* go = new GameObject(); if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x, y, z, ang, rotation0, rotation1, rotation2, rotation3, 100, GO_STATE_READY)) { delete go; return NULL; } go->SetRespawnTime(respawnTime); if (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT) //not sure how to handle this ToUnit()->AddGameObject(go); else go->SetSpawnedByDefault(false); map->AddToMap(go); return go; } Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint32 duration, CreatureAI* (*GetAI)(Creature*)) { TempSummonType summonType = (duration == 0) ? <API key> : <API key>; Creature* summon = SummonCreature(WORLD_TRIGGER, x, y, z, ang, summonType, duration); if (!summon) return NULL; //summon->SetName(GetName()); if (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT) { summon->setFaction(((Unit*)this)->getFaction()); summon->SetLevel(((Unit*)this)->getLevel()); } if (GetAI) summon->AIM_Initialize(GetAI(summon)); return summon; } Creature* WorldObject::FindNearestCreature(uint32 entry, float range, bool alive) const { Creature* creature = NULL; Trinity::<API key> checker(*this, entry, alive, range); Trinity::<API key><Trinity::<API key>> searcher(this, creature, checker); VisitNearbyObject(range, searcher); return creature; } GameObject* WorldObject::<API key>(uint32 entry, float range) const { GameObject* go = NULL; Trinity::<API key> checker(*this, entry, range); Trinity::<API key><Trinity::<API key>> searcher(this, go, checker); <API key>(range, searcher); return go; } GameObject* WorldObject::<API key>(GameobjectTypes type, float range) const { GameObject* go = NULL; Trinity::<API key> checker(*this, type, range); Trinity::<API key><Trinity::<API key>> searcher(this, go, checker); <API key>(range, searcher); return go; } void WorldObject::<API key>(std::list<GameObject*>& gameobjectList, uint32 entry, float maxSearchRange) const { CellCoord pair(Trinity::ComputeCellCoord(this->GetPositionX(), this->GetPositionY())); Cell cell(pair); cell.SetNoCreate(); Trinity::<API key> check(this, entry, maxSearchRange); Trinity::<API key><Trinity::<API key>> searcher(this, gameobjectList, check); <API key><Trinity::<API key><Trinity::<API key>>, <API key>> visitor(searcher); cell.Visit(pair, visitor, *(this->GetMap()), *this, maxSearchRange); } void WorldObject::<API key>(std::list<Creature*>& creatureList, uint32 entry, float maxSearchRange) const { CellCoord pair(Trinity::ComputeCellCoord(this->GetPositionX(), this->GetPositionY())); Cell cell(pair); cell.SetNoCreate(); Trinity::<API key> check(this, entry, maxSearchRange); Trinity::<API key><Trinity::<API key>> searcher(this, creatureList, check); <API key><Trinity::<API key><Trinity::<API key>>, <API key>> visitor(searcher); cell.Visit(pair, visitor, *(this->GetMap()), *this, maxSearchRange); } /* namespace Trinity { class NearUsedPosDo { public: NearUsedPosDo(WorldObject const& obj, WorldObject const* searcher, float angle, ObjectPosSelector& selector) : i_object(obj), i_searcher(searcher), i_angle(angle), i_selector(selector) {} void operator()(Corpse*) const {} void operator()(DynamicObject*) const {} void operator()(Creature* c) const { // skip self or target if (c == i_searcher || c == &i_object) return; float x, y, z; if (!c->isAlive() || c->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED | <API key>) || !c->GetMotionMaster()->GetDestination(x, y, z)) { x = c->GetPositionX(); y = c->GetPositionY(); } add(c, x, y); } template<class T> void operator()(T* u) const { // skip self or target if (u == i_searcher || u == &i_object) return; float x, y; x = u->GetPositionX(); y = u->GetPositionY(); add(u, x, y); } // we must add used pos that can fill places around center void add(WorldObject* u, float x, float y) const { // u is too nearest/far away to i_object if (!i_object.IsInRange2d(x, y, i_selector.m_dist - i_selector.m_size, i_selector.m_dist + i_selector.m_size)) return; float angle = i_object.GetAngle(u)-i_angle; // move angle to range -pi ... +pi while (angle > M_PI) angle -= 2.0f * M_PI; while (angle < -M_PI) angle += 2.0f * M_PI; // dist include size of u float dist2d = i_object.GetDistance2d(x, y); i_selector.AddUsedPos(u->GetObjectSize(), angle, dist2d + i_object.GetObjectSize()); } private: WorldObject const& i_object; WorldObject const* i_searcher; float i_angle; ObjectPosSelector& i_selector; }; } // namespace Trinity */ void WorldObject::GetNearPoint2D(float &x, float &y, float distance2d, float absAngle) const { x = GetPositionX() + (GetObjectSize() + distance2d) * std::cos(absAngle); y = GetPositionY() + (GetObjectSize() + distance2d) * std::sin(absAngle); Trinity::NormalizeMapCoord(x); Trinity::NormalizeMapCoord(y); } void WorldObject::GetNearPoint(WorldObject const* /*searcher*/, float &x, float &y, float &z, float searcher_size, float distance2d, float absAngle) const { GetNearPoint2D(x, y, distance2d+searcher_size, absAngle); z = GetPositionZ(); <API key>(x, y, z); /* // if detection disabled, return first point if (!sWorld->getIntConfig(<API key>)) { <API key>(x, y, z); // update to LOS height if available return; } // or remember first point float first_x = x; float first_y = y; bool first_los_conflict = false; // first point LOS problems // prepare selector for work ObjectPosSelector selector(GetPositionX(), GetPositionY(), GetObjectSize(), distance2d+searcher_size); // adding used positions around object { CellCoord p(Trinity::ComputeCellCoord(GetPositionX(), GetPositionY())); Cell cell(p); cell.SetNoCreate(); Trinity::NearUsedPosDo u_do(*this, searcher, absAngle, selector); Trinity::WorldObjectWorker<Trinity::NearUsedPosDo> worker(this, u_do); <API key><Trinity::WorldObjectWorker<Trinity::NearUsedPosDo>, <API key> > grid_obj_worker(worker); <API key><Trinity::WorldObjectWorker<Trinity::NearUsedPosDo>, <API key> > world_obj_worker(worker); CellLock<GridReadGuard> cell_lock(cell, p); cell_lock->Visit(cell_lock, grid_obj_worker, *GetMap(), *this, distance2d); cell_lock->Visit(cell_lock, world_obj_worker, *GetMap(), *this, distance2d); } // maybe can just place in primary position if (selector.CheckOriginal()) { <API key>(x, y, z); // update to LOS height if available if (IsWithinLOS(x, y, z)) return; first_los_conflict = true; // first point have LOS problems } float angle; // candidate of angle for free pos // special case when one from list empty and then empty side preferred if (selector.FirstAngle(angle)) { GetNearPoint2D(x, y, distance2d, absAngle+angle); z = GetPositionZ(); <API key>(x, y, z); // update to LOS height if available if (IsWithinLOS(x, y, z)) return; } // set first used pos in lists selector.InitializeAngle(); // select in positions after current nodes (selection one by one) while (selector.NextAngle(angle)) // angle for free pos { GetNearPoint2D(x, y, distance2d, absAngle+angle); z = GetPositionZ(); <API key>(x, y, z); // update to LOS height if available if (IsWithinLOS(x, y, z)) return; } // BAD NEWS: not free pos (or used or have LOS problems) // Attempt find _used_ pos without LOS problem if (!first_los_conflict) { x = first_x; y = first_y; <API key>(x, y, z); // update to LOS height if available return; } // special case when one from list empty and then empty side preferred if (selector.IsNonBalanced()) { if (!selector.FirstAngle(angle)) // _used_ pos { GetNearPoint2D(x, y, distance2d, absAngle+angle); z = GetPositionZ(); <API key>(x, y, z); // update to LOS height if available if (IsWithinLOS(x, y, z)) return; } } // set first used pos in lists selector.InitializeAngle(); // select in positions after current nodes (selection one by one) while (selector.NextUsedAngle(angle)) // angle for used pos but maybe without LOS problem { GetNearPoint2D(x, y, distance2d, absAngle+angle); z = GetPositionZ(); <API key>(x, y, z); // update to LOS height if available if (IsWithinLOS(x, y, z)) return; } // BAD BAD NEWS: all found pos (free and used) have LOS problem :( x = first_x; y = first_y; <API key>(x, y, z); // update to LOS height if available */ } void WorldObject::MovePosition(Position &pos, float dist, float angle) { angle += GetOrientation(); float destx, desty, destz, ground, floor; destx = pos.m_positionX + dist * std::cos(angle); desty = pos.m_positionY + dist * std::sin(angle); // Prevent invalid coordinates here, position is unchanged if (!Trinity::IsValidMapCoord(destx, desty)) { sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty); return; } ground = GetMap()->GetHeight(GetPhaseMask(), destx, desty, MAX_HEIGHT, true); floor = GetMap()->GetHeight(GetPhaseMask(), destx, desty, pos.m_positionZ, true); destz = fabs(ground - pos.m_positionZ) <= fabs(floor - pos.m_positionZ) ? ground : floor; float step = dist/10.0f; for (uint8 j = 0; j < 10; ++j) { // do not allow too big z changes if (fabs(pos.m_positionZ - destz) > 6) { destx -= step * std::cos(angle); desty -= step * std::sin(angle); ground = GetMap()->GetHeight(GetPhaseMask(), destx, desty, MAX_HEIGHT, true); floor = GetMap()->GetHeight(GetPhaseMask(), destx, desty, pos.m_positionZ, true); destz = fabs(ground - pos.m_positionZ) <= fabs(floor - pos.m_positionZ) ? ground : floor; } // we have correct destz now else { pos.Relocate(destx, desty, destz); break; } } Trinity::NormalizeMapCoord(pos.m_positionX); Trinity::NormalizeMapCoord(pos.m_positionY); <API key>(pos.m_positionX, pos.m_positionY, pos.m_positionZ); pos.SetOrientation(GetOrientation()); } void WorldObject::<API key>(Position &pos, float dist, float angle) { angle += GetOrientation(); float destx, desty, destz, ground, floor; pos.m_positionZ += 2.0f; destx = pos.m_positionX + dist * std::cos(angle); desty = pos.m_positionY + dist * std::sin(angle); // Prevent invalid coordinates here, position is unchanged if (!Trinity::IsValidMapCoord(destx, desty)) { sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::<API key> invalid coordinates X: %f and Y: %f were passed!", destx, desty); return; } ground = GetMap()->GetHeight(GetPhaseMask(), destx, desty, MAX_HEIGHT, true); floor = GetMap()->GetHeight(GetPhaseMask(), destx, desty, pos.m_positionZ, true); destz = fabs(ground - pos.m_positionZ) <= fabs(floor - pos.m_positionZ) ? ground : floor; bool col = VMAP::VMapFactory::<API key>()->getObjectHitPos(GetMapId(), pos.m_positionX, pos.m_positionY, pos.m_positionZ+0.5f, destx, desty, destz+0.5f, destx, desty, destz, -0.5f); // collision occured if (col) { // move back a bit destx -= CONTACT_DISTANCE * std::cos(angle); desty -= CONTACT_DISTANCE * std::sin(angle); dist = sqrt((pos.m_positionX - destx)*(pos.m_positionX - destx) + (pos.m_positionY - desty)*(pos.m_positionY - desty)); } // check dynamic collision col = GetMap()->getObjectHitPos(GetPhaseMask(), pos.m_positionX, pos.m_positionY, pos.m_positionZ+0.5f, destx, desty, destz+0.5f, destx, desty, destz, -0.5f); // Collided with a gameobject if (col) { destx -= CONTACT_DISTANCE * std::cos(angle); desty -= CONTACT_DISTANCE * std::sin(angle); dist = sqrt((pos.m_positionX - destx)*(pos.m_positionX - destx) + (pos.m_positionY - desty)*(pos.m_positionY - desty)); } float step = dist/10.0f; for (uint8 j = 0; j < 10; ++j) { // do not allow too big z changes if (fabs(pos.m_positionZ - destz) > 6) { destx -= step * std::cos(angle); desty -= step * std::sin(angle); ground = GetMap()->GetHeight(GetPhaseMask(), destx, desty, MAX_HEIGHT, true); floor = GetMap()->GetHeight(GetPhaseMask(), destx, desty, pos.m_positionZ, true); destz = fabs(ground - pos.m_positionZ) <= fabs(floor - pos.m_positionZ) ? ground : floor; } // we have correct destz now else { pos.Relocate(destx, desty, destz); break; } } Trinity::NormalizeMapCoord(pos.m_positionX); Trinity::NormalizeMapCoord(pos.m_positionY); <API key>(pos.m_positionX, pos.m_positionY, pos.m_positionZ); pos.SetOrientation(GetOrientation()); } void WorldObject::SetPhaseMask(uint32 newPhaseMask, bool update) { m_phaseMask = newPhaseMask; if (update && IsInWorld()) <API key>(); } void WorldObject::PlayDistanceSound(uint32 sound_id, Player* target /*= NULL*/) { WorldPacket data(<API key>, 4+8); data << uint32(sound_id); data << uint64(GetGUID()); if (target) target->SendDirectMessage(&data); else SendMessageToSet(&data, true); } void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= NULL*/) { WorldPacket data(SMSG_PLAY_SOUND, 4); data << uint32(sound_id); if (target) target->SendDirectMessage(&data); else SendMessageToSet(&data, true); } void WorldObject::<API key>() { if (!IsInWorld()) return; std::list<Player*> targets; Trinity::<API key> check(this, GetVisibilityRange(), false); Trinity::PlayerListSearcher<Trinity::<API key>> searcher(this, targets, check); <API key>(GetVisibilityRange(), searcher); for (std::list<Player*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter) { Player* player = (*iter); if (player == this) continue; if (!player->HaveAtClient(this)) continue; if (isType(TYPEMASK_UNIT) && ((Unit*)this)->GetCharmerGUID() == player->GetGUID()) // TODO: this is for puppet continue; DestroyForPlayer(player); player->m_clientGUIDs.erase(GetGUID()); } } void WorldObject::<API key>(bool /*forced*/) { //updates object's visibility for nearby players Trinity::<API key> notifier(*this); <API key>(GetVisibilityRange(), notifier); } struct <API key> { UpdateDataMapType& i_updateDatas; WorldObject& i_object; std::set<uint64> plr_list; <API key>(WorldObject &obj, UpdateDataMapType &d) : i_updateDatas(d), i_object(obj) {} void Visit(PlayerMapType &m) { Player* source = NULL; for (PlayerMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { source = iter->getSource(); BuildPacket(source); if (!source->GetSharedVisionList().empty()) { SharedVisionList::const_iterator it = source->GetSharedVisionList().begin(); for (; it != source->GetSharedVisionList().end(); ++it) BuildPacket(*it); } } } void Visit(CreatureMapType &m) { Creature* source = NULL; for (CreatureMapType::iterator iter = m.begin(); iter != m.end(); ++iter) { source = iter->getSource(); if (!source->GetSharedVisionList().empty()) { SharedVisionList::const_iterator it = source->GetSharedVisionList().begin(); for (; it != source->GetSharedVisionList().end(); ++it) BuildPacket(*it); } } } void Visit(<API key> &m) { DynamicObject* source = NULL; for (<API key>::iterator iter = m.begin(); iter != m.end(); ++iter) { source = iter->getSource(); uint64 guid = source->GetCasterGUID(); if (IS_PLAYER_GUID(guid)) { //Caster may be NULL if DynObj is in removelist if (Player* caster = ObjectAccessor::FindPlayer(guid)) if (caster->GetUInt64Value(PLAYER_FARSIGHT) == source->GetGUID()) BuildPacket(caster); } } } void BuildPacket(Player* player) { // Only send update once to a player if (plr_list.find(player->GetGUID()) == plr_list.end() && player->HaveAtClient(&i_object)) { i_object.BuildFieldsUpdate(player, i_updateDatas); plr_list.insert(player->GetGUID()); } } template<class SKIP> void Visit(GridRefManager<SKIP> &) {} }; void WorldObject::BuildUpdate(UpdateDataMapType& data_map) { CellCoord p = Trinity::ComputeCellCoord(GetPositionX(), GetPositionY()); Cell cell(p); cell.SetNoCreate(); <API key> notifier(*this, data_map); <API key><<API key>, <API key> > player_notifier(notifier); Map& map = *GetMap(); //we must build packets for all visible players cell.Visit(p, player_notifier, map, *this, GetVisibilityRange()); ClearUpdateMask(false); } uint64 WorldObject::GetTransGUID() const { if (GetTransport()) return GetTransport()->GetGUID(); return 0; }
# To test encrypted SST and IST. . inc/common.sh node1=1 # node2 will be getting SST node2=901 ADDR=127.0.0.1 SSTPASS="password" SUSER="root" SMDSUM="<API key>" tca="/tmp/certs/node1.crt" tkey="/tmp/certs/node1.key" vlog "Running test for encrypted replication" EXTRAFILE1="$XB_TESTDIR/conf/enc.cnf-node1" EXTRAFILE2="$XB_TESTDIR/conf/enc.cnf-node2" vlog "Including $EXTRAFILE1 and $EXTRAFILE2" debug="" pdebug="" if [[ -n ${WSREP_DEBUG:-} ]];then debug="--wsrep-debug=1" pdebug=";debug=1" fi recv_addr1="${ADDR}:$(get_free_port 2)" recv_addr2="${ADDR}:$(get_free_port 3)" listen_addr1="${ADDR}:$(get_free_port 4)" listen_addr2="${ADDR}:$(get_free_port 5)" vlog "Starting server $node1" <API key>="!include $EXTRAFILE1" <API key> $node1 --innodb_flush_method=O_DIRECT --<API key>=2 --<API key>=1 --wsrep-slave-threads=2 --<API key> --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --<API key>=gcomm:// --<API key>=$recv_addr1 --<API key>=$ADDR --<API key>="gmcast.listen_addr=tcp://$listen_addr1;socket.ssl_cert=$tca;socket.ssl_key=$tkey;socket.ssl_cipher=AES128-SHA${pdebug}" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth=$SUSER:$SSTPASS --wsrep_node_address=$ADDR $debug vlog "Sleeping before loading data" sleep 8 load_dbase_schema sbtest load_dbase_data sbtest vlog "Setting password to 'password'" run_cmd ${MYSQL} ${MYSQL_ARGS} <<EOF SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password'); EOF vlog "Starting server $node2" <API key>="!include $EXTRAFILE2" <API key> $node2 --innodb_flush_method=O_DIRECT --<API key>=2 --<API key>=1 --wsrep-slave-threads=2 --<API key> --binlog-format=ROW --wsrep-provider=${MYSQL_BASEDIR}/lib/libgalera_smm.so --<API key>=gcomm://$listen_addr1 --<API key>=$recv_addr2 --<API key>=$ADDR --<API key>="gmcast.listen_addr=tcp://$listen_addr2;socket.ssl_cert=$tca;socket.ssl_key=$tkey;socket.ssl_cipher=AES128-SHA${pdebug}" --wsrep_sst_method=xtrabackup-v2 --wsrep_sst_auth=$SUSER:$SSTPASS --wsrep_node_address=$ADDR $debug switch_server $node2 # The password propagates through SST MYSQL_ARGS="${MYSQL_ARGS} -ppassword" sleep 3 if [[ "`${MYSQL} ${MYSQL_ARGS} -Ns -e 'SHOW STATUS LIKE "<API key>"'|awk {'print $2'}`" == "`sed -re 's/:.+$//' $MYSQLD_DATADIR/<API key>`" && "`${MYSQL} ${MYSQL_ARGS} -Ns -e 'SHOW STATUS LIKE "<API key>"'|awk {'print $2'}`" == "`sed -re 's/^.+://' $MYSQLD_DATADIR/<API key>`" ]] then vlog "SST successful" else vlog "SST failed" exit 1 fi # Lightweight verification till lp:1199656 is fixed mdsum=$(${MYSQL} ${MYSQL_ARGS} -e 'select * from sbtest.sbtest1;' | md5sum | cut -d" " -f1) if [[ $mdsum != $SMDSUM ]];then vlog "Integrity verification failed: found: $mdsum expected: $SMDSUM" exit 1 else vlog "Integrity verification successful" fi vlog "Testing replication" load_dbase_schema sakila load_dbase_data sakila SMDSUM=$(${MYSQL} ${MYSQL_ARGS} -e 'select * from sakila.customer;' | md5sum | cut -d" " -f1) echo "md5sum on node:$node2 = $SMDSUM" switch_server $node1 MYSQL_ARGS="${MYSQL_ARGS} -ppassword" mdsum=$(${MYSQL} ${MYSQL_ARGS} -e 'select * from sakila.customer;' | md5sum | cut -d" " -f1) if [[ $mdsum != $SMDSUM ]];then vlog "Integrity verification failed: found: $mdsum expected: $SMDSUM" exit 1 else vlog "Integrity verification successful" fi stop_server_with_id $node2 stop_server_with_id $node1 free_reserved_port ${listen_addr1} free_reserved_port ${listen_addr2} free_reserved_port ${recv_addr1} free_reserved_port ${recv_addr2}
.bicon, .user_image { background:transparent url("../style-theme.png") no-repeat top left; } .bicon { width:80px; height:60px; } .<API key>{ visibility: visible; max-height: 100%; position: relative; margin: 0 auto; } .<API key> { width: 30%; } .<API key> { width: 50%; padding-left: 10px; padding-top: 10px; vertical-align: top; } .x-item-disabled { opacity: 1 !important; -moz-opacity: 1 !important; filter: none !important; } .<API key> { position: relative; top: 0px; left: 10px; width: 135px !important; height: 90px !important; border: solid 1px gray; padding: 3px; box-shadow: 0px 0px 6px #000000; -webkit-box-shadow: 0px 0px 6px #000000; -moz-box-shadow: 0px 0px 6px #000000; filter: progid:DXImageTransform.Microsoft.Shadow(color='#666666', Direction=135, Strength=2); } .<API key>{ width: 135px !important; height: 90px !important; } .x-panel-bwrap { overflow: hidden; zoom: 1; left: 0; top: 0; } .loading-img { display: block; position: absolute; top: 298px; left: 398px; } .x-form-field-wrap .x-form-addalbum { position: absolute; } .x-form-field-wrap .x-form-trigger { border-bottom-color: #6E7378; } button#cancel{ position: absolute; width: 80px; height: 30px; right: 10px; bottom: 10px; } button#upload_photo{ position: absolute; width: 80px; height: 30px; right: 100px; bottom: 10px; } #user_authorize { color: #3B5998; font-weight: bold; position: absolute; left: 80px; top: 90px; } .user_login_option { text-decoration: underline; cursor: pointer; } #user_deletetoken { color: #3B5998; position: absolute; left: 80px; top: 70px; cursor: pointer; } .<API key>{ height:115px; overflow:auto; border:1px solid #ccc; background-color:#2A2A2A; color:#fff; } .folderDiv { background-position: -80px -175px; } .audiofileDiv { background-position: -400px -175px; } .pdffileDiv { background-position: -720px -175px; } .pptfileDiv { background-position: -480px -175px; } .docfileDiv { background-position: -560px -175px; } .xlsfileDiv { background-position: -640px -175px; } .fileDiv { background-position: -160px -175px; } .user_image{ background-position: -240px -530px; width:54px; height:54px; } #tr_user_option{ height:60px; } #tr_image_upload{ height:150px; } #tr_album{ height:50px; }
package com.oracle.javafx.scenebuilder.kit.editor.panel.content.mode; import com.oracle.javafx.scenebuilder.kit.editor.images.ImageUtils; import com.oracle.javafx.scenebuilder.kit.editor.panel.content.<API key>; import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.AbstractDriver; import com.oracle.javafx.scenebuilder.kit.editor.panel.content.driver.pring.AbstractPring; import com.oracle.javafx.scenebuilder.kit.editor.selection.<API key>; import com.oracle.javafx.scenebuilder.kit.editor.selection.Selection; import com.oracle.javafx.scenebuilder.kit.fxom.FXOMDocument; import com.oracle.javafx.scenebuilder.kit.fxom.FXOMObject; import com.oracle.javafx.scenebuilder.kit.util.Deprecation; import javafx.event.EventHandler; import javafx.scene.Cursor; import javafx.scene.Group; import javafx.scene.Node; import javafx.scene.input.MouseEvent; public class PickModeController extends <API key> { private HitNodeChrome hitNodeChrome; public PickModeController(<API key> <API key>) { super(<API key>); } /* * <API key> */ @Override public void willResignActive(<API key> nextModeController) { <API key>.getGlassLayer().setCursor(Cursor.DEFAULT); <API key>(); removeHitNodeChrome(); } @Override public void didBecomeActive(<API key> <API key>) { assert <API key>.getGlassLayer() != null; updateHitNodeChrome(); <API key>(); <API key>.getGlassLayer().setCursor(ImageUtils.getCSSCursor()); } @Override public void <API key>() { updateHitNodeChrome(); } @Override public void <API key>(FXOMDocument oldDocument) { // Same logic as when the scene graph is changed <API key>(); } @Override public void <API key>() { updateHitNodeChrome(); } @Override public void dropTargetDidChange() { // Should not be invoked : if drag gesture starts, editor controller // will switch to EditModeController. assert false; } /* * Private */ private void <API key>() { final Node glassLayer = <API key>.getGlassLayer(); assert glassLayer.getOnMousePressed() == null; glassLayer.setOnMousePressed(<API key>); } private void <API key>() { final Node glassLayer = <API key>.getGlassLayer(); glassLayer.setOnMousePressed(null); } private final EventHandler<MouseEvent> <API key> = e -> <API key>(e); private void <API key>(MouseEvent e) { final Selection selection = <API key>.getEditorController().getSelection(); final FXOMDocument fxomDocument = <API key>.getEditorController().getFxomDocument(); final FXOMObject hitObject; final Node hitNode; if ((fxomDocument == null) || (fxomDocument.getFxomRoot() == null)) { hitObject = null; hitNode = null; } else { final FXOMObject fxomRoot = fxomDocument.getFxomRoot(); final Object sceneGraphRoot = fxomRoot.getSceneGraphObject(); if (sceneGraphRoot instanceof Node) { hitNode = Deprecation.pick((Node)sceneGraphRoot, e.getSceneX(), e.getSceneY()); FXOMObject fxomObject = null; Node node = hitNode; while ((fxomObject == null) && (node != null)) { fxomObject = fxomRoot.<API key>(node); node = node.getParent(); } hitObject = fxomObject; } else { hitObject = null; hitNode = null; } } if (hitObject == null) { selection.clear(); } else { if (selection.isSelected(hitObject)) { assert selection.getGroup() instanceof <API key>; selection.updateHitObject(hitObject, hitNode); } else { selection.select(hitObject, hitNode); } } } private void updateHitNodeChrome() { final Selection selection = <API key>.getEditorController().getSelection(); final HitNodeChrome newChrome; if ((hitNodeChrome == null) || (hitNodeChrome.getFxomObject() != selection.getHitItem()) || (hitNodeChrome.getHitNode() != selection.getCheckedHitNode())) { if ((selection.getHitItem() != null) && (selection.getCheckedHitNode() != null)){ newChrome = makeHitNodeChrome(selection.getHitItem(), selection.getCheckedHitNode()); } else { newChrome = null; } } else { switch(hitNodeChrome.getState()) { default: case CLEAN: newChrome = hitNodeChrome; break; case NEEDS_RECONCILE: newChrome = hitNodeChrome; hitNodeChrome.reconcile(); break; case NEEDS_REPLACE: newChrome = makeHitNodeChrome(selection.getHitItem(), selection.getCheckedHitNode()); assert newChrome.getState() == HitNodeChrome.State.CLEAN; break; } } if (newChrome != hitNodeChrome) { final Group rudderLayer = <API key>.getRudderLayer(); if (hitNodeChrome != null) { rudderLayer.getChildren().remove(hitNodeChrome.getRootNode()); } hitNodeChrome = newChrome; if (hitNodeChrome != null) { rudderLayer.getChildren().add(hitNodeChrome.getRootNode()); } } else { assert (hitNodeChrome == null) || hitNodeChrome.getState() == AbstractPring.State.CLEAN; } } private HitNodeChrome makeHitNodeChrome(FXOMObject hitItem, Node hitNode) { final HitNodeChrome result; assert hitItem != null; /* * In some cases, we cannot make a chrome for some hitObject * * MenuButton <= OK * CustomMenuItem <= KO because MenuItem are not displayable (case #1) * CheckBox <= KO because this CheckBox is in a separate scene (Case #2) */ final AbstractDriver driver = <API key>.lookupDriver(hitItem); if (driver == null) { // Case #1 above result = null; } else { final FXOMObject closestNodeObject = hitItem.getClosestNode(); if (closestNodeObject == null) { // Document content is not displayable in content panel result = null; } else { assert closestNodeObject.getSceneGraphObject() instanceof Node; final Node closestNode = (Node)closestNodeObject.getSceneGraphObject(); if (closestNode.getScene() == <API key>.getPanelRoot().getScene()) { result = new HitNodeChrome(<API key>, hitItem, hitNode); } else { // Case #2 above result = null; } } } return result; } private void removeHitNodeChrome() { if (hitNodeChrome != null) { final Group rudderLayer = <API key>.getRudderLayer(); rudderLayer.getChildren().remove(hitNodeChrome.getRootNode()); hitNodeChrome = null; } } }
#include <QMessageBox> #include <QDateTime> #include <QPushButton> #include "qgis.h" #include "qgsapplication.h" #include "qgsmaplayer.h" #include "qgsmaplayerregistry.h" #include "qgsproject.h" #include "<API key>.h" #include "qgsspatialquery.h" #include "qgsrubberselectid.h" #include "qgsmngprogressbar.h" <API key>::<API key>( QWidget* parent, QgisInterface* iface ): QDialog( parent ) { setupUi( this ); grpResults->hide(); mLayerReference = mLayerTarget = NULL; mIface = iface; mRubberSelectId = new QgsRubberSelectId( iface->mapCanvas() ); <API key>(); initGui(); connectAll(); mMsgLayersLessTwo = tr( "The spatial query requires at least two layers" ); } // <API key>::<API key>( QWidget* parent, QgisInterface* iface ) <API key>::~<API key>() { disconnectAll(); delete mRubberSelectId; mMapIdVectorLayers.clear(); mFeatureResult.clear(); } // <API key>::~<API key>() void <API key>::<API key>() { QString msgLayersLessTwo = tr( "The spatial query requires at least two layers" ); QMessageBox::warning( 0, tr( "Insufficient number of layers" ), msgLayersLessTwo, QMessageBox::Ok ); } void <API key>::disconnectQGis() { disconnectAll(); } // void <API key>::unload() void <API key>::initGui() { showLogProcessing( false ); grpResults->hide(); buttonBox->button( QDialogButtonBox::Close )->hide(); <API key>(); if ( targetLayerComboBox->count() > 1 ) { setLayer( true, 0 ); evaluateCheckBox( true ); <API key>(); setLayer( false, 0 ); evaluateCheckBox( false ); <API key>(); } else { buttonBox->setEnabled( false ); textEditStatus->append( mMsgLayersLessTwo ); } } // <API key>::initGui() void <API key>::<API key>() { int myRedInt, myGreenInt, myBlueInt; myRedInt = QgsProject::instance()->readNumEntry( "Gui", "/<API key>", 255 ); myGreenInt = QgsProject::instance()->readNumEntry( "Gui", "/<API key>", 255 ); myBlueInt = QgsProject::instance()->readNumEntry( "Gui", "/<API key>", 0 ); mRubberSelectId->setColor( 255 - myRedInt, 255 - myGreenInt, 255 - myBlueInt, 0.5, 2 ); } // void <API key>::<API key>() void <API key>::setLayer( bool isTarget, int index ) { if ( isTarget ) { if ( mLayerTarget ) { disconnect( mLayerTarget, SIGNAL( selectionChanged() ), this, SLOT( <API key>() ) ); } mLayerTarget = <API key>( isTarget, index ); connect( mLayerTarget, SIGNAL( selectionChanged() ), this, SLOT( <API key>() ) ); } else { if ( mLayerReference ) { disconnect( mLayerReference, SIGNAL( selectionChanged() ), this, SLOT( <API key>() ) ); } mLayerReference = <API key>( isTarget, index ); connect( mLayerReference, SIGNAL( selectionChanged() ), this, SLOT( <API key>() ) ); } } // void <API key>::setLayer(bool isTarget, int index) void <API key>::evaluateCheckBox( bool isTarget ) { QgsVectorLayer* layer = NULL; QCheckBox* checkbox = NULL; if ( isTarget ) { layer = mLayerTarget; checkbox = <API key>; } else { layer = mLayerReference; checkbox = <API key>; } int selectedCount = layer-><API key>(); bool isCheckBoxValid = ( layer != NULL && selectedCount > 0 ); checkbox->setChecked( isCheckBoxValid ); checkbox->setEnabled( isCheckBoxValid ); QString textCheckBox = isCheckBoxValid ? tr( "%n selected geometries", "selected geometries", selectedCount ) : tr( "Selected geometries" ); checkbox->setText( textCheckBox ); } // void <API key>::evaluateCheckBox(bool isTarget) void <API key>::runQuery() { buttonBox->setEnabled( false ); MngProgressBar* pb = new MngProgressBar( progressBarStatus ); QgsSpatialQuery* spatialQuery = new QgsSpatialQuery( pb ); if ( <API key>->isChecked() ) { spatialQuery-><API key>( true ); } if ( <API key>->isChecked() ) { spatialQuery-><API key>( true ); } progressBarStatus->setTextVisible( true ); mFeatureResult.clear(); int currentItem = operantionComboBox->currentIndex(); bool isOk; int operation = operantionComboBox->itemData( currentItem ).toInt( &isOk ); spatialQuery->runQuery( mFeatureResult, operation, mLayerTarget, mLayerReference ); delete spatialQuery; delete pb; progressBarStatus->setTextVisible( false ); buttonBox->setEnabled( true ); grpResults->show(); setInputsVisible( false ); progressBarStatus->hide(); buttonBox->button( QDialogButtonBox::Close )->show(); buttonBox->button( QDialogButtonBox::Cancel )->hide(); buttonBox->button( QDialogButtonBox::Ok )->hide(); adjustSize(); } // void <API key>::runQuery() void <API key>::setInputsVisible( bool show ) { grpTargetGroupBox->setVisible( show ); <API key>->setVisible( show ); <API key>->setVisible( show ); } void <API key>::showLogProcessing( bool hasShow ) { static int <API key> = 0; hasShow ? textEditStatus->show() : textEditStatus->hide(); adjustSize(); if ( ! hasShow ) { if ( <API key> == 0 ) { <API key> = geometry().height(); } else { setGeometry( geometry().x(), geometry().y(), geometry().width(), <API key> ); } } } // void <API key>::showLogProcessing(bool hasShow) void <API key>::showResultQuery( QDateTime *datetimeStart, QDateTime *datetimeEnd ) { <API key>->clear(); countSelectedFeats->setText( tr( "Total: %1" ).arg( mFeatureResult.size() ) ); QString msg = tr( "<<-- Begin at [%L1] --" ).arg( datetimeStart->toString() ); textEditStatus->append( msg ); msg = tr( "Query:" ); textEditStatus->append( msg ); msg = QString( "- %1" ).arg( <API key>( true ) ); textEditStatus->append( msg ); msg = tr( "< %1 >" ).arg( operantionComboBox->currentText() ); textEditStatus->append( msg ); msg = QString( "- %1" ).arg( <API key>( false ) ); textEditStatus->append( msg ); msg = tr( "Result: %1 features" ).arg( mFeatureResult.size() ); textEditStatus->append( msg ); double timeProcess = ( double )datetimeStart->secsTo( *datetimeEnd ) / 60.0; msg = tr( "-- Finish at [%L1] (processing time %L2 minutes) -->>" ).arg( datetimeEnd->toString() ).arg( timeProcess, 0, 'f', 2 ); textEditStatus->append( msg ); if ( mFeatureResult.size() > 0 ) { populateQueryResult(); mLayerTarget->setSelectedFeatures( mFeatureResult ); evaluateCheckBox( true ); QString sIdFeat = <API key>->currentItem()->text(); <API key>( sIdFeat ); } else { mRubberSelectId->reset(); } } // void <API key>::showResultQuery(QDateTime *datetimeStart, QDateTime *datetimeEnd) QString <API key>::<API key>( bool isTarget ) { QgsVectorLayer* layer = NULL; QCheckBox * checkBox = NULL; if ( isTarget ) { layer = mLayerTarget; checkBox = <API key>; } else { layer = mLayerReference; checkBox = <API key>; } QString sDescFeatures = checkBox->isChecked() ? tr( "%1 of %2" ).arg( layer-><API key>() ).arg( layer->featureCount() ) : tr( "all = %1" ).arg( layer->featureCount() ); return QString( "%1 (%2)" ).arg( layer->name() ).arg( sDescFeatures ); } // QString <API key>::<API key>(bool isTarget) void <API key>::connectAll() { connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( <API key>( QgsMapLayer* ) ) ) ; connect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( <API key>( QString ) ) ); connect( <API key>, SIGNAL( clicked( bool ) ), this, SLOT( <API key>( bool ) ) ); } // <API key>::connectAll() void <API key>::disconnectAll() { disconnect( QgsMapLayerRegistry::instance(), SIGNAL( layerWasAdded( QgsMapLayer* ) ), this, SLOT( <API key>( QgsMapLayer* ) ) ) ; disconnect( QgsMapLayerRegistry::instance(), SIGNAL( layerWillBeRemoved( QString ) ), this, SLOT( <API key>( QString ) ) ); if ( mLayerTarget ) { disconnect( mLayerTarget, SIGNAL( selectionChanged() ), this, SLOT( <API key>() ) ); } if ( mLayerReference ) { disconnect( mLayerReference, SIGNAL( selectionChanged() ), this, SLOT( <API key>() ) ); } } // <API key>::disconnectAll() void <API key>::reject() { disconnectAll(); mRubberSelectId->reset(); mLayerTarget = mLayerReference = NULL; mFeatureResult.clear(); mMapIdVectorLayers.clear(); QDialog::reject(); } // <API key>::reject() QgsVectorLayer * <API key>::<API key>( bool isTarget, int index ) { QVariant data = isTarget ? targetLayerComboBox->itemData( index ) : <API key>->itemData( index ); QgsVectorLayer* lyr = static_cast<QgsVectorLayer*>( data.value<void *>() ); return lyr; } // QgsVectorLayer * <API key>::<API key>(bool isTarget, int index) QIcon <API key>::getIconTypeGeometry( QGis::GeometryType geomType ) { QString theName; if ( geomType == QGis::Point ) { theName = "/mIconPointLayer.png"; } else if ( geomType == QGis::Line ) { theName = "/mIconLineLayer.png"; } else // Polygon { theName = "/mIconPolygonLayer.png"; } // Copy from qgisapp.cpp QString myPreferredPath = QgsApplication::activeThemePath() + QDir::separator() + theName; QString myDefaultPath = QgsApplication::defaultThemePath() + QDir::separator() + theName; if ( QFile::exists( myPreferredPath ) ) { return QIcon( myPreferredPath ); } else if ( QFile::exists( myDefaultPath ) ) { //could still return an empty icon if it //doesnt exist in the default theme either! return QIcon( myDefaultPath ); } else { return QIcon(); } } // QIcon <API key>::getIconTypeGeometry(int typeGeometry) void <API key>::addLayerCombobox( bool isTarget, QgsVectorLayer* vectorLayer ) { QVariant item = QVariant::fromValue(( void * )vectorLayer ); QComboBox * cmb = isTarget ? targetLayerComboBox : <API key>; int idNew = cmb->count(); QIcon icon = getIconTypeGeometry( vectorLayer->geometryType() ); cmb->addItem( icon, vectorLayer->name(), item ); cmb->setItemData( idNew, QVariant( vectorLayer->source() ), Qt::ToolTipRole ); } // void <API key>::removeLayerCombobox(bool isTarget, QgsVectorLayer* vectorLayer) int <API key>::<API key>( bool isTarget, QgsVectorLayer* vectorLayer ) { QVariant item = QVariant::fromValue(( void * )vectorLayer ); QComboBox * cmb = isTarget ? targetLayerComboBox : <API key>; return cmb->findData( item ); } void <API key>::removeLayer( bool isTarget, QgsVectorLayer* lyrRemove ) { QComboBox * cmb = isTarget ? targetLayerComboBox : <API key>; cmb->blockSignals( true ); // Remove Combobox int index = <API key>( isTarget, lyrRemove ); if ( index > -1 ) { cmb->removeItem( index ); } else { return; } // Set Layers (Target or Reference) QgsVectorLayer* lyrThis = mLayerTarget; if ( !isTarget ) { lyrThis = mLayerReference; } if ( lyrRemove == lyrThis ) { lyrThis = NULL; if ( cmb->count() > 0 ) { cmb->setCurrentIndex( 0 ); setLayer( isTarget, 0 ); evaluateCheckBox( isTarget ); if ( isTarget ) { <API key>->blockSignals( true ); <API key>->clear(); <API key>->blockSignals( false ); countSelectedFeats->setText( tr( "Total" ) + ": 0" ); mRubberSelectId->reset(); } } } cmb->blockSignals( false ); } // void <API key>::removeLayer(bool isTarget, QgsVectorLayer* lyrRemove) void <API key>::<API key>() { targetLayerComboBox->blockSignals( true ); QMap <QString, QgsMapLayer*> map = QgsMapLayerRegistry::instance()->mapLayers(); QMapIterator <QString, QgsMapLayer*> item( map ); QgsMapLayer * mapLayer = NULL; QgsVectorLayer * vectorLayer = NULL; QString layerId; while ( item.hasNext() ) { item.next(); mapLayer = item.value(); if ( mapLayer->type() != QgsMapLayer::VectorLayer ) { continue; } vectorLayer = qobject_cast<QgsVectorLayer *>( mapLayer ); if ( !vectorLayer ) { continue; } addLayerCombobox( true, vectorLayer ); mMapIdVectorLayers.insert( vectorLayer->getLayerID(), vectorLayer ); } targetLayerComboBox->setCurrentIndex( 0 ); targetLayerComboBox->blockSignals( false ); } // void <API key>::<API key>() void <API key>::<API key>() { <API key>->blockSignals( true ); <API key>->clear(); // Populate new values and Set current item keeping the previous value QString itemText; QVariant itemData; QIcon itemIcon; QgsVectorLayer * itemLayer = NULL; int idNew = 0; for ( int id = 0; id < targetLayerComboBox->count(); id++ ) { itemText = targetLayerComboBox->itemText( id ); itemData = targetLayerComboBox->itemData( id ); itemIcon = targetLayerComboBox->itemIcon( id ); itemLayer = static_cast<QgsVectorLayer *>( itemData.value<void *>() ); if ( itemLayer == mLayerTarget ) { continue; } <API key>->addItem( itemIcon, itemText, itemData ); <API key>->setItemData( idNew, QVariant( itemLayer->source() ), Qt::ToolTipRole ); idNew++; } int idCurrent = <API key>( false, mLayerReference ); if ( idCurrent == -1 ) { idCurrent = 0; } <API key>->setCurrentIndex( idCurrent ); <API key>->blockSignals( false ); } // <API key>::<API key>() void <API key>::<API key>() { operantionComboBox->blockSignals( true ); if ( mLayerTarget == NULL || mLayerReference == NULL ) { operantionComboBox->clear(); operantionComboBox->blockSignals( true ); } QVariant currentValueItem; bool isStartEmpty = false; if ( operantionComboBox->count() == 0 ) { isStartEmpty = true; } else { currentValueItem = operantionComboBox->itemData( operantionComboBox->currentIndex() ); } // Populate new values QMap<QString, int> * map = QgsSpatialQuery::getTypesOperations( mLayerTarget, mLayerReference ); QMapIterator <QString, int> item( *map ); operantionComboBox->clear(); while ( item.hasNext() ) { item.next(); operantionComboBox->addItem( item.key(), QVariant( item.value() ) ); } delete map; // Set current item keeping the previous value int idCurrent = 0; if ( !isStartEmpty ) { idCurrent = operantionComboBox->findData( currentValueItem ); if ( idCurrent == -1 ) { idCurrent = 0; } } operantionComboBox->setCurrentIndex( idCurrent ); operantionComboBox->blockSignals( false ); } // <API key>::<API key>() void <API key>::populateQueryResult() { <API key>->blockSignals( true ); <API key>->clear(); <API key>->setEnabled( false ); QSetIterator <int>item( mFeatureResult ); while ( item.hasNext() ) { <API key>->addItem( QString::number( item.next() ) ); } <API key>->setEnabled( true ); <API key>->setCurrentRow( 0 ); <API key>->blockSignals( false ); } // <API key>::populateQueryResult() //! Slots for signs of Dialog void <API key>::<API key>() { if ( ! mLayerReference ) { QMessageBox::warning( 0, tr( "Missing reference layer" ), tr( "Select reference layer!" ), QMessageBox::Ok ); return; } if ( ! mLayerTarget ) { QMessageBox::warning( 0, tr( "Missing target layer" ), tr( "Select target layer!" ), QMessageBox::Ok ); return; } QDateTime datetimeStart = QDateTime::currentDateTime(); runQuery(); QDateTime datetimeEnd = QDateTime::currentDateTime(); showResultQuery( &datetimeStart, &datetimeEnd ); } // <API key>::<API key>() void <API key>::<API key>() { if ( grpResults->isHidden() ) { reject(); } else { grpResults->hide(); setInputsVisible( true ); progressBarStatus->show(); buttonBox->button( QDialogButtonBox::Close )->hide(); buttonBox->button( QDialogButtonBox::Cancel )->show(); buttonBox->button( QDialogButtonBox::Ok )->show(); } } // void <API key>::<API key>() void <API key>::<API key>( int index ) { // Add old target layer in reference combobox addLayerCombobox( false, mLayerTarget ); // Set target layer setLayer( true, index ); evaluateCheckBox( true ); // Remove new target layer in reference combobox removeLayer( false, mLayerTarget ); <API key>(); } // <API key>::<API key>(int index) void <API key>::<API key>( int index ) { setLayer( false, index ); evaluateCheckBox( false ); <API key>(); } // <API key>::<API key>(int index); void <API key>::<API key>( const QString& currentText ) { mRubberSelectId->reset(); <API key>->setEnabled( false ); QCursor c; c.setShape( Qt::WaitCursor ); Qt::CursorShape shapeCurrent = cursor().shape(); setCursor( c ); c.setShape( shapeCurrent ); bool ok; int Id = currentText.toInt( &ok ); mRubberSelectId->addFeature( mLayerTarget, Id ); <API key>->setEnabled( true ); setCursor( c ); <API key>->setFocus(); mRubberSelectId->show(); } // <API key>::<API key>(const QString& currentText) void <API key>::<API key>( bool checked ) { showLogProcessing( checked ); } // void <API key>::<API key>(bool checked) //! Slots for signs of QGIS void <API key>::<API key>( QgsMapLayer* mapLayer ) { if ( mapLayer->type() != QgsMapLayer::VectorLayer ) { return; } QgsVectorLayer * vectorLayer = qobject_cast<QgsVectorLayer *>( mapLayer ); if ( !vectorLayer ) { return; } addLayerCombobox( true, vectorLayer ); addLayerCombobox( false, vectorLayer ); mMapIdVectorLayers.insert( vectorLayer->getLayerID(), vectorLayer ); // Verify is can enable buttonBox if ( !buttonBox->button( QDialogButtonBox::Ok )->isEnabled() && targetLayerComboBox->count() > 1 ) { buttonBox->button( QDialogButtonBox::Ok )->setEnabled( true ); } } // <API key>::<API key>(QgsMapLayer* mapLayer) void <API key>::<API key>( QString idLayer ) { // If Frozen: the QGis can be: Exit, Add Project, New Project if ( mIface->mapCanvas()->isFrozen() ) { reject(); } // idLayer = QgsMapLayer::getLayerID() // Get Pointer layer removed QMap<QString, QgsVectorLayer *>::const_iterator i = mMapIdVectorLayers.find( idLayer ); if ( i == mMapIdVectorLayers.end() ) { return; } mMapIdVectorLayers.remove( idLayer ); QgsVectorLayer *vectorLayer = i.value(); removeLayer( true, vectorLayer ); // set new target if need removeLayer( false, vectorLayer ); // set new reference if need if ( mLayerTarget && <API key>( <API key>, mLayerTarget ) > -1 ) { removeLayer( false, mLayerTarget ); } <API key>(); if ( targetLayerComboBox->count() < 2 ) { buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false ); textEditStatus->append( mMsgLayersLessTwo ); } } // <API key>::<API key>(QString idLayer) //! Slots for signals of Layers (Target or Reference) void <API key>::<API key>() { evaluateCheckBox( true ); } // void <API key>::<API key>() void <API key>::<API key>() { evaluateCheckBox( false ); } // void <API key>::<API key>() void <API key>::MsgDEBUG( QString sMSg ) { QMessageBox::warning( 0, tr( "DEBUG" ), sMSg, QMessageBox::Ok ); }
<?php /** * Admin View: Page - Status */ if ( ! defined( 'ABSPATH' ) ) { exit; } $current_tab = ! empty( $_REQUEST['tab'] ) ? sanitize_title( $_REQUEST['tab'] ) : 'status'; ?> <div class="wrap woocommerce"> <div class="icon32 <API key>" id="icon-woocommerce"><br /></div><h2 class="nav-tab-wrapper woo-nav-tab-wrapper"> <?php $tabs = array( 'status' => __( 'System Status', 'woocommerce' ), 'tools' => __( 'Tools', 'woocommerce' ), 'logs' => __( 'Logs', 'woocommerce' ), ); foreach ( $tabs as $name => $label ) { echo '<a href="' . admin_url( 'admin.php?page=wc-status&tab=' . $name ) . '" class="nav-tab '; if ( $current_tab == $name ) echo 'nav-tab-active'; echo '">' . $label . '</a>'; } ?> </h2><br/> <?php switch ( $current_tab ) { case "tools" : WC_Admin_Status::status_tools(); break; case "logs" : WC_Admin_Status::status_logs(); break; default : WC_Admin_Status::status_report(); break; } ?> </div>
# Makefile for the Synaptics DSX touchscreen driver. # Each configuration option enables a list of files. obj-$(<API key>) += synaptics_dsx_i2c.o obj-$(<API key>) += synaptics_dsx_spi.o obj-$(<API key>) += <API key>.o obj-$(<API key>) += synaptics_dsx_core.o obj-$(<API key>) += <API key>.o obj-$(<API key>) += <API key>.o obj-$(<API key>) += <API key>.o obj-$(<API key>) += <API key>.o obj-$(<API key>) += <API key>.o obj-$(<API key>) += synaptics_dsx_debug.o
<?php namespace TYPO3\CMS\Extensionmanager\Utility; /** * Utility for dealing with ext_emconf */ class EmConfUtility implements \TYPO3\CMS\Core\SingletonInterface { /** * Returns the $EM_CONF array from an extensions ext_emconf.php file * * @param array $extension Extension information array * @return array EMconf array values. */ public function includeEmConf(array $extension) { $_EXTKEY = $extension['key']; $path = PATH_site . $extension['siteRelPath'] . 'ext_emconf.php'; $EM_CONF = NULL; if (file_exists($path)) { include $path; if (is_array($EM_CONF[$_EXTKEY])) { return $EM_CONF[$_EXTKEY]; } } return FALSE; } /** * Generates the content for the ext_emconf.php file * Sets dependencies from TER data if any * * @internal * @param array $extensionData * @param \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension Extension object from TER data * @return string */ public function constructEmConf(array $extensionData, \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension = NULL) { if (is_object($extension) && empty($extensionData['EM_CONF']['constraints'])) { $extensionData['EM_CONF']['constraints'] = unserialize($extension-><API key>()); } $emConf = $this->fixEmConf($extensionData['EM_CONF']); $emConf = var_export($emConf, TRUE); $code = '<?php $EM_CONF[$_EXTKEY] = ' . $emConf . '; '; return str_replace(' ', TAB, $code); } /** * Fix the em conf - Converts old / ter em_conf format to new format * * @param array $emConf * @return array */ public function fixEmConf(array $emConf) { if ( !isset($emConf['constraints']) || !isset($emConf['constraints']['depends']) || !isset($emConf['constraints']['conflicts']) || !isset($emConf['constraints']['suggests']) ) { if (!isset($emConf['constraints']) || !isset($emConf['constraints']['depends'])) { $emConf['constraints']['depends'] = $this->stringToDependency($emConf['dependencies']); if ((string)$emConf['PHP_version'] !== '') { $emConf['constraints']['depends']['php'] = $emConf['PHP_version']; } if ((string)$emConf['TYPO3_version'] !== '') { $emConf['constraints']['depends']['typo3'] = $emConf['TYPO3_version']; } } if (!isset($emConf['constraints']) || !isset($emConf['constraints']['conflicts'])) { $emConf['constraints']['conflicts'] = $this->stringToDependency($emConf['conflicts']); } if (!isset($emConf['constraints']) || !isset($emConf['constraints']['suggests'])) { $emConf['constraints']['suggests'] = array(); } } // Remove TER v1-style entries unset($emConf['dependencies']); unset($emConf['conflicts']); unset($emConf['suggests']); unset($emConf['private']); unset($emConf['download_password']); unset($emConf['TYPO3_version']); unset($emConf['PHP_version']); unset($emConf['internal']); unset($emConf['module']); unset($emConf['loadOrder']); unset($emConf['lockType']); unset($emConf['shy']); unset($emConf['priority']); unset($emConf['modify_tables']); unset($emConf['CGLcompliance']); unset($emConf['CGLcompliance_note']); return $emConf; } /** * Checks whether the passed dependency is TER-style (string)or * TER2-style (array)and returns a single string for displaying the * dependencies. * * It leaves out all version numbers and the "php" and "typo3" dependencies, * as they are implicit and of no interest without the version number. * * @param mixed $dependency Either a string or an array listing dependencies. * @return string A simple dependency list for display */ public function stringToDependency($dependency) { $constraint = array(); if (is_string($dependency) && $dependency !== '') { $dependency = explode(',', $dependency); foreach ($dependency as $v) { $constraint[$v] = ''; } } return $constraint; } }
#!/usr/bin/env python # modification, are permitted provided that the following conditions are # met: # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # OWNER 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. class <API key>: def collection_name(self): raise NotImplementedError, "subclasses must implement" def <API key>(self): raise NotImplementedError, "subclasses must implement" def status_server(self): raise NotImplementedError, "subclasses must implement" def is_terminal_status(self, status): raise NotImplementedError, "subclasses must implement" class <API key>: def __init__(self, delegate): self._delegate = delegate self._name = self._delegate.collection_name() self._status = self._delegate.status_server() self._status_cache = {} def _cached_status(self, patch_id): cached = self._status_cache.get(patch_id) if cached: return cached status = self._status.patch_status(self._name, patch_id) if status and self._delegate.is_terminal_status(status): self._status_cache[patch_id] = status return status def next(self): patch_ids = self._delegate.<API key>() for patch_id in patch_ids: status = self._cached_status(patch_id) if not status or not self._delegate.is_terminal_status(status): return patch_id
<?php /* core/themes/classy/templates/block/block.html.twig */ class <API key> extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = array( 'content' => array($this, 'block_content'), ); } protected function doDisplay(array $context, array $blocks = array()) { $tags = array("set" => 29, "if" => 37, "block" => 41); $filters = array("clean_class" => 31); $functions = array(); try { $this->env->getExtension('sandbox')->checkSecurity( array('set', 'if', 'block'), array('clean_class'), array() ); } catch (<API key> $e) { $e->setTemplateFile($this->getTemplateName()); if ($e instanceof <API key> && isset($tags[$e->getTagName()])) { $e->setTemplateLine($tags[$e->getTagName()]); } elseif ($e instanceof <API key> && isset($filters[$e->getFilterName()])) { $e->setTemplateLine($filters[$e->getFilterName()]); } elseif ($e instanceof <API key> && isset($functions[$e->getFunctionName()])) { $e->setTemplateLine($functions[$e->getFunctionName()]); } throw $e; } // line 29 $context["classes"] = array(0 => "block", 1 => ("block-" . \Drupal\Component\Utility\Html::getClass($this->getAttribute( // line 31 (isset($context["configuration"]) ? $context["configuration"] : null), "provider", array()))), 2 => ("block-" . \Drupal\Component\Utility\Html::getClass( // line 32 (isset($context["plugin_id"]) ? $context["plugin_id"] : null)))); // line 35 echo "<div"; echo $this->env->getExtension('sandbox')-><API key>($this->env->getExtension('drupal_core')->escapeFilter($this->env, $this->getAttribute((isset($context["attributes"]) ? $context["attributes"] : null), "addClass", array(0 => (isset($context["classes"]) ? $context["classes"] : null)), "method"), "html", null, true)); echo "> "; // line 36 echo $this->env->getExtension('sandbox')-><API key>($this->env->getExtension('drupal_core')->escapeFilter($this->env, (isset($context["title_prefix"]) ? $context["title_prefix"] : null), "html", null, true)); echo " "; // line 37 if ((isset($context["label"]) ? $context["label"] : null)) { // line 38 echo " <h2"; echo $this->env->getExtension('sandbox')-><API key>($this->env->getExtension('drupal_core')->escapeFilter($this->env, (isset($context["title_attributes"]) ? $context["title_attributes"] : null), "html", null, true)); echo ">"; echo $this->env->getExtension('sandbox')-><API key>($this->env->getExtension('drupal_core')->escapeFilter($this->env, (isset($context["label"]) ? $context["label"] : null), "html", null, true)); echo "</h2> "; } // line 40 echo " "; echo $this->env->getExtension('sandbox')-><API key>($this->env->getExtension('drupal_core')->escapeFilter($this->env, (isset($context["title_suffix"]) ? $context["title_suffix"] : null), "html", null, true)); echo " "; // line 41 $this->displayBlock('content', $context, $blocks); // line 44 echo "</div> "; } // line 41 public function block_content($context, array $blocks = array()) { // line 42 echo " "; echo $this->env->getExtension('sandbox')-><API key>($this->env->getExtension('drupal_core')->escapeFilter($this->env, (isset($context["content"]) ? $context["content"] : null), "html", null, true)); echo " "; } public function getTemplateName() { return "core/themes/classy/templates/block/block.html.twig"; } public function isTraitable() { return false; } public function getDebugInfo() { return array ( 82 => 42, 79 => 41, 74 => 44, 72 => 41, 67 => 40, 59 => 38, 57 => 37, 53 => 36, 48 => 35, 46 => 32, 45 => 31, 44 => 29,); } } /* * @file*/ /* * Theme override to display a block.*/ /* * Available variables:*/ /* * - plugin_id: The ID of the block implementation.*/ /* * - label: The configured label of the block if visible.*/ /* * - configuration: A list of the block's configuration values.*/ /* * - label: The configured label for the block.*/ /* * - label_display: The display settings for the label.*/ /* * - provider: The module or other provider that provided this block plugin.*/ /* * - Block plugin specific settings will also be stored here.*/ /* * - content: The content of this block.*/ /* * - attributes: array of HTML attributes populated by modules, intended to*/ /* * be added to the main container tag of this template.*/ /* * - id: A valid HTML ID and guaranteed unique.*/ /* * - title_attributes: Same as attributes, except applied to the main title*/ /* * tag that appears in the template.*/ /* * - title_prefix: Additional output populated by modules, intended to be*/ /* * displayed in front of the main title tag that appears in the template.*/ /* * - title_suffix: Additional output populated by modules, intended to be*/ /* * displayed after the main title tag that appears in the template.*/ /* * @see <API key>()*/ /* set classes = [*/ /* 'block',*/ /* 'block-' ~ configuration.provider|clean_class,*/ /* 'block-' ~ plugin_id|clean_class,*/ /* <div{{ attributes.addClass(classes) }}>*/ /* {{ title_prefix }}*/ /* {% if label %}*/ /* <h2{{ title_attributes }}>{{ label }}</h2>*/ /* {% endif %}*/ /* {{ title_suffix }}*/ /* {% block content %}*/ /* {{ content }}*/ /* {% endblock %}*/ /* </div>*/
package javafx.scene.control.test.cellapps; import javafx.scene.control.test.cellapps.CellsApp.DataItem; import javafx.util.StringConverter; /** * @author Alexander Kirov */ public class <API key> extends StringConverter { public static final String TO_STRING_PREFIX = "tsc "; public static final String FROM_STRING_PREFIX = "fsc "; int toStringCounter = 0; int fromStringCounter = 0; @Override public String toString(Object t) { return TO_STRING_PREFIX + (t != null ? t.toString() : "null"); } @Override public Object fromString(String string) { return new DataItem(FROM_STRING_PREFIX + string); } }
package mpicbg.spim.registration.bead; import spim.vecmath.Point3d; import net.imglib2.util.Util; import mpicbg.spim.registration.ViewDataBeads; import mpicbg.spim.registration.detection.DetectionView; public class Bead extends DetectionView< BeadIdentification, Bead > { // so the gauss fit knows if it relocalize it already public boolean relocalized = false; private static final long serialVersionUID = -<API key>; public Bead( final int id, final Point3d location, final ViewDataBeads myView ) { super( id, new double[] { location.x, location.y, location.z}, myView ); } public Bead( final int id, final double[] location, final ViewDataBeads myView ) { super( id, location, myView ); } @Override public String toString() { String desc = "Bead " + getID() + " l"+ Util.printCoordinates( getL() ) + "; w"+ Util.printCoordinates( getW() ); if ( myView != null) return desc + " of view " + myView; else return desc + " - no view assigned"; } public boolean equals( final Bead bead ) { if ( this.getID() == bead.getID() && this.getViewID() == bead.getViewID() ) return true; else return false; } public boolean equals( final BeadIdentification beadID ) { if ( this.getID() == beadID.getDetectionID() && this.getViewID() == beadID.getViewID() ) return true; else return false; } @Override public Bead[] createArray( final int n ){ return new Bead[ n ]; } @Override public BeadIdentification <API key>() { return new BeadIdentification( this ); } }
#include <ndb_global.h> #include "sisci_types.h" #include "sisci_api.h" #include "sisci_error.h" //#include "sisci_demolib.h" #include <NdbTick.h> #include <NdbSleep.h> #define NO_CALLBACK NULL #define NO_FLAGS 0 #define DATA_TRANSFER_READY 8 sci_error_t error; sci_desc_t sdOne; sci_desc_t sdTwo; sci_local_segment_t localSegmentOne; sci_local_segment_t localSegmentTwo; <API key> remoteSegmentOne; <API key> remoteSegmentTwo; sci_map_t localMapOne; sci_map_t localMapTwo; sci_map_t remoteMapOne; sci_map_t remoteMapTwo; unsigned int localAdapterNo = 0; unsigned int standbyAdapterNo = 1; unsigned int localNodeId1; unsigned int localNodeId2; unsigned int remoteNodeId1 = 0; unsigned int remoteNodeId2 = 0; unsigned int localSegmentId; unsigned int remoteSegmentId1; unsigned int remoteSegmentId2; unsigned int segmentSize = 8192; unsigned int offset = 0; unsigned int client = 0; unsigned int server = 0; unsigned int *localbufferPtr; static int data; static int interruptConnected=0; /* U S A G E */ void Usage() { printf("Usage of shmem\n"); printf("shmem -rn <remote node-id> -client/server [ -adapterno <adapter no> -size <segment size> ] \n\n"); printf(" -rn : Remote node-id\n"); printf(" -client : The local node is client\n"); printf(" -server : The local node is server\n"); printf(" -adapterno : Local adapter number (default %d)\n", localAdapterNo); printf(" -size : Segment block size (default %d)\n", segmentSize); printf(" -help : This helpscreen\n"); printf("\n"); } /* P R I N T P A R A M E T E R S */ void PrintParameters(void) { printf("Test parameters for %s \n",(client) ? "client" : "server" ); printf(" printf("Local node-id1 : %d\n",localNodeId1); printf("Local node-id2 : %d\n",localNodeId2); // printf("Remote node-id : %d\n",remoteNodeId); printf("Local adapter no. : %d\n",localAdapterNo); printf("Segment size : %d\n",segmentSize); printf(" } /* F I L L S E G M E N T W I T H D A T A */ sci_error_t GetLocalNodeId(Uint32 localAdapterNo, Uint32* localNodeId) { sci_query_adapter_t queryAdapter; sci_error_t error; unsigned int _localNodeId; queryAdapter.subcommand = <API key>; queryAdapter.localAdapterNo = localAdapterNo; queryAdapter.data = &_localNodeId; SCIQuery(SCI_Q_ADAPTER,&queryAdapter,NO_FLAGS,&error); *localNodeId=_localNodeId; return error; } sci_error_t SendInterrupt(sci_desc_t sd, Uint32 localAdapterNo, Uint32 localSciNodeId, Uint32 remoteSciNodeId, Uint32 interruptNo){ sci_error_t error; <API key> remoteInterrupt; Uint32 timeOut = <API key>; // Now connect to the other sides interrupt flag do { SCIConnectInterrupt(sd, &remoteInterrupt, remoteSciNodeId, localAdapterNo, interruptNo, timeOut, NO_FLAGS, &error); } while (error != SCI_ERR_OK); if (error != SCI_ERR_OK) { fprintf(stderr, "SCIConnectInterrupt failed - Error code 0x%x\n", error); return error; } // Trigger interrupt printf("\nNode %u sent interrupt (0x%x) to node %d\n",localSciNodeId, interruptNo, remoteSciNodeId); SCITriggerInterrupt(remoteInterrupt, NO_FLAGS, &error); if (error != SCI_ERR_OK) { fprintf(stderr, "SCITriggerInterrupt failed - Error code 0x%x\n", error); return error; } // Disconnect and remove interrupts <API key>(remoteInterrupt, NO_FLAGS, &error); if (error != SCI_ERR_OK) { fprintf(stderr, "<API key> failed - Error code 0x%x\n", error); return error; } return error; } sci_error_t ReceiveInterrupt(sci_desc_t sd, Uint32 localAdapterNo, Uint32 localSciNodeId, Uint32 interruptNo, Uint32 timeout) { sci_error_t error; <API key> localInterrupt; Uint32 timeOut = <API key>; // Create an interrupt SCICreateInterrupt(sd, &localInterrupt, localAdapterNo, &interruptNo, 0, NULL, <API key>, &error); if (error != SCI_ERR_OK) { fprintf(stderr, "SCICreateInterrupt failed - Error code 0x%x\n", error); return error; } // Wait for an interrupt SCIWaitForInterrupt(localInterrupt, timeOut, NO_FLAGS, &error); printf("\nNode %u received interrupt (0x%x)\n", localSciNodeId, interruptNo); // Remove interrupt SCIRemoveInterrupt(localInterrupt, NO_FLAGS, &error); if (error != SCI_ERR_OK) { fprintf(stderr, "SCIRemoveInterrupt failed - Error code 0x%x\n", error); return error; } return error; } sci_error_t FillSegmentWithData(unsigned int segmentSize, int reverse) { unsigned int i; unsigned int nostores; nostores = (segmentSize) / sizeof(unsigned int); /* Allocate buffer */ localbufferPtr = (unsigned int*)malloc( segmentSize ); if ( localbufferPtr == NULL ) { /* * Unable to create local buffer - Insufficient memory available */ return SCI_ERR_NOSPC; } if(reverse) { /* Fill in the data into a local buffer */ printf("Filling forward order \n"); for (i=0;i<nostores;i++) { localbufferPtr[i] = i; } } else { int temp=nostores; printf("Filling reverse order \n"); for (i=0;i<nostores;i++) { localbufferPtr[i] = temp } } return SCI_ERR_OK; } /* P R I N T C L I E N T D A T A */ void PrintClientData(void) { unsigned int i; printf("\nClient data: "); /* Print the first 20 entries in the segment */ for (i=0;i<20;i++) { printf("%d ",localbufferPtr[i]); } printf("\n"); } /* P R I N T S E R V E R D A T A */ void PrintServerData(volatile unsigned int *localMapAddr) { unsigned int *buffer; int i; // printf("\nServer data: "); buffer = (unsigned int *)localMapAddr; /* Print the first 20 entries in the segment */ for (i=0; i< 20; i++) { printf("%d ",buffer[i]); } printf("\n"); } /* T R A N S F E R D A T A */ unsigned int TransferData(sci_map_t remoteMap, volatile unsigned int *remoteSegmentAddr1, volatile unsigned int *remoteSegmentAddr2, unsigned int segmentSize) { volatile unsigned int *remoteBuffer1; volatile unsigned int *remoteBuffer; volatile unsigned int *remoteBuffer2; static int times = 0; sci_sequence_t sequence; sci_error_t error; unsigned int nostores; unsigned int j; <API key> sequenceStatus; remoteBuffer1 = (volatile unsigned int *)remoteSegmentAddr1; remoteBuffer2 = (volatile unsigned int *)remoteSegmentAddr2; remoteBuffer=remoteBuffer1; /* 4-byte test only */ nostores = (segmentSize) / sizeof(unsigned int); /* Create a sequence for data error checking */ <API key>(remoteMapOne,&sequence,NO_FLAGS,&error); if (error != SCI_ERR_OK) { fprintf(stderr,"<API key> failed - Error code 0x%x\n",error); return error; } /* Fill in the data into a local buffer */ error = SendInterrupt(sdOne,localAdapterNo,localNodeId1,remoteNodeId1, DATA_TRANSFER_READY); error = FillSegmentWithData(segmentSize, 0); tryagain: PrintServerData(localbufferPtr); fprintf(stderr,"After recover \n"); while(1){ //data=0; if (error != SCI_ERR_OK) { /* * Unable to create local buffer - Insufficient memory available */ printf( "Unable to create local buffer - Insufficient memory available\n" ); return error; } do { /* Start data error checking */ sequenceStatus = SCIStartSequence(sequence,NO_FLAGS,&error); } while (sequenceStatus != SCI_SEQ_OK) ; /* Transfer data to remote node */ for (j=0;j<nostores;j++) { remoteBuffer[j] = localbufferPtr[j]; } /* Check for error after data transfer */ sequenceStatus = SCICheckSequence(sequence,NO_FLAGS,&error); if (sequenceStatus != SCI_SEQ_OK) { fprintf(stderr,"Data transfer failed\n"); if(times==0) { error = FillSegmentWithData(segmentSize, 1); <API key>(remoteMapTwo,&sequence,NO_FLAGS,&error); if (error != SCI_ERR_OK) { fprintf(stderr,"<API key> failed - Error code 0x%x\n",error); return error; return <API key>; } } else { error = FillSegmentWithData(segmentSize, 0); /* Create a sequence for data error checking */ <API key>(remoteMapOne,&sequence,NO_FLAGS,&error); if (error != SCI_ERR_OK) { fprintf(stderr,"<API key> failed - Error code 0x%x\n",error); return error; return <API key>; } } fprintf(stderr,"Recovery \n"); if(times==0) remoteBuffer=remoteBuffer2; else remoteBuffer=remoteBuffer1; times++; printf("remotebuffer %p times %d\n", remoteBuffer, times); goto tryagain; } int timeout=0; // error = SendInterrupt(sdOne,localAdapterNo,localNodeId1,remoteNodeId1, DATA_TRANSFER_READY); // NdbSleep_MilliSleep(100); //error = ReceiveInterrupt(sdOne,localAdapterNo,localNodeId1,DATA_TRANSFER_READY, timeout); } /* Remove the Sequence */ SCIRemoveSequence(sequence,NO_FLAGS, &error); if (error != SCI_ERR_OK) { fprintf(stderr,"SCIRemoveSequence failed - Error code 0x%x\n",error); return error; } return SCI_ERR_OK; } /* S H M E M C L I E N T N O D E */ unsigned int ShmemClientNode(void) { volatile unsigned int *remoteMapAddr1; volatile unsigned int *remoteMapAddr2; printf("here?\n"); /* Create a segmentId */ remoteSegmentId1 = 1;//(remoteNodeId1 << 16) | localNodeId1; /* Connect to remote segment */ printf("Connect to remote segment .... \n"); printf("segid = %d node %d \n",remoteSegmentId1, remoteNodeId1 ); do { SCIConnectSegment(sdOne, &remoteSegmentOne, remoteNodeId1, remoteSegmentId1, localAdapterNo, NO_CALLBACK, NULL, <API key>, NO_FLAGS, &error); } while (error != SCI_ERR_OK); printf("connected\n"); // remoteSegmentId2 = (remoteNodeId2 << 16) | localNodeId2; // printf("segid = %d\n",remoteSegmentId2 ); printf("segid = %d node %d \n",remoteSegmentId1, remoteNodeId1 ); do { SCIConnectSegment(sdTwo, &remoteSegmentTwo, remoteNodeId2, remoteSegmentId1, standbyAdapterNo, NO_CALLBACK, NULL, <API key>, NO_FLAGS, &error); } while (error != SCI_ERR_OK); printf("connected 3\n"); printf("Remote segment (id=0x%x) is connected.\n", remoteSegmentId2); /* Map remote segment to user space */ remoteMapAddr1 = (unsigned int*)SCIMapRemoteSegment(remoteSegmentOne,&remoteMapOne,offset,segmentSize,NULL,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Remote segment (id=0x%x) is mapped to user space @ 0x%x. \n", remoteSegmentId1, remoteMapAddr1); } else { fprintf(stderr,"SCIMapRemoteSegment failed - Error code 0x%x\n",error); return 0; } remoteMapAddr2 = (unsigned int *)SCIMapRemoteSegment(remoteSegmentTwo,&remoteMapTwo,offset,segmentSize,NULL,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Remote segment (id=0x%x) is mapped to user space @ 0x%x. \n", remoteSegmentId2, remoteMapAddr2); } else { fprintf(stderr,"SCIMapRemoteSegment failed - Error code 0x%x\n",error); return 0; } /* Start data transfer and error checking */ error = (sci_error_t)TransferData(remoteMapOne,remoteMapAddr1, remoteMapAddr2,segmentSize); if (error == SCI_ERR_OK) { printf("Data transfer done!\n\n"); } else { fprintf(stderr,"Data transfer failed - Error code 0x%x\n\n",error); return 0; } /* Send an interrupt to remote node telling that the data transfer is ready */ error = SendInterrupt(sdOne,localAdapterNo,localNodeId1,remoteNodeId1, DATA_TRANSFER_READY); if (error == SCI_ERR_OK) { printf("\nInterrupt message sent to remote node\n"); } else { printf("\nInterrupt synchronization failed\n"); return 0; } PrintClientData(); /* Unmap remote segment */ SCIUnmapSegment(remoteMapOne,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The remote segment is unmapped\n"); } else { fprintf(stderr,"SCIUnmapSegment failed - Error code 0x%x\n",error); return 0; } SCIUnmapSegment(remoteMapTwo,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The remote segment is unmapped\n"); } else { fprintf(stderr,"SCIUnmapSegment failed - Error code 0x%x\n",error); return 0; } /* Disconnect segment */ <API key>(remoteSegmentOne,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The segment is disconnected\n"); } else { fprintf(stderr,"<API key> failed - Error code 0x%x\n",error); return 0; } <API key>(remoteSegmentTwo,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The segment is disconnected\n"); } else { fprintf(stderr,"<API key> failed - Error code 0x%x\n",error); return 0; } return 1; } /* S H M E M S E R V E R N O D E */ unsigned int ShmemServerNode(void) { unsigned int *localMapAddr; /* Create a segmentId */ localSegmentId =1;// (localNodeId1 << 16) | remoteNodeId1; /* Create local segment */ SCICreateSegment(sdOne,&localSegmentOne,localSegmentId, segmentSize, NO_CALLBACK, NULL, NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Local segment (id=%d, size=%d) is created. \n", localSegmentId, segmentSize); } else { fprintf(stderr,"SCICreateSegment failed - Error code 0x%x\n",error); return 0; } //localSegmentId = (localNodeId2 << 16) | remoteNodeId2; /* SCICreateSegment(sdTwo,&localSegmentTwo,localSegmentId+1, segmentSize, NO_CALLBACK, NULL, NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Local segment (id=%d, size=%d) is created (2). \n", localSegmentId, segmentSize); } else { fprintf(stderr,"SCICreateSegment failed - Error code 0x%x\n",error); return 0; } printf("segment one %p segment 2 %p\n", localSegmentOne, localSegmentTwo); */ /* Prepare the segment */ SCIPrepareSegment(localSegmentOne,localAdapterNo,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Local segment (id=%d, size=%d) is prepared. \n", localSegmentId, segmentSize); } else { fprintf(stderr,"SCIPrepareSegment failed - Error code 0x%x\n",error); return 0; } /* Prepare the segment */ SCIPrepareSegment(localSegmentOne,standbyAdapterNo,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Local segment (id=%d, size=%d) is created. \n", localSegmentId, segmentSize); } else { fprintf(stderr,"SCIPrepareSegment failed - Error code 0x%x\n",error); return 0; } /* Map local segment to user space */ localMapAddr = (unsigned int *)SCIMapLocalSegment(localSegmentOne,&localMapOne, offset,segmentSize, NULL,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Local segment (id=0x%x) is mapped to user space @ 0x%x.\n", localSegmentId, localMapAddr); } else { fprintf(stderr,"SCIMapLocalSegment failed - Error code 0x%x\n",error); return 0; } /* Map local segment to user space */ /* localMapAddr = (unsigned int *)SCIMapLocalSegment(localSegmentTwo,&localMapTwo, offset,segmentSize, NULL,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("Local segment (id=0x%x) is mapped to user space @ 0x%x.\n", localSegmentId, localMapAddr); printf("Local segment (id=%d) is mapped to user space.\n", localSegmentId); } else { fprintf(stderr,"SCIMapLocalSegment failed - Error code 0x%x\n",error); return 0; } */ /* Set the segment available */ <API key>(localSegmentOne, localAdapterNo, NO_FLAGS, &error); if (error == SCI_ERR_OK) { printf("Local segment (id=0x%x) is available for remote connections. \n", localSegmentId); } else { fprintf(stderr,"<API key> failed - Error code 0x%x\n",error); return 0; } <API key>(localSegmentOne, standbyAdapterNo, NO_FLAGS, &error); if (error == SCI_ERR_OK) { printf("Local segment (id=0x%x) is available for remote connections. \n", localSegmentId); } else { fprintf(stderr,"<API key> failed - Error code 0x%x\n",error); return 0; } int timeout=0; error = ReceiveInterrupt(sdOne,localAdapterNo,localNodeId1,DATA_TRANSFER_READY, timeout); if (error == SCI_ERR_OK) { printf("\nThe data transfer is ready\n"); } else { printf("\nInterrupt synchronization failed\n"); return 0; } again: // printf("Wait for the shared memory data transfer ....."); /* Wait for interrupt signal telling that block transfer is ready */ //printf("\nData transfer done!\n"); //PrintClientData() PrintServerData(localMapAddr); /*Uint32 micros; Uint32 micros2; NDB_TICKS secs; <API key>(&secs, &micros); error = SendInterrupt(sdOne,localAdapterNo,localNodeId1,remoteNodeId1, DATA_TRANSFER_READY); <API key>(&secs, &micros2); printf("TIME ELAPSED %d \n", micros2-micros); // NdbSleep_MilliSleep(100); */ goto again; /* Unmap local segment */ SCIUnmapSegment(localMapTwo,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The local segment is unmapped\n"); } else { fprintf(stderr,"SCIUnmapSegment failed - Error code 0x%x\n",error); return 0; } /* Unmap local segment */ SCIUnmapSegment(localMapOne,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The local segment is unmapped\n"); } else { fprintf(stderr,"SCIUnmapSegment failed - Error code 0x%x\n",error); return 0; } /* Remove local segment */ SCIRemoveSegment(localSegmentOne,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The local segment is removed\n"); } else { fprintf(stderr,"SCIRemoveSegment failed - Error code 0x%x\n",error); return 0; } /* Remove local segment */ SCIRemoveSegment(localSegmentTwo,NO_FLAGS,&error); if (error == SCI_ERR_OK) { printf("The local segment is removed\n"); } else { fprintf(stderr,"SCIRemoveSegment failed - Error code 0x%x\n",error); return 0; } return 1; } /* M A I N */ int main(int argc,char *argv[]) { int counter; printf("\n %s compiled %s : %s\n\n",argv[0],__DATE__,__TIME__); if (argc<3) { Usage(); exit(-1); } /* Get the parameters */ for (counter=1; counter<argc; counter++) { if (!strcmp("-rn",argv[counter])) { // remoteNodeId = strtol(argv[counter+1],(char **) NULL,10); continue; } if (!strcmp("-size",argv[counter])) { segmentSize = strtol(argv[counter+1],(char **) NULL,10); continue; } if (!strcmp("-adapterno",argv[counter])) { localAdapterNo = strtol(argv[counter+1],(char **) NULL,10); continue; } if (!strcmp("-client",argv[counter])) { client = 1; continue; } if (!strcmp("-server",argv[counter])) { server = 1; continue; } if (!strcmp("-help",argv[counter])) { Usage(); exit(0); } } // if (remoteNodeId == 0) { // fprintf(stderr,"Remote node-id is not specified. Use -rn <remote node-id>\n"); // exit(-1); if (server == 0 && client == 0) { fprintf(stderr,"You must specify a client node or a server node\n"); exit(-1); } if (server == 1 && client == 1) { fprintf(stderr,"Both server node and client node is selected.\n"); fprintf(stderr,"You must specify either a client or a server node\n"); exit(-1); } /* Initialize the SISCI library */ SCIInitialize(NO_FLAGS, &error); if (error != SCI_ERR_OK) { fprintf(stderr,"SCIInitialize failed - Error code: 0x%x\n",error); exit(error); } /* Open a file descriptor */ SCIOpen(&sdOne,NO_FLAGS,&error); if (error != SCI_ERR_OK) { if (error == <API key>) { fprintf(stderr,"Version mismatch between SISCI user library and SISCI driver\n"); } fprintf(stderr,"SCIOpen failed - Error code 0x%x\n",error); exit(error); } /* Open a file descriptor */ SCIOpen(&sdTwo,NO_FLAGS,&error); if (error != SCI_ERR_OK) { if (error == <API key>) { fprintf(stderr,"Version mismatch between SISCI user library and SISCI driver\n"); } fprintf(stderr,"SCIOpen failed - Error code 0x%x\n",error); exit(error); } /* Get local node-id */ error = GetLocalNodeId(localAdapterNo, &localNodeId1); error = GetLocalNodeId(standbyAdapterNo, &localNodeId2); if (error != SCI_ERR_OK) { fprintf(stderr,"Could not find the local adapter %d\n", localAdapterNo); SCIClose(sdOne,NO_FLAGS,&error); SCIClose(sdTwo,NO_FLAGS,&error); exit(-1); } /* Print parameters */ PrintParameters(); if (client) { remoteNodeId1=324; remoteNodeId2=328; ShmemClientNode(); } else { remoteNodeId1=452; remoteNodeId2=456; ShmemServerNode(); } /* Close the file descriptor */ SCIClose(sdOne,NO_FLAGS,&error); SCIClose(sdTwo,NO_FLAGS,&error); if (error != SCI_ERR_OK) { fprintf(stderr,"SCIClose failed - Error code: 0x%x\n",error); } /* Free allocated resources */ SCITerminate(); return SCI_ERR_OK; }
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify it under # any later version. # Please read the COPYING file. import signal exception = { signal.SIGINT:KeyboardInterrupt } class Signal: def __init__(self, sig): self.signal = sig self.oldhandler = signal.getsignal(sig) self.pending = False class SignalHandler: def __init__(self): self.signals = {} def signal_handler(self, sig, frame): signal.signal(sig, signal.SIG_IGN) self.signals[sig].pending = True def disable_signal(self, sig): if sig not in self.signals.keys(): self.signals[sig] = Signal(sig) signal.signal(sig, self.signal_handler) def enable_signal(self, sig): if sig in self.signals.keys(): if self.signals[sig].oldhandler: oldhandler = self.signals[sig].oldhandler else: oldhandler = signal.SIG_DFL pending = self.signals[sig].pending del self.signals[sig] signal.signal(sig, oldhandler) if pending: raise exception[sig] def signal_disabled(self, sig): return sig in self.signals.keys() def signal_pending(self, sig): return self.signal_disabled(sig) and self.signals[sig].pending
<?php class <API key> { const CLASS_NAME = 'lib.model.nomina.map.<API key>'; private $dbMap; public function isBuilt() { return ($this->dbMap !== null); } public function getDatabaseMap() { return $this->dbMap; } public function doBuild() { $this->dbMap = Propel::getDatabaseMap('propel'); $tMap = $this->dbMap->addTable('npasicodpre'); $tMap->setPhpName('Npasicodpre'); $tMap->setUseIdGenerator(true); $tMap-><API key>('npasicodpre_SEQ'); $tMap->addColumn('CODCON', 'Codcon', 'string', CreoleTypes::VARCHAR, true, 3); $tMap->addColumn('CODNOM', 'Codnom', 'string', CreoleTypes::VARCHAR, true, 3); $tMap->addColumn('CODPRE', 'Codpre', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null); } }
#ifndef __TAFAGENT_LOG_H__ #define __TAFAGENT_LOG_H__ #ifdef __cplusplus #if __cplusplus extern "C" { #endif #endif #pragma pack(4) #include "vos.h" #include "pslog.h" #include "PsCommonDef.h" #define TAFAGENT_MEM_FAIL() PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "APSAGENT Mem Operation Failed!"); #define TAFAGENT_MSG_FAIL() PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "APSAGENT Msg Opration Failed!"); #define TAFAGENT_TIMER_FAIL() PS_LOG(WUEPS_PID_OM, 0, PS_PRINT_ERROR, "APSAGENT Timer Opration Failed!"); #ifndef SUBMOD_NULL #define SUBMOD_NULL (0) #endif #define TAFAGENT_INFO_LOG(Mod, String) PS_LOG ( (Mod), SUBMOD_NULL, PS_PRINT_INFO, (String) ) #define TAFAGENT_INFO_LOG1(Mod, String,Para1) PS_LOG1 ( (Mod), SUBMOD_NULL, PS_PRINT_INFO, (String), (VOS_INT32)(Para1) ) #define TAFAGENT_INFO_LOG2(Mod, String,Para1,Para2) PS_LOG2 ( (Mod), SUBMOD_NULL, PS_PRINT_INFO, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2) ) #define TAFAGENT_INFO_LOG3(Mod, String,Para1,Para2,Para3) PS_LOG3 ( (Mod), SUBMOD_NULL, PS_PRINT_INFO, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3) ) #define TAFAGENT_INFO_LOG4(Mod, String,Para1,Para2,Para3,Para4) PS_LOG4 ( (Mod), SUBMOD_NULL, PS_PRINT_INFO, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3), (VOS_INT32)(Para4) ) #define TAFAGENT_NORMAL_LOG(Mod, String) PS_LOG ( (Mod), SUBMOD_NULL, PS_PRINT_NORMAL, (String) ) #define <API key>(Mod, String,Para1) PS_LOG1 ( (Mod), SUBMOD_NULL, PS_PRINT_NORMAL, (String), (VOS_INT32)(Para1) ) #define <API key>(Mod, String,Para1,Para2) PS_LOG2 ( (Mod), SUBMOD_NULL, PS_PRINT_NORMAL, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2) ) #define <API key>(Mod, String,Para1,Para2,Para3) PS_LOG3 ( (Mod), SUBMOD_NULL, PS_PRINT_NORMAL, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3) ) #define <API key>(Mod, String,Para1,Para2,Para3,Para4) PS_LOG4 ( (Mod), SUBMOD_NULL, PS_PRINT_NORMAL, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3), (VOS_INT32)(Para4) ) #define <API key>(Mod, String) PS_LOG ( (Mod), SUBMOD_NULL, PS_PRINT_WARNING, (String) ) #define <API key>(Mod, String,Para1) PS_LOG1 ( (Mod), SUBMOD_NULL, PS_PRINT_WARNING, (String), (VOS_INT32)(Para1) ) #define <API key>(Mod, String,Para1,Para2) PS_LOG2 ( (Mod), SUBMOD_NULL, PS_PRINT_WARNING, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2) ) #define <API key>(Mod, String,Para1,Para2,Para3) PS_LOG3 ( (Mod), SUBMOD_NULL, PS_PRINT_WARNING, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3) ) #define <API key>(Mod, String,Para1,Para2,Para3,Para4) PS_LOG4 ( (Mod), SUBMOD_NULL, PS_PRINT_WARNING, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3), (VOS_INT32)(Para4) ) #define TAFAGENT_ERROR_LOG(Mod, String) PS_LOG ( (Mod), SUBMOD_NULL, PS_PRINT_ERROR, (String) ) #define TAFAGENT_ERROR_LOG1(Mod, String,Para1) PS_LOG1 ( (Mod), SUBMOD_NULL, PS_PRINT_ERROR, (String), (VOS_INT32)(Para1) ) #define TAFAGENT_ERROR_LOG2(Mod, String,Para1,Para2) PS_LOG2 ( (Mod), SUBMOD_NULL, PS_PRINT_ERROR, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2) ) #define TAFAGENT_ERROR_LOG3(Mod, String,Para1,Para2,Para3) PS_LOG3 ( (Mod), SUBMOD_NULL, PS_PRINT_ERROR, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3) ) #define TAFAGENT_ERROR_LOG4(Mod, String,Para1,Para2,Para3,Para4) PS_LOG4 ( (Mod), SUBMOD_NULL, PS_PRINT_ERROR, (String), (VOS_INT32)(Para1), (VOS_INT32)(Para2), (VOS_INT32)(Para3), (VOS_INT32)(Para4) ) #if (VOS_OS_VER == VOS_WIN32) #pragma pack() #else #pragma pack(0) #endif #ifdef __cplusplus #if __cplusplus } #endif #endif #endif /* TafAgentLog.h */
#include <linux/types.h> #include <linux/netdevice.h> #include <brcmu_utils.h> #include <brcmu_wifi.h> #include "dhd.h" #include "dhd_dbg.h" #include "proto.h" #include "msgbuf.h" #include "commonring.h" #include "flowring.h" #include "dhd_bus.h" #include "tracepoint.h" #define <API key> 2000 #define <API key> 0x1 #define <API key> 0x2 #define <API key> 0x3 #define <API key> 0x4 #define <API key> 0x5 #define <API key> 0x6 #define <API key> 0x7 #define <API key> 0x8 #define <API key> 0x9 #define <API key> 0xA #define <API key> 0xB #define <API key> 0xC #define <API key> 0xD #define <API key> 0xE #define MSGBUF_TYPE_TX_POST 0xF #define <API key> 0x10 #define <API key> 0x11 #define <API key> 0x12 #define <API key> 0x13 #define <API key> 0x14 #define NR_TX_PKTIDS 2048 #define NR_RX_PKTIDS 1024 #define <API key> 0xFFFE #define <API key> 2048 #define <API key> 32 #define <API key> 8 #define <API key> 8 #define <API key> 0x01 #define <API key> 5 #define <API key> 32 #define <API key> 96 struct msgbuf_common_hdr { u8 msgtype; u8 ifidx; u8 flags; u8 rsvd0; __le32 request_id; }; struct msgbuf_buf_addr { __le32 low_addr; __le32 high_addr; }; struct <API key> { struct msgbuf_common_hdr msg; __le32 cmd; __le16 trans_id; __le16 input_buf_len; __le16 output_buf_len; __le16 rsvd0[3]; struct msgbuf_buf_addr req_buf_addr; __le32 rsvd1[2]; }; struct msgbuf_tx_msghdr { struct msgbuf_common_hdr msg; u8 txhdr[ETH_HLEN]; u8 flags; u8 seg_cnt; struct msgbuf_buf_addr metadata_buf_addr; struct msgbuf_buf_addr data_buf_addr; __le16 metadata_buf_len; __le16 data_len; __le32 rsvd0; }; struct msgbuf_rx_bufpost { struct msgbuf_common_hdr msg; __le16 metadata_buf_len; __le16 data_buf_len; __le32 rsvd0; struct msgbuf_buf_addr metadata_buf_addr; struct msgbuf_buf_addr data_buf_addr; }; struct <API key> { struct msgbuf_common_hdr msg; __le16 host_buf_len; __le16 rsvd0[3]; struct msgbuf_buf_addr host_buf_addr; __le32 rsvd1[4]; }; struct <API key> { __le16 status; __le16 flow_ring_id; }; struct msgbuf_rx_event { struct msgbuf_common_hdr msg; struct <API key> compl_hdr; __le16 event_data_len; __le16 seqnum; __le16 rsvd0[4]; }; struct <API key> { struct msgbuf_common_hdr msg; struct <API key> compl_hdr; __le16 resp_len; __le16 trans_id; __le32 cmd; __le32 rsvd0; }; struct msgbuf_tx_status { struct msgbuf_common_hdr msg; struct <API key> compl_hdr; __le16 metadata_len; __le16 tx_status; }; struct msgbuf_rx_complete { struct msgbuf_common_hdr msg; struct <API key> compl_hdr; __le16 metadata_len; __le16 data_len; __le16 data_offset; __le16 flags; __le32 rx_status_0; __le32 rx_status_1; __le32 rsvd0; }; struct <API key> { struct msgbuf_common_hdr msg; u8 da[ETH_ALEN]; u8 sa[ETH_ALEN]; u8 tid; u8 if_flags; __le16 flow_ring_id; u8 tc; u8 priority; __le16 int_vector; __le16 max_items; __le16 len_item; struct msgbuf_buf_addr flow_ring_addr; }; struct <API key> { struct msgbuf_common_hdr msg; __le16 flow_ring_id; __le16 reason; __le32 rsvd0[7]; }; struct <API key> { struct msgbuf_common_hdr msg; struct <API key> compl_hdr; __le32 rsvd0[3]; }; struct <API key> { struct msgbuf_common_hdr msg; struct <API key> compl_hdr; __le32 rsvd0[3]; }; struct <API key> { struct msgbuf_common_hdr msg; struct <API key> compl_hdr; __le32 rsvd0[3]; }; struct brcmf_msgbuf { struct brcmf_pub *drvr; struct brcmf_commonring **commonrings; struct brcmf_commonring **flowrings; dma_addr_t *flowring_dma_handle; u16 nrof_flowrings; u16 rx_dataoffset; u32 max_rxbufpost; u16 rx_metadata_offset; u32 rxbufpost; u32 max_ioctlrespbuf; u32 cur_ioctlrespbuf; u32 max_eventbuf; u32 cur_eventbuf; void *ioctbuf; dma_addr_t ioctbuf_handle; u32 ioctbuf_phys_hi; u32 ioctbuf_phys_lo; u32 ioctl_resp_status; u32 ioctl_resp_ret_len; u32 ioctl_resp_pktid; u16 data_seq_no; u16 ioctl_seq_no; u32 reqid; wait_queue_head_t ioctl_resp_wait; bool ctl_completed; struct brcmf_msgbuf_pktids *tx_pktids; struct brcmf_msgbuf_pktids *rx_pktids; struct brcmf_flowring *flow; struct workqueue_struct *txflow_wq; struct work_struct txflow_work; unsigned long *flow_map; unsigned long *txstatus_done_map; }; struct brcmf_msgbuf_pktid { atomic_t allocated; u16 data_offset; struct sk_buff *skb; dma_addr_t physaddr; }; struct brcmf_msgbuf_pktids { u32 array_size; u32 last_allocated_idx; enum dma_data_direction direction; struct brcmf_msgbuf_pktid *array; }; /* dma flushing needs implementation for mips and arm platforms. Should * be put in util. Note, this is not real flushing. It is virtual non * cached memory. Only write buffers should have to be drained. Though * this may be different depending on platform...... */ #define brcmf_dma_flush(addr, len) #define <API key>(addr, len) static void <API key>(struct brcmf_msgbuf *msgbuf); static struct brcmf_msgbuf_pktids * <API key>(u32 nr_array_entries, enum dma_data_direction direction) { struct brcmf_msgbuf_pktid *array; struct brcmf_msgbuf_pktids *pktids; array = kcalloc(nr_array_entries, sizeof(*array), GFP_ATOMIC); if (!array) return NULL; pktids = kzalloc(sizeof(*pktids), GFP_ATOMIC); if (!pktids) { kfree(array); return NULL; } pktids->array = array; pktids->array_size = nr_array_entries; return pktids; } static int <API key>(struct device *dev, struct brcmf_msgbuf_pktids *pktids, struct sk_buff *skb, u16 data_offset, dma_addr_t *physaddr, u32 *idx) { struct brcmf_msgbuf_pktid *array; u32 count; array = pktids->array; *physaddr = dma_map_single(dev, skb->data + data_offset, skb->len - data_offset, pktids->direction); if (dma_mapping_error(dev, *physaddr)) { brcmf_err("dma_map_single failed !!\n"); return -ENOMEM; } *idx = pktids->last_allocated_idx; count = 0; do { (*idx)++; if (*idx == pktids->array_size) *idx = 0; if (array[*idx].allocated.counter == 0) if (atomic_cmpxchg(&array[*idx].allocated, 0, 1) == 0) break; count++; } while (count < pktids->array_size); if (count == pktids->array_size) return -ENOMEM; array[*idx].data_offset = data_offset; array[*idx].physaddr = *physaddr; array[*idx].skb = skb; pktids->last_allocated_idx = *idx; return 0; } static struct sk_buff * <API key>(struct device *dev, struct brcmf_msgbuf_pktids *pktids, u32 idx) { struct brcmf_msgbuf_pktid *pktid; struct sk_buff *skb; if (idx >= pktids->array_size) { brcmf_err("Invalid packet id %d (max %d)\n", idx, pktids->array_size); return NULL; } if (pktids->array[idx].allocated.counter) { pktid = &pktids->array[idx]; dma_unmap_single(dev, pktid->physaddr, pktid->skb->len - pktid->data_offset, pktids->direction); skb = pktid->skb; pktid->allocated.counter = 0; return skb; } else { brcmf_err("Invalid packet id %d (not in use)\n", idx); } return NULL; } static void <API key>(struct device *dev, struct brcmf_msgbuf_pktids *pktids) { struct brcmf_msgbuf_pktid *array; struct brcmf_msgbuf_pktid *pktid; u32 count; array = pktids->array; count = 0; do { if (array[count].allocated.counter) { pktid = &array[count]; dma_unmap_single(dev, pktid->physaddr, pktid->skb->len - pktid->data_offset, pktids->direction); <API key>(pktid->skb); } count++; } while (count < pktids->array_size); kfree(array); kfree(pktids); } static void <API key>(struct brcmf_msgbuf *msgbuf) { if (msgbuf->rx_pktids) <API key>(msgbuf->drvr->bus_if->dev, msgbuf->rx_pktids); if (msgbuf->tx_pktids) <API key>(msgbuf->drvr->bus_if->dev, msgbuf->tx_pktids); } static int <API key>(struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, uint len) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; struct brcmf_commonring *commonring; struct <API key> *request; u16 buf_len; void *ret_ptr; int err; commonring = msgbuf->commonrings[<API key>]; <API key>(commonring); ret_ptr = <API key>(commonring); if (!ret_ptr) { brcmf_err("Failed to reserve space in commonring\n"); <API key>(commonring); return -ENOMEM; } msgbuf->reqid++; request = (struct <API key> *)ret_ptr; request->msg.msgtype = <API key>; request->msg.ifidx = (u8)ifidx; request->msg.flags = 0; request->msg.request_id = cpu_to_le32(<API key>); request->cmd = cpu_to_le32(cmd); request->output_buf_len = cpu_to_le16(len); request->trans_id = cpu_to_le16(msgbuf->reqid); buf_len = min_t(u16, len, <API key>); request->input_buf_len = cpu_to_le16(buf_len); request->req_buf_addr.high_addr = cpu_to_le32(msgbuf->ioctbuf_phys_hi); request->req_buf_addr.low_addr = cpu_to_le32(msgbuf->ioctbuf_phys_lo); if (buf) memcpy(msgbuf->ioctbuf, buf, buf_len); else memset(msgbuf->ioctbuf, 0, buf_len); brcmf_dma_flush(ioctl_buf, buf_len); err = <API key>(commonring); <API key>(commonring); return err; } static int <API key>(struct brcmf_msgbuf *msgbuf) { return wait_event_timeout(msgbuf->ioctl_resp_wait, msgbuf->ctl_completed, msecs_to_jiffies(<API key>)); } static void <API key>(struct brcmf_msgbuf *msgbuf) { if (waitqueue_active(&msgbuf->ioctl_resp_wait)) { msgbuf->ctl_completed = true; wake_up(&msgbuf->ioctl_resp_wait); } } static int <API key>(struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, uint len) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; struct sk_buff *skb = NULL; int timeout; int err; brcmf_dbg(MSGBUF, "ifidx=%d, cmd=%d, len=%d\n", ifidx, cmd, len); msgbuf->ctl_completed = false; err = <API key>(drvr, ifidx, cmd, buf, len); if (err) return err; timeout = <API key>(msgbuf); if (!timeout) { brcmf_err("Timeout on response for query command\n"); return -EIO; } skb = <API key>(msgbuf->drvr->bus_if->dev, msgbuf->rx_pktids, msgbuf->ioctl_resp_pktid); if (msgbuf->ioctl_resp_ret_len != 0) { if (!skb) { brcmf_err("Invalid packet id idx recv'd %d\n", msgbuf->ioctl_resp_pktid); return -EBADF; } memcpy(buf, skb->data, (len < msgbuf->ioctl_resp_ret_len) ? len : msgbuf->ioctl_resp_ret_len); } if (skb) <API key>(skb); return msgbuf->ioctl_resp_status; } static int <API key>(struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, uint len) { return <API key>(drvr, ifidx, cmd, buf, len); } static int <API key>(struct brcmf_pub *drvr, bool do_fws, u8 *ifidx, struct sk_buff *skb) { return -ENODEV; } static void <API key>(struct brcmf_msgbuf *msgbuf, u16 flowid) { u32 dma_sz; void *dma_buf; brcmf_dbg(MSGBUF, "Removing flowring %d\n", flowid); dma_sz = <API key> * <API key>; dma_buf = msgbuf->flowrings[flowid]->buf_addr; dma_free_coherent(msgbuf->drvr->bus_if->dev, dma_sz, dma_buf, msgbuf->flowring_dma_handle[flowid]); <API key>(msgbuf->flow, flowid); } static u32 <API key>(struct brcmf_msgbuf *msgbuf, int ifidx, struct sk_buff *skb) { struct <API key> *create; struct ethhdr *eh = (struct ethhdr *)(skb->data); struct brcmf_commonring *commonring; void *ret_ptr; u32 flowid; void *dma_buf; u32 dma_sz; long long address; int err; flowid = <API key>(msgbuf->flow, eh->h_dest, skb->priority, ifidx); if (flowid == <API key>) return flowid; dma_sz = <API key> * <API key>; dma_buf = dma_alloc_coherent(msgbuf->drvr->bus_if->dev, dma_sz, &msgbuf->flowring_dma_handle[flowid], GFP_ATOMIC); if (!dma_buf) { brcmf_err("dma_alloc_coherent failed\n"); <API key>(msgbuf->flow, flowid); return <API key>; } <API key>(msgbuf->flowrings[flowid], <API key>, <API key>, dma_buf); commonring = msgbuf->commonrings[<API key>]; <API key>(commonring); ret_ptr = <API key>(commonring); if (!ret_ptr) { brcmf_err("Failed to reserve space in commonring\n"); <API key>(commonring); <API key>(msgbuf, flowid); return <API key>; } create = (struct <API key> *)ret_ptr; create->msg.msgtype = <API key>; create->msg.ifidx = ifidx; create->msg.request_id = 0; create->tid = brcmf_flowring_tid(msgbuf->flow, flowid); create->flow_ring_id = cpu_to_le16(flowid + <API key>); memcpy(create->sa, eh->h_source, ETH_ALEN); memcpy(create->da, eh->h_dest, ETH_ALEN); address = (long long)(long)msgbuf->flowring_dma_handle[flowid]; create->flow_ring_addr.high_addr = cpu_to_le32(address >> 32); create->flow_ring_addr.low_addr = cpu_to_le32(address & 0xffffffff); create->max_items = cpu_to_le16(<API key>); create->len_item = cpu_to_le16(<API key>); brcmf_dbg(MSGBUF, "Send Flow Create Req flow ID %d for peer %pM prio %d ifindex %d\n", flowid, eh->h_dest, create->tid, ifidx); err = <API key>(commonring); <API key>(commonring); if (err) { brcmf_err("Failed to write commonring\n"); <API key>(msgbuf, flowid); return <API key>; } return flowid; } static void brcmf_msgbuf_txflow(struct brcmf_msgbuf *msgbuf, u8 flowid) { struct brcmf_flowring *flow = msgbuf->flow; struct brcmf_commonring *commonring; void *ret_ptr; u32 count; struct sk_buff *skb; dma_addr_t physaddr; u32 pktid; struct msgbuf_tx_msghdr *tx_msghdr; long long address; commonring = msgbuf->flowrings[flowid]; if (!<API key>(commonring)) return; <API key>(commonring); count = <API key> - <API key>; while (brcmf_flowring_qlen(flow, flowid)) { skb = <API key>(flow, flowid); if (skb == NULL) { brcmf_err("No SKB, but qlen %d\n", brcmf_flowring_qlen(flow, flowid)); break; } skb_orphan(skb); if (<API key>(msgbuf->drvr->bus_if->dev, msgbuf->tx_pktids, skb, ETH_HLEN, &physaddr, &pktid)) { <API key>(flow, flowid, skb); brcmf_err("No PKTID available !!\n"); break; } ret_ptr = <API key>(commonring); if (!ret_ptr) { <API key>(msgbuf->drvr->bus_if->dev, msgbuf->tx_pktids, pktid); <API key>(flow, flowid, skb); break; } count++; tx_msghdr = (struct msgbuf_tx_msghdr *)ret_ptr; tx_msghdr->msg.msgtype = MSGBUF_TYPE_TX_POST; tx_msghdr->msg.request_id = cpu_to_le32(pktid); tx_msghdr->msg.ifidx = <API key>(flow, flowid); tx_msghdr->flags = <API key>; tx_msghdr->flags |= (skb->priority & 0x07) << <API key>; tx_msghdr->seg_cnt = 1; memcpy(tx_msghdr->txhdr, skb->data, ETH_HLEN); tx_msghdr->data_len = cpu_to_le16(skb->len - ETH_HLEN); address = (long long)(long)physaddr; tx_msghdr->data_buf_addr.high_addr = cpu_to_le32(address >> 32); tx_msghdr->data_buf_addr.low_addr = cpu_to_le32(address & 0xffffffff); tx_msghdr->metadata_buf_len = 0; tx_msghdr->metadata_buf_addr.high_addr = 0; tx_msghdr->metadata_buf_addr.low_addr = 0; if (count >= <API key>) { <API key>(commonring); count = 0; } } if (count) <API key>(commonring); <API key>(commonring); } static void <API key>(struct work_struct *worker) { struct brcmf_msgbuf *msgbuf; u32 flowid; msgbuf = container_of(worker, struct brcmf_msgbuf, txflow_work); for_each_set_bit(flowid, msgbuf->flow_map, msgbuf->nrof_flowrings) { clear_bit(flowid, msgbuf->flow_map); brcmf_msgbuf_txflow(msgbuf, flowid); } } static int <API key>(struct brcmf_msgbuf *msgbuf, u32 flowid) { set_bit(flowid, msgbuf->flow_map); queue_work(msgbuf->txflow_wq, &msgbuf->txflow_work); return 0; } static int brcmf_msgbuf_txdata(struct brcmf_pub *drvr, int ifidx, u8 offset, struct sk_buff *skb) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; struct brcmf_flowring *flow = msgbuf->flow; struct ethhdr *eh = (struct ethhdr *)(skb->data); u32 flowid; flowid = <API key>(flow, eh->h_dest, skb->priority, ifidx); if (flowid == <API key>) { flowid = <API key>(msgbuf, ifidx, skb); if (flowid == <API key>) return -ENOMEM; } <API key>(flow, flowid, skb); <API key>(msgbuf, flowid); return 0; } static void <API key>(struct brcmf_pub *drvr, int ifidx, enum proto_addr_mode addr_mode) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; <API key>(msgbuf->flow, ifidx, addr_mode); } static void <API key>(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN]) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; <API key>(msgbuf->flow, ifidx, peer); } static void <API key>(struct brcmf_pub *drvr, int ifidx, u8 peer[ETH_ALEN]) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; <API key>(msgbuf->flow, ifidx, peer); } static void <API key>(struct brcmf_msgbuf *msgbuf, void *buf) { struct <API key> *ioctl_resp; ioctl_resp = (struct <API key> *)buf; msgbuf->ioctl_resp_status = le16_to_cpu(ioctl_resp->compl_hdr.status); msgbuf->ioctl_resp_ret_len = le16_to_cpu(ioctl_resp->resp_len); msgbuf->ioctl_resp_pktid = le32_to_cpu(ioctl_resp->msg.request_id); <API key>(msgbuf); if (msgbuf->cur_ioctlrespbuf) msgbuf->cur_ioctlrespbuf <API key>(msgbuf); } static void <API key>(struct brcmf_msgbuf *msgbuf, void *buf) { struct msgbuf_tx_status *tx_status; u32 idx; struct sk_buff *skb; u16 flowid; tx_status = (struct msgbuf_tx_status *)buf; idx = le32_to_cpu(tx_status->msg.request_id); flowid = le16_to_cpu(tx_status->compl_hdr.flow_ring_id); flowid -= <API key>; skb = <API key>(msgbuf->drvr->bus_if->dev, msgbuf->tx_pktids, idx); if (!skb) { brcmf_err("Invalid packet id idx recv'd %d\n", idx); return; } set_bit(flowid, msgbuf->txstatus_done_map); brcmf_txfinalize(msgbuf->drvr, skb, tx_status->msg.ifidx, true); } static u32 <API key>(struct brcmf_msgbuf *msgbuf, u32 count) { struct brcmf_commonring *commonring; void *ret_ptr; struct sk_buff *skb; u16 alloced; u32 pktlen; dma_addr_t physaddr; struct msgbuf_rx_bufpost *rx_bufpost; long long address; u32 pktid; u32 i; commonring = msgbuf->commonrings[<API key>]; ret_ptr = <API key>(commonring, count, &alloced); if (!ret_ptr) { brcmf_err("Failed to reserve space in commonring\n"); return 0; } for (i = 0; i < alloced; i++) { rx_bufpost = (struct msgbuf_rx_bufpost *)ret_ptr; memset(rx_bufpost, 0, sizeof(*rx_bufpost)); skb = <API key>(<API key>); if (skb == NULL) { brcmf_err("Failed to alloc SKB\n"); <API key>(commonring, alloced - i); break; } pktlen = skb->len; if (<API key>(msgbuf->drvr->bus_if->dev, msgbuf->rx_pktids, skb, 0, &physaddr, &pktid)) { dev_kfree_skb_any(skb); brcmf_err("No PKTID available !!\n"); <API key>(commonring, alloced - i); break; } if (msgbuf->rx_metadata_offset) { address = (long long)(long)physaddr; rx_bufpost->metadata_buf_len = cpu_to_le16(msgbuf->rx_metadata_offset); rx_bufpost->metadata_buf_addr.high_addr = cpu_to_le32(address >> 32); rx_bufpost->metadata_buf_addr.low_addr = cpu_to_le32(address & 0xffffffff); skb_pull(skb, msgbuf->rx_metadata_offset); pktlen = skb->len; physaddr += msgbuf->rx_metadata_offset; } rx_bufpost->msg.msgtype = <API key>; rx_bufpost->msg.request_id = cpu_to_le32(pktid); address = (long long)(long)physaddr; rx_bufpost->data_buf_len = cpu_to_le16((u16)pktlen); rx_bufpost->data_buf_addr.high_addr = cpu_to_le32(address >> 32); rx_bufpost->data_buf_addr.low_addr = cpu_to_le32(address & 0xffffffff); ret_ptr += <API key>(commonring); } if (i) <API key>(commonring); return i; } static void <API key>(struct brcmf_msgbuf *msgbuf) { u32 fillbufs; u32 retcount; fillbufs = msgbuf->max_rxbufpost - msgbuf->rxbufpost; while (fillbufs) { retcount = <API key>(msgbuf, fillbufs); if (!retcount) break; msgbuf->rxbufpost += retcount; fillbufs -= retcount; } } static void <API key>(struct brcmf_msgbuf *msgbuf, u16 rxcnt) { msgbuf->rxbufpost -= rxcnt; if (msgbuf->rxbufpost <= (msgbuf->max_rxbufpost - <API key>)) <API key>(msgbuf); } static u32 <API key>(struct brcmf_msgbuf *msgbuf, bool event_buf, u32 count) { struct brcmf_commonring *commonring; void *ret_ptr; struct sk_buff *skb; u16 alloced; u32 pktlen; dma_addr_t physaddr; struct <API key> *rx_bufpost; long long address; u32 pktid; u32 i; commonring = msgbuf->commonrings[<API key>]; <API key>(commonring); ret_ptr = <API key>(commonring, count, &alloced); if (!ret_ptr) { brcmf_err("Failed to reserve space in commonring\n"); <API key>(commonring); return 0; } for (i = 0; i < alloced; i++) { rx_bufpost = (struct <API key> *)ret_ptr; memset(rx_bufpost, 0, sizeof(*rx_bufpost)); skb = <API key>(<API key>); if (skb == NULL) { brcmf_err("Failed to alloc SKB\n"); <API key>(commonring, alloced - i); break; } pktlen = skb->len; if (<API key>(msgbuf->drvr->bus_if->dev, msgbuf->rx_pktids, skb, 0, &physaddr, &pktid)) { dev_kfree_skb_any(skb); brcmf_err("No PKTID available !!\n"); <API key>(commonring, alloced - i); break; } if (event_buf) rx_bufpost->msg.msgtype = <API key>; else rx_bufpost->msg.msgtype = <API key>; rx_bufpost->msg.request_id = cpu_to_le32(pktid); address = (long long)(long)physaddr; rx_bufpost->host_buf_len = cpu_to_le16((u16)pktlen); rx_bufpost->host_buf_addr.high_addr = cpu_to_le32(address >> 32); rx_bufpost->host_buf_addr.low_addr = cpu_to_le32(address & 0xffffffff); ret_ptr += <API key>(commonring); } if (i) <API key>(commonring); <API key>(commonring); return i; } static void <API key>(struct brcmf_msgbuf *msgbuf) { u32 count; count = msgbuf->max_ioctlrespbuf - msgbuf->cur_ioctlrespbuf; count = <API key>(msgbuf, false, count); msgbuf->cur_ioctlrespbuf += count; } static void <API key>(struct brcmf_msgbuf *msgbuf) { u32 count; count = msgbuf->max_eventbuf - msgbuf->cur_eventbuf; count = <API key>(msgbuf, true, count); msgbuf->cur_eventbuf += count; } static void brcmf_msgbuf_rx_skb(struct brcmf_msgbuf *msgbuf, struct sk_buff *skb, u8 ifidx) { struct brcmf_if *ifp; ifp = msgbuf->drvr->iflist[ifidx]; if (!ifp || !ifp->ndev) { <API key>(skb); return; } brcmf_netif_rx(ifp, skb); } static void <API key>(struct brcmf_msgbuf *msgbuf, void *buf) { struct msgbuf_rx_event *event; u32 idx; u16 buflen; struct sk_buff *skb; event = (struct msgbuf_rx_event *)buf; idx = le32_to_cpu(event->msg.request_id); buflen = le16_to_cpu(event->event_data_len); if (msgbuf->cur_eventbuf) msgbuf->cur_eventbuf <API key>(msgbuf); skb = <API key>(msgbuf->drvr->bus_if->dev, msgbuf->rx_pktids, idx); if (!skb) return; if (msgbuf->rx_dataoffset) skb_pull(skb, msgbuf->rx_dataoffset); skb_trim(skb, buflen); brcmf_msgbuf_rx_skb(msgbuf, skb, event->msg.ifidx); } static void <API key>(struct brcmf_msgbuf *msgbuf, void *buf) { struct msgbuf_rx_complete *rx_complete; struct sk_buff *skb; u16 data_offset; u16 buflen; u32 idx; <API key>(msgbuf, 1); rx_complete = (struct msgbuf_rx_complete *)buf; data_offset = le16_to_cpu(rx_complete->data_offset); buflen = le16_to_cpu(rx_complete->data_len); idx = le32_to_cpu(rx_complete->msg.request_id); skb = <API key>(msgbuf->drvr->bus_if->dev, msgbuf->rx_pktids, idx); if (data_offset) skb_pull(skb, data_offset); else if (msgbuf->rx_dataoffset) skb_pull(skb, msgbuf->rx_dataoffset); skb_trim(skb, buflen); brcmf_msgbuf_rx_skb(msgbuf, skb, rx_complete->msg.ifidx); } static void <API key>(struct brcmf_msgbuf *msgbuf, void *buf) { struct <API key> *<API key>; u16 status; u16 flowid; <API key> = (struct <API key> *)buf; flowid = le16_to_cpu(<API key>->compl_hdr.flow_ring_id); flowid -= <API key>; status = le16_to_cpu(<API key>->compl_hdr.status); if (status) { brcmf_err("Flowring creation failed, code %d\n", status); <API key>(msgbuf, flowid); return; } brcmf_dbg(MSGBUF, "Flowring %d Create response status %d\n", flowid, status); brcmf_flowring_open(msgbuf->flow, flowid); <API key>(msgbuf, flowid); } static void <API key>(struct brcmf_msgbuf *msgbuf, void *buf) { struct <API key> *<API key>; u16 status; u16 flowid; <API key> = (struct <API key> *)buf; flowid = le16_to_cpu(<API key>->compl_hdr.flow_ring_id); flowid -= <API key>; status = le16_to_cpu(<API key>->compl_hdr.status); if (status) { brcmf_err("Flowring deletion failed, code %d\n", status); <API key>(msgbuf->flow, flowid); return; } brcmf_dbg(MSGBUF, "Flowring %d Delete response status %d\n", flowid, status); <API key>(msgbuf, flowid); } static void <API key>(struct brcmf_msgbuf *msgbuf, void *buf) { struct msgbuf_common_hdr *msg; msg = (struct msgbuf_common_hdr *)buf; switch (msg->msgtype) { case <API key>: brcmf_dbg(MSGBUF, "<API key>\n"); <API key>(msgbuf, buf); break; case <API key>: brcmf_dbg(MSGBUF, "<API key>\n"); <API key>(msgbuf, buf); break; case <API key>: brcmf_dbg(MSGBUF, "<API key>\n"); break; case <API key>: brcmf_dbg(MSGBUF, "<API key>\n"); <API key>(msgbuf, buf); break; case <API key>: brcmf_dbg(MSGBUF, "<API key>\n"); <API key>(msgbuf, buf); break; case <API key>: brcmf_dbg(MSGBUF, "<API key>\n"); <API key>(msgbuf, buf); break; case <API key>: brcmf_dbg(MSGBUF, "<API key>\n"); <API key>(msgbuf, buf); break; default: brcmf_err("Unsupported msgtype %d\n", msg->msgtype); break; } } static void <API key>(struct brcmf_msgbuf *msgbuf, struct brcmf_commonring *commonring) { void *buf; u16 count; again: buf = <API key>(commonring, &count); if (buf == NULL) return; while (count) { <API key>(msgbuf, buf + msgbuf->rx_dataoffset); buf += <API key>(commonring); count } <API key>(commonring); if (commonring->r_ptr == 0) goto again; } int <API key>(struct device *dev) { struct brcmf_bus *bus_if = dev_get_drvdata(dev); struct brcmf_pub *drvr = bus_if->drvr; struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; void *buf; u32 flowid; buf = msgbuf->commonrings[<API key>]; <API key>(msgbuf, buf); buf = msgbuf->commonrings[<API key>]; <API key>(msgbuf, buf); buf = msgbuf->commonrings[<API key>]; <API key>(msgbuf, buf); for_each_set_bit(flowid, msgbuf->txstatus_done_map, msgbuf->nrof_flowrings) { clear_bit(flowid, msgbuf->txstatus_done_map); if (brcmf_flowring_qlen(msgbuf->flow, flowid)) <API key>(msgbuf, flowid); } return 0; } void <API key>(struct brcmf_pub *drvr, u8 flowid) { struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; struct <API key> *delete; struct brcmf_commonring *commonring; void *ret_ptr; u8 ifidx; int err; commonring = msgbuf->commonrings[<API key>]; <API key>(commonring); ret_ptr = <API key>(commonring); if (!ret_ptr) { brcmf_err("FW unaware, flowring will be removed !!\n"); <API key>(commonring); <API key>(msgbuf, flowid); return; } delete = (struct <API key> *)ret_ptr; ifidx = <API key>(msgbuf->flow, flowid); delete->msg.msgtype = <API key>; delete->msg.ifidx = ifidx; delete->msg.request_id = 0; delete->flow_ring_id = cpu_to_le16(flowid + <API key>); delete->reason = 0; brcmf_dbg(MSGBUF, "Send Flow Delete Req flow ID %d, ifindex %d\n", flowid, ifidx); err = <API key>(commonring); <API key>(commonring); if (err) { brcmf_err("Failed to submit RING_DELETE, flowring will be removed\n"); <API key>(msgbuf, flowid); } } int <API key>(struct brcmf_pub *drvr) { struct brcmf_bus_msgbuf *if_msgbuf; struct brcmf_msgbuf *msgbuf; long long address; u32 count; if_msgbuf = drvr->bus_if->msgbuf; msgbuf = kzalloc(sizeof(*msgbuf), GFP_ATOMIC); if (!msgbuf) goto fail; msgbuf->txflow_wq = <API key>("msgbuf_txflow"); if (msgbuf->txflow_wq == NULL) { brcmf_err("workqueue creation failed\n"); goto fail; } INIT_WORK(&msgbuf->txflow_work, <API key>); count = BITS_TO_LONGS(if_msgbuf->nrof_flowrings); count = count * sizeof(unsigned long); msgbuf->flow_map = kzalloc(count, GFP_ATOMIC); if (!msgbuf->flow_map) goto fail; msgbuf->txstatus_done_map = kzalloc(count, GFP_ATOMIC); if (!msgbuf->txstatus_done_map) goto fail; msgbuf->drvr = drvr; msgbuf->ioctbuf = dma_alloc_coherent(drvr->bus_if->dev, <API key>, &msgbuf->ioctbuf_handle, GFP_ATOMIC); if (!msgbuf->ioctbuf) goto fail; address = (long long)(long)msgbuf->ioctbuf_handle; msgbuf->ioctbuf_phys_hi = address >> 32; msgbuf->ioctbuf_phys_lo = address & 0xffffffff; drvr->proto->hdrpull = <API key>; drvr->proto->query_dcmd = <API key>; drvr->proto->set_dcmd = <API key>; drvr->proto->txdata = brcmf_msgbuf_txdata; drvr->proto->configure_addr_mode = <API key>; drvr->proto->delete_peer = <API key>; drvr->proto->add_tdls_peer = <API key>; drvr->proto->pd = msgbuf; init_waitqueue_head(&msgbuf->ioctl_resp_wait); msgbuf->commonrings = (struct brcmf_commonring **)if_msgbuf->commonrings; msgbuf->flowrings = (struct brcmf_commonring **)if_msgbuf->flowrings; msgbuf->nrof_flowrings = if_msgbuf->nrof_flowrings; msgbuf->flowring_dma_handle = kzalloc(msgbuf->nrof_flowrings * sizeof(*msgbuf->flowring_dma_handle), GFP_ATOMIC); if (!msgbuf->flowring_dma_handle) goto fail; msgbuf->rx_dataoffset = if_msgbuf->rx_dataoffset; msgbuf->max_rxbufpost = if_msgbuf->max_rxbufpost; msgbuf->max_ioctlrespbuf = <API key>; msgbuf->max_eventbuf = <API key>; msgbuf->tx_pktids = <API key>(NR_TX_PKTIDS, DMA_TO_DEVICE); if (!msgbuf->tx_pktids) goto fail; msgbuf->rx_pktids = <API key>(NR_RX_PKTIDS, DMA_FROM_DEVICE); if (!msgbuf->rx_pktids) goto fail; msgbuf->flow = <API key>(drvr->bus_if->dev, if_msgbuf->nrof_flowrings); if (!msgbuf->flow) goto fail; brcmf_dbg(MSGBUF, "Feeding buffers, rx data %d, rx event %d, rx ioctl resp %d\n", msgbuf->max_rxbufpost, msgbuf->max_eventbuf, msgbuf->max_ioctlrespbuf); count = 0; do { <API key>(msgbuf); if (msgbuf->max_rxbufpost != msgbuf->rxbufpost) msleep(10); else break; count++; } while (count < 10); <API key>(msgbuf); <API key>(msgbuf); return 0; fail: if (msgbuf) { kfree(msgbuf->flow_map); kfree(msgbuf->txstatus_done_map); <API key>(msgbuf); kfree(msgbuf->flowring_dma_handle); if (msgbuf->ioctbuf) dma_free_coherent(drvr->bus_if->dev, <API key>, msgbuf->ioctbuf, msgbuf->ioctbuf_handle); kfree(msgbuf); } return -ENOMEM; } void <API key>(struct brcmf_pub *drvr) { struct brcmf_msgbuf *msgbuf; brcmf_dbg(TRACE, "Enter\n"); if (drvr->proto->pd) { msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; kfree(msgbuf->flow_map); kfree(msgbuf->txstatus_done_map); if (msgbuf->txflow_wq) destroy_workqueue(msgbuf->txflow_wq); <API key>(msgbuf->flow); dma_free_coherent(drvr->bus_if->dev, <API key>, msgbuf->ioctbuf, msgbuf->ioctbuf_handle); <API key>(msgbuf); kfree(msgbuf->flowring_dma_handle); kfree(msgbuf); drvr->proto->pd = NULL; } }
#include <linux/module.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/errno.h> #include <linux/string.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/fb.h> #include <asm/machvec.h> #include <asm/uaccess.h> #include <asm/pgtable.h> #include <asm/io.h> #include <asm/hd64461.h> #include <asm/cpu/dac.h> #define WIDTH 640 static struct fb_var_screeninfo hitfb_var __initdata = { .activate = FB_ACTIVATE_NOW, .height = -1, .width = -1, .vmode = <API key>, }; static struct fb_fix_screeninfo hitfb_fix __initdata = { .id = "Hitachi HD64461", .type = <API key>, .accel = FB_ACCEL_NONE, }; static u32 pseudo_palette[16]; static struct fb_info fb_info; static inline void hitfb_accel_wait(void) { while (fb_readw(HD64461_GRCFGR) & <API key>) ; } static inline void hitfb_accel_start(int truecolor) { if (truecolor) { fb_writew(6, HD64461_GRCFGR); } else { fb_writew(7, HD64461_GRCFGR); } } static inline void <API key>(int truecolor, u16 dx, u16 dy, u16 width, u16 height) { u32 saddr = WIDTH * dy + dx; if (truecolor) saddr <<= 1; fb_writew(width-1, HD64461_BBTDWR); fb_writew(height-1, HD64461_BBTDHR); fb_writew(saddr & 0xffff, HD64461_BBTDSARL); fb_writew(saddr >> 16, HD64461_BBTDSARH); } static inline void hitfb_accel_bitblt(int truecolor, u16 sx, u16 sy, u16 dx, u16 dy, u16 width, u16 height, u16 rop, u32 mask_addr) { u32 saddr, daddr; u32 maddr = 0; height width fb_writew(rop, HD64461_BBTROPR); if ((sy < dy) || ((sy == dy) && (sx <= dx))) { saddr = WIDTH * (sy + height) + sx + width; daddr = WIDTH * (dy + height) + dx + width; if (mask_addr) { if (truecolor) maddr = ((width >> 3) + 1) * (height + 1) - 1; else maddr = (((width >> 4) + 1) * (height + 1) - 1) * 2; fb_writew((1 << 5) | 1, HD64461_BBTMDR); } else fb_writew(1, HD64461_BBTMDR); } else { saddr = WIDTH * sy + sx; daddr = WIDTH * dy + dx; if (mask_addr) { fb_writew((1 << 5), HD64461_BBTMDR); } else { fb_writew(0, HD64461_BBTMDR); } } if (truecolor) { saddr <<= 1; daddr <<= 1; } fb_writew(width, HD64461_BBTDWR); fb_writew(height, HD64461_BBTDHR); fb_writew(saddr & 0xffff, HD64461_BBTSSARL); fb_writew(saddr >> 16, HD64461_BBTSSARH); fb_writew(daddr & 0xffff, HD64461_BBTDSARL); fb_writew(daddr >> 16, HD64461_BBTDSARH); if (mask_addr) { maddr += mask_addr; fb_writew(maddr & 0xffff, HD64461_BBTMARL); fb_writew(maddr >> 16, HD64461_BBTMARH); } hitfb_accel_start(truecolor); } static void hitfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect) { if (rect->rop != ROP_COPY) cfb_fillrect(p, rect); else { hitfb_accel_wait(); fb_writew(0x00f0, HD64461_BBTROPR); fb_writew(16, HD64461_BBTMDR); if (p->var.bits_per_pixel == 16) { fb_writew(((u32 *) (p->pseudo_palette))[rect->color], HD64461_GRSCR); <API key>(1, rect->dx, rect->dy, rect->width, rect->height); hitfb_accel_start(1); } else { fb_writew(rect->color, HD64461_GRSCR); <API key>(0, rect->dx, rect->dy, rect->width, rect->height); hitfb_accel_start(0); } } } static void hitfb_copyarea(struct fb_info *p, const struct fb_copyarea *area) { hitfb_accel_wait(); hitfb_accel_bitblt(p->var.bits_per_pixel == 16, area->sx, area->sy, area->dx, area->dy, area->width, area->height, 0x00cc, 0); } static int hitfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) { int xoffset = var->xoffset; int yoffset = var->yoffset; if (xoffset != 0) return -EINVAL; fb_writew((yoffset*info->fix.line_length)>>10, HD64461_LCDCBAR); return 0; } int hitfb_blank(int blank_mode, struct fb_info *info) { unsigned short v; if (blank_mode) { v = fb_readw(HD64461_LDR1); v &= ~HD64461_LDR1_DON; fb_writew(v, HD64461_LDR1); v = fb_readw(HD64461_LCDCCR); v |= HD64461_LCDCCR_MOFF; fb_writew(v, HD64461_LCDCCR); v = fb_readw(HD64461_STBCR); v |= <API key>; fb_writew(v, HD64461_STBCR); } else { v = fb_readw(HD64461_STBCR); v &= ~<API key>; fb_writew(v, HD64461_STBCR); v = fb_readw(HD64461_LCDCCR); v &= ~(HD64461_LCDCCR_MOFF | <API key>); fb_writew(v, HD64461_LCDCCR); do { v = fb_readw(HD64461_LCDCCR); } while(v&<API key>); v = fb_readw(HD64461_LDR1); v |= HD64461_LDR1_DON; fb_writew(v, HD64461_LDR1); } return 0; } static int hitfb_setcolreg(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info) { if (regno >= 256) return 1; switch (info->var.bits_per_pixel) { case 8: fb_writew(regno << 8, HD64461_CPTWAR); fb_writew(red >> 10, HD64461_CPTWDR); fb_writew(green >> 10, HD64461_CPTWDR); fb_writew(blue >> 10, HD64461_CPTWDR); break; case 16: if (regno >= 16) return 1; ((u32 *) (info->pseudo_palette))[regno] = ((red & 0xf800)) | ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11); break; } return 0; } static int hitfb_sync(struct fb_info *info) { hitfb_accel_wait(); return 0; } static int hitfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { int maxy; var->xres = info->var.xres; var->xres_virtual = info->var.xres; var->yres = info->var.yres; if ((var->bits_per_pixel != 8) && (var->bits_per_pixel != 16)) var->bits_per_pixel = info->var.bits_per_pixel; if (var->yres_virtual < var->yres) var->yres_virtual = var->yres; maxy = info->fix.smem_len / var->xres; if (var->bits_per_pixel == 16) maxy /= 2; if (var->yres_virtual > maxy) var->yres_virtual = maxy; var->xoffset = 0; var->yoffset = 0; switch (var->bits_per_pixel) { case 8: var->red.offset = 0; var->red.length = 8; var->green.offset = 0; var->green.length = 8; var->blue.offset = 0; var->blue.length = 8; var->transp.offset = 0; var->transp.length = 0; break; case 16: /* RGB 565 */ var->red.offset = 11; var->red.length = 5; var->green.offset = 5; var->green.length = 6; var->blue.offset = 0; var->blue.length = 5; var->transp.offset = 0; var->transp.length = 0; break; } return 0; } static int hitfb_set_par(struct fb_info *info) { unsigned short ldr3; switch (info->var.bits_per_pixel) { case 8: info->fix.line_length = info->var.xres; info->fix.visual = <API key>; info->fix.ypanstep = 16; break; case 16: info->fix.line_length = info->var.xres*2; info->fix.visual = FB_VISUAL_TRUECOLOR; info->fix.ypanstep = 8; break; } fb_writew(info->fix.line_length, HD64461_LCDCLOR); ldr3 = fb_readw(HD64461_LDR3); ldr3 &= ~15; ldr3 |= (info->var.bits_per_pixel == 8) ? 4 : 8; fb_writew(ldr3, HD64461_LDR3); return 0; } static struct fb_ops hitfb_ops = { .owner = THIS_MODULE, .fb_check_var = hitfb_check_var, .fb_set_par = hitfb_set_par, .fb_setcolreg = hitfb_setcolreg, .fb_blank = hitfb_blank, .fb_sync = hitfb_sync, .fb_pan_display = hitfb_pan_display, .fb_fillrect = hitfb_fillrect, .fb_copyarea = hitfb_copyarea, .fb_imageblit = cfb_imageblit, }; static int __init hitfb_probe(struct platform_device *dev) { unsigned short lcdclor, ldr3, ldvndr; if (fb_get_options("hitfb", NULL)) return -ENODEV; hitfb_fix.mmio_start = <API key>+0x1000; hitfb_fix.mmio_len = 0x1000; hitfb_fix.smem_start = <API key> + 0x02000000; hitfb_fix.smem_len = 512 * 1024; lcdclor = fb_readw(HD64461_LCDCLOR); ldvndr = fb_readw(HD64461_LDVNDR); ldr3 = fb_readw(HD64461_LDR3); switch (ldr3 & 15) { default: case 4: hitfb_var.bits_per_pixel = 8; hitfb_var.xres = lcdclor; break; case 8: hitfb_var.bits_per_pixel = 16; hitfb_var.xres = lcdclor / 2; break; } hitfb_fix.line_length = lcdclor; hitfb_fix.visual = (hitfb_var.bits_per_pixel == 8) ? <API key> : FB_VISUAL_TRUECOLOR; hitfb_var.yres = ldvndr + 1; hitfb_var.xres_virtual = hitfb_var.xres; hitfb_var.yres_virtual = hitfb_fix.smem_len / lcdclor; switch (hitfb_var.bits_per_pixel) { case 8: hitfb_var.red.offset = 0; hitfb_var.red.length = 8; hitfb_var.green.offset = 0; hitfb_var.green.length = 8; hitfb_var.blue.offset = 0; hitfb_var.blue.length = 8; hitfb_var.transp.offset = 0; hitfb_var.transp.length = 0; break; case 16: /* RGB 565 */ hitfb_var.red.offset = 11; hitfb_var.red.length = 5; hitfb_var.green.offset = 5; hitfb_var.green.length = 6; hitfb_var.blue.offset = 0; hitfb_var.blue.length = 5; hitfb_var.transp.offset = 0; hitfb_var.transp.length = 0; break; } fb_info.fbops = &hitfb_ops; fb_info.var = hitfb_var; fb_info.fix = hitfb_fix; fb_info.pseudo_palette = pseudo_palette; fb_info.flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | <API key> | <API key>; fb_info.screen_base = (void *)hitfb_fix.smem_start; fb_alloc_cmap(&fb_info.cmap, 256, 0); if (<API key>(&fb_info) < 0) return -EINVAL; printk(KERN_INFO "fb%d: %s frame buffer device\n", fb_info.node, fb_info.fix.id); return 0; } static int __devexit hitfb_remove(struct platform_device *dev) { return <API key>(&fb_info); } #ifdef CONFIG_PM static int hitfb_suspend(struct platform_device *dev, pm_message_t state) { u16 v; hitfb_blank(1,0); v = fb_readw(HD64461_STBCR); v |= <API key>; fb_writew(v, HD64461_STBCR); return 0; } static int hitfb_resume(struct platform_device *dev) { u16 v; v = fb_readw(HD64461_STBCR); v &= ~<API key>; msleep(100); v = fb_readw(HD64461_STBCR); v &= ~<API key>; fb_writew(v, HD64461_STBCR); hitfb_blank(0,0); return 0; } #endif static struct platform_driver hitfb_driver = { .probe = hitfb_probe, .remove = __devexit_p(hitfb_remove), #ifdef CONFIG_PM .suspend = hitfb_suspend, .resume = hitfb_resume, #endif .driver = { .name = "hitfb", }, }; static struct platform_device hitfb_device = { .name = "hitfb", .id = -1, }; static int __init hitfb_init(void) { int ret; ret = <API key>(&hitfb_driver); if (!ret) { ret = <API key>(&hitfb_device); if (ret) <API key>(&hitfb_driver); } return ret; } static void __exit hitfb_exit(void) { <API key>(&hitfb_device); <API key>(&hitfb_driver); } module_init(hitfb_init); module_exit(hitfb_exit); MODULE_LICENSE("GPL");
#ifndef G72X_PRIVATE_H #define G72X_PRIVATE_H #ifdef __cplusplus #error "This code is not designed to be compiled with a C++ compiler." #endif /* ** The following is the definition of the state structure used by the ** G.721/G.723 encoder and decoder to preserve their internal state ** between successive calls. The meanings of the majority of the state ** structure fields are explained in detail in the CCITT Recommendation ** G.721. The field names are essentially identical to variable names ** in the bit level description of the coding algorithm included in this ** Recommendation. */ struct g72x_state { long yl; /* Locked or steady state step size multiplier. */ short yu; /* Unlocked or non-steady state step size multiplier. */ short dms; /* Short term energy estimate. */ short dml; /* Long term energy estimate. */ short ap; /* Linear weighting coefficient of 'yl' and 'yu'. */ short a[2]; /* Coefficients of pole portion of prediction filter. */ short b[6]; /* Coefficients of zero portion of prediction filter. */ short pk[2]; /* ** Signs of previous two samples of a partially ** reconstructed signal. **/ short dq[6]; /* ** Previous 6 samples of the quantized difference ** signal represented in an internal floating point ** format. **/ short sr[2]; /* ** Previous 2 samples of the quantized difference ** signal represented in an internal floating point ** format. */ char td; /* delayed tone detect, new in 1988 version */ /* The following struct members were added for libsndfile. The original ** code worked by calling a set of functions on a sample by sample basis ** which is slow on architectures like Intel x86. For libsndfile, this ** was changed so that the encoding and decoding routines could work on ** a block of samples at a time to reduce the function call overhead. */ int (*encoder) (int, struct g72x_state* state) ; int (*decoder) (int, struct g72x_state* state) ; int codec_bits, blocksize, samplesperblock ; } ; typedef struct g72x_state G72x_STATE ; int predictor_zero (G72x_STATE *state_ptr); int predictor_pole (G72x_STATE *state_ptr); int step_size (G72x_STATE *state_ptr); int quantize (int d, int y, short *table, int size); int reconstruct (int sign, int dqln, int y); void update (int code_size, int y, int wi, int fi, int dq, int sr, int dqsez, G72x_STATE *state_ptr); int g721_encoder (int sample, G72x_STATE *state_ptr); int g721_decoder (int code, G72x_STATE *state_ptr); int g723_16_encoder (int sample, G72x_STATE *state_ptr); int g723_16_decoder (int code, G72x_STATE *state_ptr); int g723_24_encoder (int sample, G72x_STATE *state_ptr); int g723_24_decoder (int code, G72x_STATE *state_ptr); int g723_40_encoder (int sample, G72x_STATE *state_ptr); int g723_40_decoder (int code, G72x_STATE *state_ptr); void private_init_state (G72x_STATE *state_ptr) ; #endif /* G72X_PRIVATE_H */
/* Written by Bruno Haible <bruno@clisp.org>, 2010. */ #include <config.h> #include "unistr.h" #include "macros.h" static int check (const uint8_t *input, size_t input_length, ucs4_t *puc) { ucs4_t uc; /* Test recognition when at the beginning of the string. */ if (u8_prev (&uc, input + input_length, input) != input) return 1; /* Test recognition when preceded by a 1-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ucs4_t uc1; ptr = buf; *ptr++ = 'x'; for (i = 0; i < input_length; i++) ptr[i] = input[i]; if (u8_prev (&uc1, ptr + input_length, buf) != ptr) return 2; if (uc1 != uc) return 3; } /* Test recognition when preceded by a 2-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ucs4_t uc1; ptr = buf; *ptr++ = 0xC3; *ptr++ = 0x97; for (i = 0; i < input_length; i++) ptr[i] = input[i]; if (u8_prev (&uc1, ptr + input_length, buf) != ptr) return 4; if (uc1 != uc) return 5; } /* Test recognition when preceded by a 3-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ucs4_t uc1; ptr = buf; *ptr++ = 0xE2; *ptr++ = 0x84; *ptr++ = 0x82; for (i = 0; i < input_length; i++) ptr[i] = input[i]; if (u8_prev (&uc1, ptr + input_length, buf) != ptr) return 6; if (uc1 != uc) return 7; } /* Test recognition when preceded by a 4-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ucs4_t uc1; ptr = buf; *ptr++ = 0xF0; *ptr++ = 0x9D; *ptr++ = 0x94; *ptr++ = 0x9E; for (i = 0; i < input_length; i++) ptr[i] = input[i]; if (u8_prev (&uc1, ptr + input_length, buf) != ptr) return 8; if (uc1 != uc) return 9; } *puc = uc; return 0; } static int check_invalid (const uint8_t *input, size_t input_length) { ucs4_t uc; /* Test recognition when at the beginning of the string. */ uc = 0xBADFACE; if (u8_prev (&uc, input + input_length, input) != NULL) return 1; if (uc != 0xBADFACE) return 2; /* Test recognition when preceded by a 1-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ptr = buf; *ptr++ = 'x'; for (i = 0; i < input_length; i++) ptr[i] = input[i]; uc = 0xBADFACE; if (u8_prev (&uc, ptr + input_length, buf) != NULL) return 3; if (uc != 0xBADFACE) return 4; } /* Test recognition when preceded by a 2-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ptr = buf; *ptr++ = 0xC3; *ptr++ = 0x97; for (i = 0; i < input_length; i++) ptr[i] = input[i]; uc = 0xBADFACE; if (u8_prev (&uc, ptr + input_length, buf) != NULL) return 5; if (uc != 0xBADFACE) return 6; } /* Test recognition when preceded by a 3-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ptr = buf; *ptr++ = 0xE2; *ptr++ = 0x84; *ptr++ = 0x82; for (i = 0; i < input_length; i++) ptr[i] = input[i]; uc = 0xBADFACE; if (u8_prev (&uc, ptr + input_length, buf) != NULL) return 7; if (uc != 0xBADFACE) return 8; } /* Test recognition when preceded by a 4-unit character. */ { uint8_t buf[100]; uint8_t *ptr; size_t i; ptr = buf; *ptr++ = 0xF0; *ptr++ = 0x9D; *ptr++ = 0x94; *ptr++ = 0x9E; for (i = 0; i < input_length; i++) ptr[i] = input[i]; uc = 0xBADFACE; if (u8_prev (&uc, ptr + input_length, buf) != NULL) return 9; if (uc != 0xBADFACE) return 10; } return 0; } int main () { ucs4_t uc; /* Test ISO 646 unit input. */ { ucs4_t c; uint8_t buf[1]; for (c = 0; c < 0x80; c++) { buf[0] = c; uc = 0xBADFACE; ASSERT (check (buf, 1, &uc) == 0); ASSERT (uc == c); } } /* Test 2-byte character input. */ { static const uint8_t input[] = { 0xC3, 0x97 }; uc = 0xBADFACE; ASSERT (check (input, SIZEOF (input), &uc) == 0); ASSERT (uc == 0x00D7); } /* Test 3-byte character input. */ { static const uint8_t input[] = { 0xE2, 0x82, 0xAC }; uc = 0xBADFACE; ASSERT (check (input, SIZEOF (input), &uc) == 0); ASSERT (uc == 0x20AC); } /* Test 4-byte character input. */ { static const uint8_t input[] = { 0xF4, 0x8F, 0xBF, 0xBD }; uc = 0xBADFACE; ASSERT (check (input, SIZEOF (input), &uc) == 0); ASSERT (uc == 0x10FFFD); } /* Test incomplete/invalid 1-byte input. */ { static const uint8_t input[] = { 0xC1 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xC3 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xE2 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xF4 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xFE }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } /* Test incomplete/invalid 2-byte input. */ { static const uint8_t input[] = { 0xE0, 0x9F }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xE2, 0x82 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xE2, 0xD0 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xF0, 0x8F }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xF3, 0x8F }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xF3, 0xD0 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } /* Test incomplete/invalid 3-byte input. */ { static const uint8_t input[] = { 0xF3, 0x8F, 0xBF }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xF3, 0xE4, 0xBF }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } { static const uint8_t input[] = { 0xF3, 0x8F, 0xD0 }; ASSERT (check_invalid (input, SIZEOF (input)) == 0); } return 0; }
{% load i18n %} {% load base_tags %} {% load client_lib_tags %} {% block head %} <style> #paneltbar { margin-top: 90px !important; } </style> {% get_geoapp_list %} {% endblock %}
{% load home_tags %} <ul id="code-list" class="list"> {% for entry in entrys.object_list %} <li> <span>[{{ entry.category }}]</span> <a href="{{ entry.get_absolute_url }}" title="{{ entry.description|slice:"50" }}" class="title"> {{ entry.title }} </a> <span class="time">{{ entry.sub_time|how_long }}</span> <span class="author">By {{ entry.author.get_profile.screen_name }}</span> <span class="count">{{ entry.click_times }}</span> <div class="clear"></div> </li> {% empty %} <li class="none-entry"></li> {% endfor %} <div class="more">{% include 'paginator.inc.html' %}</div> <div class="clear"></div> </ul>
#ifndef GRUB_ZFS_HEADER #define GRUB_ZFS_HEADER 1 #include <grub/err.h> #include <grub/disk.h> /* * On-disk version number. */ #define SPA_VERSION 28ULL /* * The following are configuration names used in the nvlist describing a pool's * configuration. */ #define <API key> "version" #define <API key> "name" #define <API key> "state" #define <API key> "txg" #define <API key> "pool_guid" #define <API key> "create_txg" #define <API key> "top_guid" #define <API key> "vdev_tree" #define ZPOOL_CONFIG_TYPE "type" #define <API key> "children" #define ZPOOL_CONFIG_ID "id" #define ZPOOL_CONFIG_GUID "guid" #define ZPOOL_CONFIG_PATH "path" #define ZPOOL_CONFIG_DEVID "devid" #define <API key> "metaslab_array" #define <API key> "metaslab_shift" #define ZPOOL_CONFIG_ASHIFT "ashift" #define ZPOOL_CONFIG_ASIZE "asize" #define ZPOOL_CONFIG_DTL "DTL" #define ZPOOL_CONFIG_STATS "stats" #define <API key> "whole_disk" #define <API key> "error_count" #define <API key> "not_present" #define ZPOOL_CONFIG_SPARES "spares" #define <API key> "is_spare" #define <API key> "nparity" #define <API key> "phys_path" #define <API key> "l2cache" #define <API key> "hole_array" #define <API key> "vdev_children" #define <API key> "is_hole" #define <API key> "ddt_histogram" #define <API key> "ddt_object_stats" #define <API key> "ddt_stats" /* * The persistent vdev state is stored as separate values rather than a single * 'vdev_state' entry. This is because a device can be in multiple states, such * as offline and degraded. */ #define <API key> "offline" #define <API key> "faulted" #define <API key> "degraded" #define <API key> "removed" #define VDEV_TYPE_ROOT "root" #define VDEV_TYPE_MIRROR "mirror" #define VDEV_TYPE_REPLACING "replacing" #define VDEV_TYPE_RAIDZ "raidz" #define VDEV_TYPE_DISK "disk" #define VDEV_TYPE_FILE "file" #define VDEV_TYPE_MISSING "missing" #define VDEV_TYPE_HOLE "hole" #define VDEV_TYPE_SPARE "spare" #define VDEV_TYPE_L2CACHE "l2cache" /* * pool state. The following states are written to disk as part of the normal * SPA lifecycle: ACTIVE, EXPORTED, DESTROYED, SPARE, L2CACHE. The remaining * states are software abstractions used at various levels to communicate pool * state. */ typedef enum pool_state { POOL_STATE_ACTIVE = 0, /* In active use */ POOL_STATE_EXPORTED, /* Explicitly exported */ <API key>, /* Explicitly destroyed */ POOL_STATE_SPARE, /* Reserved for hot spare use */ POOL_STATE_L2CACHE, /* Level 2 ARC device */ <API key>, /* Internal spa_t state */ POOL_STATE_UNAVAIL, /* Internal libzfs state */ <API key> /* Internal libzfs state */ } pool_state_t; struct grub_zfs_data; grub_err_t <API key> (grub_device_t dev, char **nvlist); grub_err_t grub_zfs_getmdnobj (grub_device_t dev, const char *fsfilename, grub_uint64_t *mdnobj); char *<API key> (char *nvlist, char *name); char *<API key> (char *nvlist, char *name); int <API key> (char *nvlist, char *name, grub_uint64_t *out); char *<API key> (char *nvlist, char *name, grub_size_t index); int <API key> (char *nvlist, char *name); #endif /* ! GRUB_ZFS_HEADER */
#define UNICODE #include <Python.h> #include <stdlib.h> #define min(x, y) ((x < y) ? x : y) #define max(x, y) ((x > y) ? x : y) static PyObject * speedup_parse_date(PyObject *self, PyObject *args) { const char *raw, *orig, *tz; char *end; long year, month, day, hour, minute, second, tzh = 0, tzm = 0, sign = 0; size_t len; if(!PyArg_ParseTuple(args, "s", &raw)) return NULL; len = strlen(raw); if (len < 19) Py_RETURN_NONE; orig = raw; year = strtol(raw, &end, 10); if ((end - raw) != 4) Py_RETURN_NONE; raw += 5; month = strtol(raw, &end, 10); if ((end - raw) != 2) Py_RETURN_NONE; raw += 3; day = strtol(raw, &end, 10); if ((end - raw) != 2) Py_RETURN_NONE; raw += 3; hour = strtol(raw, &end, 10); if ((end - raw) != 2) Py_RETURN_NONE; raw += 3; minute = strtol(raw, &end, 10); if ((end - raw) != 2) Py_RETURN_NONE; raw += 3; second = strtol(raw, &end, 10); if ((end - raw) != 2) Py_RETURN_NONE; tz = orig + len - 6; if (*tz == '+') sign = +1; if (*tz == '-') sign = -1; if (sign != 0) { // We have TZ info tz += 1; tzh = strtol(tz, &end, 10); if ((end - tz) != 2) Py_RETURN_NONE; tz += 3; tzm = strtol(tz, &end, 10); if ((end - tz) != 2) Py_RETURN_NONE; } return Py_BuildValue("lllllll", year, month, day, hour, minute, second, (tzh*60 + tzm)*sign*60); } static PyObject* speedup_pdf_float(PyObject *self, PyObject *args) { double f = 0.0, a = 0.0; char *buf = "0", *dot; void *free_buf = NULL; int precision = 6, l = 0; PyObject *ret; if(!PyArg_ParseTuple(args, "d", &f)) return NULL; a = fabs(f); if (a > 1.0e-7) { if(a > 1) precision = min(max(0, 6-(int)log10(a)), 6); buf = <API key>(f, 'f', precision, 0, NULL); if (buf != NULL) { free_buf = (void*)buf; if (precision > 0) { l = strlen(buf) - 1; while (l > 0 && buf[l] == '0') l if (buf[l] == ',' || buf[l] == '.') buf[l] = 0; else buf[l+1] = 0; if ( (dot = strchr(buf, ',')) ) *dot = '.'; } } else if (!PyErr_Occurred()) PyErr_SetString(PyExc_TypeError, "Float->str failed."); } ret = <API key>(buf); if (free_buf != NULL) PyMem_Free(free_buf); return ret; } static PyMethodDef speedup_methods[] = { {"parse_date", speedup_parse_date, METH_VARARGS, "parse_date()\n\nParse ISO dates faster." }, {"pdf_float", speedup_pdf_float, METH_VARARGS, "pdf_float()\n\nConvert float to a string representation suitable for PDF" }, {NULL, NULL, 0, NULL} }; PyMODINIT_FUNC initspeedup(void) { PyObject *m; m = Py_InitModule3("speedup", speedup_methods, "Implementation of methods in C for speed." ); if (m == NULL) return; }
check_sudoer() { show_msg "Checking sudo access for $user" if [[ `sudo -l -U "$user" 2>&1 | grep "ALL"` ]]; then show_status "Sudo access exists" else show_dialog --title="Add you to the wheel group?" --text="Adding yourself to wheel group will enable you to perform operations as root with sudo. Do you want $program to add $user to the wheel group? You might need to enter the root password in the Terminal." --button="No:1" --button="Yes:0" if [[ $? -eq 0 ]]; then su -c "usermod -G wheel $user" else show_msg "As you wish, I was just helping" terminate_program fi fi }
//#define START_BMPHIGH #if ENABLED(SHOW_BOOTSCREEN) #if ENABLED(START_BMPHIGH) #define START_BMPWIDTH 112 #define START_BMPHEIGHT 38 #define START_BMPBYTEWIDTH 14 #define START_BMPBYTES 532 // START_BMPWIDTH * START_BMPHEIGHT / 8 const unsigned char start_bmp[START_BMPBYTES] PROGMEM = { 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xFF, 0xFF, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x3F, 0xFF, 0xC0, 0x0F, 0xC0, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x18, 0x00, 0x1F, 0xFF, 0xC0, 0x3F, 0xE1, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x0F, 0xFF, 0xC0, 0x7F, 0xF3, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x07, 0xFF, 0xC0, 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x3C, 0x00, 0x03, 0xFF, 0xC1, 0xF8, 0x7F, 0x87, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x01, 0xFF, 0xC1, 0xF0, 0x3F, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0xFF, 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x1F, 0x00, 0x03, 0xE0, 0x78, 0x3C, 0x03, 0xF0, 0x7F, 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0xC0, 0x0F, 0xF8, 0x78, 0x3C, 0x07, 0xFC, 0x3F, 0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0xE0, 0x1F, 0xFC, 0x78, 0x3C, 0x0F, 0xFE, 0x1F, 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0xF0, 0x3F, 0xFE, 0x78, 0x3C, 0x1F, 0xFE, 0x0F, 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xF3, 0xF8, 0x3F, 0x3E, 0x78, 0x3C, 0x3F, 0x3F, 0x07, 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xE0, 0xFC, 0x7C, 0x1F, 0x78, 0x3C, 0x3E, 0x1F, 0x07, 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x7C, 0x7C, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x7C, 0x78, 0x0F, 0x78, 0x3C, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0x80, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE7, 0xC0, 0x3C, 0x78, 0x00, 0x78, 0x3C, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xE0, 0x3C, 0x78, 0x00, 0x7C, 0x3C, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE3, 0xFF, 0x3F, 0xF8, 0x00, 0x7F, 0xBC, 0x3C, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE1, 0xFF, 0x3F, 0xF8, 0x00, 0x3F, 0xBF, 0xFC, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0xFF, 0x3F, 0xF8, 0x00, 0x1F, 0xBF, 0xFC, 0x0F, 0x03, 0xC1, 0xE0, 0x1E, 0x01, 0xE0, 0x7F, 0x3F, 0xF8, 0x00, 0x0F, 0xBF, 0xFC, 0x0F, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80 }; #else #define START_BMPWIDTH 56 #define START_BMPHEIGHT 19 #define START_BMPBYTEWIDTH 7 #define START_BMPBYTES 133 // START_BMPWIDTH * START_BMPHEIGHT / 8 const unsigned char start_bmp[START_BMPBYTES] PROGMEM = { 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x83, 0xCF, 0x00, 0x00, 0x0C, 0x30, 0x3F, 0x87, 0xFF, 0x80, 0x00, 0x0C, 0x30, 0x1F, 0x86, 0x79, 0x80, 0x00, 0x0C, 0x00, 0x0F, 0x8C, 0x30, 0xC7, 0x83, 0x8C, 0x30, 0xE7, 0x8C, 0x30, 0xCF, 0xC7, 0xCC, 0x31, 0xF3, 0x8C, 0x30, 0xDC, 0xEC, 0xEC, 0x33, 0xB9, 0x8C, 0x30, 0xD8, 0x6C, 0x6C, 0x33, 0x19, 0x8C, 0x30, 0xD0, 0x6C, 0x0C, 0x33, 0x19, 0x8C, 0x30, 0xD8, 0x6C, 0x0C, 0x33, 0x19, 0x8C, 0x30, 0xDC, 0x6C, 0x0E, 0x3B, 0x19, 0x8C, 0x30, 0xCF, 0x7C, 0x07, 0x9F, 0x19, 0x8C, 0x30, 0xC7, 0x7C, 0x03, 0x8F, 0x19, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8 }; #endif #endif // Here comes a compile-time operation to match the extruder symbols // on the info screen to the set number of extruders in configuration.h // When only one extruder is selected, the "1" on the symbol will not // be displayed. #if HAS_TEMP_BED #if HOTENDS == 1 #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 }; #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 }; #elif HOTENDS == 2 #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 }; #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 }; #else #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x40, 0xF0, 0x20, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x40, 0x60, 0x20, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x5E, 0x07, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x5F, 0x0F, 0xA0, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x4F, 0x0F, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x47, 0x0E, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x63, 0x0C, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 }; #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x20, 0x82, 0x00, 0x5E, 0xF7, 0xA0, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x5C, 0x63, 0xA0, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x82, 0x08, 0x00, 0x58, 0x01, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x01, 0x04, 0x10, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x01, 0x04, 0x10, 0x00, 0x40, 0xF0, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x82, 0x08, 0x00, 0x41, 0xF8, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x41, 0x04, 0x00, 0x61, 0xF8, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00 }; #endif // Extruders #else #if HOTENDS == 1 #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0xFF, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #elif HOTENDS == 2 #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #else #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen0_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0x07, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x0F, 0xA0, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x4F, 0x0F, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x47, 0x0E, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x63, 0x0C, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #define STATUS_SCREENWIDTH 115 //Width in pixels #define STATUS_SCREENHEIGHT 19 //Height in pixels #define <API key> 15 //Width in bytes const unsigned char status_screen1_bmp[] PROGMEM = { //AVR-GCC, WinAVR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7F, 0x80, 0x00, 0x3F, 0xC0, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, 0xFB, 0xC0, 0x00, 0x79, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, 0xF3, 0xC0, 0x00, 0x76, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5E, 0xF7, 0xA0, 0xEB, 0xC0, 0x00, 0x7E, 0xE0, 0x00, 0x7E, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x63, 0xA0, 0x7B, 0x80, 0x00, 0x3D, 0xC0, 0x00, 0x39, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x58, 0x01, 0xA0, 0x7B, 0x80, 0x00, 0x3B, 0xC0, 0x00, 0x3E, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x60, 0x20, 0xFB, 0xC0, 0x00, 0x77, 0xE0, 0x00, 0x76, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF0, 0x20, 0xFB, 0xC0, 0x00, 0x70, 0xE0, 0x00, 0x79, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x41, 0xF8, 0x20, 0xFF, 0xC0, 0x00, 0x7F, 0xE0, 0x00, 0x7F, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x61, 0xF8, 0x60, 0x3F, 0x00, 0x00, 0x1F, 0x80, 0x00, 0x1F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xE0, 0x1E, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x0C, 0x00, 0x00, 0x06, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; #endif // Extruders #endif // HAS_TEMP_BED
/*! \file kspiC.cpp \author Michael Olsen \date 08/Mar/2005 \date 08/Mar/2005 */ /* This file contains a standard kspiC dispatcher, which will transform the calls into the C++ counterparts. This can be used by the plug-in to support kspiC with minimal efford. */ // KSPI #ifndef _KSPI_INCLUDED #include "kspi.h" #endif #ifndef _KSPI_C_INCLUDED #include "kspiC.h" #endif //! A wrapper for the main func (fixes a bug in msvc) kspi::IModule* MainWrap(kspi::IHost* pHost, tuint32* piVersionNumber); #ifdef WIN32 extern "C" __declspec(dllexport) void kspiCDispatcher(void* pObject, tint32 iCode, void** ppParms, void* pReturn) #endif #ifdef _Mac extern "C" void kspiCDispatcher(void* pObject, tint32 iCode, void** ppParms, void* pReturn) #endif { switch(iCode) { /* // Main case kspi::kspiDispatchMain: { // *((kspi::IModule**)pReturn) = kspi::kspiMain((kspi::IHost*)ppParms[0], (tuint32*)ppParms[1]); kspi::<API key> Func = (kspi::<API key>)ppParms[0]; kspi::IHost* pHost = (kspi::IHost*)ppParms[2]; kspi::kspiHost* pHostWrap = new kspi::kspiHost(Func, pHost); *((kspi::IModule**)pReturn) = MainWrap(pHostWrap, (tuint32*)ppParms[1]); } break;*/ // Module case kspi::<API key>: ((kspi::IModule*)pObject)->Destroy(); break; case kspi::<API key>: *((tuint32*)pReturn) = ((kspi::IModule*)pObject)->GetNrOfPlugIns(); break; case kspi::<API key>: *((kspi::IPlugIn**)pReturn) = ((kspi::IModule*)pObject)->CreateProcess((tuint32)ppParms[0]); break; case kspi::<API key>: *((tuint32*)pReturn) = ((kspi::IModule*)pObject)->GetCompanyID(); break; case kspi::<API key>: ((kspi::IModule*)pObject)->GetCompanyName((tchar*)ppParms[0]); break; // PlugIn case kspi::<API key>: ((kspi::IPlugIn*)pObject)->Destroy(); break; case kspi::<API key>: *((kspi::IGUI**)pReturn) = ((kspi::IPlugIn*)pObject)->CreateGUI((tuint32)ppParms[0]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->PreInitialize(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->Initialize(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->DeInitialize(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->Start(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->Stop(); break; case kspi::<API key>: *((tint32*)pReturn) = ((kspi::IPlugIn*)pObject)->IsSignalGenerator(); break; case kspi::<API key>: *((tint32*)pReturn) = ((kspi::IPlugIn*)pObject)->CanProcessInPlace(); break; case kspi::<API key>: *((tint32*)pReturn) = ((kspi::IPlugIn*)pObject)->WantsMIDI(); break; case kspi::<API key>: *((tint32*)pReturn) = ((kspi::IPlugIn*)pObject)->IsSynth(); break; case kspi::<API key>: *((tint32*)pReturn) = ((kspi::IPlugIn*)pObject)->GetLatency(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)-><API key>((tuint32*)ppParms[0], (tuint32*)ppParms[1], (tuint32*)ppParms[2], (tuint32*)ppParms[3]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)-><API key>((tuint32)ppParms[0], (tuint32)ppParms[1], (tuint32)ppParms[2]); break; case kspi::<API key>: *((tuint32*)pReturn) = ((kspi::IPlugIn*)pObject)->GetChannelGroups(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->SetMaxBufferSize((tuint32)ppParms[0]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->SetChannelGroups((tuint32)ppParms[0]); break; case kspi::<API key>: *((tint32*)pReturn) = ((kspi::IPlugIn*)pObject)->SupportSampleRate((tuint32)ppParms[0]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->SetSampleRate((tuint32)ppParms[0]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->InputMIDI((const kspi::SMIDIEvent*)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->ProcessInPlace((tfloat**)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->ProcessNonInPlace((tfloat**)ppParms[0], (const tfloat**)ppParms[1], (tuint32)ppParms[2]); break; case kspi::<API key>: *((tuint32*)pReturn) = ((kspi::IPlugIn*)pObject)->GetNrOfParameters(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->GetParameterInfo((tuint32)ppParms[0], (kspi::SParameterInfo*)ppParms[1]); break; case kspi::<API key>: *((tint32*)pReturn) = ((kspi::IPlugIn*)pObject)->GetParameter((tuint32)ppParms[0]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->SetParameter((tuint32)ppParms[0], (tint32)ppParms[1]); break; case kspi::<API key>: *((tuint32*)pReturn) = ((kspi::IPlugIn*)pObject)->GetChunkSize(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->GetChunk((void*)ppParms[0]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->SetChunk((const void*)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->Timer(); break; case kspi::<API key>: *((tuint32*)pReturn) = ((kspi::IPlugIn*)pObject)->GetProductID(); break; case kspi::<API key>: ((kspi::IPlugIn*)pObject)->GetProductName((tchar*)ppParms[0]); break; // GUI case kspi::<API key>: ((kspi::IGUI*)pObject)->Destroy(); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->GetSize((tuint32*)ppParms[0], (tuint32*)ppParms[1]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->MakeWindow((void*)ppParms[0]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->PrepareBuffer(); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->Paint(); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->OnMouseDown((tuint32)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->OnKeyDown((tuint32)ppParms[0]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->OnTimer(); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->OnDraw((tuchar*)ppParms[0], (tuint32)ppParms[1], (tint32)ppParms[2], (tint32)ppParms[3], (tint32)ppParms[4], (tint32)ppParms[5]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)-><API key>((tuint32)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->OnMouseLeftButtonUp((tuint32)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)->OnMouseMove((tuint32)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)-><API key>((tuint32)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)-><API key>((tuint32)ppParms[0], (tuint32)ppParms[1]); break; case kspi::<API key>: ((kspi::IGUI*)pObject)-><API key>((tuint32)ppParms[0], (tuint32)ppParms[1]); break; } } void kspiDispatcherWrap(void* hObject, tint32 iCode, void** ppParms, void* pReturn) { kspiCDispatcher(hObject, iCode, ppParms, pReturn); } #define PARM1(a) \ void* ppParms[1]; \ ppParms[0] = (void*)a #define PARMS2(a, b) \ void* ppParms[2]; \ ppParms[0] = (void*)a; \ ppParms[1] = (void*)b #define PARMS3(a, b, c) \ void* ppParms[3]; \ ppParms[0] = (void*)a; \ ppParms[1] = (void*)b; \ ppParms[2] = (void*)c #define PARMS4(a, b, c, d) \ void* ppParms[4]; \ ppParms[0] = (void*)a; \ ppParms[1] = (void*)b; \ ppParms[2] = (void*)c; \ ppParms[3] = (void*)d #define PARMS5(a, b, c, d, e) \ void* ppParms[5]; \ ppParms[0] = (void*)a; \ ppParms[1] = (void*)b; \ ppParms[2] = (void*)c; \ ppParms[3] = (void*)d; \ ppParms[4] = (void*)e kspi::IHost* kspi::IHost::Create(<API key> pCallback, void* hHost) { return dynamic_cast<IHost*>(new CHost((void*)pCallback, hHost)); } void kspi::CHost::Destroy() { } kspi::CHost::CHost(void* pCallback, void* hHost) : mpCallback((<API key>)pCallback), mhHost(hHost) { } kspi::CHost::~CHost() { } void kspi::CHost::OnAutomationUpdate(IPlugIn* pCaller, tint32 iParameterIndex, tint32 iValue) { PARMS3(pCaller, iParameterIndex, iValue); mpCallback(mhHost, <API key>, ppParms, NULL); } tfloat32 kspi::CHost::GetCurrentBPM() { float fRet; mpCallback(mhHost, <API key>, NULL, &fRet); return fRet; } kspi::IHost::EType kspi::CHost::GetType() { EType Type; mpCallback(mhHost, kspi::<API key>, NULL, &Type); return Type; } void kspi::CHost::ActivateWindow(tint32 iIndex) { PARM1(iIndex); mpCallback(mhHost, <API key>, ppParms, NULL); } void kspi::CHost::HideWindow(tint32 iIndex) { PARM1(iIndex); mpCallback(mhHost, <API key>, ppParms, NULL); } tint32 kspi::CHost::IsWindowVisible(tint32 iIndex) { PARM1(iIndex); tint32 iRet; mpCallback(mhHost, <API key>, ppParms, &iRet); return iRet; } void kspi::CHost::RedrawWindow(kspi::IGUI* pCaller, tint32 iX, tint32 iY, tint32 iCX, tint32 iCY) { PARMS5(pCaller, iX, iY, iCX, iCY); mpCallback(mhHost, <API key>, ppParms, NULL); } tint32 kspi::CHost::<API key>(tint32 iIndex) { PARM1(iIndex); tint32 iRet; mpCallback(mhHost, <API key>, ppParms, &iRet); return iRet; }
//<API key> //<API key> #ifndef <API key> #define <API key> #include <string> #include <iostream> #include "Interaction/ScatteringType.h" #include "Interaction/InteractionType.h" using std::string; using std::ostream; namespace genie { class Interaction; class GVldContext { public : GVldContext(); ~GVldContext(); void Decode (string encoded_values); double Emin (void) const { return fEmin; } double Emax (void) const { return fEmax; } void Print (ostream & stream) const; friend ostream & operator<< (ostream & stream, const GVldContext & vldc); private: void Init(void); void DecodeENERGY (string encoded_values); double fEmin; // min probe energy in validity range double fEmax; // max probe energy in validity range }; } // genie namespace #endif // <API key>
<?php /** * Exception class for PayPal returned exceptions */ class <API key> extends oePayPalException { /** * Exception constructor. Adds additional prefix string to error message. * @param string $sMessage exception message * @param integer $iCode exception code */ public function __construct( $sMessage = "", $iCode = 0 ) { $sPrefix = oxRegistry::getLang()->translateString( "<API key>" ); parent::__construct( $sPrefix . $sMessage, $iCode ); } }
package masterDB; /** * * @author krawler */ public class <API key> { private String id; private Template template; private <API key> empcontrimaster; private String rate; private String status; public <API key> getEmpcontrimaster() { return empcontrimaster; } public void setEmpcontrimaster(<API key> empcontrimaster) { this.empcontrimaster = empcontrimaster; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getRate() { return rate; } public void setRate(String rate) { this.rate = rate; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public Template getTemplate() { return template; } public void setTemplate(Template template) { this.template = template; } }