text:
<?php

declare(strict_types=1);

/*
 * This file is part of PHP CS Fixer.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *     Dariusz Rumiński <dariusz.ruminski@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace PhpCsFixer\Tests\Fixer\ConstantNotation;

use PhpCsFixer\ConfigurationException\InvalidConfigurationException;
use PhpCsFixer\Tests\Test\AbstractFixerTestCase;

/**
 * @author Filippo Tessarotto <zoeslam@gmail.com>
 *
 * @internal
 *
 * @covers \PhpCsFixer\Fixer\ConstantNotation\NativeConstantInvocationFixer
 */
final class NativeConstantInvocationFixerTest extends AbstractFixerTestCase
{
    public function testConfigureRejectsUnknownConfigurationKey(): void
    {
        $key = 'foo';

        $this->expectException(InvalidConfigurationException::class);
        $this->expectExceptionMessage(sprintf('[native_constant_invocation] Invalid configuration: The option "%s" does not exist.', $key));

        $this->fixer->configure([
            $key => 'bar',
        ]);
    }

    /**
     * @dataProvider provideInvalidConfigurationElementCases
     *
     * @param mixed $element
     */
    public function testConfigureRejectsInvalidExcludeConfigurationElement($element): void
    {
        $this->expectException(InvalidConfigurationException::class);
        $this->expectExceptionMessage(sprintf(
            'Each element must be a non-empty, trimmed string, got "%s" instead.',
            \is_object($element) ? \get_class($element) : \gettype($element)
        ));

        $this->fixer->configure([
            'exclude' => [
                $element,
            ],
        ]);
    }

    /**
     * @dataProvider provideInvalidConfigurationElementCases
     *
     * @param mixed $element
     */
    public function testConfigureRejectsInvalidIncludeConfigurationElement($element): void
    {
        $this->expectException(InvalidConfigurationException::class);
        $this->expectExceptionMessage(sprintf(
            'Each element must be a non-empty, trimmed string, got "%s" instead.',
            \is_object($element) ? \get_class($element) : \gettype($element)
        ));

        $this->fixer->configure([
            'include' => [
                $element,
            ],
        ]);
    }

    public function provideInvalidConfigurationElementCases(): array
    {
        return [
            'null' => [null],
            'false' => [false],
            'true' => [true],
            'int' => [1],
            'array' => [[]],
            'float' => [0.1],
            'object' => [new \stdClass()],
            'not-trimmed' => ['  M_PI  '],
        ];
    }

    public function testConfigureResetsExclude(): void
    {
        $this->fixer->configure([
            'exclude' => [
                'M_PI',
            ],
        ]);

        $before = '<?php var_dump(m_pi, M_PI);';
        $after = '<?php var_dump(m_pi, \\M_PI);';

        $this->doTest($before);

        $this->fixer->configure([]);

        $this->doTest($after, $before);
    }

    /**
     * @dataProvider provideFixWithDefaultConfigurationCases
     */
    public function testFixWithDefaultConfiguration(string $expected, ?string $input = null): void
    {
        $this->doTest($expected, $input);
    }

    public function provideFixWithDefaultConfigurationCases(): array
    {
        return [
            ['<?php var_dump(NULL, FALSE, TRUE, 1);'],
            ['<?php echo CUSTOM_DEFINED_CONSTANT_123;'],
            ['<?php echo m_pi; // Constant are case sensitive'],
            ['<?php namespace M_PI;'],
            ['<?php namespace Foo; use M_PI;'],
            ['<?php class M_PI {}'],
            ['<?php class Foo extends M_PI {}'],
            ['<?php class Foo implements M_PI {}'],
            ['<?php interface M_PI {};'],
            ['<?php trait M_PI {};'],
            ['<?php class Foo { const M_PI = 1; }'],
            ['<?php class Foo { use M_PI; }'],
            ['<?php class Foo { public $M_PI = 1; }'],
            ['<?php class Foo { function M_PI($M_PI) {} }'],
            ['<?php class Foo { function bar() { $M_PI = M_PI() + self::M_PI(); } }'],
            ['<?php class Foo { function bar() { $this->M_PI(self::M_PI); } }'],
            ['<?php namespace Foo; use M_PI;'],
            ['<?php namespace Foo; use Bar as M_PI;'],
            ['<?php echo Foo\\M_PI\\Bar;'],
            ['<?php M_PI::foo();'],
            ['<?php function x(M_PI $foo, M_PI &$bar, M_PI ...$baz) {}'],
            ['<?php $foo instanceof M_PI;'],
            ['<?php class x implements FOO, M_PI, BAZ {}'],
            ['<?php class Foo { use Bar, M_PI { Bar::baz insteadof M_PI; } }'],
            ['<?php M_PI: goto M_PI;'],
            [
                '<?php echo \\M_PI;',
                '<?php echo M_PI;',
            ],
            [
                '<?php namespace Foo; use M_PI; echo \\M_PI;',
                '<?php namespace Foo; use M_PI; echo M_PI;',
            ],
            [
                // Here we are just testing the algorithm.
                // A user likely would add this M_PI to its excluded list.
                '<?php namespace M_PI; const M_PI = 1; return \\M_PI;',
                '<?php namespace M_PI; const M_PI = 1; return M_PI;',
            ],
            [
                '<?php foo(\E_DEPRECATED | \E_USER_DEPRECATED);',
                '<?php foo(E_DEPRECATED | E_USER_DEPRECATED);',
            ],
            ['<?php function foo(): M_PI {}'],
            ['<?php use X\Y\{FOO, BAR as BAR2, M_PI};'],
        ];
    }

    /**
     * @dataProvider provideFix71WithDefaultConfigurationCases
     *
     * @requires PHP 7.1
     */
    public function testFix71WithDefaultConfiguration(string $expected, ?string $input = null): void
    {
        $this->doTest($expected, $input);
    }

    public function provideFix71WithDefaultConfigurationCases(): array
    {
        return [
            [
                '<?php
try {
    foo(\JSON_ERROR_DEPTH|\JSON_PRETTY_PRINT|JOB_QUEUE_PRIORITY_HIGH);
} catch (\Exception | \InvalidArgumentException|\UnexpectedValueException|LogicException $e) {
}
',
                '<?php
try {
    foo(\JSON_ERROR_DEPTH|JSON_PRETTY_PRINT|\JOB_QUEUE_PRIORITY_HIGH);
} catch (\Exception | \InvalidArgumentException|\UnexpectedValueException|LogicException $e) {
}
',
            ],
        ];
    }

    /**
     * @dataProvider provideFixWithConfiguredCustomIncludeCases
     */
    public function testFixWithConfiguredCustomInclude(string $expected, ?string $input = null): void
    {
        $this->fixer->configure([
            'include' => [
                'FOO_BAR_BAZ',
            ],
        ]);

        $this->doTest($expected, $input);
    }

    public function provideFixWithConfiguredCustomIncludeCases(): array
    {
        return [
            [
                '<?php echo \\FOO_BAR_BAZ . \\M_PI;',
                '<?php echo FOO_BAR_BAZ . M_PI;',
            ],
            [
                '<?php class Foo { public function bar($foo) { return \\FOO_BAR_BAZ . \\M_PI; } }',
                '<?php class Foo { public function bar($foo) { return FOO_BAR_BAZ . M_PI; } }',
            ],
        ];
    }

    /**
     * @dataProvider provideFixWithConfiguredOnlyIncludeCases
     */
    public function testFixWithConfiguredOnlyInclude(string $expected, ?string $input = null): void
    {
        $this->fixer->configure([
            'fix_built_in' => false,
            'include' => [
                'M_PI',
            ],
        ]);

        $this->doTest($expected, $input);
    }

    public function provideFixWithConfiguredOnlyIncludeCases(): array
    {
        return [
            [
                '<?php echo PHP_SAPI . FOO_BAR_BAZ . \\M_PI;',
                '<?php echo PHP_SAPI . FOO_BAR_BAZ . M_PI;',
            ],
            [
                '<?php class Foo { public function bar($foo) { return PHP_SAPI . FOO_BAR_BAZ . \\M_PI; } }',
                '<?php class Foo { public function bar($foo) { return PHP_SAPI . FOO_BAR_BAZ . M_PI; } }',
            ],
        ];
    }

