// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SA1503QuickFix.cs" company="http://stylecop.codeplex.com">
//   MS-PL
// </copyright>
// <license>
//   This source code is subject to terms and conditions of the Microsoft
//   Public License. A copy of the license can be found in the License.html
//   file at the root of this distribution. If you cannot locate the
//   Microsoft Public License, please send an email to dlr@microsoft.com.
//   By using this source code in any fashion, you are agreeing to be bound
//   by the terms of the Microsoft Public License. You must not remove this
//   notice, or any other, from this software.
// </license>
// <summary>
//   QuickFix - SA1503.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace StyleCop.ReSharper.QuickFixes.Layout
{
    using System.Collections.Generic;

    using JetBrains.ReSharper.Feature.Services.Bulbs;
    using JetBrains.ReSharper.Feature.Services.QuickFixes;

    using StyleCop.ReSharper.BulbItems.Readability;
    using StyleCop.ReSharper.QuickFixes.Framework;
    using StyleCop.ReSharper.Violations;

    /// <summary>
    /// QuickFix - SA1503.
    /// </summary>
    //// [ShowQuickFix]
    [QuickFix]
    public class SA1503QuickFix : StyleCopQuickFixBase
    {
        /// <summary>
        /// Initializes a new instance of the SA1503QuickFix class that can
        /// handle <see cref="StyleCopHighlighting"/>.
        /// </summary>
        /// <param name="highlight">
        /// <see cref="StyleCopHighlighting"/>that has been detected.
        /// </param>
        public SA1503QuickFix(StyleCopHighlighting highlight)
            : base(highlight)
        {
        }

        /// <summary>
        /// Initializes the QuickFix with all the available BulbItems that can fix the current
        /// StyleCop Violation.
        /// </summary>
        protected override void InitialiseBulbItems()
        {
            this.BulbItems = new List<IBulbAction>
                                 {
                                     new FormatLineBulbItem
                                         {
                                             DocumentRange = this.Highlighting.CalculateRange(),
                                             Description = "Format line : " + this.Highlighting.ToolTip
                                         }
                                 };
        }
    }
}


.discussion {
  background-color: #ECF0F1;
  .discussion-card {
    background-color: #FFFFFF;
    margin: 20px 0 20px;
    padding: 10px;
  }
  h3 {
    margin: 20px 0 10px;
    size: 18 px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    line-height: 1.1;
    color: #363838;
  }
  .author-avatar {
    width: 50px;
    margin-top: 10px;
  }
  .upvoted {
    color: #2ABB9C;
  }
  .downvoted {
    color: #D97A7B;
  }

  .description-text {
    font-size:15px;
    margin-top: 35px;
    font-family: 'Open Sans Light', sans-serif;
    text-align:justify;
    color: #989c9e;
    line-height: 25px;
    min-height: 100px;
  }

  .discussion-sidebar {
    background-color: #FFFFFF;
    margin: 20px 0 20px;
    padding: 20px;
    h5 {
      margin: 10px 0 10px;
      size: 18 px;
      font-family: 'Open Sans', sans-serif;
      font-weight: 400;
      line-height: 1.1;
      color: #363838;
    }

  }

}

.preview-pane {
  padding: 6px 12px;
}
p {
  overflow-wrap: break-word;
}


<root>
	<styles>
		<include src="file://{resources}/styles/steamstyles.css" />
		<include src="file://{resources}/styles/music/music_filter_artists.css" />
	</styles>

	<MusicFilterAlbums class="MusicFilterArtists" defaultfocus="ArtistSearchInput" ondescendantfocus="AsyncEvent( 0.1, GameFilterScrollChildIntoView() );" rememberchildfocus="true" >
		<Label class="NxTagHeader AlwaysVisible FilterHeader" text="#Music_Filter_Artists_Header" />
		<Panel class="HorizRule" />
		<Panel class="FilterWrapper" selectionpos="0,0" onmoveright="None();" onmoveup="None();" sendchildscrolledintoviewevents="true" >

			<Button id="clearFiltersButton" class="NxFilterButton" onactivate="ArtistFilterChanged(clear);" selectionpos="0,-1000" >
				<Image src="file://{images}/library/icon_favorite.png" />
				<Label text="#Library_ClearButton" />
			</Button>

			<Label id="NxNarrowByName" class="NxTagHeader" text="#Library_NameHeader" />

			<TextEntry id="ArtistSearchInput" class="ArtistSearchInput"
				textinputid="SearchTextEntry" selectionpos="auto"
				textinputclass="FullWidth AppearFromBottomCenter"
				headerlabel="#KeyboardHeader_LibrarySearch"
				headerdetaillabel="#KeyboardDetail_SearchResultCount" >
					<Label class="TextEntryPrompt SearchInputHint" text="#Library_HintSearch" />
			</TextEntry>

		</Panel>
	</MusicFilterAlbums>
</root>


; RUN: opt -ipsccp < %s -S | FileCheck %s

define internal {i32, i32} @identity(i32 %patatino) {
  %foo = insertvalue {i32, i32} {i32 1, i32 undef}, i32 %patatino, 1
  ret {i32, i32} %foo
}

; Check that the return value is not transformed to undef
; CHECK: define internal { i32, i32 } @identity(i32 %patatino) {
; CHECK-NEXT:  %foo = insertvalue { i32, i32 } { i32 1, i32 undef }, i32 %patatino, 1
; CHECK-NEXT:  ret { i32, i32 } %foo
; CHECK-NEXT: }

define {i32, i32} @caller(i32 %pat) {
  %S1 = call {i32, i32} @identity(i32 %pat)
  ret {i32, i32} %S1
}

; Check that we don't invent values and propagate them.
; CHECK: define { i32, i32 } @caller(i32 %pat) {
; CHECK-NEXT:  %S1 = call { i32, i32 } @identity(i32 %pat)
; CHECK-NEXT:  ret { i32, i32 } %S1
; CHECK-NEXT: }


// PropIDUtils.cpp

#include "StdAfx.h"

#include "PropIDUtils.h"

#include "Common/IntToString.h"
#include "Common/StringConvert.h"

#include "Windows/FileFind.h"
#include "Windows/PropVariantConversions.h"

#include "../../PropID.h"

using namespace NWindows;

static UString ConvertUInt32ToString(UInt32 value)
{
  wchar_t buffer[32];
  ConvertUInt64ToString(value, buffer);
  return buffer;
}

static void ConvertUInt32ToHex(UInt32 value, wchar_t *s)
{
  for (int i = 0; i < 8; i++)
  {
    int t = value & 0xF;
    value >>= 4;
    s[7 - i] = (wchar_t)((t < 10) ? (L'0' + t) : (L'A' + (t - 10)));
  }
  s[8] = L'\0';
}

UString ConvertPropertyToString(const PROPVARIANT &propVariant, PROPID propID, bool full)
{
  switch(propID)
  {
    case kpidCTime:
    case kpidATime:
    case kpidMTime:
    {
      if (propVariant.vt != VT_FILETIME)
        return UString(); // It is error;
      FILETIME localFileTime;
      if (propVariant.filetime.dwHighDateTime == 0 &&
          propVariant.filetime.dwLowDateTime == 0)
        return UString();
      if (!::FileTimeToLocalFileTime(&propVariant.filetime, &localFileTime))
        return UString(); // It is error;
      return ConvertFileTimeToString(localFileTime, true, full);
    }
    case kpidCRC:
    {
      if(propVariant.vt != VT_UI4)
        break;
      wchar_t temp[12];
      ConvertUInt32ToHex(propVariant.ulVal, temp);
      return temp;
    }
    case kpidAttrib:
    {
      if(propVariant.vt != VT_UI4)
        break;
      UString result;
      UInt32 attributes = propVariant.ulVal;
      if (NFile::NFind::NAttributes::IsReadOnly(attributes)) result += L'R';
      if (NFile::NFind::NAttributes::IsHidden(attributes)) result += L'H';
      if (NFile::NFind::NAttributes::IsSystem(attributes)) result += L'S';
      if (NFile::NFind::NAttributes::IsDir(attributes)) result += L'D';
      if (NFile::NFind::NAttributes::IsArchived(attributes)) result += L'A';
      if (NFile::NFind::NAttributes::IsCompressed(attributes)) result += L'C';
      if (NFile::NFind::NAttributes::IsEncrypted(attributes)) result += L'E';
      return result;
    }
    case kpidDictionarySize:
    {
      if(propVariant.vt != VT_UI4)
        break;
      UInt32 size = propVariant.ulVal;
      if (size % (1 << 20) == 0)
        return ConvertUInt32ToString(size >> 20) + L"MB";
      if (size % (1 << 10) == 0)
        return ConvertUInt32ToString(size >> 10) + L"KB";
      return ConvertUInt32ToString(size);
    }
  }
  return ConvertPropVariantToString(propVariant);
}