    /**
     * @dataProvider provideFixWithConfiguredExcludeCases
     */
    public function testFixWithConfiguredExclude(string $expected, ?string $input = null): void
    {
        $this->fixer->configure([
            'exclude' => [
                'M_PI',
            ],
        ]);

        $this->doTest($expected, $input);
    }

    public function provideFixWithConfiguredExcludeCases(): array
    {
        return [
            [
                '<?php echo \\PHP_SAPI . M_PI;',
                '<?php echo PHP_SAPI . M_PI;',
            ],
            [
                '<?php class Foo { public function bar($foo) { return \\PHP_SAPI . M_PI; } }',
                '<?php class Foo { public function bar($foo) { return PHP_SAPI . M_PI; } }',
            ],
        ];
    }

    public function testNullTrueFalseAreCaseInsensitive(): void
    {
        $this->fixer->configure([
            'fix_built_in' => false,
            'include' => [
                'null',
                'false',
                'M_PI',
                'M_pi',
            ],
            'exclude' => [],
        ]);

        $expected = <<<'EOT'
<?php
var_dump(
    \null,
    \NULL,
    \Null,
    \nUlL,
    \false,
    \FALSE,
    true,
    TRUE,
    \M_PI,
    \M_pi,
    m_pi,
    m_PI
);
EOT;

        $input = <<<'EOT'
<?php
var_dump(
    null,
    NULL,
    Null,
    nUlL,
    false,
    FALSE,
    true,
    TRUE,
    M_PI,
    M_pi,
    m_pi,
    m_PI
);
EOT;

        $this->doTest($expected, $input);
    }

    public function testDoNotIncludeUserConstantsUnlessExplicitlyListed(): void
    {
        $uniqueConstantName = uniqid(self::class);
        $uniqueConstantName = preg_replace('/\W+/', '_', $uniqueConstantName);
        $uniqueConstantName = strtoupper($uniqueConstantName);

        $dontFixMe = 'DONTFIXME_'.$uniqueConstantName;
        $fixMe = 'FIXME_'.$uniqueConstantName;

        \define($dontFixMe, 1);
        \define($fixMe, 1);

        $this->fixer->configure([
            'fix_built_in' => true,
            'include' => [
                $fixMe,
            ],
            'exclude' => [],
        ]);

        $expected = <<<EOT
<?php
var_dump(
    \\null,
    {$dontFixMe},
    \\{$fixMe}
);
EOT;

        $input = <<<EOT
<?php
var_dump(
    null,
    {$dontFixMe},
    {$fixMe}
);
EOT;

        $this->doTest($expected, $input);
    }

    public function testDoNotFixImportedConstants(): void
    {
        $this->fixer->configure([
            'fix_built_in' => false,
            'include' => [
                'M_PI',
                'M_EULER',
            ],
            'exclude' => [],
        ]);

        $expected = <<<'EOT'
<?php

namespace Foo;

use const M_EULER;

var_dump(
    null,
    \M_PI,
    M_EULER
);
EOT;

        $input = <<<'EOT'
<?php

namespace Foo;

use const M_EULER;

var_dump(
    null,
    M_PI,
    M_EULER
);
EOT;

        $this->doTest($expected, $input);
    }

    public function testFixScopedOnly(): void
    {
        $this->fixer->configure(['scope' => 'namespaced']);

        $expected = <<<'EOT'
<?php

namespace space1 {
    echo \PHP_VERSION;
}
namespace {
    echo PHP_VERSION;
}
EOT;

        $input = <<<'EOT'
<?php

namespace space1 {
    echo PHP_VERSION;
}
namespace {
    echo PHP_VERSION;
}
EOT;

        $this->doTest($expected, $input);
    }

    public function testFixScopedOnlyNoNamespace(): void
    {
        $this->fixer->configure(['scope' => 'namespaced']);

        $expected = <<<'EOT'
<?php

echo PHP_VERSION . PHP_EOL;
EOT;

        $this->doTest($expected);
    }

    public function testFixStrictOption(): void
    {
        $this->fixer->configure(['strict' => true]);

        $this->doTest(
            '<?php
                echo \PHP_VERSION . \PHP_EOL; // built-in constants to have backslash
                echo MY_FRAMEWORK_MAJOR_VERSION . MY_FRAMEWORK_MINOR_VERSION; // non-built-in constants not to have backslash
                echo \Dont\Touch\Namespaced\CONSTANT;
            ',
            '<?php
                echo \PHP_VERSION . PHP_EOL; // built-in constants to have backslash
                echo \MY_FRAMEWORK_MAJOR_VERSION . MY_FRAMEWORK_MINOR_VERSION; // non-built-in constants not to have backslash
                echo \Dont\Touch\Namespaced\CONSTANT;
            '
        );
    }

    /**
     * @requires PHP <8.0
     */
    public function testFixPrePHP80(): void
    {
        $this->doTest(
            '<?php
echo \\/**/M_PI;
echo \\ M_PI;
echo \\#
#
M_PI;
echo \\M_PI;
',
            '<?php
echo \\/**/M_PI;
echo \\ M_PI;
echo \\#
#
M_PI;
echo M_PI;
'
        );
    }

    /**
     * @requires PHP 8.0
     */
    public function testFixPhp80(): void
    {
        $this->fixer->configure(['strict' => true]);
        $this->doTest(
            '<?php
            try {
            } catch (\Exception) {
            }'
        );
    }
}


text:
goog.provide('ol.renderer.canvas.ImageLayer');

goog.require('goog.asserts');
goog.require('goog.functions');
goog.require('goog.vec.Mat4');
goog.require('ol.ImageBase');
goog.require('ol.ViewHint');
goog.require('ol.dom');
goog.require('ol.extent');
goog.require('ol.layer.Image');
goog.require('ol.proj');
goog.require('ol.renderer.canvas.Layer');
goog.require('ol.source.ImageVector');
goog.require('ol.vec.Mat4');

/**
 * @constructor
 * @extends {ol.renderer.canvas.Layer}
 * @param {ol.layer.Image} imageLayer Single image layer.
 */
ol.renderer.canvas.ImageLayer = function(imageLayer) {

  goog.base(this, imageLayer);

  /**
   * @private
   * @type {?ol.ImageBase}
   */
  this.image_ = null;

  /**
   * @private
   * @type {!goog.vec.Mat4.Number}
   */
  this.imageTransform_ = goog.vec.Mat4.createNumber();

  /**
   * @private
   * @type {?goog.vec.Mat4.Number}
   */
  this.imageTransformInv_ = null;

  /**
   * @private
   * @type {CanvasRenderingContext2D}
   */
  this.hitCanvasContext_ = null;

};
goog.inherits(ol.renderer.canvas.ImageLayer, ol.renderer.canvas.Layer);

/**
 * @inheritDoc
 */
ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
  var layer = this.getLayer();
  var source = layer.getSource();
  var resolution = frameState.viewState.resolution;
  var rotation = frameState.viewState.rotation;
  var skippedFeatureUids = frameState.skippedFeatureUids;
  return source.forEachFeatureAtCoordinate(
      coordinate, resolution, rotation, skippedFeatureUids,
      /**
       * @param {ol.Feature|ol.render.Feature} feature Feature.
       * @return {?} Callback result.
       */
      function(feature) {
        return callback.call(thisArg, feature, layer);
      });
};

/**
 * @inheritDoc
 */
ol.renderer.canvas.ImageLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
  if (!this.getImage()) {
    return undefined;
  }

  if (this.getLayer().getSource() instanceof ol.source.ImageVector) {
    // for ImageVector sources use the original hit-detection logic,
    // so that for example also transparent polygons are detected
    var coordinate = pixel.slice();
    ol.vec.Mat4.multVec2(
        frameState.pixelToCoordinateMatrix, coordinate, coordinate);
    var hasFeature = this.forEachFeatureAtCoordinate(
        coordinate, frameState, goog.functions.TRUE, this);

    if (hasFeature) {
      return callback.call(thisArg, this.getLayer());
    } else {
      return undefined;
    }
  } else {
    // for all other image sources directly check the image
    if (!this.imageTransformInv_) {
      this.imageTransformInv_ = goog.vec.Mat4.createNumber();
      goog.vec.Mat4.invert(this.imageTransform_, this.imageTransformInv_);
    }

    var pixelOnCanvas =
        this.getPixelOnCanvas(pixel, this.imageTransformInv_);

    if (!this.hitCanvasContext_) {
      this.hitCanvasContext_ = ol.dom.createCanvasContext2D(1, 1);
    }

    this.hitCanvasContext_.clearRect(0, 0, 1, 1);
    this.hitCanvasContext_.drawImage(
        this.getImage(), pixelOnCanvas[0], pixelOnCanvas[1], 1, 1, 0, 0, 1, 1);

    var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;
    if (imageData[3] > 0) {
      return callback.call(thisArg, this.getLayer());
    } else {
      return undefined;
    }
  }
};

/**
 * @inheritDoc
 */
ol.renderer.canvas.ImageLayer.prototype.getImage = function() {
  return !this.image_ ? null : this.image_.getImage();
};

/**
 * @inheritDoc
 */
ol.renderer.canvas.ImageLayer.prototype.getImageTransform = function() {
  return this.imageTransform_;
};

/**
 * @inheritDoc
 */
ol.renderer.canvas.ImageLayer.prototype.prepareFrame = function(frameState, layerState) {

  var pixelRatio = frameState.pixelRatio;
  var viewState = frameState.viewState;
  var viewCenter = viewState.center;
  var viewResolution = viewState.resolution;

  var image;
  var imageLayer = this.getLayer();
  goog.asserts.assertInstanceof(imageLayer, ol.layer.Image,
      'layer is an instance of ol.layer.Image');
  var imageSource = imageLayer.getSource();

  var hints = frameState.viewHints;

  var renderedExtent = frameState.extent;
  if (layerState.extent !== undefined) {
    renderedExtent = ol.extent.getIntersection(
        renderedExtent, layerState.extent);
  }

  if (!hints[ol.ViewHint.ANIMATING] && !hints[ol.ViewHint.INTERACTING] &&
      !ol.extent.isEmpty(renderedExtent)) {
    var projection = viewState.projection;
    if (!ol.ENABLE_RASTER_REPROJECTION) {
      var sourceProjection = imageSource.getProjection();
      if (sourceProjection) {
        goog.asserts.assert(ol.proj.equivalent(projection, sourceProjection),
            'projection and sourceProjection are equivalent');
        projection = sourceProjection;
      }
    }
    image = imageSource.getImage(
        renderedExtent, viewResolution, pixelRatio, projection);
    if (image) {
      var loaded = this.loadImage(image);
      if (loaded) {
        this.image_ = image;
      }
    }
  }

  if (this.image_) {
    image = this.image_;
    var imageExtent = image.getExtent();
    var imageResolution = image.getResolution();
    var imagePixelRatio = image.getPixelRatio();
    var scale = pixelRatio * imageResolution /
        (viewResolution * imagePixelRatio);
    ol.vec.Mat4.makeTransform2D(this.imageTransform_,
        pixelRatio * frameState.size[0] / 2,
        pixelRatio * frameState.size[1] / 2,
        scale, scale,
        0,
        imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolution,
        imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolution);
    this.imageTransformInv_ = null;
    this.updateAttributions(frameState.attributions, image.getAttributions());
    this.updateLogos(frameState, imageSource);
  }

  return !!this.image_;
};

redpajama_set_name: RedPajamaGithub


text:
MeasureJS
=============
MeasureJS is a javascript library which allow you to measure execution time of your code. The style of writing
measurement suits is similar to those which you are able to write in qunit. Thanks to MeasureJS-UI you are able
to navigate through them in user friendly UI, rerun dynamically, change the number of executions loop and compare
them together.

##Development
###Install
Use `bower` and `npm` to install all dependencies


text:
///
/// \file  TCAnimLua.cpp
/// \brief This file contains the implementation of the TCAnimLua class as defined by the
///        TCAnimLua.h header file.
///

#include <lua.hpp>          // The Lua C++ header file.
#include <string>           // String object library.
#include "main.h"           // Used to access the global cube size.
#include "console.h"        // Used to print error messages to the console.
#include "TCAnim.h"         // The base TCAnim object header.
#include "TCAnimLua.h"      // Definition of the TCAnimLua class.

///
/// \brief Triclysm Lua Functions
///
/// A namespace containing all of the functions to be exposed to Lua animations, which
/// are nested within more namespaces depending on the number of animation colors. These
/// functions can be registered to a given Lua state by calling the RegisterCommands
/// function in the appropriate sub-namespace.
///
/// \remarks Some of these functions make references to the current animation's cube state.
///
namespace TC_Lua_Functions
{
    TCAnimLua *currAnim;    // Pointer to the currently registered TCAnimLua object.