package cn.hellohao.service;

import cn.hellohao.pojo.Group;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Hellohao
 * @version 1.0
 * @date 2019/8/19 16:29
 */
@Service
public interface GroupService {
    List<Group> grouplist();
    Group idgrouplist(Integer id);
    Integer addgroup(Group group);
    Integer delegroup(Integer id);
    Integer setgroup(Group group);
}


<?php
/**
 * Undocumented
 */
class Logger extends AbstractController
{
/**
 * Logger class is implemented a more sophisticated and usable error handling.
 *
 * Normally all error messages are sent through the APP class by using one of two
 * ways:
 *
 * 1. throwing exception, which is caught by App class (unless you catch it yourself)p
 * 2. calling $this->fatal() which would throw exception for you (useful when calling
 *  from PHP4 compatible components)
 *
 * additionally there are way to pass info and warnings by calling:
 *
 * $this->warning();
 * $this->info();
 * $this->debug();
 *
 * Debug information will reach logs only if debug mode is set.
 *
 * ==[ Controling debug info ]===================================================
 *
 * AModules3 support two ways to set debug mode. Global and Local.
 *
 * Global mode is set by setting $app->debug to true. Local mode is set by setting
 * particular object's $this->debug to true.
 *
 * In local mode only debug info generated by particular object will be sent
 * through
 *
 * This class does not manage debug modes, which is a task for App and all other
 * objects.
 *
 * $config['debug']=true; // turns on global debug mode.
 *
 *
 * ==[ Severity ]================================================================
 *
 * AModules3 have 4 severity types: debug, info, warning and fatal.
 *
 * Expected exceptions might be reported as warnings and uncaught exceptions
 * are fatal. Forms have their own validation and errors on the form is
 * completely separate system.
 *
 * Sample fatal errors:
 *  - unable to execute query
 *  - method not found
 *  - mandatory data is not specified
 * fatal errors will automatically terminate application execution.
 *
 * Warnings messages:
 *  - duplicate child added to the object with same name
 *  - method is called without specifying important argument
 *
 * Sample info messages:
 *  - user tried to access restricted page
 *  - monthly log rotation routine finished successfuly
 *  - user information is automatically converted (from format used in previous version)
 *  Info messages are passed as strings without extended information.
 *
 * Debug messages
 *  - called some function which might contain errors or being debuged
 *  - user logged in or logged out
 *  - when debuging, even more messages might be sent as debug()
 *  WARNING: please keep debug information to the minimum. Debug information is
 *  accompanied with extended information. Debug information is always saved into
 *  logs or is available on the screen.
 *
 * AModules3 core tries not to produce any debug or info messages to keep files
 * clean. Even if it does, those calls might eventually be cleaned out.
 *
 *
 * ==[ Configuring logger ]======================================================
 * Logger uses 2 output destinations, and 3 ways to restrict output information.
 *
 * Output destination: stdout (webpage), logs
 * Restrict options: 'full', 'light', null
 *
 * stdout is different for App_CLI and App_Web classes. Web output might contact
 * tags or even some AJAX elements. Logs and App_CLI uses the same output
 * format.
 *
 * Web output for info, warning and debug messages relies on templates
 * but fatal messages are template independent.
 *
 * ==[ Output restriction ]======================================================
 * null: this option will surpress all output. When used with logs, you won't
 * even need an empty directory. Web output will be clean of any messages.
 *
 * If fatal error occurs, if 'null' is used with web output, you will see
 * message (public_error_message), instead of the actual error.
 *
 *
 * light: only message is outputed. Even if debug mode is on, backtraces and
 * additional information is stripped off. This method is best if you are using
 * application for intranet and know uses or if you are doing beta testing.
 * This output won't contain any sensitive information such as table names, field
 * names, actual data)
 *
 * when used with logs, each message takes one line.
 *
 * full: this will output all the information available including:
 *  error message
 *  line/file/function where error message occured (guessed)
 *  additional information (such as last_query and error_message from DBlite)
 *  complete backtrace.
 *
 * when used with logs, each message takes several lines.
 *
 * ==[ Activation ]==================================================================
 * To start using this class in your applicaion you should:
 *
 *  $app->add('Logger');
 *
 * If you do not activate Logger, output will be similar to:
 * web_output='full';
 * log_output=null;
 *
 * ==[ Extending ]====================================================================
 *
 * You can extend this class to add additional features. Please notify me if you think
 * something essential is missing out
 *
 * romans@adevel.com
 *
 * Debug functions were contributed my mvs@adevel.com
 */

    // AModules3 compatibility
    public $owner;

    // Configuration;
    public $web_output = 'full';      // $config['logger']['web_output']
    public $log_output = null;        // $config['logger']['log_output']

    public $public_error_message = null;
    // This message will be outputed to user in case of
    // fatal error. When running in production mode, you
    // shouldn't show any debug info to user, but log them
    // instead

    public $log_dir;                // Directory where logs are created. It should be
    // used solely by AModules3. If not set, then
    // /var/log/atk4/<realm> will be used.
    //
    // You can change in $config['logger']['log_dir']

    protected $log_error_file;        // File we are currently logging errors to
    protected $log_debug_file;        // File we are currently logging errors to
    protected $log_info_file;         // File we are currently logging errors to
    public $details = array();

    private $html_stdout = false;

    private $header_sent = 0;

    public $debug_log = '';           // Will be outputed at the end of the page
    private $debug_added = false;     // no debug messages added yet

    public $filename;
    public $err_message;
    public $_current_ip;
    public $_prev_exec_time;

    public function init()
    {
        parent::init();
        $this->debug_log = session_id() ? $this->recall('debug_log', '') : '';
        if (session_id()) {
            $this->forget('debug_log');
        }
        $this->debug_log .= '[Debug log from '.date('d.m.Y H:m:s').' to '.
            $_SERVER['QUERY_STRING']."] - debug started
\n";
        $this->debug_added = false;

        register_shutdown_function(array($this, 'showDebugInfo'));

        $this->log_output = $this->app->getConfig('logger/log_output', null);
        $this->web_output = $this->app->getConfig('logger/web_output', 'full');

        if (!$this->web_output) {
            $this->public_error_message = $this->app
                ->getConfig(
                    'debug_public_error_message',
                    'We were unable to deal with your request. Please retry later.'
                );
        }

        $this->log_dir = $this->app->getConfig(
            'logger/log_dir',
            '/var/log/atk4/'.$this->app->name
        );

        if ($this->log_output) {
            $this->openLogFile('error');
            $this->openLogFile('debug');
            $this->openLogFile('info');
            if (rand(1, 50) == 1) {
                $this->cleanupLogDirectory();
            }
        }

        if ($this->log_output == 'full' || $this->web_output == 'full') {
            // Full logging will require some preparations
            $this->gatherDetails();
        }

        if ($this->app instanceof App_Web) {
            $this->html_stdout = true;
        }

        $this->app->addHook('caught-exception', array($this, 'caughtException'));
        $this->app->addHook('output-fatal', array($this, 'outputFatal'));
        $this->app->addHook('output-warning', array($this, 'outputWarning'));
        $this->app->addHook('output-info', array($this, 'outputInfo'));
        $this->app->addHook('output-debug', array($this, 'outputDebug'));

        $this->app->debug('Logger is initialized');
    }
    public function showDebugInfo()
    {
        if (!$this->debug_added) {
            return;
        }
        if (@$this->app->not_html) {
            // We may not output anything, because this will screw up. Save debug output to session
            if (session_id()) {
                $this->memorize('debug_log', $this->debug_log);
            }
        } else {
            echo $this->debug_log;
        }
    }
    public function gatherDetails()
    {
        // Get IP address
        if (isset($_SERVER['REMOTE_ADDR'])) {
            //FIXME: generates warning - array_shift wants variable
            //$this->details['IP Address']=(isset($_SERVER["HTTP_X_FORWARDED_FOR"])
            //    ? array_shift(explode(',', $_SERVER["HTTP_X_FORWARDED_FOR"]))
            //    : $_SERVER["REMOTE_ADDR"]);
            null;
        }

        if (isset($_SERVER['QUERY_STRING'])) {
            $this->details['Query String'] = $_SERVER['QUERY_STRING'];
        }
        if (isset($_SERVER['REDIRECT_SCRIPT_URI'])) {
            $this->details['Original Query'] = $_SERVER['REDIRECT_SCRIPT_URI'];
        }
        if (isset($_SERVER['HTTP_REFERER'])) {
            $this->details['Referer'] = $_SERVER['HTTP_REFERER'];
        }
        if (isset($_SERVER['HTTP_USER_AGENT'])) {
            $this->details['Version'] = $_SERVER['HTTP_USER_AGENT'];
        }
        if (isset($_SERVER['SERVER_PORT'])) {
            $this->details['Port'] = $_SERVER['SERVER_PORT'];
        }
    }