    ///
    /// \brief Common Lua Functions
    ///
    namespace Common
    {
        int Shift(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 2)
            {
                currAnim->Shift(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2)  );
            }
            return 0;
        }

        int DoneIteration(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 0)
            {
                currAnim->DoneIteration();
            }
            return 0;
        }

        int WriteConsole(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (argc == 1)
            {
                WriteOutput(lua_tostring(L, 1));
            }
            return 0;
        }

        void RegisterCommands(lua_State *L)
        {
            lua_register(L, "Shift",         Shift);
            lua_register(L, "DoneIteration", DoneIteration);
            lua_register(L, "WriteConsole",  WriteConsole);
        }
    }

    ///
    /// \brief Black & White Lua Functions
    ///
    /// This namespace contains functions to be registered with the Lua state when the
    /// animation does not use colors.
    ///
    namespace BW
    {
        int SetVoxelState(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 4)
            {
                currAnim->cubeState[0]->SetVoxelState(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3),
                    ((lua_toboolean(L, 4)) ? true : false) );
            }
            return 0;
        }

        int GetVoxelState(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 3)
            {
                lua_pushboolean(L, currAnim->cubeState[0]->GetVoxelState(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3) ));
                return 1;
            }
            else
            {
                return 0;
            }
        }

        int SetColumnState(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 4)
            {
                currAnim->cubeState[0]->SetColumnState(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3),
                    ((lua_toboolean(L, 4)) ? true : false) );
            }
            return 0;
        }

        int GetColumnState(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 4)
            {
                lua_pushboolean(L, currAnim->cubeState[0]->GetColumnState(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3),
                    (lua_toboolean(L, 4) ? true : false) ));
                return 1;
            }
            else
            {
                return 0;
            }
        }

        int SetPlaneState(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 3)
            {
                currAnim->cubeState[0]->SetPlaneState(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    ((lua_toboolean(L, 3)) ? true : false) );
            }
            return 0;
        }

        int GetPlaneState(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 3)
            {
                lua_pushboolean(L, currAnim->cubeState[0]->GetPlaneState(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (lua_toboolean(L, 3) ? true : false) ));
                return 1;
            }
            else
            {
                return 0;
            }
        }

        void RegisterCommands(lua_State *L)
        {
            lua_register(L, "SetVoxelState",  SetVoxelState);
            lua_register(L, "GetVoxelState",  GetVoxelState);
            lua_register(L, "SetColumnState", SetColumnState);
            lua_register(L, "GetColumnState", GetColumnState);
            lua_register(L, "SetPlaneState",  SetPlaneState);
            lua_register(L, "GetPlaneState",  GetPlaneState);
        }
    }

    ///
    /// \brief Greyscale (Monochrome) Lua Functions
    ///
    /// This namespace contains functions to be registered with the Lua state when the
    /// animation needs to use only one color.
    ///
    namespace Greyscale
    {
        int SetVoxelValue(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 4)
            {
                currAnim->SetVoxelColor(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3),
                    (byte)lua_tointeger(L, 4) );
            }
            return 0;
        }

        int GetVoxelValue(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 3)
            {
                lua_pushinteger(L, currAnim->cubeState[0]->GetVoxelState(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3) ));
                return 1;
            }
            else
            {
                return 0;
            }
        }

        int SetColumnValue(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 4)
            {
                currAnim->SetColumnColor(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3),
                    (byte)lua_tointeger(L, 4));
            }
            return 0;
        }

        int CompareColumnValue(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 4)
            {
                lua_pushboolean(L, currAnim->CompareColumnColor(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3),
                    (byte)lua_tointeger(L, 4) ));
                return 1;
            }
            return 0;
        }

        int SetPlaneValue(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 3)
            {
                currAnim->SetPlaneColor(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3));
            }
            return 0;
        }

        int ComparePlaneValue(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL && argc == 3)
            {
                lua_pushboolean(L, currAnim->ComparePlaneColor(
                    (byte)lua_tointeger(L, 1),
                    (byte)lua_tointeger(L, 2),
                    (byte)lua_tointeger(L, 3) ));
                return 1;
            }
            return 0;
        }

        void RegisterCommands(lua_State *L)
        {
            lua_register(L, "SetVoxelValue",      SetVoxelValue);
            lua_register(L, "GetVoxelValue",      GetVoxelValue);
            lua_register(L, "SetColumnValue",     GetVoxelValue);
            lua_register(L, "CompareColumnValue", CompareColumnValue);
            lua_register(L, "SetPlaneValue",      SetPlaneValue);
            lua_register(L, "ComparePlaneValue",  ComparePlaneValue);
        }
    }

    ///
    /// \brief RGB Lua Functions
    ///
    /// This namespace contains functions to be registered with the Lua state when the
    /// animation needs to use three colors.
    ///
    namespace RGB
    {
        int SetVoxelColor(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (currAnim != NULL)
            {
                switch (argc)
                {
                    case 4:     // x, y, z, RGB
                        currAnim->SetVoxelColor(
                            (byte)lua_tointeger(L, 1),
                            (byte)lua_tointeger(L, 2),
                            (byte)lua_tointeger(L, 3),
                            (ulint)lua_tointeger(L, 4) );
                        break;
                    case 6:     // x, y, z, r, g, b
                        currAnim->SetVoxelColor(
                            (byte)lua_tointeger(L, 1),
                            (byte)lua_tointeger(L, 2),
                            (byte)lua_tointeger(L, 3),
                            (byte)lua_tointeger(L, 4),
                            (byte)lua_tointeger(L, 5),
                            (byte)lua_tointeger(L, 6) );
                        break;
                    default:
                        break;
                }
            }
            return 0;
        }

        int GetVoxelColor(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (argc != 3 && argc != 4) return 0;
            // Set the mode based on the 4th argument (default to RGB_HEX).
            int mode = (argc == 4) ? lua_tointeger(L, 4) : -2;

            if (currAnim != NULL)
            {
                if (mode == -2)
                {
                    lua_pushinteger(L, currAnim->GetVoxelColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (byte)lua_tointeger(L, 3) ));
                    return 1;
                }
                else if (mode == -1)
                {
                    byte x = (byte)lua_tointeger(L, 1),
                         y = (byte)lua_tointeger(L, 2),
                         z = (byte)lua_tointeger(L, 3);
                    lua_pushinteger(L,
                        currAnim->cubeState[0]->GetVoxelState(x, y, z));
                    lua_pushinteger(L,
                        currAnim->cubeState[1]->GetVoxelState(x, y, z));
                    lua_pushinteger(L,
                        currAnim->cubeState[2]->GetVoxelState(x, y, z));
                    return 3;
                }
                else if ( mode == TC_COLOR_R ||
                          mode == TC_COLOR_G ||
                          mode == TC_COLOR_B )
                {
                    lua_pushinteger(L,
                        currAnim->cubeState[mode]->GetVoxelState(
                            (byte)lua_tointeger(L, 1),
                            (byte)lua_tointeger(L, 2),
                            (byte)lua_tointeger(L, 3) ));
                    return 1;
                }
            }
            return 0;
        }

        int SetColumnColor(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (argc != 4 && argc != 6) return 0;
            if (currAnim != NULL)
            {
                if (argc == 4)
                {
                    currAnim->SetColumnColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (byte)lua_tointeger(L, 3),
                        (ulint)lua_tointeger(L, 4) );
                }
                else
                {
                    currAnim->SetColumnColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (byte)lua_tointeger(L, 3),
                        (byte)lua_tointeger(L, 4),
                        (byte)lua_tointeger(L, 5),
                        (byte)lua_tointeger(L, 6) );
                }
                return 1;
            }
            return 0;
        }

        int CompareColumnColor(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (argc != 4 && argc != 6) return 0;
            if (currAnim != NULL)
            {
                if (argc == 4)
                {
                    lua_pushboolean(L, currAnim->CompareColumnColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (byte)lua_tointeger(L, 3),
                        (ulint)lua_tointeger(L, 4)));
                }
                else
                {
                    lua_pushboolean(L, currAnim->CompareColumnColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (byte)lua_tointeger(L, 3),
                        (byte)lua_tointeger(L, 4),
                        (byte)lua_tointeger(L, 5),
                        (byte)lua_tointeger(L, 6)));
                }
                return 1;
            }
            return 0;
        }

        int SetPlaneColor(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (argc != 3 && argc != 5) return 0;
            if (currAnim != NULL)
            {
                if (argc == 3)
                {
                    currAnim->SetPlaneColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (ulint)lua_tointeger(L, 3) );
                }
                else
                {
                    currAnim->SetPlaneColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (byte)lua_tointeger(L, 3),
                        (byte)lua_tointeger(L, 4),
                        (byte)lua_tointeger(L, 5) );
                }
                return 1;
            }
            return 0;
        }

        int ComparePlaneColor(lua_State *L)
        {
            int argc = lua_gettop(L);
            if (argc != 3 && argc != 5) return 0;
            if (currAnim != NULL)
            {
                if (argc == 3)
                {
                    lua_pushboolean(L, currAnim->ComparePlaneColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (ulint)lua_tointeger(L, 3)));
                }
                else
                {
                    lua_pushboolean(L, currAnim->ComparePlaneColor(
                        (byte)lua_tointeger(L, 1),
                        (byte)lua_tointeger(L, 2),
                        (byte)lua_tointeger(L, 3),
                        (byte)lua_tointeger(L, 4),
                        (byte)lua_tointeger(L, 5)));
                }
                return 1;
            }
            return 0;
        }

        void RegisterCommands(lua_State *L)
        {
            lua_register(L, "SetVoxelColor",      SetVoxelColor);
            lua_register(L, "GetVoxelColor",      GetVoxelColor);
            lua_register(L, "SetColumnColor",     SetColumnColor);
            lua_register(L, "CompareColumnColor", CompareColumnColor);
            lua_register(L, "SetPlaneColor",      SetPlaneColor);
            lua_register(L, "ComparePlaneColor",  ComparePlaneColor);
        }
    }
}

///
/// \brief Lua Animation Loader
///
/// Loads the passed filename as a Lua animation, and validates the file.  This function
/// validates the Lua file, to ensure that the Lua file is syntactically correct, and all
/// required functions have been implemented.
///
/// \param fname A C-string containing the filename to be passed to luaL_loadfile.
/// \param argc  The number of arguments to pass to the animation when initializing.
/// \param argv  Pointer to each of the arguments. If there are no arguments, set to NULL.
///
/// \returns A pointer to a TCAnimLua object, casted to a TCAnim object.  If the Lua file
///          could not be loaded, NULL is returned.
///
TCAnim *LuaAnimLoader(char const *fname, int argc, int *argv)
{
    TCAnimLua *toReturn  = NULL;        // The TCAnimLua object to return (as a TCAnim).
    lua_State *pLuaState;               // Pointer to the current Lua state.
    TC_Lua_Functions::currAnim = NULL;  // Initialize the Lua animation pointer to NULL.
    std::string fpath = "animations/";
    fpath += fname;
    // First, we open the Lua state, and load the Lua libraries.
    pLuaState = lua_open();
    luaL_openlibs(pLuaState);
    // Next, we attempt to open the animation file from the passed filename.
    if (luaL_loadfile(pLuaState, fpath.c_str()))    // So, if Lua couldn't load the file...
    {
        // Try to load the filename with .lua appended to it.
        fpath += ".lua";
        if (luaL_loadfile(pLuaState, fpath.c_str()))
        {
            // We couldn't open the file, so display an error, cleanup, and return.
            std::string errMsg = "Error - could not load file \"";
            errMsg += fname;
            errMsg += "\"!\n";
            errMsg += "Ensure that the file exists, and try again.";
            WriteOutput(errMsg);
            lua_close(pLuaState);
            return NULL;
        }
    }
    // Next, we see if Lua can parse the given file.
    if (lua_pcall(pLuaState, 0, 0, 0))
    {
        // If we couldn't parse the file, show an error in the console, and return.
        WriteOutput("Error - could not load animation. "
                    "Check the file for syntax errors and try again.");
        lua_close(pLuaState);
        return NULL;
    }
    // Now, we check the value of _setColors to see if the number of colors was set.
    lua_getglobal(pLuaState, "_setColors");
    if (!lua_toboolean(pLuaState, -1))
    {
        WriteOutput("Error - number of colors in animation is not set. "
                    "Ensure that you have called SetNumColors in your animation file.");
        lua_close(pLuaState);
        return NULL;
    }
    lua_pop(pLuaState, 1);  // We have to pop the value off of the Lua stack.
    // Next, we get the actual number of colors.
    lua_getglobal(pLuaState, "_numColors");
    int _numColors = lua_tointeger(pLuaState, -1);
    // So, if the number of colors was not set to 0, 1, or 3...
    if (_numColors != 0 && _numColors != 1 && _numColors != 3)
    {
        WriteOutput("Error - animation has unsupported number of colors. "
                    "Valid numbers of colors are 0, 1, and 3.");
        lua_close(pLuaState);
        return NULL;
    }
    lua_pop(pLuaState, 1);  // Again, we have to pop the value off of the Lua stack.
    // Now that we have the number of colors, we can register the appropriate Lua commands
    // (as well as the common commands) to the animation's Lua state.
    TC_Lua_Functions::Common::RegisterCommands(pLuaState);
    switch (_numColors)
    {
        case 0:
            TC_Lua_Functions::BW::RegisterCommands(pLuaState);
            break;
        case 1:
            TC_Lua_Functions::Greyscale::RegisterCommands(pLuaState);
            break;
        case 3:
            TC_Lua_Functions::RGB::RegisterCommands(pLuaState);
            break;
        default:
            break;
    }
    // Next, we initialize the object so that the registered functions are valid.  We also
    // delete the object if we need to quit (since lua_close is called in the destructor).
    toReturn = new TCAnimLua(cubeSize, _numColors, pLuaState);
    // We also store the pointer for use with the registered commands in TC_Lua_Functions.
    TC_Lua_Functions::currAnim = toReturn;
    // Now, we attempt to call the InitSize function (which is in animbase.lua).
    lua_getglobal(pLuaState, "_InitSize");
    if (!lua_isfunction(pLuaState, -1))     // If the function does not exist...
    {
        // We output an error to the console, close the Lua state, and return NULL.
        WriteOutput("Error - could not find the InitSize function. "
                    "Ensure that you have included animbase.lua in your animation file.");
        delete toReturn;
        TC_Lua_Functions::currAnim = NULL;
        return NULL;
    }
    // Next, we push each of the sizes onto the Lua stack, and call the InitSize function.
    lua_pushinteger(pLuaState, cubeSize[0]);
    lua_pushinteger(pLuaState, cubeSize[1]);
    lua_pushinteger(pLuaState, cubeSize[2]);
    lua_pcall(pLuaState, 3, 0, 0);
    // Now, we repeat the above steps, but with the Initialize function.
    lua_getglobal(pLuaState, "Initialize");
    if (!lua_isfunction(pLuaState, -1))     // If the function does not exist...
    {
        // We output an error to the console, close the Lua state, and return NULL.
        WriteOutput("Error - could not find the Initialize function. "
                    "Ensure that you have defined this function in your animation file.");
        delete toReturn;
        TC_Lua_Functions::currAnim = NULL;
        return NULL;
    }
    // Next, we push all of the arguments onto the stack, and call the function.
    for (int i = 0; i < argc; i++)
    {
        lua_pushinteger(pLuaState, argv[i]);
    }
    if (lua_pcall(pLuaState, argc, 1, 0))   // If there was too little/many arguments...
    {
        // We output an error to the console, close the Lua state, and return NULL.
        WriteOutput("Error - call to Initialize failed. "
                    "Check that you have passed the proper number of arguments.");
        delete toReturn;
        TC_Lua_Functions::currAnim = NULL;
        return NULL;
    }
    if (!lua_toboolean(pLuaState, -1))      // If Initialize returned false...
    {
        // We output an error to the console, close the Lua state, and return NULL.
        WriteOutput("Error - call to Initialize failed (returned false). See above for "
                    "additional information (if applicable).");
        delete toReturn;
        TC_Lua_Functions::currAnim = NULL;
        return NULL;
    }
    lua_pop(pLuaState, 1);  // We have to pop the return value off of the Lua stack.
    // Lastly, we need to check that the Update function is valid.
    lua_getglobal(pLuaState, "Update");
    if (!lua_isfunction(pLuaState, -1))     // If the function does not exist...
    {
        // We output an error to the console, close the Lua state, and return NULL.
        WriteOutput("Error - could not find the Update function. "
                    "Ensure that you have defined this function in your animation file.");
        delete toReturn;
        TC_Lua_Functions::currAnim = NULL;
        return NULL;
    }
    // Finally, we can return the TCAnimLua object.
    return toReturn;
}

///
/// \brief Constructor
///
/// Creates a TCAnim object from the given cubesize and Lua state.  This function assumes
/// that the passed Lua state was parsed properly, and has all required functions.  See
/// the \ref LuaAnimLoader function for details.
///
/// \param tccSize      Array holding the cube size (in voxels).
/// \param luaStateAnim Pointer to the initialized and valid Lua state.
///
/// \see LuaAnimLoader
///
TCAnimLua::TCAnimLua(byte tccSize[3], byte colors, lua_State *luaStateAnim)
    : TCAnim(tccSize, colors)
{
    pLuaState = luaStateAnim;
}

///
/// \brief Destructor
///
/// Closes the Lua state (all other dynamic memory is deallocated by the base destructor).
///
TCAnimLua::~TCAnimLua()
{
    lua_close(pLuaState);
}

///
/// \brief Update
///
/// Called on every tick, this function calls the Update function defined by the Lua
/// animation file.  This function assumes that the function exists and is valid.
///
void TCAnimLua::Update()
{
    lua_pcall(pLuaState, 0, 0, 0);
    lua_getglobal(pLuaState, "Update");
}

///
/// \brief Done Iteration
///
/// Increases the animation's iteration count by one.
///
/// \remarks This is a trivial method, provided only to allow incrementing the animation's
///          iteration count through Lua.  See the TC_Lua_Functions::DoneIteration
///          function for more details.
///
void TCAnimLua::DoneIteration()
{
    iterations++;
}


text:
package gov.nih.nci.cagrid.introduce.extensions.wsenum.codegen;

import gov.nih.nci.cagrid.common.XMLUtilities;
import gov.nih.nci.cagrid.introduce.beans.extension.ServiceExtensionDescriptionType;
import gov.nih.nci.cagrid.introduce.common.CommonTools;
import gov.nih.nci.cagrid.introduce.common.ServiceInformation;
import gov.nih.nci.cagrid.introduce.extension.CodegenExtensionException;
import gov.nih.nci.cagrid.introduce.extension.CodegenExtensionPostProcessor;

import java.io.File;
import java.io.FileWriter;
import java.util.Iterator;

import org.jdom.Element;

/**
 * WsEnumCreationPostProcessor Post-creation extension to Introduce to add
 * WS-Enumeration support to a Grid Service
 *
 * @author David W. Ervin *
 * @created Nov 16, 2006
 * @version $Id: WsEnumCodegenPostProcessor.java,v 1.5 2007/05/08 16:58:09
 *          dervin Exp $
 */
public class WsEnumCodegenPostProcessor implements CodegenExtensionPostProcessor {

    public WsEnumCodegenPostProcessor() {

    }

    public void postCodegen(ServiceExtensionDescriptionType desc, ServiceInformation info)
        throws CodegenExtensionException {
        editJNDI(info);
    }