    public function findFrame($function_name, $shift = 0)
    {
        $backtrace = debug_backtrace();
        while ($bt = array_shift($backtrace)) {
            if ($bt['function'] == $function_name) {
                while ($shift--) {
                    $bt = array_shift($backtrace);
                }

                return $bt;
            }
        }

        return array();
    }
    public $recskip = array();
    public function showRenderTree($e, $obj)
    {
        if (in_array($obj->name, $this->recskip)) {
            echo '..recursion('.$obj.')';

            return;
        };
        $this->recskip[] = $obj;
        if ($e->owner == $obj || $e->owner->owner == $obj || $e->owner->owner->owner == $obj) {
            echo ''.$obj->__toString().'';
        } else {
            echo $obj->__toString();
        }
        if ($obj->elements) {
            echo '
';
            foreach ($obj->elements as $name => $object) {
                echo '
'.$name.': ';
                $this->showRenderTree($e, $object);
                echo '
';
            }
            echo '
';
        }
    }
    public function logCaughtException($e)
    {
        if (!$this->log_output) {
            return;
        }
        if (method_exists($e, 'getMyTrace')) {
            $trace = $e->getMyTrace();
        } else {
            $trace = $e->getTrace();
        }

        if (isset($e->shift)) {
            $frame = $e->my_backtrace[$e->shift];
        } else {
            $frame = array('file' => 'unknown', 'line' => 'unknown');
        }

        $this->logLine($this->txtLine(get_class($e).': '.$e->getMessage(), $frame), 2, 'error', $trace);
        if (method_exists($e, 'getAdditionalMessage')) {
            $this->logLine($e->getAdditionalMessage(), 2, 'error');
        }

        if (isset($e->more_info)) {
            $this->logLine("Additional information:\n".
            $this->print_r($e->more_info, '', '', '* ', "\n", ' '), 2, 'error');
        }
    }
    public function caughtException($caller, $e, $last_exception = true)
    {

        // compatibility with \atk4\core\Exception
        if ($e instanceof \atk4\core\Exception) {
            $e->more_info = $e->getParams();
        }

        $this->logCaughtException($e);
        if (!$this->web_output) {
            echo $this->public_error_message;
            exit;
        }

        if (PHP_SAPI === 'cli') {
            if (posix_isatty(STDOUT)) {
                $red = "\033[0;31m";
                $yellow = "\033[1;33m";
                $end = "\033[0m";
            } else {
                $red = $end = $yellow = '';
            }

            if (isset($e->more_info)) {
                echo '==[ ';
                echo get_class($e).': '.$red.$e->getMessage().$end." ]===========\n\n";
                echo "Additional information:\n".
                    $this->print_r($e->more_info, '', '', $yellow.'* '.$end, "\n", ' ');
            } else {
                echo $red.$e->getMessage().$end."\n";
            }

            exit($e->getCode() ?: 255);
        }

        if (method_exists($e, 'getHTML')) {
            ?><!DOCTYPE html>

    <title>Exception: <?php echo htmlspecialchars($e->getMessage())?></title>

<?php  echo $e->getHTML();
            ?>

<?php
            exit;
        }

        if ($_GET[$this->name.'_debug'] == 'rendertree') {
            echo '
Object Tree
';
            try {
                $this->showRenderTree($e, $this->app);
            } catch (Exception $e) {
                echo '
Exception while trying to render tree:
';
                //unset($_GET[$this->name.'_debug']);
                //$this->app->caughtException($e);
            }
        }

        $o = '';
        $o .= '
Application Error: '.htmlspecialchars($e->getMessage())."
\n";
        $o .= "
".get_class($e).', code: '.$e->getCode().'
';
        if (isset($e->more_info)) {
            $o .= 'Additional information:
';
            $o .= "
\n";
            $o .= $this->print_r($e->more_info, '
', '
', '
', '
', ' ');
            $o .= '
';
        }
        if (method_exists($e, 'getMyFile')) {
            $o .= "
getMyFile().':'.$e->getMyLine().'
';
        }

        $previous = isset($e->by_exception) ? $e->by_exception : ($e->getPrevious() ?: null);

        // add stacktrace only for initial / first exception
        if (!$previous) {
            if (method_exists($e, 'getMyTrace')) {
                $o .= $this->backtrace(null, $e->getMyTrace());
            } else {
                $o .= $this->backtrace(@$e->shift, $e->getTrace());
            }
        }

        // recursively shows all previous exceptions
        if ($previous) {
            //$o .= '
This error was triggered by the following error:
';
            ob_start();
            $this->caughtException($caller, $previous, false);
            $o .= ob_get_clean();
        }

        if ($last_exception) {
            $o .= "
Note: To hide this information from your users, add \$config['logger']['web_output']=false ".
                "to your config.php file. Refer to documentation on 'Logger' for alternative logging options
";
        }

        if ((isset($_POST['ajax_submit'])
            || $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')
            && !$_GET['cut_page']
            && !$_GET['cut_object']
            && !$_GET['cut_region']
            && $last_exception
        ) {
            $this->displayError($o);
        } else {
            echo $o;
        }

        if ($last_exception) {
            exit;
        }
    }

    public function displayError($o)
    {
        if (isset($this->app->jquery)) {
            $this->app->js()->univ()->dialogError($o, array('width' => 900, 'height' => 500))->execute();
        } else {
            echo strip_tags($o);
        }
    }
    /**
     * Returns HTML formatted $key array.
     *
     * @param mixed $key
     * @param string $gs List start tag
     * @param string $ge List end tag
     * @param string $ls Item start tag
     * @param string $le Item end tag
     * @param string $ind Identation
     *
     * @return string
     */
    public function print_r($key, $gs, $ge, $ls, $le, $ind = ' ', $max_depth = 6)
    {
        $o = '';
        if (strlen($ind) > $max_depth) {
            return;
        }
        if (is_array($key)) {
            $o = $gs;
            foreach ($key as $a => $b) {
                $o .= $ind.$ls.$a.': '.$this->print_r($b, $gs, $ge, $ls, $le, $ind.' ').$le;
            }
            $o .= $ge;
        } elseif ($key instanceof Closure) {
            $o .= '[closure]';
        } elseif (is_object($key)) {
            $o .= 'object('.get_class($key).'): ';
            if (method_exists($key, '__debugInfo')) {
                $o .= $this->print_r($key->__debugInfo(), $gs, $ge, $ls, $le, $ind.' ').$le;
            }
        } else {
            $o .= $gs ? htmlspecialchars($key) : $key;
        }

        return $o;
    }
    public function outputWarning($caller, $msg, $shift = 0)
    {
        // first, let's see if we should log this
        $frame = $this->findFrame('warning', $shift);
        if ($this->log_output) {
            $this->logLine($this->txtLine("warning: $msg", $frame), 'warning', 'error');
        }
        if (!$this->web_output) {
            return true;
        } else {
            echo $this->html_stdout ?
                $this->htmlLine("$msg", $frame, 'warning') :
                $this->txtLine("$msg", $frame, 'warning');

            return true;
        }
    }
    public function outputDebug($front, $caller, $msg, $shift = 0)
    {
        // first, let's see if we should log this
        $frame = $this->findFrame('debug');
        if ($this->log_output) {
            $this->logLine($this->txtLine("info: $msg", $frame), 'fatal', 'debug');
        }
        if (!$this->web_output) {
            return true;
        } else {
            $this->debug_added = true;
            $this->debug_log .= $this->html_stdout ?
                $this->htmlLine("$msg", $frame, 'debug') :
                $this->txtLine("$msg", $frame, 'debug');

            return true;
        }
    }
    public function outputInfo($caller, $msg, $shift = 0, $nohtml = false)
    {
        if ($this->log_output) {
            $this->logLine($this->txtLine("info: $msg"), null, 'info');
        }
        if ($this->web_output && !$nohtml) {
            echo $this->html_stdout ?
                $this->htmlLine("$msg", null, 'info') :
                $this->txtLine("$msg", null, 'info');
        }

        return true;
    }
    public function outputFatal($caller, $msg, $shift = 0)
    {
        // first, let's see if we should log this
        $frame = $this->findFrame('fatal');
        if ($this->log_output) {
            $this->logLine($this->txtLine("fatal: $msg", $frame), 'fatal', 'error');
        }
        if (!$this->web_output) {
            echo $this->public_error_message;
        } else {
            if ($this->html_stdout) {
                echo "
Fatal error
\n";
            }
            echo $this->html_stdout ?
                $this->htmlLine("$msg", $frame, 'fatal') :
                $this->txtLine("$msg", $frame, 'fatal');

            if ($this->html_stdout) {
                echo $this->backtrace('fatal');
            } else {
                echo "Stack trace:\n";
                echo $this->txtBacktrace('fatal');
            }
        }
        exit;
    }
    public function htmlLine($msg, $frame = null, $prefix = null)
    {
        if (!$frame) {
            return "warning:  ".
                "$msg
";
        } else {
            $errfile = dirname($frame['file']).'/'.basename($frame['file']).'';

            return "$errfile:".$frame['line'].
                ' '.($prefix ? "$prefix: " : '')."$msg
";
        }
    }
    public function txtLine($msg, $frame = null, $prefix = null)
    {
        if (!$frame) {
            return "$prefix: $msg\n";
        } else {
            return basename($frame['file']).' on line '.$frame['line'].', path: '.dirname($frame['file'])."\n\n".
                ($prefix ? "$prefix: " : '')."$msg\n\n";
        }
    }
    public function logLine($msg, $shiftfunc = null, $severity = 'info', $trace = null)
    {
        $log_file = 'log_'.$severity.'_file';
        if (!isset($this->$log_file)) {
            $this->openLogFile($severity);
        }
        if ($this->log_output === 'full' && $severity == 'error') {
            if (!$this->header_sent++) {
                fputs($this->$log_file, "\n\n".
                        "============================================================\n".
                        "$msg".
                        "------------------------------------------------------------\n".
                        'Date: '.date('d-M-Y H:i:s')."\n");
                foreach ($this->details as $key => $val) {
                    fputs($this->$log_file, "$key: $val\n");
                }
                fputs(
                    $this->$log_file,
                    "------------------------------------------------------------\n".
                    " Stack trace\n".
                    $this->txtBacktrace($shiftfunc, $trace).
                    "\n"
                );
            } else {
                fputs($this->$log_file, $msg);
            }
        } elseif ($this->log_output) {
            fputs($this->$log_file, '['.date('d-M-Y H:i:s')."] $msg");
        } else {
            return;
        }
        fflush($this->$log_file);
    }
    public function logVar($var, $msg = '', $shiftfunc = null, $severity = 'debug')
    {
        //creating an $msg from variable
        $msg .= '('.gettype($var).'):';
        if (is_array($var) || is_object($var)) {
            $msg .= print_r($var, true);
        } else {
            $msg .= $var;
        }
        $this->logLine($msg."\n", $shiftfunc, $severity);
    }
    public function logException($e)
    {
        // logs exception from the catch statement
        // contains code from Logger::caughtException(), as this code won't launch
        // if exception is caught
        $frame = $e->my_backtrace[$e->shift - 1];
        $this->logLine($this->txtLine(get_class($e).': ('.$e->getCode().') '.$e->getMessage(), $frame), 2, 'error');

        return $this;
    }
    public function openLogFile($severity = 'error')
    {
        if (!is_dir($this->log_dir)) {
            // Directory is not writable, let's first try to create it
            if (!mkdir($this->log_dir, 0750)) {
                throw new BaseException("Unable to create $this->log_dir for log output");
            }
        }

        $filename = 'am3_'.$severity.'_log';
        $full_filename = $this->log_dir.DIRECTORY_SEPARATOR.$filename;
        if (!is_writable($full_filename) && !is_writable($this->log_dir)) {
            throw new BaseException("Log file is not writable and seems I won't be able to create it: $full_filename");
        }
        if (is_link($full_filename)) {
            throw new BaseException('Log file is a symlink. Are you trying to make me overwrite somethingn?');
        }

        ini_set($severity.'_log', $full_filename);

        //$full_filename=tempnam($this->log_dir,$filename);
        $new_file = (file_exists($full_filename)) ? false : true;
        $log_file = "log_$severity".'_file';
        $this->$log_file = fopen($full_filename, 'a');
        if (!$this->$log_file) {
            throw new BaseException("Cannot open $severity log file");
        }
        if ($new_file) {
            chmod($full_filename, 0777);
        } //
    }
    public function writeLogMessage()
    {
    }
    public function backtrace($sh = null, $backtrace = null)
    {
        $output = "
\n";
        // TODO: allow extending backtrace option, so that
        $output .= "Stack trace:
".
            "
\n".
            "
File	 # 	Object Name	Stack Trace
\n";
        if (!isset($backtrace)) {
            $backtrace = debug_backtrace();
        }
        if ($sh) {
            $sh -= 2;
        }

        $n = 0;
        foreach ($backtrace as $bt) {
            ++$n;
            $args = '';
            if (!isset($bt['args'])) {
                continue;
            }
            foreach ($bt['args'] as $a) {
                if (!empty($args)) {
                    $args .= ', ';
                }
                switch (gettype($a)) {
                    case 'integer':
                    case 'double':
                        $args .= $a;
                        break;
                    case 'string':
                        $a = htmlspecialchars(substr($a, 0, 128)).((strlen($a) > 128) ? '...' : '');
                        $args .= "\"$a\"";
                        break;
                    case 'array':
                        $args .= 'Array('.count($a).')';
                        break;
                    case 'object':
                        $args .= 'Object('.get_class($a).')';
                        break;
                    case 'resource':
                        $args .= 'Resource('.strstr((string) $a, '#').')';
                        break;
                    case 'boolean':
                        $args .= $a ? 'True' : 'False';
                        break;
                    case 'NULL':
                        $args .= 'Null';
                        break;
                    default:
                        $args .= 'Unknown';
                }
            }

            $ds = DIRECTORY_SEPARATOR;
            if (($sh == null
                && (
                    strpos($bt['file'], $ds.'atk4'.$ds.'lib'.$ds) === false &&
                    strpos($bt['file'], $ds.'data'.$ds.'src'.$ds) === false &&
                    strpos($bt['file'], $ds.'core'.$ds.'src'.$ds) === false &&
                    strpos($bt['file'], $ds.'dsql'.$ds.'src'.$ds) === false && $bt['file'] != null
                ))
                || (!is_int($sh) && $bt['function'] == $sh)
            ) {
                $sh = $n;
            }

            $name = isset($bt['object']->name) ? $bt['object']->name : ($bt['object'] ? get_class($bt['object']) : '');
            $output .= '
'.
                ''.
                    htmlspecialchars(dirname($bt['file'])).'/'.
                    ''.htmlspecialchars(basename($bt['file'])).'	'.
                ''.
                    ':'.$bt['line'].' 	'.
                ''.($bt['object'] ? $name : '').'	'.
                ''.
                    ($bt['object'] ? get_class($bt['object']) : '').
                    $bt['type'].''.$bt['function'].'('.$args.')
'."\n";
        }
        $output .= "

\n";

        return $output;
    }
    public function cleanupLogDirectory()
    {
        // we should try to take care of our own log file cleanup
    }
    public function txtBacktrace($sh = null, $backtrace = null)
    {
        if (!isset($backtrace)) {
            $backtrace = debug_backtrace();
        }
        $output = '';
        $n = 0;
        foreach ($backtrace as $bt) {
            ++$n;
            $args = '';
            if (!isset($bt['args'])) {
                $bt['args'] = array();
            }
            foreach ($bt['args'] as $a) {
                if (!empty($args)) {
                    $args .= ', ';
                }
                switch (gettype($a)) {
                    case 'integer':
                    case 'double':
                        $args .= $a;
                        break;
                    case 'string':
                        $a = (substr($a, 0, 128)).((strlen($a) > 128) ? '...' : '');
                        $args .= "\"$a\"";
                        break;
                    case 'array':
                        $args .= 'Array('.count($a).')';
                        break;
                    case 'object':
                        $args .= 'Object('.get_class($a).')';
                        break;
                    case 'resource':
                        $args .= 'Resource('.strstr($a, '#').')';
                        break;
                    case 'boolean':
                        $args .= $a ? 'True' : 'False';
                        break;
                    case 'NULL':
                        $args .= 'Null';
                        break;
                    default:
                        $args .= 'Unknown';
                }
            }

            if ($sh) {
                if (is_int($sh)) {
                    if ($sh > 0) {
                        --$sh;
                        continue;
                    }
                } elseif ($bt['function'] != $sh) {
                    $sh = null;
                    continue;
                }
            }

            $output .= $bt['file'].':'.$bt['line'].' ';
            $output .= "{$bt['class']}{$bt['type']}{$bt['function']}($args)\n";
        }

        return $output;
    }

    /**
     * Debug functions
     */
    public function Debug($filename)
    {
        if (is_null($filename)) {
            $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'debug.log';
        }

        $this->filename = $filename;

        if (isset($_SERVER['REMOTE_ADDR'])) {
            if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
                $a = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
                $this->_current_ip = array_shift($a);
            } else {
                $this->_current_ip = $_SERVER['REMOTE_ADDR'];
            }
        }
    }

    public function _sec2time($sec)
    {
        $res = '';
        if ($sec < 0) {
            $sec = -$sec;
            $res = '-'.$res;
        }

        if ($sec != floor($sec)) {
            $msec = round(($sec - floor($sec)) * 1000);

            $msec = '.'.str_pad($msec, 3, '0', STR_PAD_LEFT);
            $sec = floor($sec);
        } else {
            $msec = '';
        }

        $hours = floor($sec / 3600);
        $min = floor(($sec - $hours * 3600) / 60);
        $sec = $sec - $hours * 3600 - $min * 60;

        if ($hours > 0) {
            $res .= str_pad($hours, 2, '0', STR_PAD_LEFT).':';
        }

        if (($hours > 0) || ($min > 0)) {
            $res .= str_pad($min, 2, '0', STR_PAD_LEFT).':';
        }

        $res .= str_pad($sec, 2, '0', STR_PAD_LEFT).$msec;

        return $res;
    }

    public function _microtime_float()
    {
        list($usec, $sec) = explode(' ', microtime());

        return (float) $usec + (float) $sec;
    }

    // print
    public function p($message, $file = null, $line = null)
    {
        $res = true;

        $time_diff_str = '';
        if (!empty($this->_prev_exec_time)) {
            $time_diff = $this->_microtime_float() - $this->_prev_exec_time;
            if ($time_diff < 1) {
                $time_diff_str = $this->_sec2time($time_diff);
            }
        }

        $details = ((empty($this->_current_ip)) ? '' : $this->_current_ip.' - ').
            ((!empty($file)) ? basename($file).' (line '.$line.')' : '');

        if (!empty($details)) {
            $details = ' ***** '.$details.' *****';
        }

        $message = '['.date('d-M-Y H:i:s').'] '.$time_diff_str.$details.
            "\n\n".$message."\n\n";

        $new_file = (file_exists($this->filename)) ? false : true;
        $fh = @fopen($this->filename, 'a');

        if (($fh !== false) && (is_resource($fh))) {
            @flock($fh, LOCK_EX);

            if (!@fwrite($fh, $message)) {
                $this->err_message = "Cannot write to file ($this->filename)";
                error_log($this->err_message.' in '.__FILE__.' on line '.__LINE__, 0);
                $res = false;
            }
            @flock($fh, LOCK_UN);
            @fclose($fh);

            if ($new_file) {
                chmod($this->filename, 0777);
            }
        } else {
            $this->err_message = 'Cannot open file ('.$this->filename.')'.
                ' in '.__FILE__.' on line '.__LINE__.' for save message: '."\n".$message;
            error_log($this->err_message, 0);
            $res = false;
        }

        $this->_prev_exec_time = $this->_microtime_float();

        return $res;
    }
}


define("dojo/io/script", [
	"../_base/connect", /*===== "../_base/declare", =====*/ "../_base/kernel", "../_base/lang",
	"../sniff", "../_base/window","../_base/xhr",
	"../dom", "../dom-construct", "../request/script"
], function(connect, /*===== declare, =====*/ kernel, lang, has, win, xhr, dom, domConstruct, _script){

	// module:
	//		dojo/io/script

	kernel.deprecated("dojo/io/script", "Use dojo/request/script.", "2.0");

	/*=====
	var __ioArgs = declare(kernel.__IoArgs, {
		// summary:
		//		All the properties described in the dojo.__ioArgs type, apply to this
		//		type as well, EXCEPT "handleAs". It is not applicable to
		//		dojo/io/script.get() calls, since it is implied by the usage of
		//		"jsonp" (response will be a JSONP call returning JSON)
		//		or the response is pure JavaScript defined in
		//		the body of the script that was attached.
		// callbackParamName: String
		//		Deprecated as of Dojo 1.4 in favor of "jsonp", but still supported for
		//		legacy code. See notes for jsonp property.
		// jsonp: String
		//		The URL parameter name that indicates the JSONP callback string.
		//		For instance, when using Yahoo JSONP calls it is normally,
		//		jsonp: "callback". For AOL JSONP calls it is normally
		//		jsonp: "c".
		// checkString: String
		//		A string of JavaScript that when evaluated like so:
		//		"typeof(" + checkString + ") != 'undefined'"
		//		being true means that the script fetched has been loaded.
		//		Do not use this if doing a JSONP type of call (use callbackParamName instead).
		// frameDoc: Document
		//		The Document object for a child iframe. If this is passed in, the script
		//		will be attached to that document. This can be helpful in some comet long-polling
		//		scenarios with Firefox and Opera.
	});
	=====*/

	var script = {
		// summary:
		//		TODOC

		get: function(/*__ioArgs*/ args){
			// summary:
			//		sends a get request using a dynamically created script tag.
			var rDfd;
			var dfd = this._makeScriptDeferred(args, function(dfd){
				rDfd && rDfd.cancel();
			});
			var ioArgs = dfd.ioArgs;
			xhr._ioAddQueryToUrl(ioArgs);

			xhr._ioNotifyStart(dfd);

			rDfd = _script.get(ioArgs.url, {
				timeout: args.timeout,
				jsonp: ioArgs.jsonp,
				checkString: args.checkString,
				ioArgs: ioArgs,
				frameDoc: args.frameDoc,
				canAttach: function(rDfd){
					// sync values
					ioArgs.requestId = rDfd.id;
					ioArgs.scriptId = rDfd.scriptId;
					ioArgs.canDelete = rDfd.canDelete;

					return script._canAttach(ioArgs);
				}
			}, true);

			rDfd.then(function(){
				dfd.resolve(dfd);
			}).otherwise(function(error){
				dfd.ioArgs.error = error;
				dfd.reject(error);
			});

			return dfd;
		},

		attach: _script._attach,
		remove: _script._remove,

		_makeScriptDeferred: function(/*Object*/ args, /*Function?*/ cancel){
			// summary:
			//		sets up a Deferred object for an IO request.
			var dfd = xhr._ioSetArgs(args, cancel || this._deferredCancel, this._deferredOk, this._deferredError);

			var ioArgs = dfd.ioArgs;
			ioArgs.id = kernel._scopeName + "IoScript" + (this._counter++);
			ioArgs.canDelete = false;

			//Special setup for jsonp case
			ioArgs.jsonp = args.callbackParamName || args.jsonp;
			if(ioArgs.jsonp){
				//Add the jsonp parameter.
				ioArgs.query = ioArgs.query || "";
				if(ioArgs.query.length > 0){
					ioArgs.query += "&";
				}
				ioArgs.query += ioArgs.jsonp +
					"=" + (args.frameDoc ? "parent." : "") +
					kernel._scopeName + ".io.script.jsonp_" + ioArgs.id + "._jsonpCallback";

				ioArgs.frameDoc = args.frameDoc;

				//Setup the Deferred to have the jsonp callback.
				ioArgs.canDelete = true;
				dfd._jsonpCallback = this._jsonpCallback;
				this["jsonp_" + ioArgs.id] = dfd;
			}
			return dfd; // dojo/_base/Deferred
		},

		_deferredCancel: function(/*Deferred*/ dfd){
			// summary:
			//		canceller function for xhr._ioSetArgs call.

			//DO NOT use "this" and expect it to be script.
			dfd.canceled = true;
		},

		_deferredOk: function(/*Deferred*/ dfd){
			// summary:
			//		okHandler function for xhr._ioSetArgs call.

			//DO NOT use "this" and expect it to be script.
			var ioArgs = dfd.ioArgs;

			//Favor JSONP responses, script load events then lastly ioArgs.
			//The ioArgs are goofy, but cannot return the dfd since that stops
			//the callback chain in Deferred. The return value is not that important
			//in that case, probably a checkString case.
			return ioArgs.json || ioArgs.scriptLoaded || ioArgs;
		},

		_deferredError: function(/*Error*/ error, /*Deferred*/ dfd){
			// summary:
			//		errHandler function for xhr._ioSetArgs call.

			console.log("dojo.io.script error", error);
			return error;
		},

		_deadScripts: [],
		_counter: 1,

		_addDeadScript: function(/*Object*/ ioArgs){
			// summary:
			//		sets up an entry in the deadScripts array.
			script._deadScripts.push({id: ioArgs.id, frameDoc: ioArgs.frameDoc});
			//Being extra paranoid about leaks:
			ioArgs.frameDoc = null;
		},

		_validCheck: function(/*Deferred*/ dfd){
			// summary:
			//		inflight check function to see if dfd is still valid.

			// TODO: why isn't dfd accessed?

			//Do script cleanup here. We wait for one inflight pass
			//to make sure we don't get any weird things by trying to remove a script
			//tag that is part of the call chain (IE 6 has been known to
			//crash in that case).
			var deadScripts = script._deadScripts;
			if(deadScripts && deadScripts.length > 0){
				for(var i = 0; i < deadScripts.length; i++){
					//Remove the script tag
					script.remove(deadScripts[i].id, deadScripts[i].frameDoc);
					deadScripts[i].frameDoc = null;
				}
				script._deadScripts = [];
			}

			return true;
		},

		_ioCheck: function(dfd){
			// summary:
			//		inflight check function to see if IO finished.
			// dfd: Deferred
			var ioArgs = dfd.ioArgs;
			//Check for finished jsonp
			if(ioArgs.json || (ioArgs.scriptLoaded && !ioArgs.args.checkString)){
				return true;
			}

			//Check for finished "checkString" case.
			var checkString = ioArgs.args.checkString;
			return checkString && eval("typeof(" + checkString + ") != 'undefined'");

		},

		_resHandle: function(/*Deferred*/ dfd){
			// summary:
			//		inflight function to handle a completed response.
			if(script._ioCheck(dfd)){
				dfd.callback(dfd);
			}else{
				//This path should never happen since the only way we can get
				//to _resHandle is if _ioCheck is true.
				dfd.errback(new Error("inconceivable dojo.io.script._resHandle error"));
			}
		},

		_canAttach: function(/*===== ioArgs =====*/ ){
			// summary:
			//		A method that can be overridden by other modules
			//		to control when the script attachment occurs.
			// ioArgs: Object
			return true;
		},

		_jsonpCallback: function(/*JSON Object*/ json){
			// summary:
			//		generic handler for jsonp callback. A pointer to this function
			//		is used for all jsonp callbacks.  NOTE: the "this" in this
			//		function will be the Deferred object that represents the script
			//		request.
			this.ioArgs.json = json;
			kernel.global[_script._callbacksProperty][this.ioArgs.requestId](json);
		}
	};

	lang.setObject("dojo.io.script", script);

	/*=====
	script.attach = function(id, url, frameDocument){
		// summary:
		//		creates a new `<script>` tag pointing to the specified URL and
		//		adds it to the document.
		// description:
		//		Attaches the script element to the DOM. Use this method if you
		//		just want to attach a script to the DOM and do not care when or
		//		if it loads.
	};
	script.remove = function(id, frameDocument){
		// summary:
		//		removes the script element with the given id, from the given frameDocument.
		//		If no frameDocument is passed, the current document is used.
	};
	=====*/

	return script;
});


lid velocity = 0.0625, prandtl # = 1., grashof # = 1.
  0 SNES Function norm 2.391552180052e-01
    0 KSP Residual norm 2.393352985382e-01
    1 KSP Residual norm 3.223423659801e-02
    2 KSP Residual norm 1.438869629055e-03
    3 KSP Residual norm 3.236616248614e-05
    4 KSP Residual norm 1.238240315615e-06
  1 SNES Function norm 6.561269611120e-02
    0 KSP Residual norm 2.976057119668e-02
    1 KSP Residual norm 6.350534968078e-04
    2 KSP Residual norm 3.640822251327e-05
    3 KSP Residual norm 1.045957674251e-06
    4 KSP Residual norm 3.599389586384e-08
  2 SNES Function norm 8.399783109780e-05
    0 KSP Residual norm 6.036844933988e-05
    1 KSP Residual norm 1.780078946467e-06
    2 KSP Residual norm 8.336366619233e-08
    3 KSP Residual norm 2.332964488261e-09
    4 KSP Residual norm 6.084324016831e-11
  3 SNES Function norm 4.955282292940e-06
    0 KSP Residual norm 2.182712023568e-06
    1 KSP Residual norm 7.639241061952e-08
    2 KSP Residual norm 3.652530056186e-09
    3 KSP Residual norm 1.370309560267e-10
    4 KSP Residual norm 5.121130516178e-12
  4 SNES Function norm 3.495943019516e-07
Number of SNES iterations = 4


        .module crt0

        ; Ordering of segments for the linker.
        ; WRS: Note we list all our segments here, even though
        ; we don't use them all, because their ordering is set
        ; when they are first seen.

	; Start with the ROM area CODE-CODE2
        .area _CODE
        .area _HOME     ; compiler stores __mullong etc in here if you use them
        .area _CODE2
        .area _CONST
        .area _INITIALIZED
        .area _DATA
        .area _BSEG
        .area _BSS
        .area _HEAP
        .area _GSINIT      ; unused
        .area _GSFINAL     ; unused
        .area _BUFFERS     ; _BUFFERS grows to consume all before it (up to KERNTOP)
	; Discard is loaded where process memory wil blow it away
        .area _DISCARD
	; The rest grows upwards from C000 starting with the udata so we can
	; swap in one block, ending with the buffers so they can expand up
        ; note that areas below here may be overwritten by the heap at runtime, so
        ; put initialisation stuff in here
	; These get overwritten and don't matter
        .area _INITIALIZER ; binman copies this to the right place for us
        .area _COMMONMEM

        ; exported symbols
	.globl _suspend

        ; imported symbols
        .globl _fuzix_main
        .globl init_hardware
        .globl s__INITIALIZER
        .globl s__COMMONMEM
        .globl l__COMMONMEM
        .globl s__DISCARD
        .globl l__DISCARD
        .globl s__DATA
        .globl l__DATA
	.globl s__BUFFERS
	.globl l__BUFFERS
        .globl kstack_top

	.globl interrupt_handler
	.globl nmi_handler
	.globl outstring

	.globl _mach_zrcc

	.include "kernel.def"

	; Starts at 0x1000 at the moment

	; Entered with bank = 1 from the bootstrap logic
	; A holds the machine type: 0 = SBC64/MBC64 1 = ZRCC

resume_sp .equ 0x0080
resume_tag .equ 0x0084

	.area _CODE

	jp start
	jp resume
	.dw 0x10AD

start:
	ld sp, #kstack_top

	; move the common memory where it belongs
	ld hl, #s__DATA
	ld de, #s__COMMONMEM
	ld bc, #l__COMMONMEM
	ldir
	; then the discard
	; Discard can just be linked in but is next to the buffers
	ld de, #s__DISCARD
	ld bc, #l__DISCARD
	ldir

	ld hl, #s__DATA
	ld de, #s__DATA + 1
	ld bc, #l__DATA - 1
	ld (hl),#0
	ldir

	; Zero buffers area
	ld hl, #s__BUFFERS
	ld de, #s__BUFFERS + 1
	ld bc, #l__BUFFERS - 1
	ld (hl), #0
	ldir

	ld (_mach_zrcc),a

	call init_hardware
	call _fuzix_main
	; Should never return
	di
stop:	halt
	jr stop
;
;	Helpers for the battery backed memory model
;
resume:
	di
	ld sp, (resume_sp)
	pop iy
	pop ix
	ld hl, #0
	ld (resume_tag), hl
	ret

_suspend:
	push ix
	push iy
	ld (resume_sp), sp
	ld hl,#0xC0DE
	ld (resume_tag), hl
	ld hl, #suspended
	call outstring
	di
	halt
suspended:
	.ascii 'Suspended, you may now power off'
	.db 13,10,0


# Providers for FormatConversion
com.sun.media.sound.AudioFloatFormatConverter
com.sun.media.sound.UlawCodec
com.sun.media.sound.AlawCodec
com.sun.media.sound.PCMtoPCMCodec


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
	<maintainer type="project">
		<email>haskell@gentoo.org</email>
		<name>Gentoo Haskell</name>
	</maintainer>
	<longdescription>
		HAProxy protocol version 1.5 support (see
		<http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt>) for applications
		using io-streams. The proxy protocol allows information about a networked
		peer (like remote address and port) to be propagated through a forwarding
		proxy that is configured to speak this protocol.
	</longdescription>
</pkgmetadata>


/* rtc-ds3234.c
 *
 * Driver for Dallas Semiconductor (DS3234) SPI RTC with Integrated Crystal
 * and SRAM.
 *
 * Copyright (C) 2008 MIMOMax Wireless Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 */

#include <linux/init.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/spi/spi.h>
#include <linux/bcd.h>

#define DS3234_REG_SECONDS	0x00
#define DS3234_REG_MINUTES	0x01
#define DS3234_REG_HOURS	0x02
#define DS3234_REG_DAY		0x03
#define DS3234_REG_DATE		0x04
#define DS3234_REG_MONTH	0x05
#define DS3234_REG_YEAR		0x06
#define DS3234_REG_CENTURY	(1 << 7) /* Bit 7 of the Month register */

#define DS3234_REG_CONTROL	0x0E
#define DS3234_REG_CONT_STAT	0x0F

static int ds3234_set_reg(struct device *dev, unsigned char address,
				unsigned char data)
{
	struct spi_device *spi = to_spi_device(dev);
	unsigned char buf[2];

	/* MSB must be '1' to indicate write */
	buf[0] = address | 0x80;
	buf[1] = data;

	return spi_write_then_read(spi, buf, 2, NULL, 0);
}

static int ds3234_get_reg(struct device *dev, unsigned char address,
				unsigned char *data)
{
	struct spi_device *spi = to_spi_device(dev);

	*data = address & 0x7f;

	return spi_write_then_read(spi, data, 1, data, 1);
}

static int ds3234_read_time(struct device *dev, struct rtc_time *dt)
{
	int err;
	unsigned char buf[8];
	struct spi_device *spi = to_spi_device(dev);

	buf[0] = 0x00; /* Start address */

	err = spi_write_then_read(spi, buf, 1, buf, 8);
	if (err != 0)
		return err;

	/* Seconds, Minutes, Hours, Day, Date, Month, Year */
	dt->tm_sec	= bcd2bin(buf[0]);
	dt->tm_min	= bcd2bin(buf[1]);
	dt->tm_hour	= bcd2bin(buf[2] & 0x3f);
	dt->tm_wday	= bcd2bin(buf[3]) - 1; /* 0 = Sun */
	dt->tm_mday	= bcd2bin(buf[4]);
	dt->tm_mon	= bcd2bin(buf[5] & 0x1f) - 1; /* 0 = Jan */
	dt->tm_year	= bcd2bin(buf[6] & 0xff) + 100; /* Assume 20YY */

	return rtc_valid_tm(dt);
}

static int ds3234_set_time(struct device *dev, struct rtc_time *dt)
{
	ds3234_set_reg(dev, DS3234_REG_SECONDS, bin2bcd(dt->tm_sec));
	ds3234_set_reg(dev, DS3234_REG_MINUTES, bin2bcd(dt->tm_min));
	ds3234_set_reg(dev, DS3234_REG_HOURS, bin2bcd(dt->tm_hour) & 0x3f);

	/* 0 = Sun */
	ds3234_set_reg(dev, DS3234_REG_DAY, bin2bcd(dt->tm_wday + 1));
	ds3234_set_reg(dev, DS3234_REG_DATE, bin2bcd(dt->tm_mday));

	/* 0 = Jan */
	ds3234_set_reg(dev, DS3234_REG_MONTH, bin2bcd(dt->tm_mon + 1));

	/* Assume 20YY although we just want to make sure not to go negative. */
	if (dt->tm_year > 100)
		dt->tm_year -= 100;

	ds3234_set_reg(dev, DS3234_REG_YEAR, bin2bcd(dt->tm_year));

	return 0;
}

static const struct rtc_class_ops ds3234_rtc_ops = {
	.read_time	= ds3234_read_time,
	.set_time	= ds3234_set_time,
};

static int ds3234_probe(struct spi_device *spi)
{
	struct rtc_device *rtc;
	unsigned char tmp;
	int res;

	spi->mode = SPI_MODE_3;
	spi->bits_per_word = 8;
	spi_setup(spi);

	res = ds3234_get_reg(&spi->dev, DS3234_REG_SECONDS, &tmp);
	if (res != 0)
		return res;

	/* Control settings
	 *
	 * CONTROL_REG
	 * BIT 7	6	5	4	3	2	1	0
	 *     EOSC	BBSQW	CONV	RS2	RS1	INTCN	A2IE	A1IE
	 *
	 *     0	0	0	1	1	1	0	0
	 *
	 * CONTROL_STAT_REG
	 * BIT 7	6	5	4	3	2	1	0
	 *     OSF	BB32kHz	CRATE1	CRATE0	EN32kHz	BSY	A2F	A1F
	 *
	 *     1	0	0	0	1	0	0	0
	 */
	ds3234_get_reg(&spi->dev, DS3234_REG_CONTROL, &tmp);
	ds3234_set_reg(&spi->dev, DS3234_REG_CONTROL, tmp & 0x1c);

	ds3234_get_reg(&spi->dev, DS3234_REG_CONT_STAT, &tmp);
	ds3234_set_reg(&spi->dev, DS3234_REG_CONT_STAT, tmp & 0x88);

	/* Print our settings */
	ds3234_get_reg(&spi->dev, DS3234_REG_CONTROL, &tmp);
	dev_info(&spi->dev, "Control Reg: 0x%02x\n", tmp);

	ds3234_get_reg(&spi->dev, DS3234_REG_CONT_STAT, &tmp);
	dev_info(&spi->dev, "Ctrl/Stat Reg: 0x%02x\n", tmp);

	rtc = devm_rtc_device_register(&spi->dev, "ds3234",
				&ds3234_rtc_ops, THIS_MODULE);
	if (IS_ERR(rtc))
		return PTR_ERR(rtc);

	spi_set_drvdata(spi, rtc);

	return 0;
}

static struct spi_driver ds3234_driver = {
	.driver = {
		.name	 = "ds3234",
	},
	.probe	 = ds3234_probe,
};

module_spi_driver(ds3234_driver);

MODULE_DESCRIPTION("DS3234 SPI RTC driver");
MODULE_AUTHOR("Dennis Aberilla <denzzzhome@yahoo.com>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("spi:ds3234");


<?xml version="1.0"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
	<ItemGroup Label="ProjectConfigurations">
		<ProjectConfiguration Include="Debug|Win32">
			<Configuration>Debug</Configuration>
			<Platform>Win32</Platform>
		</ProjectConfiguration>
		<ProjectConfiguration Include="Release|Win32">
			<Configuration>Release</Configuration>
			<Platform>Win32</Platform>
		</ProjectConfiguration>
	</ItemGroup>
	<PropertyGroup Label="Globals">
		<ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>
		<RootNamespace>DurationRemote</RootNamespace>
		<Keyword>Win32Proj</Keyword>
	</PropertyGroup>
	<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
		<ConfigurationType>Application</ConfigurationType>
		<CharacterSet>Unicode</CharacterSet>
		<WholeProgramOptimization>true</WholeProgramOptimization>
	</PropertyGroup>
	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
		<ConfigurationType>Application</ConfigurationType>
		<CharacterSet>Unicode</CharacterSet>
	</PropertyGroup>
	<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
	<ImportGroup Label="ExtensionSettings" />
	<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
		<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
		<Import Project="..\..\..\libs\openFrameworksCompiled\project\vs2010\openFrameworksRelease.props" />
	</ImportGroup>
	<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
		<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
		<Import Project="..\..\..\libs\openFrameworksCompiled\project\vs2010\openFrameworksDebug.props" />
	</ImportGroup>
	<PropertyGroup Label="UserMacros" />
	<PropertyGroup>
		<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
		<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">bin\</OutDir>
		<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">obj\$(Configuration)\</IntDir>
		<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
		<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
		<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">bin\</OutDir>
		<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">obj\$(Configuration)\</IntDir>
		<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
		<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)_debug</TargetName>
		<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)</TargetName>
	</PropertyGroup>
	<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
		<ClCompile>
			<Optimization>Disabled</Optimization>
			<MinimalRebuild>true</MinimalRebuild>
			<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
			<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
			<PrecompiledHeader />
			<WarningLevel>Level3</WarningLevel>
			<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
			<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);src;..\..\..\addons\ofxOsc\libs;..\..\..\addons\ofxOsc\src;..\..\..\addons\ofxOsc\libs\oscpack;..\..\..\addons\ofxOsc\libs\oscpack\src;..\..\..\addons\ofxOsc\libs\oscpack\src\ip;..\..\..\addons\ofxOsc\libs\oscpack\src\ip\posix;..\..\..\addons\ofxOsc\libs\oscpack\src\ip\win32;..\..\..\addons\ofxOsc\libs\oscpack\src\osc;..\..\..\addons\ofxUI\libs;..\..\..\addons\ofxUI\src;..\..\..\addons\ofxXmlSettings\libs;..\..\..\addons\ofxXmlSettings\src</AdditionalIncludeDirectories>
		</ClCompile>
		<Link>
			<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
			<GenerateDebugInformation>true</GenerateDebugInformation>
			<ProgramDatabaseFile>$(TargetDir)$(TargetName)_debugInfo.pdb</ProgramDatabaseFile>
			<SubSystem>Console</SubSystem>
			<RandomizedBaseAddress>false</RandomizedBaseAddress>
			<DataExecutionPrevention />
			<TargetMachine>MachineX86</TargetMachine>
			<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
			<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
		</Link>
		<PostBuildEvent />
	</ItemDefinitionGroup>
	<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
		<ClCompile>
			<WholeProgramOptimization>false</WholeProgramOptimization>
			<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
			<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
			<PrecompiledHeader />
			<WarningLevel>Level3</WarningLevel>
			<DebugInformationFormat />
			<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);src;..\..\..\addons\ofxOsc\libs;..\..\..\addons\ofxOsc\src;..\..\..\addons\ofxOsc\libs\oscpack;..\..\..\addons\ofxOsc\libs\oscpack\src;..\..\..\addons\ofxOsc\libs\oscpack\src\ip;..\..\..\addons\ofxOsc\libs\oscpack\src\ip\posix;..\..\..\addons\ofxOsc\libs\oscpack\src\ip\win32;..\..\..\addons\ofxOsc\libs\oscpack\src\osc;..\..\..\addons\ofxUI\libs;..\..\..\addons\ofxUI\src;..\..\..\addons\ofxXmlSettings\libs;..\..\..\addons\ofxXmlSettings\src</AdditionalIncludeDirectories>
		</ClCompile>
		<Link>
			<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
			<GenerateDebugInformation>false</GenerateDebugInformation>
			<SubSystem>Console</SubSystem>
			<OptimizeReferences>true</OptimizeReferences>
			<EnableCOMDATFolding>true</EnableCOMDATFolding>
			<RandomizedBaseAddress>false</RandomizedBaseAddress>
			<DataExecutionPrevention />
			<TargetMachine>MachineX86</TargetMachine>
			<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
			<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
			<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
		</Link>
		<PostBuildEvent />
	</ItemDefinitionGroup>
	<ItemGroup>
		<ClCompile Include="src\main.cpp" />
		<ClCompile Include="src\testApp.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\src\ofxOscBundle.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\src\ofxOscMessage.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\src\ofxOscReceiver.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\src\ofxOscSender.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\IpEndpointName.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\posix\NetworkingUtils.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\posix\UdpSocket.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\win32\NetworkingUtilsWin.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\win32\UdpSocketWin.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscOutboundPacketStream.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscPrintReceivedElements.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscReceivedElements.cpp" />
		<ClCompile Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscTypes.cpp" />
		<ClCompile Include="..\..\..\addons\ofxXmlSettings\src\ofxXmlSettings.cpp" />
		<ClCompile Include="..\..\..\addons\ofxXmlSettings\libs\tinyxml.cpp" />
		<ClCompile Include="..\..\..\addons\ofxXmlSettings\libs\tinyxmlerror.cpp" />
		<ClCompile Include="..\..\..\addons\ofxXmlSettings\libs\tinyxmlparser.cpp" />
	</ItemGroup>
	<ItemGroup>
		<ClInclude Include="src\testApp.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\src\ofxOsc.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\src\ofxOscArg.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\src\ofxOscBundle.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\src\ofxOscMessage.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\src\ofxOscReceiver.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\src\ofxOscSender.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\IpEndpointName.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\NetworkingUtils.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\PacketListener.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\TimerListener.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\ip\UdpSocket.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\MessageMappingOscPacketListener.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscException.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscHostEndianness.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscOutboundPacketStream.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscPacketListener.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscPrintReceivedElements.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscReceivedElements.h" />
		<ClInclude Include="..\..\..\addons\ofxOsc\libs\oscpack\src\osc\OscTypes.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUI.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUI2DPad.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIBiLabelSlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIButton.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUICanvas.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUICircleSlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUICustomImageButton.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIDropDownList.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIEventArgs.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIFPS.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIFPSSlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIImage.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIImageButton.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIImageSampler.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIImageSlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIImageToggle.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUILabel.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUILabelButton.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUILabelToggle.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIMinimalSlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIMovingGraph.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIMultiImageButton.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIMultiImageSlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIMultiImageToggle.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUINumberDialer.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIRadio.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIRangeSlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIRectangle.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIRotarySlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIScrollableCanvas.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUISlider.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUISpacer.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUISpectrum.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUITextArea.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUITextInput.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIToggle.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIToggleMatrix.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIWaveform.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIWidget.h" />
		<ClInclude Include="..\..\..\addons\ofxUI\src\ofxUIWidgetWithLabel.h" />
		<ClInclude Include="..\..\..\addons\ofxXmlSettings\src\ofxXmlSettings.h" />
		<ClInclude Include="..\..\..\addons\ofxXmlSettings\libs\tinyxml.h" />
	</ItemGroup>
	<ItemGroup>
		<ProjectReference Include="..\..\..\libs\openFrameworksCompiled\project\vs2010\openframeworksLib.vcxproj">
			<Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>
		</ProjectReference>
	</ItemGroup>
	<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
	<ImportGroup Label="ExtensionTargets" />
</Project>


/*
 * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */
package java.awt.peer;

import java.awt.Choice;

/**
 * The peer interface for {@link Choice}.
 *
 * The peer interfaces are intended only for use in porting
 * the AWT. They are not intended for use by application
 * developers, and developers should not implement peers
 * nor invoke any of the peer methods directly on the peer
 * instances.
 */
public interface ChoicePeer extends ComponentPeer {

    /**
     * Adds an item with the string {@code item} to the combo box list
     * at index {@code index}.
     *
     * @param item the label to be added to the list
     * @param index the index where to add the item
     *
     * @see Choice#add(String)
     */
    void add(String item, int index);

    /**
     * Removes the item at index {@code index} from the combo box list.
     *
     * @param index the index where to remove the item
     *
     * @see Choice#remove(int)
     */
    void remove(int index);

    /**
     * Removes all items from the combo box list.
     *
     * @see Choice#removeAll()
     */
    void removeAll();

    /**
     * Selects the item at index {@code index}.
     *
     * @param index the index which should be selected
     *
     * @see Choice#select(int)
     */
    void select(int index);

}