    private void editJNDI(ServiceInformation info) throws CodegenExtensionException {
        boolean jndiEdited = false;
        File serviceJndiFile = new File(info.getBaseDirectory().getAbsolutePath() + File.separator + "jndi-config.xml");
        Element jndiRoot = null;
        try {
            jndiRoot = XMLUtilities.fileNameToDocument(serviceJndiFile.getAbsolutePath()).getRootElement();
        } catch (Exception ex) {
            throw new CodegenExtensionException("Error loading service's JNDI file: " + ex.getMessage(), ex);
        }
        // locate the enumeration service context's stuff in the JNDI
        Iterator serviceElementIter = jndiRoot.getChildren("service", jndiRoot.getNamespace()).iterator();
        String serviceName = "SERVICE-INSTANCE-PREFIX/" + info.getServices().getService(0).getName() + "Enumeration";
        while (serviceElementIter.hasNext()) {
            Element serviceElement = (Element) serviceElementIter.next();
            if (serviceElement.getAttributeValue("name").equals(serviceName)) {
                // see if the service already has the resource definition
                if (serviceElement.getChild("resource", jndiRoot.getNamespace()) == null) {
                    // add the enumeration resource description
                    serviceElement.addContent(getEnumerationResourceDescription());
                    jndiEdited = true;
                }
                break;
            }
        }
        if (jndiEdited) {
            // write the JNDI with edits back out
            try {
                FileWriter jndiWriter = new FileWriter(serviceJndiFile);
                String xml = XMLUtilities.formatXML(XMLUtilities.elementToString(jndiRoot));
                jndiWriter.write(xml);
                jndiWriter.flush();
                jndiWriter.close();
            } catch (Exception ex) {
                throw new CodegenExtensionException("Error writing edited JNDI file: " + ex.getMessage(), ex);
            }
        }
    }

    private Element getEnumerationResourceDescription() throws CodegenExtensionException {
        String globusLocation = CommonTools.getGlobusLocation();
        File coreJndiConfigFile = new File(new File(globusLocation).getAbsolutePath() + File.separator + "etc"
            + File.separator + "globus_wsrf_core" + File.separator + "jndi-config.xml");
        Element coreJndiRoot = null;
        try {
            coreJndiRoot = XMLUtilities.fileNameToDocument(coreJndiConfigFile.getAbsolutePath()).getRootElement();
        } catch (Exception ex) {
            throw new CodegenExtensionException("Error loading Globus core JNDI file: " + ex.getMessage(), ex);
        }
        Element globalElement = coreJndiRoot.getChild("global", coreJndiRoot.getNamespace());
        Iterator resourceElementIter = globalElement.getChildren("resource", coreJndiRoot.getNamespace()).iterator();
        while (resourceElementIter.hasNext()) {
            Element resourceElement = (Element) resourceElementIter.next();
            if (resourceElement.getAttributeValue("name").equals("enumeration/EnumerationHome")) {
                Element resourceDescription = (Element) resourceElement.clone();
                return (Element) resourceDescription.detach();
            }
        }
        return null;
    }
}


text:
#ifndef BERRYSHELL_H_
#define BERRYSHELL_H_

#include <berryMacros.h>

#include <org_blueberry_ui_qt_Export.h>
#include "berryIShellListener.h"
#include "guitk/berryGuiTkIControlListener.h"

namespace berry {

/**
 * Instances of this class represent the "windows"
 * which the desktop or "window manager" is managing.
 * Instances that do not have a parent (that is, they
 * are built using the constructor, which takes a
 * Display as the argument) are described
 * as top level shells. Instances that do have
 * a parent are described as secondary or
 * dialog shells.
 *

 * Instances are always displayed in one of the maximized,
 * minimized or normal states:
 *

 *

 * When an instance is marked as maximized, the
 * window manager will typically resize it to fill the
 * entire visible area of the display, and the instance
 * is usually put in a state where it can not be resized
 * (even if it has style RESIZE) until it is
 * no longer maximized.
 *

 * When an instance is in the normal state (neither
 * maximized or minimized), its appearance is controlled by
 * the style constants which were specified when it was created
 * and the restrictions of the window manager (see below).
 *

 * When an instance has been marked as minimized,
 * its contents (client area) will usually not be visible,
 * and depending on the window manager, it may be
 * "iconified" (that is, replaced on the desktop by a small
 * simplified representation of itself), relocated to a
 * distinguished area of the screen, or hidden. Combinations
 * of these changes are also possible.
 *

 *

 *

 * The modality of an instance may be specified using
 * style bits. The modality style bits are used to determine
 * whether input is blocked for other shells on the display.
 * The PRIMARY_MODAL style allows an instance to block
 * input to its parent. The APPLICATION_MODAL style
 * allows an instance to block input to every other shell in the
 * display. The SYSTEM_MODAL style allows an instance
 * to block input to all shells, including shells belonging to
 * different applications.
 *

 * Note: The styles supported by this class are treated
 * as HINTs, since the window manager for the
 * desktop on which the instance is visible has ultimate
 * control over the appearance and behavior of decorations
 * and modality. For example, some window managers only
 * support resizable windows and will always assume the
 * RESIZE style, even if it is not set. In addition, if a
 * modality style is not supported, it is "upgraded" to a
 * more restrictive modality style that is supported. For
 * example, if PRIMARY_MODAL is not supported,
 * it would be upgraded to APPLICATION_MODAL.
 * A modality style may also be "downgraded" to a less
 * restrictive style. For example, most operating systems
 * no longer support SYSTEM_MODAL because
 * it can freeze up the desktop, so this is typically
 * downgraded to APPLICATION_MODAL.
 *

 *
Styles:

 *
BORDER, CLOSE, MIN, MAX, NO_TRIM, RESIZE, TITLE, ON_TOP, TOOL

 *
APPLICATION_MODAL, MODELESS, PRIMARY_MODAL, SYSTEM_MODAL

 *
Events:

 *
Activate, Close, Deactivate, Deiconify, Iconify

 *

 * Class SWT provides two "convenience constants"
 * for the most commonly required style combinations:
 *

 *
SHELL_TRIM

 *

 * the result of combining the constants which are required
 * to produce a typical application top level shell: (that
 * is, CLOSE | TITLE | MIN | MAX | RESIZE)
 *

 *
DIALOG_TRIM

 *

 * the result of combining the constants which are required
 * to produce a typical application dialog shell: (that
 * is, TITLE | CLOSE | BORDER)
 *

 *

 *

 *

 * Note: Only one of the styles APPLICATION_MODAL, MODELESS,
 * PRIMARY_MODAL and SYSTEM_MODAL may be specified.
 *

 * IMPORTANT: This class is not intended to be subclassed.
 *

 */
class BERRY_UI_QT Shell : public virtual Object
{
public:

  berryObjectMacro(Shell)

  Shell();

  Object::Pointer GetData(const QString& id = "") const;
  void SetData(const Object::Pointer& data, const QString& id = "");

  IShellListener* GetExtraShellListener() const;

  void SetExtraShellListener(IShellListener* l);

  void SetBounds(int x, int y, int width, int height);

  virtual void SetBounds(const QRect& bounds) = 0;
  virtual QRect GetBounds() const = 0;

  virtual void SetLocation(int x, int y) = 0;

  virtual QPoint ComputeSize(int wHint, int hHint, bool changed) = 0;

  /**
   * Returns the receiver's text, which is the string that the
   * window manager will typically display as the receiver's title.
   * If the text has not previously been set, returns an empty string.
   *
   * @return the text
   */
  virtual QString GetText() const = 0;

  /**
   * Sets the receiver's text, which is the string that the window manager
   * will typically display as the receiver's title, to the argument.
   */
  virtual void SetText(const QString& text) = 0;

  virtual bool IsVisible() const = 0;
  virtual void SetVisible(bool visible) = 0;

  virtual QWidget* GetControl() const = 0;

  virtual void SetImages(const QList<QIcon>& images) = 0;

  /**
   * Returns true if the receiver is currently
   * maximized, and false otherwise.
   *

   *
   * @return the maximized state
   *
   * @see #SetMaximized
   */
  virtual bool GetMaximized() const = 0;

  /**
   * Returns true if the receiver is currently
   * minimized, and false otherwise.
   *

   *
   * @return the minimized state
   *
   * @see #SetMinimized
   */
  virtual bool GetMinimized() const = 0;

  /**
   * Sets the minimized stated of the receiver.
   * If the argument is true causes the receiver
   * to switch to the minimized state, and if the argument is
   * false and the receiver was previously minimized,
   * causes the receiver to switch back to either the maximized
   * or normal states.
   *

   * Note: The result of intermixing calls to setMaximized(true)
   * and setMinimized(true) will vary by platform. Typically,
   * the behavior will match the platform user's expectations, but not
   * always. This should be avoided if possible.
   *

   *
   * @param minimized the new maximized state
   *
   * @see #SetMaximized
   */
  virtual void SetMinimized(bool minimized) = 0;

  /**
   * Sets the maximized state of the receiver.
   * If the argument is true causes the receiver
   * to switch to the maximized state, and if the argument is
   * false and the receiver was previously maximized,
   * causes the receiver to switch back to either the minimized
   * or normal states.
   *

   * Note: The result of intermixing calls to setMaximized(true)
   * and setMinimized(true) will vary by platform. Typically,
   * the behavior will match the platform user's expectations, but not
   * always. This should be avoided if possible.
   *

   *
   * @param maximized the new maximized state
   *
   * @see #SetMinimized
   */
  virtual void SetMaximized(bool maximized) = 0;

  /**
   * Adds the listener to the collection of listeners who will
   * be notified when operations are performed on the receiver,
   * by sending the listener one of the messages defined in the
   * IShellListener interface.
   *
   * @param listener the listener which should be notified
   *
   * @see IShellListener
   * @see #RemoveShellListener
   */
  virtual void AddShellListener(IShellListener* listener) = 0;

  /**
   * Removes the listener from the collection of listeners who will
   * be notified when operations are performed on the receiver.
   *
   * @param listener the listener which should no longer be notified
   *
   * @see IShellListener
   * @see #AddShellListener
   */
  virtual void RemoveShellListener(IShellListener* listener) = 0;

  /**
   * Moves the receiver to the top of the drawing order for
   * the display on which it was created (so that all other
   * shells on that display, which are not the receiver's
   * children will be drawn behind it), marks it visible,
   * sets the focus and asks the window manager to make the
   * shell active.
   */
  virtual void Open(bool block = false) = 0;

  /**
   * Requests that the window manager close the receiver in
   * the same way it would be closed when the user clicks on
   * the "close box" or performs some other platform specific
   * key or mouse combination that indicates the window
   * should be removed.
   */
  virtual void Close() = 0;

  /**
   * If the receiver is visible, moves it to the top of the
   * drawing order for the display on which it was created
   * (so that all other shells on that display, which are not
   *  the receiver's children will be drawn behind it) and
   *  asks the window manager to make the shell active.
   */
  virtual void SetActive() = 0;

  /**
    * Returns an array containing all shells which are
    * descendants of the receiver.
    *

    * @return the dialog shells
    *
    * @exception SWTException

    *
ERROR_WIDGET_DISPOSED - if the receiver has been disposed

    *
ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

    *

    */
   virtual QList<Shell::Pointer> GetShells() = 0;

   /**
     * Returns the receiver's style information.
     *

     * Note that the value which is returned by this method may
     * not match the value which was provided to the constructor
     * when the receiver was created. This can occur when the underlying
     * operating system does not support a particular combination of
     * requested styles. For example, if the platform widget used to
     * implement a particular SWT widget always has scroll bars, the
     * result of calling this method would always have the
     * SWT.H_SCROLL and SWT.V_SCROLL bits set.
     *

     *
     * @return the style bits
     *
     * @exception SWTException

     *
ERROR_WIDGET_DISPOSED - if the receiver has been disposed

     *
ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

     *

     */
    virtual Qt::WindowFlags GetStyle () const = 0;

private:

  QHash<QString, Object::Pointer> data;
  IShellListener* extraShellListener;

};

}

Q_DECLARE_METATYPE(berry::Shell*)

#endif /* BERRYSHELL_H_ */


text:
module.exports = {
  extends: ['../.eslintrc-ts.js'],
  parserOptions: {
    project: 'bundle-size-chart/tsconfig.json',
    createDefaultProgram: true,
  },
};


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>get_op_or_user_services (OpenID)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />

# File lib/openid/consumer/discovery.rb, line 336
  def self.get_op_or_user_services(openid_services)
    # Extract OP Identifier services.  If none found, return the rest,
    # sorted with most preferred first according to
    # OpenIDServiceEndpoint.openid_type_uris.
    #
    # openid_services is a list of OpenIDServiceEndpoint objects.
    #
    # Returns a list of OpenIDServiceEndpoint objects.

    op_services = arrange_by_type(openid_services, [OPENID_IDP_2_0_TYPE])

    openid_services = arrange_by_type(openid_services,
                                      OpenIDServiceEndpoint::OPENID_TYPE_URIS)

    if !op_services.empty?
      return op_services
    else
      return openid_services
    end
  end


text:
package com.google.gxp.compiler.validate;

import com.google.gxp.compiler.alerts.ErrorAlert;
import com.google.gxp.compiler.alerts.SourcePosition;
import com.google.gxp.compiler.base.Node;

/**
 * {@link com.google.gxp.compiler.alerts.Alert} which indicates that a
 * {@code gxp:param} attatched to a {@code gxp:template} has a
 * {@code has-constructor} attribute.
 */
public class TemplateParamWithHasConstructorError extends ErrorAlert {
  public TemplateParamWithHasConstructorError(SourcePosition pos) {
    super(pos, "Template parameters do not take a has-constructor attribute.");
  }

  public TemplateParamWithHasConstructorError(Node node) {
    this(node.getSourcePosition());
  }
}


text: This project shows the use of Spring Auto REST Docs with WebTestClient in a Java 8 project.


text:
using System.Collections.Generic;
using BuildAProject.BuildManagement.CsProjects;

namespace BuildAProject.BuildManagement.Test.TestSupport.Builders
{
  public sealed class CsProjectBuilder
  {
    public string Name = "UnitTest_Name";

    public string OutputType = "UnitTest_OutputType";

    public IEnumerable<Reference> References = new[]
                                                  {
                                                    new ReferenceBuilder().Build()

                                                  };

    public CsProject Build()
    {
      return new CsProject(Name, References, OutputType);
    }
  }
}


text:
/* Dump to disk in '.rgb' format */

void ssgaScreenDump ( char *filename,
                      int width, int height,
                      int frontBuffer = TRUE ) ;

/* Dump to a memory buffer - three bytes per pixel */

unsigned char *ssgaScreenDump ( int width, int height,
                                int frontBuffer = TRUE ) ;


text:
# Makefile.in generated by automake 1.10 from Makefile.am.
# include/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# $Id: Makefile.am,v 1.1.1.1 2003/06/26 21:55:10 route Exp $

# $Id: Makefile.am.common,v 1.3 2004/01/03 20:31:00 mike Exp $
#
# Libnet automake information file
# Copyright (c) 1998 - 2004 Mike D. Schiffman <mike@infonexus.com>
# All rights reserved.
#

pkgdatadir = $(datadir)/libnet
pkglibdir = $(libdir)/libnet
pkgincludedir = $(includedir)/libnet
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-pc-linux-gnu
host_triplet = arm-unknown-linux-androideabi
target_triplet = arm-unknown-linux-androideabi
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
	$(srcdir)/config.h.in $(srcdir)/libnet.h.in \
	$(top_srcdir)/Makefile.am.common
subdir = include
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
	$(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = libnet.h
depcomp =
am__depfiles_maybe =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
	html-recursive info-recursive install-data-recursive \
	install-dvi-recursive install-exec-recursive \
	install-html-recursive install-info-recursive \
	install-pdf-recursive install-ps-recursive install-recursive \
	installcheck-recursive installdirs-recursive pdf-recursive \
	ps-recursive uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
    *) f=$$p;; \
  esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(includedir)"
nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(nodist_include_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
  distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/robquad/dev/android/ndk/arpspoof/jni/libnet/missing --run aclocal-1.10
ADDITIONAL_LIBS =
AMTAR = ${SHELL} /home/robquad/dev/android/ndk/arpspoof/jni/libnet/missing --run tar
AR = arm-linux-androideabi-ar
AUTOCONF = ${SHELL} /home/robquad/dev/android/ndk/arpspoof/jni/libnet/missing --run autoconf
AUTOHEADER = ${SHELL} /home/robquad/dev/android/ndk/arpspoof/jni/libnet/missing --run autoheader
AUTOMAKE = ${SHELL} /home/robquad/dev/android/ndk/arpspoof/jni/libnet/missing --run automake-1.10
AWK = gawk
CC = arm-linux-androideabi-gcc
CCDEPMODE = depmode=none
CFLAGS = -mthumb -I/home/robquad/dev/android/ndk/build/platforms/android-8/arch-arm/usr/include/ -I../include/ -I../../include
CPP = arm-linux-androideabi-gcc -E
CPPFLAGS =
CXX = arm-linux-androideabi-g++
CXXCPP = arm-linux-androideabi-g++ -E
CXXDEPMODE = depmode=none
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /bin/grep -E
ENDIANESS = LIBNET_LIL_ENDIAN
EXEEXT =
F77 =
FFLAGS =
GREP = /bin/grep
HAVE_PACKET_SOCKET =
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS = -Wl,--fix-cortex-a8,-rpath-link=/home/robquad/dev/android/ndk/build/platforms/android-8/arch-arm/usr/lib/ -L/home/robquad/dev/android/ndk/build/platforms/android-8/arch-arm/usr/lib/
LIBNET_CONFIG_CFLAGS =
LIBNET_CONFIG_DEFINES = -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD
LIBNET_CONFIG_LIBS =
LIBOBJS =  ${LIBOBJDIR}libnet_link_linux$U.o
LIBS = -lc
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =  ${LIBOBJDIR}libnet_link_linux$U.lo
MAINT = #
MAKEINFO = ${SHELL} /home/robquad/dev/android/ndk/arpspoof/jni/libnet/missing --run makeinfo
MKDIR_P = /bin/mkdir -p
OBJEXT = o
PACKAGE = libnet
PACKAGE_BUGREPORT =
PACKAGE_NAME = libnet
PACKAGE_STRING = libnet 1.1.5
PACKAGE_TARNAME = libnet
PACKAGE_VERSION = 1.1.5
PATH_SEPARATOR = :
RANLIB = arm-linux-androideabi-ranlib
SED = /bin/sed
SET_MAKE =
SHELL = /bin/bash
STRIP = arm-linux-androideabi-strip
VERSION = 1.1.5
abs_builddir = /home/robquad/dev/android/ndk/arpspoof/jni/libnet/include
abs_srcdir = /home/robquad/dev/android/ndk/arpspoof/jni/libnet/include
abs_top_builddir = /home/robquad/dev/android/ndk/arpspoof/jni/libnet
abs_top_srcdir = /home/robquad/dev/android/ndk/arpspoof/jni/libnet
ac_ct_CC =
ac_ct_CXX =
ac_ct_F77 =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = x86_64-pc-linux-gnu
build_alias = x86_64-linux-gnu
build_cpu = x86_64
build_os = linux-gnu
build_vendor = pc
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = arm-unknown-linux-androideabi
host_alias = arm-linux-androideabi
host_cpu = arm
host_os = linux-androideabi
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = $(SHELL) /home/robquad/dev/android/ndk/arpspoof/jni/libnet/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = /bin/mkdir -p
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target = arm-unknown-linux-androideabi
target_alias =
target_cpu = arm
target_os = linux-androideabi
target_vendor = unknown
top_builddir = ..
top_srcdir = ..
AUTOMAKE_OPTIONS = foreign no-dependencies
DISTCLEANFILES = *~
ACLOCAL_AMFLAGS = -I m4
INCLUDES = -I$(top_srcdir)/include
nodist_include_HEADERS = libnet.h
EXTRA_DIST = bpf.h gnuc.h ifaddrlist.h
SUBDIRS = libnet win32
all: config.h
	$(MAKE) $(AM_MAKEFLAGS) all-recursive

.SUFFIXES:
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  include/Makefile'; \
	cd $(top_srcdir) && \
	  $(AUTOMAKE) --foreign  include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: # $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

config.h: stamp-h1
	@if test ! -f $@; then \
	  rm -f stamp-h1; \
	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
	else :; fi

stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
	@rm -f stamp-h1
	cd $(top_builddir) && $(SHELL) ./config.status include/config.h
$(srcdir)/config.h.in: # $(am__configure_deps)
	cd $(top_srcdir) && $(AUTOHEADER)
	rm -f stamp-h1
	touch $@

distclean-hdr:
	-rm -f config.h stamp-h1
libnet.h: $(top_builddir)/config.status $(srcdir)/libnet.h.in
	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
install-nodist_includeHEADERS: $(nodist_include_HEADERS)
	@$(NORMAL_INSTALL)
	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
	@list='$(nodist_include_HEADERS)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f=$(am__strip_dir) \
	  echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
	  $(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
	done

uninstall-nodist_includeHEADERS:
	@$(NORMAL_UNINSTALL)
	@list='$(nodist_include_HEADERS)'; for p in $$list; do \
	  f=$(am__strip_dir) \
	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
	done

# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
#     (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
	@failcom='exit 1'; \
	for f in x $$MAKEFLAGS; do \
	  case $$f in \
	    *=* | --[!k]*);; \
	    *k*) failcom='fail=yes';; \
	  esac; \
	done; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    dot_seen=yes; \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	  || eval $$failcom; \
	done; \
	if test "$$dot_seen" = "no"; then \
	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
	fi; test -z "$$fail"

$(RECURSIVE_CLEAN_TARGETS):
	@failcom='exit 1'; \
	for f in x $$MAKEFLAGS; do \
	  case $$f in \
	    *=* | --[!k]*);; \
	    *k*) failcom='fail=yes';; \
	  esac; \
	done; \
	dot_seen=no; \
	case "$@" in \
	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
	  *) list='$(SUBDIRS)' ;; \
	esac; \
	rev=''; for subdir in $$list; do \
	  if test "$$subdir" = "."; then :; else \
	    rev="$$subdir $$rev"; \
	  fi; \
	done; \
	rev="$$rev ."; \
	target=`echo $@ | sed s/-recursive//`; \
	for subdir in $$rev; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	  || eval $$failcom; \
	done && test -z "$$fail"
tags-recursive:
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
	done
ctags-recursive:
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
	done

ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	mkid -fID $$unique
tags: TAGS

TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	here=`pwd`; \
	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
	  include_option=--etags-include; \
	  empty_fix=.; \
	else \
	  include_option=--include; \
	  empty_fix=; \
	fi; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    test ! -f $$subdir/TAGS || \
	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
	  fi; \
	done; \
	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	    $$tags $$unique; \
	fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	tags=; \
	here=`pwd`; \
	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '    { files[$$0] = 1; } \
	       END { for (i in files) print i; }'`; \
	test -z "$(CTAGS_ARGS)$$tags$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$tags $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && cd $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) $$here

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
	    fi; \
	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
	  else \
	    test -f $(distdir)/$$file \
	    || cp -p $$d/$$file $(distdir)/$$file \
	    || exit 1; \
	  fi; \
	done
	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    test -d "$(distdir)/$$subdir" \
	    || $(MKDIR_P) "$(distdir)/$$subdir" \
	    || exit 1; \
	    distdir=`$(am__cd) $(distdir) && pwd`; \
	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
	    (cd $$subdir && \
	      $(MAKE) $(AM_MAKEFLAGS) \
	        top_distdir="$$top_distdir" \
	        distdir="$$distdir/$$subdir" \
		am__remove_distdir=: \
		am__skip_length_check=: \
	        distdir) \
	      || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-recursive
all-am: Makefile $(HEADERS) config.h
installdirs: installdirs-recursive
installdirs-am:
	for dir in "$(DESTDIR)$(includedir)"; do \
	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
	done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-recursive
install-strip:
	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	  `test -z '$(STRIP)' || \
	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-recursive
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags

dvi: dvi-recursive

dvi-am:

html: html-recursive

info: info-recursive

info-am:

install-data-am: install-nodist_includeHEADERS

install-dvi: install-dvi-recursive

install-exec-am:

install-html: install-html-recursive

install-info: install-info-recursive

install-man:

install-pdf: install-pdf-recursive

install-ps: install-ps-recursive

installcheck-am:

maintainer-clean: maintainer-clean-recursive
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-recursive

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-recursive

pdf-am:

ps: ps-recursive

ps-am:

uninstall-am: uninstall-nodist_includeHEADERS

.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
	install-strip

.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
	all all-am check check-am clean clean-generic clean-libtool \
	ctags ctags-recursive distclean distclean-generic \
	distclean-hdr distclean-libtool distclean-tags distdir dvi \
	dvi-am html html-am info info-am install install-am \
	install-data install-data-am install-dvi install-dvi-am \
	install-exec install-exec-am install-html install-html-am \
	install-info install-info-am install-man \
	install-nodist_includeHEADERS install-pdf install-pdf-am \
	install-ps install-ps-am install-strip installcheck \
	installcheck-am installdirs installdirs-am maintainer-clean \
	maintainer-clean-generic mostlyclean mostlyclean-generic \
	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
	uninstall uninstall-am uninstall-nodist_includeHEADERS

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: