sstables: Remove use of forwarding wrapper

--- sstables/partition.cc
+++ sstables/partition.cc
@@ -140,6 +140,7 @@
     stdx::optional<new_mutation> _mutation;
     bool _is_mutation_end = true;
     position_range _fwd_range = position_range::full(); // Restricts the stream on top of _ck_ranges.
+    streamed_mutation::forwarding _fwd;
     bool _after_fwd_range_start = false;

     // Because of #1203 we may encounter sstables with range tombstones
@@ -352,6 +353,7 @@
     void set_up_ck_ranges(const partition_key& pk) {
         _ck_ranges = query::clustering_key_filter_ranges::get_ranges(*_schema, _slice, pk);
         _ck_ranges_walker = clustering_ranges_walker(*_schema, _ck_ranges->ranges());
+        _fwd_range = _fwd ? position_range::for_static_row() : position_range::full();
         _out_of_range = false;
         _after_fwd_range_start = false;
         _range_tombstones.reset();
@@ -363,11 +365,13 @@
     mp_row_consumer(const key& key,
                     const schema_ptr schema,
                     const query::partition_slice& slice,
-                    const io_priority_class& pc)
+                    const io_priority_class& pc,
+                    streamed_mutation::forwarding fwd)
             : _schema(schema)
             , _key(key_view(key))
             , _pc(&pc)
             , _slice(slice)
+            , _fwd(fwd)
             , _range_tombstones(*_schema)
     {
         set_up_ck_ranges(partition_key::from_exploded(*_schema, key.explode(*_schema)));
@@ -375,21 +379,25 @@

     mp_row_consumer(const key& key,
                     const schema_ptr schema,
-                    const io_priority_class& pc)
-            : mp_row_consumer(key, schema, query::full_slice, pc) { }
+                    const io_priority_class& pc,
+                    streamed_mutation::forwarding fwd)
+            : mp_row_consumer(key, schema, query::full_slice, pc, fwd) { }

     mp_row_consumer(const schema_ptr schema,
                     const query::partition_slice& slice,
-                    const io_priority_class& pc)
+                    const io_priority_class& pc,
+                    streamed_mutation::forwarding fwd)
             : _schema(schema)
             , _pc(&pc)
             , _slice(slice)
+            , _fwd(fwd)
             , _range_tombstones(*_schema)
     { }

     mp_row_consumer(const schema_ptr schema,
-                    const io_priority_class& pc)
-            : mp_row_consumer(schema, query::full_slice, pc) { }
+                    const io_priority_class& pc,
+                    streamed_mutation::forwarding fwd)
+            : mp_row_consumer(schema, query::full_slice, pc, fwd) { }

     virtual proceed consume_row_start(sstables::key_view key, sstables::deletion_time deltime) override {
         if (_key.empty() || key == _key) {
@@ -817,9 +825,9 @@
     { }

     sstable_data_source(schema_ptr s, shared_sstable sst, const sstables::key& k, const io_priority_class& pc,
-            const query::partition_slice& slice, sstable::disk_read_range toread)
+            const query::partition_slice& slice, sstable::disk_read_range toread, streamed_mutation::forwarding fwd)
         : _sst(std::move(sst))
-        , _consumer(k, s, slice, pc)
+        , _consumer(k, s, slice, pc, fwd)
         , _context(_sst->data_consume_single_partition(_consumer, std::move(toread)))
     { }

@@ -886,17 +894,12 @@
                                             sstable::disk_read_range toread,
                                             streamed_mutation::forwarding fwd)
     {
-        auto ds = make_lw_shared<sstable_data_source>(s, sst, k, pc, slice, std::move(toread));
-        return ds->_context.read().then([s, ds, fwd] {
+        auto ds = make_lw_shared<sstable_data_source>(s, sst, k, pc, slice, std::move(toread), fwd);
+        return ds->_context.read().then([s, ds] {
             auto mut = ds->_consumer.get_mutation();
             assert(mut);
             auto dk = dht::global_partitioner().decorate_key(*s, std::move(mut->key));
-            auto sm = make_streamed_mutation<sstable_streamed_mutation>(s, std::move(dk), mut->tomb, ds);
-            if (fwd) {
-                return make_forwardable(std::move(sm)); // FIXME: optimize
-            } else {
-                return std::move(sm);
-            }
+            return make_streamed_mutation<sstable_streamed_mutation>(s, std::move(dk), mut->tomb, ds);
         });
     }
 };
@@ -1144,7 +1147,6 @@
     const io_priority_class& _pc;
     schema_ptr _schema;
     lw_shared_ptr<sstable_data_source> _ds;
-    streamed_mutation::forwarding _fwd;
     std::function<future<lw_shared_ptr<sstable_data_source>> ()> _get_data_source;
 public:
     impl(shared_sstable sst, schema_ptr schema, sstable::disk_read_range toread,
@@ -1152,9 +1154,8 @@
          streamed_mutation::forwarding fwd)
         : _pc(pc)
         , _schema(schema)
-        , _fwd(fwd)
-        , _get_data_source([this, sst = std::move(sst), toread, &pc] {
-            auto consumer = mp_row_consumer(_schema, query::full_slice, pc);
+        , _get_data_source([this, sst = std::move(sst), toread, &pc, fwd] {
+            auto consumer = mp_row_consumer(_schema, query::full_slice, pc, fwd);
             auto ds = make_lw_shared<sstable_data_source>(std::move(sst), std::move(consumer), std::move(toread), std::unique_ptr<index_reader>());
             return make_ready_future<lw_shared_ptr<sstable_data_source>>(std::move(ds));
         }) { }
@@ -1163,9 +1164,8 @@
          streamed_mutation::forwarding fwd)
         : _pc(pc)
         , _schema(schema)
-        , _fwd(fwd)
-        , _get_data_source([this, sst = std::move(sst), &pc] {
-            auto consumer = mp_row_consumer(_schema, query::full_slice, pc);
+        , _get_data_source([this, sst = std::move(sst), &pc, fwd] {
+            auto consumer = mp_row_consumer(_schema, query::full_slice, pc, fwd);
             auto ds = make_lw_shared<sstable_data_source>(std::move(sst), std::move(consumer));
             return make_ready_future<lw_shared_ptr<sstable_data_source>>(std::move(ds));
         }) { }
@@ -1177,15 +1177,14 @@
          streamed_mutation::forwarding fwd)
         : _pc(pc)
         , _schema(schema)
-        , _fwd(fwd)
-        , _get_data_source([this, &pr, sst = std::move(sst), &pc, &slice] () mutable {
+        , _get_data_source([this, &pr, sst = std::move(sst), &pc, &slice, fwd] () mutable {
             auto index = std::make_unique<index_reader>(sst->get_index_reader(_pc));
             auto f = index->get_disk_read_range(*_schema, pr);
-            return f.then([this, index = std::move(index), sst = std::move(sst), &pc, &slice] (sstable::disk_read_range drr) mutable {
+            return f.then([this, index = std::move(index), sst = std::move(sst), &pc, &slice, fwd] (sstable::disk_read_range drr) mutable {
                 if (!drr.found_row()) {
                     _read_enabled = false;
                 }
-                auto consumer = mp_row_consumer(_schema, slice, pc);
+                auto consumer = mp_row_consumer(_schema, slice, pc, fwd);
                 return make_lw_shared<sstable_data_source>(std::move(sst), std::move(consumer), std::move(drr), std::move(index));
             });
         }) { }
@@ -1247,9 +1246,6 @@
             }
             auto dk = dht::global_partitioner().decorate_key(*_schema, std::move(mut->key));
             auto sm = make_streamed_mutation<sstable_streamed_mutation>(_schema, std::move(dk), mut->tomb, _ds);
-            if (_fwd) {
-                sm = make_forwardable(std::move(sm)); // FIXME: optimize
-            }
             return make_ready_future<streamed_mutation_opt>(std::move(sm));
         });
     }


sstables: Make key full when setting a range tombstone start from end open marker.

Signed-off-by: Vladimir Krivopalov <dc9186a06078733915a6fcbab34e59120be2b484@scylladb.com>

--- sstables/partition.cc
+++ sstables/partition.cc
@@ -101,13 +101,18 @@
  * For other consumers, it is a no-op.
  */
 template <typename Consumer>
-void set_range_tombstone_start_from_end_open_marker(Consumer& c, const index_reader& idx) {
+void set_range_tombstone_start_from_end_open_marker(Consumer& c, const schema& s, const index_reader& idx) {
     if constexpr (Consumer::is_setting_range_tombstone_start_supported) {
         auto open_end_marker = idx.end_open_marker();
         if (open_end_marker) {
             auto[pos, tomb] = *open_end_marker;
             if (pos.is_clustering_row()) {
-                c.set_range_tombstone_start(pos.key(), bound_kind::excl_start, tomb);
+                auto ck = pos.key();
+                bool was_non_full = clustering_key::make_full(s, ck);
+                c.set_range_tombstone_start(
+                        std::move(ck),
+                        was_non_full ? bound_kind::incl_start : bound_kind::excl_start,
+                        tomb);
             } else {
                 auto view = position_in_partition_view(pos).as_start_bound_view();
                 c.set_range_tombstone_start(view.prefix(), view.kind(), tomb);
@@ -374,7 +379,7 @@
                     return make_ready_future<>();
                 }
                 return _context->skip_to(idx.element_kind(), index_position.start).then([this, &idx] {
-                    set_range_tombstone_start_from_end_open_marker(_consumer, idx);
+                    set_range_tombstone_start_from_end_open_marker(_consumer, *_schema, idx);
                 });
             });
         });


include sentinel1 in ossimPluginProjectionFactory::createProjection

--- Modules/ThirdParty/OssimPlugins/src/ossim/ossimPluginProjectionFactory.cpp
+++ Modules/ThirdParty/OssimPlugins/src/ossim/ossimPluginProjectionFactory.cpp
@@ -30,7 +30,7 @@
 #include <ossim/base/ossimNotifyContext.h>
 #include "ossimTileMapModel.h"
 #include "ossimSpot6Model.h"
-
+#include "ossimSentinel1Model.h"
 //***
 // Define Trace flags for use within this file:
 //***
@@ -62,14 +62,35 @@
    ossimRefPtr<ossimProjection> projection = 0;
    //traceDebug.setTraceFlag(true);

-   if(traceDebug())
-   {
-    	ossimNotify(ossimNotifyLevel_DEBUG)
-        	   << MODULE << " DEBUG: testing ossimRadarSat2Model" << std::endl;
-   }
-
+   // Sentinel1
    if ( !projection )
    {
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG: testing ossimSentinel1Model" << std::endl;
+      }
+
+      ossimRefPtr<ossimSentinel1Model> model = new ossimSentinel1Model();
+      if ( model->open(filename) )
+      {
+         projection = model.get();
+      }
+      else
+      {
+         model = 0;
+      }
+   }
+
+   if ( !projection )
+   {
+
+      if(traceDebug())
+      {
+         ossimNotify(ossimNotifyLevel_DEBUG)
+            << MODULE << " DEBUG: testing ossimRadarSat2Model" << std::endl;
+      }
+
       ossimRefPtr<ossimRadarSat2Model> model = new ossimRadarSat2Model();
       if ( model->open(filename) )
       {
@@ -300,6 +321,7 @@
          model = 0;
       }
    }
+

    //***
    // ADD_MODEL: (Please leave this comment for the next programmer)
@@ -382,6 +404,11 @@
    {
      return new ossimSpot6Model;
    }
+   else if (name == STATIC_TYPE_NAME(ossimSentinel1Model))
+   {
+     return new ossimSentinel1Model;
+   }
+

    //***
    // ADD_MODEL: (Please leave this comment for the next programmer)
@@ -491,6 +518,15 @@
       else if (type == "ossimSpot6Model")
       {
          result = new ossimSpot6Model();
+         if ( !result->loadState(kwl, prefix) )
+         {
+            result = 0;
+         }
+      }
+
+      else if (type == "ossimSentinel1Model")
+      {
+         result = new ossimSentinel1Model();
          if ( !result->loadState(kwl, prefix) )
          {
             result = 0;
@@ -545,6 +581,7 @@
    typeList.push_back(STATIC_TYPE_NAME(ossimFormosatModel));
    typeList.push_back(STATIC_TYPE_NAME(ossimTileMapModel));
    typeList.push_back(STATIC_TYPE_NAME(ossimPleiadesModel));
+   typeList.push_back(STATIC_TYPE_NAME(ossimSentinel1Model));
    typeList.push_back(STATIC_TYPE_NAME(ossimSpot6Model));

    //***


[test.main] fixed includes

[test.main] fixed includes

--- dune/stuff/test/main.hxx
+++ dune/stuff/test/main.hxx
@@ -3,7 +3,7 @@
 // Copyright holders: Rene Milk, Felix Schindler
 // License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)

-
+#include "config.h"

 #include <string>
 #include <vector>
@@ -28,7 +28,7 @@
 #include <dune/stuff/common/logging.hh>
 #include <dune/stuff/common/convergence-study.hh>

-#include "main_header.hh"
+#include "common.hh"

 class


INTEGRATION: CWS os2port02 (1.8.106); FILE MERGED 2007/10/04 19:44:53 ydario 1.8.106.1: Issue number: i82034 Submitted by: ydario Reviewed by:  ydario Commit of changes for OS/2 CWS source code integration.

--- svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: overlaymanagerbuffered.cxx,v $
  *
- *  $Revision: 1.8 $
- *
- *  last change: $Author: obo $ $Date: 2007-07-18 10:55:05 $
+ *  $Revision: 1.9 $
+ *
+ *  last change: $Author: hr $ $Date: 2007-11-02 12:19:14 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -261,7 +261,7 @@
                 if(bDoSaveForVisualControl)
                 {
                     const Bitmap aBitmap(maBufferDevice.GetBitmap(aTopLeft, aSize));
-                    SvFileStream aNew(String(ByteString( "c:\\test.bmp" ), RTL_TEXTENCODING_UTF8), STREAM_WRITE|STREAM_TRUNC);
+                    SvFileStream aNew((const String&)String(ByteString( "c:\\test.bmp" ), RTL_TEXTENCODING_UTF8), STREAM_WRITE|STREAM_TRUNC);
                     aNew << aBitmap;
                 }
 #endif


[Core/AbstractImage] Add missing documentation

--- include/Bull/Core/Image/AbstractImage.hpp
+++ include/Bull/Core/Image/AbstractImage.hpp
@@ -37,9 +37,9 @@
          */
         virtual Size getSize() const = 0;

-        /*! \brief
+        /*! \brief Pixels of the AbstractImage
          *
-         * \return
+         * \return Pixels
          *
          */
         virtual ByteArray getPixels() const = 0;


Network/AbstractSocket: Fix comment

Network/AbstractSocket: Fix comment

Former-commit-id: f74b61def45195a8e5b82f499fbbc05ce0cc492c

--- include/Nazara/Network/AbstractSocket.hpp
+++ include/Nazara/Network/AbstractSocket.hpp
@@ -35,7 +35,7 @@

 			unsigned int QueryAvailableBytes() const;

-			// Slots
+			// Signals:
 			NazaraSignal(OnStateChange, const AbstractSocket* /*socket*/, SocketState /*newState*/);

 		protected:


style(discrete_domains): use m_ for class fields

--- include/crab/domains/discrete_domains.hpp
+++ include/crab/domains/discrete_domains.hpp
@@ -41,7 +41,6 @@
 #pragma once

 #include <crab/domains/patricia_trees.hpp>
-#include <crab/domains/separate_domains.hpp>
 #include <crab/support/debug.hpp>

 #include <boost/range.hpp>
@@ -58,87 +57,89 @@
   using iterator = typename ptset_t::iterator;

 private:
-  bool _is_top;
-  ptset_t _set;
+  bool m_is_top;
+  ptset_t m_set;

 private:
-  discrete_domain(bool is_top) : _is_top(is_top) {}
-
-  discrete_domain(ptset_t set) : _is_top(false), _set(set) {}
+  discrete_domain(bool is_top) : m_is_top(is_top) {}
+  discrete_domain(ptset_t set) : m_is_top(false), m_set(set) {}

 public:
   static discrete_domain_t bottom() { return discrete_domain_t(false); }
-
   static discrete_domain_t top() { return discrete_domain_t(true); }

 public:
-  discrete_domain() : _is_top(true) {}
-
-  discrete_domain(const discrete_domain_t &other)
-      : _is_top(other._is_top), _set(other._set) {}
-
-  discrete_domain(Element s) : _is_top(false), _set(s) {}
+  discrete_domain() : m_is_top(true) {}
+
+  discrete_domain(const discrete_domain_t &other) = default;
+  discrete_domain(discrete_domain_t &&other) = default;
+  discrete_domain_t &operator=(const discrete_domain_t &other) = default;
+  discrete_domain_t &operator=(discrete_domain_t &&other) = default;
+
+  discrete_domain(Element s) : m_is_top(false), m_set(s) {}

   template <typename Iterator>
-  discrete_domain(Iterator eIt, Iterator eEt) : _is_top(false) {
+  discrete_domain(Iterator eIt, Iterator eEt) : m_is_top(false) {
     for (auto e : boost::make_iterator_range(eIt, eEt)) {
-      this->_set += e;
-    }
-  }
-
-  bool is_top() const { return this->_is_top; }
-
-  bool is_bottom() const { return (!this->_is_top && this->_set.empty()); }
+      m_set += e;
+    }
+  }
+
+  bool is_top() const { return m_is_top; }
+
+  bool is_bottom() const { return (!m_is_top && m_set.empty()); }

   bool operator<=(const discrete_domain_t &other) const {
-    return other._is_top || (!this->_is_top && this->_set <= other._set);
+    return other.m_is_top || (!m_is_top && m_set <= other.m_set);
   }

   bool operator==(const discrete_domain_t &other) const {
-    return (this->_is_top && other._is_top) || (this->_set == other._set);
+    return (m_is_top && other.m_is_top) || (m_set == other.m_set);
   }

   void operator|=(const discrete_domain_t &other) { *this = *this | other; }

   discrete_domain_t operator|(const discrete_domain_t &other) const {
-    if (this->_is_top || other._is_top) {
+    if (m_is_top || other.m_is_top) {
       return discrete_domain_t(true);
     } else {
-      return discrete_domain_t(this->_set | other._set);
+      return discrete_domain_t(m_set | other.m_set);
     }
   }

   discrete_domain_t operator&(const discrete_domain_t &other) const {
-    if (this->is_bottom() || other.is_bottom()) {
+    if (is_bottom() || other.is_bottom()) {
       return discrete_domain_t(false);
-    } else if (this->_is_top) {
+    } else if (m_is_top) {
       return other;
-    } else if (other._is_top) {
+    } else if (other.m_is_top) {
       return *this;
     } else {
-      return discrete_domain_t(this->_set & other._set);
+      return discrete_domain_t(m_set & other.m_set);
     }
   }

   discrete_domain_t operator||(const discrete_domain_t &other) const {
-    return this->operator|(other);
+    return operator|(other);
   }

   discrete_domain_t operator&&(const discrete_domain_t &other) const {
-    return this->operator&(other);
+    return operator&(other);
   }

   discrete_domain_t &operator+=(Element s) {
-    if (!this->_is_top) {
-      this->_set += s;
+    if (!m_is_top) {
+      m_set += s;
     }
     return *this;
   }

   template <typename Range> discrete_domain_t &operator+=(Range es) {
-    if (!this->_is_top)
-      for (auto e : es)
-        this->_set += e;
+    if (!m_is_top) {
+      for (auto e : es) {
+        m_set += e;
+      }
+    }
     return *this;
   }

@@ -155,16 +156,18 @@
   }

   discrete_domain_t &operator-=(Element s) {
-    if (!this->_is_top) {
-      this->_set -= s;
+    if (!m_is_top) {
+      m_set -= s;
     }
     return *this;
   }

   template <typename Range> discrete_domain_t &operator-=(Range es) {
-    if (!this->_is_top)
-      for (auto e : es)
-        this->_set -= e;
+    if (!m_is_top) {
+      for (auto e : es) {
+        m_set -= e;
+      }
+    }
     return *this;
   }

@@ -181,36 +184,39 @@
   }

   std::size_t size() const {
-    if (this->_is_top) {
+    if (m_is_top) {
+      assert(false);
       CRAB_ERROR("Size for discrete domain TOP is undefined");
     } else {
-      return this->_set.size();
+      return m_set.size();
     }
   }

   iterator begin() const {
-    if (this->_is_top) {
+    if (m_is_top) {
+      assert(false);
       CRAB_ERROR("Iterator for discrete domain TOP is undefined");
     } else {
-      return this->_set.begin();
+      return m_set.begin();
     }
   }

   iterator end() const {
-    if (this->_is_top) {
+    if (m_is_top) {
+      assert(false);
       CRAB_ERROR("Iterator for discrete domain TOP is undefined");
     } else {
-      return this->_set.end();
+      return m_set.end();
     }
   }

   void write(crab::crab_os &o) const {
-    if (this->_is_top) {
+    if (m_is_top) {
       o << "{...}";
-    } else if (this->_set.empty()) {
-      o << "_|_";
-    } else {
-      o << this->_set;
+    } else if (m_set.empty()) {
+      o << "{}";
+    } else {
+      o << m_set;
     }
   }


Made the minimum changes to make the texture extraction work with the affine renderer

- Taking a 3x4 affine matrix and adding an orthogonal row to make it 4x4
- Removed all transformations from clip to screen space as our camera matrix now goes directly from world to screen space
- Removed division by w (it's 1 anyway)

--- include/eos/render/texture_extraction.hpp
+++ include/eos/render/texture_extraction.hpp
@@ -49,7 +49,7 @@
 // Returns true if inside the tri or on the border
 inline bool is_point_in_triangle(cv::Point2f point, cv::Point2f triV0, cv::Point2f triV1, cv::Point2f triV2) {
 	/* See http://www.blackpawn.com/texts/pointinpoly/ */
-	// Compute vectors
+	// Compute vectors
 	cv::Point2f v0 = triV2 - triV0;
 	cv::Point2f v1 = triV1 - triV0;
 	cv::Point2f v2 = point - triV0;
@@ -116,6 +116,8 @@
 	using std::floor;
 	using std::ceil;

+	mvp_matrix = detail::calculate_affine_z_direction(mvp_matrix);
+
 	// optional param  cv::Mat texture_map = Mat(512, 512, CV_8UC3) ?
 	// cv::Mat texture_map(512, 512, inputImage.type());
 	Mat texture_map = Mat::zeros(512, 512, CV_8UC3); // We don't want an alpha channel. We might want to handle grayscale input images though.
@@ -144,19 +146,7 @@
 		// clipping against the frustums etc.
 		// But as long as our model is fully on the screen, we're fine.

-		// divide by w
-		// if ortho, we can do the divide as well, it will just be a / 1.0f.
-		v0 = v0 / v0[3];
-		v1 = v1 / v1[3];
-		v2 = v2 / v2[3];
-
 		// Todo: This is all very similar to processProspectiveTri(...), except the other function does texturing stuff as well. Remove code duplication!
-		Vec2f v0_clip = clip_to_screen_space(Vec2f(v0[0], v0[1]), viewport_width, viewport_height);
-		Vec2f v1_clip = clip_to_screen_space(Vec2f(v1[0], v1[1]), viewport_width, viewport_height);
-		Vec2f v2_clip = clip_to_screen_space(Vec2f(v2[0], v2[1]), viewport_width, viewport_height);
-		v0[0] = v0_clip[0]; v0[1] = v0_clip[1];
-		v1[0] = v1_clip[0]; v1[1] = v1_clip[1];
-		v2[0] = v2_clip[0]; v2[1] = v2_clip[1];

 		//if (doBackfaceCulling) {
 		if (!are_vertices_cc_in_screen_space(v0, v1, v2))
@@ -213,23 +203,18 @@

 		cv::Point2f src_tri[3];
 		cv::Point2f dst_tri[3];
+
 		cv::Vec4f vec(mesh.vertices[triangle_indices[0]][0], mesh.vertices[triangle_indices[0]][1], mesh.vertices[triangle_indices[0]][2], 1.0f);
 		cv::Vec4f res = Mat(mvp_matrix * Mat(vec));
-		res /= res[3];
-		Vec2f screen_space = clip_to_screen_space(Vec2f(res[0], res[1]), viewport_width, viewport_height);
-		src_tri[0] = screen_space;
+		src_tri[0] = Vec2f(res[0], res[1]);

 		vec = cv::Vec4f(mesh.vertices[triangle_indices[1]][0], mesh.vertices[triangle_indices[1]][1], mesh.vertices[triangle_indices[1]][2], 1.0f);
 		res = Mat(mvp_matrix * Mat(vec));
-		res /= res[3];
-		screen_space = clip_to_screen_space(Vec2f(res[0], res[1]), viewport_width, viewport_height);
-		src_tri[1] = screen_space;
+		src_tri[1] = Vec2f(res[0], res[1]);

 		vec = cv::Vec4f(mesh.vertices[triangle_indices[2]][0], mesh.vertices[triangle_indices[2]][1], mesh.vertices[triangle_indices[2]][2], 1.0f);
 		res = Mat(mvp_matrix * Mat(vec));
-		res /= res[3];
-		screen_space = clip_to_screen_space(Vec2f(res[0], res[1]), viewport_width, viewport_height);
-		src_tri[2] = screen_space;
+		src_tri[2] = Vec2f(res[0], res[1]);

 		dst_tri[0] = cv::Point2f(texture_map.cols*mesh.texcoords[triangle_indices[0]][0], texture_map.rows*mesh.texcoords[triangle_indices[0]][1] - 1.0f);
 		dst_tri[1] = cv::Point2f(texture_map.cols*mesh.texcoords[triangle_indices[1]][0], texture_map.rows*mesh.texcoords[triangle_indices[1]][1] - 1.0f);


batchlog: Use token_metadata from proxy

batchlog: Use token_metadata from proxy

This kills the second global reference on storage_service from
batchlog code and breaks the dependency loop between these two.

Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@scylladb.com>

--- db/batchlog_manager.cc
+++ db/batchlog_manager.cc
@@ -48,7 +48,6 @@

 #include "batchlog_manager.hh"
 #include "canonical_mutation.hh"
-#include "service/storage_service.hh"
 #include "service/storage_proxy.hh"
 #include "system_keyspace.hh"
 #include "utils/rate_limiter.hh"
@@ -58,12 +57,12 @@
 #include "database.hh"
 #include "unimplemented.hh"
 #include "gms/failure_detector.hh"
-#include "service/storage_service.hh"
 #include "schema_registry.hh"
 #include "idl/uuid.dist.hh"
 #include "idl/frozen_schema.dist.hh"
 #include "serializer_impl.hh"
 #include "serialization_visitors.hh"
+#include "db/schema_tables.hh"
 #include "idl/uuid.dist.impl.hh"
 #include "idl/frozen_schema.dist.impl.hh"
 #include "message/messaging_service.hh"
@@ -183,7 +182,7 @@

     // rate limit is in bytes per second. Uses Double.MAX_VALUE if disabled (set to 0 in cassandra.yaml).
     // max rate is scaled by the number of nodes in the cluster (same as for HHOM - see CASSANDRA-5272).
-    auto throttle = _replay_rate / service::get_storage_service().local().get_token_metadata().get_all_endpoints_count();
+    auto throttle = _replay_rate / _qp.proxy().get_token_metadata().get_all_endpoints_count();
     auto limiter = make_lw_shared<utils::rate_limiter>(throttle);

     auto batch = [this, limiter](const cql3::untyped_result_set::row& row) {


updated ad3 to support new visitors

updated ad3 to support new visitors

--- include/opengm/inference/external/ad3.hxx
+++ include/opengm/inference/external/ad3.hxx
@@ -4,7 +4,7 @@

 #include "opengm/graphicalmodel/graphicalmodel.hxx"
 #include "opengm/inference/inference.hxx"
-#include "opengm/inference/visitors/visitor.hxx"
+#include "opengm/inference/new_visitors/new_visitors.hxx"

 #include "ad3/FactorGraph.h"
@@ -22,9 +22,9 @@
          typedef GM GraphicalModelType;
          typedef ACC AccumulationType;
          OPENGM_GM_TYPE_TYPEDEFS;
-         typedef VerboseVisitor<AD3Inf<GM,ACC> > VerboseVisitorType;
-         typedef TimingVisitor<AD3Inf<GM,ACC> > TimingVisitorType;
-         typedef EmptyVisitor<AD3Inf<GM,ACC> > EmptyVisitorType;
+         typedef visitors::VerboseVisitor<AD3Inf<GM,ACC> > VerboseVisitorType;
+         typedef visitors::EmptyVisitor<AD3Inf<GM,ACC> >   EmptyVisitorType;
+         typedef visitors::TimingVisitor<AD3Inf<GM,ACC> >  TimingVisitorType;

          enum SolverType{
             AD3_LP,


Validate parameters when adding plugins

Validate parameters when adding plugins

(cherry picked from commit 1a9e3edd30f6db4cb3fc7e079b64a2eb137bf865)

--- editor/editor_plugin.cpp
+++ editor/editor_plugin.cpp
@@ -699,44 +699,54 @@
 void EditorPlugin::save_global_state() {}

 void EditorPlugin::add_import_plugin(const Ref<EditorImportPlugin> &p_importer) {
+	ERR_FAIL_COND(!p_importer.is_valid());
 	ResourceFormatImporter::get_singleton()->add_importer(p_importer);
 	EditorFileSystem::get_singleton()->call_deferred("scan");
 }

 void EditorPlugin::remove_import_plugin(const Ref<EditorImportPlugin> &p_importer) {
+	ERR_FAIL_COND(!p_importer.is_valid());
 	ResourceFormatImporter::get_singleton()->remove_importer(p_importer);
 	EditorFileSystem::get_singleton()->call_deferred("scan");
 }

 void EditorPlugin::add_export_plugin(const Ref<EditorExportPlugin> &p_exporter) {
+	ERR_FAIL_COND(!p_exporter.is_valid());
 	EditorExport::get_singleton()->add_export_plugin(p_exporter);
 }

 void EditorPlugin::remove_export_plugin(const Ref<EditorExportPlugin> &p_exporter) {
+	ERR_FAIL_COND(!p_exporter.is_valid());
 	EditorExport::get_singleton()->remove_export_plugin(p_exporter);
 }

 void EditorPlugin::add_spatial_gizmo_plugin(const Ref<EditorSpatialGizmoPlugin> &p_gizmo_plugin) {
+	ERR_FAIL_COND(!p_gizmo_plugin.is_valid());
 	SpatialEditor::get_singleton()->add_gizmo_plugin(p_gizmo_plugin);
 }

 void EditorPlugin::remove_spatial_gizmo_plugin(const Ref<EditorSpatialGizmoPlugin> &p_gizmo_plugin) {
+	ERR_FAIL_COND(!p_gizmo_plugin.is_valid());
 	SpatialEditor::get_singleton()->remove_gizmo_plugin(p_gizmo_plugin);
 }

 void EditorPlugin::add_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin) {
+	ERR_FAIL_COND(!p_plugin.is_valid());
 	EditorInspector::add_inspector_plugin(p_plugin);
 }

 void EditorPlugin::remove_inspector_plugin(const Ref<EditorInspectorPlugin> &p_plugin) {
+	ERR_FAIL_COND(!p_plugin.is_valid());
 	EditorInspector::remove_inspector_plugin(p_plugin);
 }

 void EditorPlugin::add_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer) {
+	ERR_FAIL_COND(!p_importer.is_valid());
 	ResourceImporterScene::get_singleton()->add_importer(p_importer);
 }

 void EditorPlugin::remove_scene_import_plugin(const Ref<EditorSceneImporter> &p_importer) {
+	ERR_FAIL_COND(!p_importer.is_valid());
 	ResourceImporterScene::get_singleton()->remove_importer(p_importer);
 }


Mind background color in pathtracer

Mind background color in pathtracer

--- include/visionaray/detail/pathtracing.inl
+++ include/visionaray/detail/pathtracing.inl
@@ -44,7 +44,7 @@
         auto exited         = !hit_rec.hit;
         auto active_rays    =  hit_rec.hit;

-        C result(1.0, 1.0, 1.0, 1.0);
+        C result = select( exited, C(params.bg_color), C(1.0) );

         for (unsigned d = 0; d < MaxDepth; ++d)
         {


Use 64-bit indices when limits are 64 bit

--- include/visionaray/math/detail/matrix.inl
+++ include/visionaray/math/detail/matrix.inl
@@ -58,9 +58,9 @@

     matrix<N, M, T> result;

-    for (int i = 0; i < N; ++i)
+    for (size_t i = 0; i < N; ++i)
     {
-        for (int j = 0; j < M; ++j)
+        for (size_t j = 0; j < M; ++j)
         {
             result(i, j) = i == j ? T(1.0) : T(0.0);
         }


INTEGRATION: CWS pchfix02 (1.16.34); FILE MERGED 2006/09/01 17:59:33 kaib 1.16.34.1: #i68856# Added header markers and pch files

--- xmloff/source/draw/animimp.cxx
+++ xmloff/source/draw/animimp.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: animimp.cxx,v $
  *
- *  $Revision: 1.16 $
- *
- *  last change: $Author: hr $ $Date: 2006-06-19 18:09:48 $
+ *  $Revision: 1.17 $
+ *
+ *  last change: $Author: obo $ $Date: 2006-09-17 10:27:00 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -32,6 +32,9 @@
  *    MA  02111-1307  USA
  *
  ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_xmloff.hxx"

 #include <tools/debug.hxx>


#80598#; catch the exception, this is only a hack. The original bug is #80606# .

--- xmloff/source/text/txtfldi.cxx
+++ xmloff/source/text/txtfldi.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: txtfldi.cxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.10 $
  *
- *  last change: $Author: dvo $ $Date: 2000-11-14 13:43:09 $
+ *  last change: $Author: sab $ $Date: 2000-11-22 13:42:43 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -447,8 +447,16 @@

             // attach field to document
             Reference<XTextContent> xTextContent(xPropSet, UNO_QUERY);
-            rTextImportHelper.InsertTextContent(xTextContent);
-
+
+            // workaround for #80606#
+            try
+            {
+                rTextImportHelper.InsertTextContent(xTextContent);
+            }
+            catch (lang::IllegalArgumentException e)
+            {
+                // ignore
+            }
             return;
         }
     }


better error messages for failures in downloading

--- installation/net_installer/win32/main.cpp
+++ installation/net_installer/win32/main.cpp
@@ -144,7 +144,7 @@
 	if (hr != S_OK)
 	{
 		std::string error = Win32Utils::QuickFormatMessage(GetLastError());
-		error = string("Could not download file: ") + error;
+		error = string("Could not decode URL: ") + error;
 		ShowError(error);
 		return false;
 	}
@@ -155,7 +155,7 @@
 	if (hr != S_OK)
 	{
 		std::string error = Win32Utils::QuickFormatMessage(GetLastError());
-		error = string("Could not download file: ") + error;
+		error = string("Could not parse domain: ") + error;
 		ShowError(error);
 		return false;
 	}
@@ -166,7 +166,7 @@
 	if (!hConnection)
 	{
 		std::string error = Win32Utils::QuickFormatMessage(GetLastError());
-		error = string("Could not download file: ") + error;
+		error = string("Could not start connection: ") + error;
 		ShowError(error);
 		return false;
 	}
@@ -187,7 +187,7 @@
 		InternetCloseHandle(hConnection);

 		std::string error = Win32Utils::QuickFormatMessage(GetLastError());
-		error = string("Could not download file: ") + error;
+		error = string("Could not open request: ") + error;
 		ShowError(error);

 		return false;
@@ -215,7 +215,13 @@
 	if (!success || statusCode != 200)
 	{
 		std::string error = Win32Utils::QuickFormatMessage(GetLastError());
-		error = string("Could not download file: ") + error;
+		if (success)
+		{
+			std::ostringstream str;
+			str << "Invalid HTTP Status Code (" << statusCode << ")";
+			error = str.str();
+		}
+		error = string("Could not query info: ") + error;
 		ShowError(error);
 		return false;
 	}


fix enum type with strict mode

fix enum type with strict mode

--- storage/src/stream.cc
+++ storage/src/stream.cc
@@ -924,8 +924,8 @@
             << "INSERT INTO " << (db_v2 ? "data_bin" : "log_data_bin")
             << "  (" << (db_v2 ? "id_metric" : "metric_id")
             << "   , ctime, status, value)"
-               "  VALUES (" << mv.metric_id << ", " << mv.c_time << ", "
-            << mv.status << ", '";
+               "  VALUES (" << mv.metric_id << ", " << mv.c_time << ", '"
+            << mv.status << "', '";
       if (std::isinf(mv.value))
         query << ((mv.value < 0.0) ? -FLT_MAX : FLT_MAX);
       else if (std::isnan(mv.value))
@@ -939,8 +939,8 @@
     // Insert perfdata in data_bin.
     while (!_perfdata_queue.empty()) {
       metric_value& mv(_perfdata_queue.front());
-      query << ", (" << mv.metric_id << ", " << mv.c_time << ", "
-            << mv.status << ", ";
+      query << ", (" << mv.metric_id << ", " << mv.c_time << ", '"
+            << mv.status << "', ";
       if (std::isinf(mv.value))
         query << ((mv.value < 0.0) ? -FLT_MAX : FLT_MAX);
       else if (std::isnan(mv.value))


INTEGRATION: CWS canvas05 (1.7.38); FILE MERGED 2008/04/21 07:50:36 thb 1.7.38.2: RESYNC: (1.7-1.8); FILE MERGED 2007/10/01 13:41:45 thb 1.7.38.1: #i79258# Merge from CWS picom

--- cppcanvas/source/wrapper/basegfxfactory.cxx
+++ cppcanvas/source/wrapper/basegfxfactory.cxx
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: basegfxfactory.cxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -30,19 +30,22 @@

 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_cppcanvas.hxx"
+
 #include <rtl/instance.hxx>
 #include <osl/getglobalmutex.hxx>
 #include <osl/diagnose.h>
+
 #include <com/sun/star/rendering/InterpolationMode.hpp>
+
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <basegfx/polygon/b2dpolypolygon.hxx>
 #include <basegfx/tools/canvastools.hxx>

 #include <cppcanvas/basegfxfactory.hxx>

-#include <implpolypolygon.hxx>
-#include <implbitmap.hxx>
-#include <impltext.hxx>
+#include "implpolypolygon.hxx"
+#include "implbitmap.hxx"
+#include "impltext.hxx"

 using namespace ::com::sun::star;


removes incorrect copyright notice from file's origins

--- tests/sha1_t.cpp
+++ tests/sha1_t.cpp
@@ -1,13 +1,3 @@
-/* testsha1.cpp
-
-Copyright (c) 2005 Michael D. Leonhard
-
-http://tamale.net/
-
-This file is licensed under the terms described in the
-accompanying LICENSE file.
-*/
-
 #include <cstdio>
 #include <cstdlib>
 #include <cassert>


camera: get mode before set mode not needed

With a recent E90 update, this is not needed anymore.

--- integration_tests/camera_test_helpers.cpp
+++ integration_tests/camera_test_helpers.cpp
@@ -38,14 +38,8 @@

 void set_mode(std::shared_ptr<Camera> camera, Camera::Mode mode)
 {
-    Camera::Mode mode_already_set = get_mode(camera);
-
-    // FIXME: this should not be required.
-    std::this_thread::sleep_for(std::chrono::seconds(2));
-
-    if (mode == mode_already_set) {
-        return;
-    }
+    //// FIXME: this should not be required.
+    std::this_thread::sleep_for(std::chrono::seconds(1));

     auto prom = std::make_shared<std::promise<void>>();
     auto ret = prom->get_future();


cell-address added

cell-address added

--- xmloff/inc/xmlkywd.hxx
+++ xmloff/inc/xmlkywd.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: xmlkywd.hxx,v $
  *
- *  $Revision: 1.91 $
- *
- *  last change: $Author: mtg $ $Date: 2001-01-24 11:46:41 $
+ *  $Revision: 1.92 $
+ *
+ *  last change: $Author: sab $ $Date: 2001-01-24 15:12:24 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -309,6 +309,7 @@
 XML_CONSTASCII_ACTION( sXML_categories, "categories" );
 XML_CONSTASCII_ACTION( sXML_category, "category" );
 XML_CONSTASCII_ACTION( sXML_category_and_value, "category-and-value" );
+XML_CONSTASCII_ACTION( sXML_cell_address, "cell-address");
 XML_CONSTASCII_ACTION( sXML_cell_content_change, "cell-content-change");
 XML_CONSTASCII_ACTION( sXML_cell_content_deletion, "cell-content-deletion");
 XML_CONSTASCII_ACTION( sXML_cell_count, "cell-count");


Fix an embarrassing copy/paste bug that makes reference resolution crash

--- OOModel/src/elements/OOReference.cpp
+++ OOModel/src/elements/OOReference.cpp
@@ -183,7 +183,7 @@
 		while (it != candidates.end())
 		{
 			if ( DCast<VariableDeclaration>(*it) || DCast<FormalArgument>(*it) || DCast<FormalArgument>(*it))
-				++it = candidates.erase(it);
+				++it;
 			else it = candidates.erase(it);
 		}
 	}


Added missing include.

Added missing include.

--HG--
branch : v1-8

--- OgreMain/src/OgreInstanceManager.cpp
+++ OgreMain/src/OgreInstanceManager.cpp
@@ -37,6 +37,7 @@
 #include "OgreMaterialManager.h"
 #include "OgreSceneManager.h"
 #include "OgreMeshSerializer.h"
+#include "OgreHardwareBufferManager.h"

 namespace Ogre
 {


use a typedef

use a typedef

--- connectivity/source/drivers/adabas/BTable.cxx
+++ connectivity/source/drivers/adabas/BTable.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: BTable.cxx,v $
  *
- *  $Revision: 1.6 $
- *
- *  last change: $Author: oj $ $Date: 2000-10-30 10:57:54 $
+ *  $Revision: 1.7 $
+ *
+ *  last change: $Author: kz $ $Date: 2000-10-31 16:31:17 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -106,6 +106,8 @@
 using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
+
+typedef connectivity::sdbcx::OTableDescriptor_BASE __OAdabas_BASE99;

 // -------------------------------------------------------------------------
 OAdabasTable::OAdabasTable( OAdabasConnection* _pConnection,
@@ -388,7 +390,7 @@
 void SAL_CALL OAdabasTable::rename( const ::rtl::OUString& newName ) throw(SQLException, ElementExistException, RuntimeException)
 {
     ::osl::MutexGuard aGuard(m_aMutex);
-    if ( sdbcx::OTableDescriptor_BASE::rBHelper.bDisposed)
+    if ( __OAdabas_BASE99::rBHelper.bDisposed)
                 throw DisposedException();

     if(!isNew())
@@ -417,7 +419,7 @@
 void SAL_CALL OAdabasTable::alterColumnByName( const ::rtl::OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
 {
     ::osl::MutexGuard aGuard(m_aMutex);
-    if ( sdbcx::OTableDescriptor_BASE::rBHelper.bDisposed)
+    if ( __OAdabas_BASE99::rBHelper.bDisposed)
                 throw DisposedException();

     if(!isNew())
@@ -481,7 +483,7 @@
 void SAL_CALL OAdabasTable::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException)
 {
     ::osl::MutexGuard aGuard(m_aMutex);
-    if ( sdbcx::OTableDescriptor_BASE::rBHelper.bDisposed)
+    if ( __OAdabas_BASE99::rBHelper.bDisposed)
                 throw DisposedException();

         Reference< XPropertySet > xOld;


remove unnecessary calls to compositingActive, redundant with hasAlphaChannel

svn path=/trunk/playground/artwork/oxygen-transparent/; revision=1154531

--- style/oxygenstyle.cpp
+++ style/oxygenstyle.cpp
@@ -701,7 +701,7 @@

         }

-        if( hasAlpha && _helper.compositingActive() && hasTranslucentBackground() )
+        if( hasAlpha && hasTranslucentBackground() )
         {

             QColor backgroundColor( color );
@@ -2152,7 +2152,7 @@
             else r.adjust( 1, 0, -1, 0 );
         }

-        switch (primitive)
+        switch( primitive )
         {
             case ScrollBar::DoubleButtonHor:

@@ -7528,7 +7528,7 @@
                 }

                 // background
-                if( hasAlpha && _helper.compositingActive() && hasTranslucentBackground() )
+                if( hasAlpha && hasTranslucentBackground() )
                 {

                     QColor backgroundColor( color );
@@ -7620,7 +7620,7 @@
                 }

                 // background
-                if( hasAlpha && _helper.compositingActive() && hasTranslucentBackground() )
+                if( hasAlpha && hasTranslucentBackground() )
                 {

                     QColor backgroundColor( color );
@@ -7814,7 +7814,7 @@
                     }
                     #endif

-                    if( hasAlpha && _helper.compositingActive() && hasTranslucentBackground() )
+                    if( hasAlpha && hasTranslucentBackground() )
                     {

                         QColor backgroundColor( color );


As suggested by Chris, use MatchRHSPunctuation instead of manually looking for a right parenthesis when parsing @encode() and @protocol().

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@41321 91177308-0d34-0410-b5e6-96231b3b80d8

--- Parse/ParseObjc.cpp
+++ Parse/ParseObjc.cpp
@@ -677,13 +677,10 @@

   TypeTy *Ty = ParseTypeName();

-  if (Tok.getKind() != tok::r_paren) {
-    Diag(Tok, diag::err_expected_rparen);
-    return true;
-  }
+  SourceLocation RParenLoc = MatchRHSPunctuation(tok::r_paren, LParenLoc);

   return Actions.ParseObjCEncodeExpression(EncLoc, LParenLoc, Ty,
-                                           ConsumeParen());
+                                           RParenLoc);
 }

 ///     objc-protocol-expression
@@ -708,12 +705,7 @@
   // FIXME: Do something with the protocol name
   ConsumeToken();

-  if (Tok.getKind() != tok::r_paren) {
-    Diag(Tok, diag::err_expected_rparen);
-    return true;
-  }
-
-  ConsumeParen();
+  SourceLocation RParenLoc = MatchRHSPunctuation(tok::r_paren, LParenLoc);

   // FIXME
   return 0;


Revised creature animation frame times and properties.

12 fps seems decent for most animations. I set the look fps to 8 since that looks better. These will probably be variables in the future since they might affect gameplay balance.

--- OpenTESArena/src/World/LevelData.cpp
+++ OpenTESArena/src/World/LevelData.cpp
@@ -38,12 +38,16 @@
 	// with a creature .CFA file.
 	constexpr int FIRST_FLIPPED_ANIM_ID = 6;

+	// Animation values for static .DFA files.
+	constexpr double STATIC_ANIM_IDLE_SECONDS_PER_FRAME = 1.0 / 12.0;
+	const bool STATIC_ANIM_IDLE_LOOP = true;
+
 	// Animation values for creatures with .CFA files.
-	constexpr double CREATURE_ANIM_IDLE_SECONDS_PER_FRAME = 1.0 / 4.0;
-	constexpr double CREATURE_ANIM_LOOK_SECONDS_PER_FRAME = 1.0 / 4.0;
-	constexpr double CREATURE_ANIM_WALK_SECONDS_PER_FRAME = 1.0 / 8.0;
-	constexpr double CREATURE_ANIM_ATTACK_SECONDS_PER_FRAME = 1.0 / 8.0;
-	constexpr double CREATURE_ANIM_DEATH_SECONDS_PER_FRAME = 1.0 / 4.0;
+	constexpr double CREATURE_ANIM_IDLE_SECONDS_PER_FRAME = 1.0 / 12.0;
+	constexpr double CREATURE_ANIM_LOOK_SECONDS_PER_FRAME = 1.0 / 8.0;
+	constexpr double CREATURE_ANIM_WALK_SECONDS_PER_FRAME = 1.0 / 12.0;
+	constexpr double CREATURE_ANIM_ATTACK_SECONDS_PER_FRAME = 1.0 / 12.0;
+	constexpr double CREATURE_ANIM_DEATH_SECONDS_PER_FRAME = 1.0 / 12.0;
 	constexpr int CREATURE_ANIM_ATTACK_FRAME_INDEX = 10;
 	const bool CREATURE_ANIM_IDLE_LOOP = true;
 	const bool CREATURE_ANIM_LOOK_LOOP = false;
@@ -60,11 +64,11 @@
 	constexpr double HUMAN_ANIM_WALK_SECONDS_PER_FRAME = CREATURE_ANIM_WALK_SECONDS_PER_FRAME;
 	constexpr double HUMAN_ANIM_ATTACK_SECONDS_PER_FRAME = CREATURE_ANIM_ATTACK_SECONDS_PER_FRAME;
 	constexpr double HUMAN_ANIM_DEATH_SECONDS_PER_FRAME = CREATURE_ANIM_DEATH_SECONDS_PER_FRAME;
-	const bool HUMAN_ANIM_IDLE_LOOP = true;
-	const bool HUMAN_ANIM_WALK_LOOP = true;
-	const bool HUMAN_ANIM_ATTACK_LOOP = false;
-	const bool HUMAN_ANIM_DEATH_LOOP = false;
-	const std::vector<int> HumanAnimIndicesIdle = { 0 };
+	const bool HUMAN_ANIM_IDLE_LOOP = CREATURE_ANIM_IDLE_LOOP;
+	const bool HUMAN_ANIM_WALK_LOOP = CREATURE_ANIM_WALK_LOOP;
+	const bool HUMAN_ANIM_ATTACK_LOOP = CREATURE_ANIM_ATTACK_LOOP;
+	const bool HUMAN_ANIM_DEATH_LOOP = CREATURE_ANIM_DEATH_LOOP;
+	const std::vector<int> HumanAnimIndicesIdle = CreatureAnimIndicesIdle;
 	const std::vector<int> HumanAnimIndicesWalk = { 0, 1, 2, 3, 4, 5 };

 	// Cache for .CFA/.DFA files referenced multiple times during entity loading.
@@ -339,7 +343,9 @@
 		};

 		EntityAnimationData::State animState = MakeAnimState(
-			EntityAnimationData::StateType::Idle, 1.0 / 12.0, true);
+			EntityAnimationData::StateType::Idle,
+			STATIC_ANIM_IDLE_SECONDS_PER_FRAME,
+			STATIC_ANIM_IDLE_LOOP);

 		// Determine how to populate the animation state with keyframes.
 		if (isDFA)
@@ -848,8 +854,8 @@

 				EntityAnimationData::State deathState = MakeAnimState(
 					EntityAnimationData::StateType::Death,
-					HUMAN_ANIM_ATTACK_SECONDS_PER_FRAME,
-					HUMAN_ANIM_ATTACK_LOOP,
+					HUMAN_ANIM_DEATH_SECONDS_PER_FRAME,
+					HUMAN_ANIM_DEATH_LOOP,
 					animIsFlipped);

 				deathState.setTextureName(std::string(animName));


implemented process_line()

implemented process_line()

--- parser.cpp
+++ parser.cpp
@@ -6,13 +6,20 @@
 #include <vector>
 using namespace std;

-char HSH = '#';
+bool start;
+
+char HSH = '#';
+char SPACE = ' ';
 string LEN = "len:";
 int SEG_LEN;
 string ITER = "iter:";
+int ITERATIONS;
 string ROT = "rot:";
+vector<float> ROTATIONS;
 string REP = "rep:";
 string START = "start:";
+//"initial turtle string"
+string INIT_STR;
 // +(theta) turn left by angle theta
 char PLS = '+';
 // -(theta) turn right by angle theta
@@ -28,69 +35,73 @@
 // | is equivalent to +(180) -(180)
 char VER = '|';

-//couldn't get atoi or stoi to work for me
-int ctoi (char c) {
-    int i;
-    if (c == '1'){
-        i = 1;
-    } else if (c == '2') {
-        i = 2;
-    } else if (c == '3') {
-        i = 3;
-    } else if (c == '4') {
-        i = 4;
-    } else if (c == '5') {
-        i = 5;
-    } else if (c == '6') {
-        i = 6;
-    } else if (c == '7') {
-        i = 7;
-    } else if (c == '8') {
-        i = 8;
-    } else if (c == '9') {
-        i = 9;
-    } else {
-        i = -1; //not an int
-    }
-    return i;
-}
-
 void process_line ( string l ) {
+    if (start) {
+        execute(l);
+    }
+
     string t; //temp
     int d_pos;
     int d_len;
-    int l_length = l.length();
+    int l_length = l.length( );
     cout << "l_length = " << l_length << endl;
     string l_sub4 = l.substr(0, 4);
     cout << "l_sub4 = " << l_sub4 << endl;
     if (l[0] == HSH) {
         cout << "comment" << endl;
         return; //ignore comment
-    } else if (l_sub4.compare (LEN) == 0) {
+    } else if (l_sub4.compare(LEN) == 0) {
         cout << "length" << endl;
         d_pos = 5;
         d_len = l_length - d_pos;
-        cout << "d_len = " << d_len << endl;
-        if (d_len == 1){
-            SEG_LEN = ctoi(l[d_pos]);
-        }
-        cout << "SEG_LEN = " << SEG_LEN << endl;
+        t = l.substr(d_pos, d_len);
+        sscanf(t.c_str( ), "%d", &SEG_LEN);
+        cout << "SEG_LEN = " <<  SEG_LEN << endl;
         return;
     } else if (l.substr(0, 5).compare (ITER) == 0) {
         cout << "iter" << endl;
+        d_pos = 6;
+        d_len = l_length - d_pos;
+        t = l.substr(d_pos, d_len);
+        sscanf(t.c_str( ), "%d", &ITERATIONS);
+        cout << "ITERATIONS = " << ITERATIONS << endl;
         return;
     } else if (l_sub4.compare (ROT) == 0) {
-        cout << "rot" << endl;
+        d_pos = 5;
+        d_len = l_length - d_pos;
+        t = l.substr(d_pos, d_len);
+        int count = 0;
+        double  current;
+        string c = "";
+        for (int i = 0; i < t.length(); i++){
+            if (t[i] == SPACE) {
+                current = ::atof(c.c_str( ));
+                cout << "ROT current = " << current << endl;
+                ROTATIONS.push_back(current);
+                count = 0;
+                c = "";
+            } else {
+                c += t[count++];
+            }//if/else
+        }//for
+        //remove below and turn into while loop for opti
+        current = ::atof(c.c_str( ));
+        cout << "ROT current = " << current << endl;
+        ROTATIONS.push_back(current);
         return;
     } else if (l_sub4.compare (REP) == 0) {
         cout << "rep" << endl;
         return;
     } else if (l.substr(0, 6).compare (START) == 0 ) {
-        cout << "start" << endl;
+        d_pos = 7;
+        d_len = l_length - d_pos;
+        INIT_STR = l.substr(d_pos, d_len);
+        cout << "INIT_STR = " << INIT_STR << endl;
+        start = true;
         return;
     } else {
         //cout << l[i] << endl;
-    }
+    }//if/else
 }//process_line

 int main ( ) {
@@ -101,6 +112,7 @@
     ifstream in (filename.c_str());
     if (in.is_open ( ) ) {
         cout << "File is open" << endl;
+        start = false;
         while(in.good ( ) ) {
             getline (in, line);
             process_line (line);


Add tests of new Read.erase behaviour

Add tests of new Read.erase behaviour

--- tests/test-io.cc
+++ tests/test-io.cc
@@ -49,9 +49,37 @@
     SECTION("str() works w/ quality") {
         REQUIRE(read.str() == "@Name\nACGT\n+\nIIII\n");
     }
+
     SECTION("str() works w/o quality") {
         read.quality.clear();
         REQUIRE(read.str() == ">Name\nACGT\n");
+    }
+
+    SECTION("Erase with just start") {
+        read.erase(1);
+        REQUIRE(read.sequence == "A");
+        REQUIRE(read.quality == "I");
+        REQUIRE(read.size() == 1);
+    }
+
+    SECTION("Erase in middle with start and end") {
+        read.erase(1, 2);
+        REQUIRE(read.sequence == "AT");
+        REQUIRE(read.quality == "II");
+        REQUIRE(read.size() == 2);
+    }
+
+    SECTION("Erase from start with start and end") {
+        read.erase(0, 1);
+        REQUIRE(read.sequence == "CGT");
+        REQUIRE(read.quality == "III");
+        REQUIRE(read.size() == 3);
+    }
+    SECTION("Erase count=0") {
+        read.erase(0, 0);
+        REQUIRE(read.sequence == "ACGT");
+        REQUIRE(read.quality == "IIII");
+        REQUIRE(read.size() == 4);
     }
 }


load_configuration_options basic tests

load_configuration_options basic tests

--- tests/app/main.cpp
+++ tests/app/main.cpp
@@ -23,6 +23,7 @@
  */
 #include <graphene/app/application.hpp>
 #include <graphene/app/plugin.hpp>
+#include <graphene/app/config_util.hpp>

 #include <graphene/chain/balance_object.hpp>

@@ -35,6 +36,8 @@

 #include <fc/thread/thread.hpp>
 #include <fc/smart_ref_impl.hpp>
+#include <fc/log/appender.hpp>
+#include <fc/log/logger.hpp>

 #include <boost/filesystem/path.hpp>

@@ -44,6 +47,107 @@
 #include "../common/genesis_file_util.hpp"

 using namespace graphene;
+namespace bpo = boost::program_options;
+
+namespace fc {
+   extern std::unordered_map<std::string, logger> &get_logger_map();
+   extern std::unordered_map<std::string, appender::ptr> &get_appender_map();
+}
+
+BOOST_AUTO_TEST_CASE(load_configuration_options_test_config_files_created)
+{
+   fc::temp_directory app_dir(graphene::utilities::temp_directory_path());
+   auto dir = app_dir.path();
+   auto config_ini_file = dir / "config.ini";
+   auto logging_ini_file = dir / "logging.ini";
+
+   /// create default config options
+   auto node = new app::application();
+   bpo::options_description cli, cfg;
+   node->set_program_options(cli, cfg);
+   bpo::options_description cfg_options("Graphene Witness Node");
+   cfg_options.add(cfg);
+
+   /// check preconditions
+   BOOST_CHECK(!fc::exists(config_ini_file));
+   BOOST_CHECK(!fc::exists(logging_ini_file));
+
+   bpo::variables_map options;
+   app::load_configuration_options(dir, cfg_options, options);
+
+   /// check post-conditions
+   BOOST_CHECK(fc::exists(config_ini_file));
+   BOOST_CHECK(fc::exists(logging_ini_file));
+   BOOST_CHECK_GT(fc::file_size(config_ini_file), 0);
+   BOOST_CHECK_GT(fc::file_size(logging_ini_file), 0);
+}
+
+BOOST_AUTO_TEST_CASE(load_configuration_options_test_config_ini_options)
+{
+   fc::temp_directory app_dir(graphene::utilities::temp_directory_path());
+   auto dir = app_dir.path();
+   auto config_ini_file = dir / "config.ini";
+   auto logging_ini_file = dir / "logging.ini";
+
+   /// create config.ini
+   bpo::options_description cfg_options("config.ini options");
+   cfg_options.add_options()
+   ("option1", bpo::value<std::string>(), "")
+   ("option2", bpo::value<int>(), "")
+   ;
+   std::ofstream out(config_ini_file.preferred_string());
+   out << "option1=is present\n"
+          "option2=1\n\n";
+   out.close();
+
+   bpo::variables_map options;
+   app::load_configuration_options(dir, cfg_options, options);
+
+   /// check the options values are parsed into the output map
+   BOOST_CHECK(!options.empty());
+   BOOST_CHECK_EQUAL(options.count("option1"), 1);
+   BOOST_CHECK_EQUAL(options.count("option2"), 1);
+   BOOST_CHECK_EQUAL(options["option1"].as<std::string>(), "is present");
+   BOOST_CHECK_EQUAL(options["option2"].as<int>(), 1);
+}
+
+BOOST_AUTO_TEST_CASE(load_configuration_options_test_logging_ini_options)
+{
+   fc::temp_directory app_dir(graphene::utilities::temp_directory_path());
+   auto dir = app_dir.path();
+   auto config_ini_file = dir / "config.ini";
+   auto logging_ini_file = dir / "logging.ini";
+
+   /// create logging.ini
+   /// configure exactly one logger and appender
+   std::ofstream out(logging_ini_file.preferred_string());
+   out << "[log.file_appender.default]\n"
+          "filename=test.log\n\n"
+          "[logger.default]\n"
+          "level=info\n"
+          "appenders=default\n\n"
+          ;
+   out.close();
+
+   /// clear logger and appender state
+   fc::get_logger_map().clear();
+   fc::get_appender_map().clear();
+   BOOST_CHECK(fc::get_logger_map().empty());
+   BOOST_CHECK(fc::get_appender_map().empty());
+
+   bpo::options_description cfg_options("empty");
+   bpo::variables_map options;
+   app::load_configuration_options(dir, cfg_options, options);
+
+   /// check the options values are parsed into the output map
+   /// this is a little bit tricky since load_configuration_options() doesn't provide output variable for logging_config
+   auto logger_map = fc::get_logger_map();
+   auto appender_map = fc::get_appender_map();
+   BOOST_CHECK_EQUAL(logger_map.size(), 1);
+   BOOST_CHECK(logger_map.count("default"));
+   BOOST_CHECK_EQUAL(appender_map.size(), 1);
+   BOOST_CHECK(appender_map.count("default"));
+}

 /////////////
 /// @brief create a 2 node network


Coding style update

Coding style update

--- tests/cli/main.cpp
+++ tests/cli/main.cpp
@@ -495,16 +495,17 @@
    using namespace graphene::chain;
    using namespace graphene::app;
    std::shared_ptr<graphene::app::application> app1;
-   try {
+   try
+   {
       fc::temp_directory app_dir ( graphene::utilities::temp_directory_path() );

-	  int server_port_number = 0;
-	  app1 = start_application(app_dir, server_port_number);
+      int server_port_number = 0;
+      app1 = start_application(app_dir, server_port_number);

       // connect to the server
-	  client_connection con(app1, app_dir, server_port_number);
-
-	  // set wallet password
+      client_connection con(app1, app_dir, server_port_number);
+
+      // set wallet password
       BOOST_TEST_MESSAGE("Setting wallet password");
       con.wallet_api_ptr->set_password("supersecret");
       con.wallet_api_ptr->unlock("supersecret");
@@ -526,17 +527,17 @@

       // verify that the upgrade was successful
       BOOST_CHECK_PREDICATE( std::not_equal_to<uint32_t>(),
-    		  (nathan_acct_before_upgrade.membership_expiration_date.sec_since_epoch())
-			  (nathan_acct_after_upgrade.membership_expiration_date.sec_since_epoch()) );
+                             (nathan_acct_before_upgrade.membership_expiration_date.sec_since_epoch())
+                             (nathan_acct_after_upgrade.membership_expiration_date.sec_since_epoch()) );
       BOOST_CHECK(nathan_acct_after_upgrade.is_lifetime_member());

       // create a new account
       graphene::wallet::brain_key_info bki = con.wallet_api_ptr->suggest_brain_key();
       BOOST_CHECK(!bki.brain_priv_key.empty());
       signed_transaction create_acct_tx = con.wallet_api_ptr->create_account_with_brain_key(
-    		  bki.brain_priv_key, "jmjatlanta", "nathan", "nathan", true);
+                                                bki.brain_priv_key, "jmjatlanta", "nathan", "nathan", true);
       // save the private key for this new account in the wallet file
-   	  BOOST_CHECK(con.wallet_api_ptr->import_key("jmjatlanta", bki.wif_priv_key));
+      BOOST_CHECK(con.wallet_api_ptr->import_key("jmjatlanta", bki.wif_priv_key));
       con.wallet_api_ptr->save_wallet_file(con.wallet_filename);

       // attempt to give jmjatlanta some bitsahres
@@ -544,7 +545,7 @@
       for(int i = 1; i <= 200; i++)
       {
           signed_transaction transfer_tx = con.wallet_api_ptr->transfer("nathan", "jmjatlanta", std::to_string(i),
-        		  "1.3.0", "Here are some BTS for your new account", true);
+                                                 "1.3.0", "Here are some BTS for your new account", true);
       }

       BOOST_CHECK(generate_block(app1));
@@ -555,16 +556,18 @@

       std::set<object_id_type> operation_ids;

-      for(auto op : history)
+      for(auto& op : history)
       {
-    	  if (operation_ids.find(op.op.id) != operation_ids.end())
-    		  BOOST_FAIL("Duplicate found");
-    	  operation_ids.insert(op.op.id);
+         if( operation_ids.find(op.op.id) != operation_ids.end() )
+         {
+            BOOST_FAIL("Duplicate found");
+         }
+         operation_ids.insert(op.op.id);
       }

    } catch( fc::exception& e ) {
       edump((e.to_detail_string()));
-	  throw;
+      throw;
    }
    app1->shutdown();


Add a test for the new debug function.

Add a test for the new debug function.

--- tests/fsm_test.cpp
+++ tests/fsm_test.cpp
@@ -155,3 +155,38 @@
 	REQUIRE(fsm.is_final() == true);
 }

+TEST_CASE("Test debug function")
+{
+	int action_count = 0;
+	const int stateA = 1;
+	FSM::Fsm fsm;
+	FSM::Trans transitions[] = {
+		{FSM::Fsm_Initial, stateA        , 'a', nullptr, nullptr},
+		{stateA          , FSM::Fsm_Final, 'b', nullptr, nullptr},
+	};
+	fsm.add_transitions(&transitions[0], &transitions[0]+2);
+	fsm.init();
+
+	SECTION("Test enable debugging function.") {
+		int dbg_from = 0;
+		int dbg_to = 0;
+		char dbg_tr = 0;
+		fsm.add_debug_fn([&dbg_from, &dbg_to, &dbg_tr](int from, int to, char tr){ dbg_from = from; dbg_to = to; dbg_tr = tr; });
+		fsm.execute('a');
+		REQUIRE(dbg_from == FSM::Fsm_Initial);
+		REQUIRE(dbg_to == stateA);
+		REQUIRE(dbg_tr == 'a');
+	}
+
+	SECTION("Test disable debugging function.") {
+		int dbg_from = 0;
+		int dbg_to = 0;
+		char dbg_tr = 0;
+		fsm.reset();
+		fsm.add_debug_fn(nullptr);
+		REQUIRE(dbg_from == 0);
+		REQUIRE(dbg_to == 0);
+		REQUIRE(dbg_tr == 0);
+	}
+}
+


Update: internal OSC

Update: internal OSC

--- RX600/system_io.hpp
+++ RX600/system_io.hpp
@@ -4,7 +4,6 @@
 	@brief	RX64M/RX71M/RX651/RX65N/RX66T/RX72T/RX72N/RX72M グループ・システム制御 @n
 			※RX24T は構成が大きく異なるので、RX24T/system_io.hpp に分離しています。@n
 			※ USB を使う場合：96MHz, 144MHz, 192MHz, 240MHz のいづれか @n
-			※ 通常ベースクロックは、12MHz、24MHz を使います。@n
 			RX72x 系では、内部 PLL 回路が追加され、Ethernet などに必要な 25MHz を得る為 @n
 			16MHz を使います。@n
 			(16MHz x 12.5 -> 200MHz, 16MHz x 15 -> 240MHz)
@@ -33,7 +32,7 @@
 		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
 		/*!
 			@brief  発信器タイプ @n
-					HOCO を使う場合、同時に、BASE_CLOCK_ に周波数を設定します。
+					HOCO を使う場合、同時に、BASE_CLOCK_ に周波数（16,18,20 MHz）を設定します。
 		*/
 		//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
 		enum class OSC_TYPE {
@@ -52,9 +51,6 @@
 				外部クリスタルを微妙な周波数にする場合、その整数倍にしなければなりません。 @n
 				RX71M はスーパーバイザモードでの変更が必要なので、「start.s」内で行う。 @n
 				RX71M の場合、アセンブラにオプション「--defsym MEMWAIT=1」を渡す。
-		@param[in]	BASE_CLOCK_	ベース・クロック周波数
-		@param[in]	INTR_CLOCK	内臓クロック周波数 @n
-								※USB を使う場合、「INTR_CLOCK」は48の倍数である事
 		@param[in]	OSC_TYPE	発信器タイプを設定（通常、XTAL）
 	*/
 	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
@@ -98,16 +94,15 @@
 				device::SYSTEM::MOSCCR.MOSTP = 1;		// メインクロック発振器停止
 				device::SYSTEM::MOFCR = device::SYSTEM::MOFCR.MOSEL.b();
 			} else if(OSC_TYPE_ == OSC_TYPE::HOCO) {  // 高速オンチップオシレータ
-				device::SYSTEM::MOSCCR.MOSTP = 1;
-				device::SYSTEM::HOCOCR = device::SYSTEM::HOCOCR.HCSTP.b(1);  // 停止
 				uint8_t frq;
 				if(clock_profile::BASE == 16'000'000) frq = 0b00;
 				else if(clock_profile::BASE == 18'000'000) frq = 0b01;
 				else if(clock_profile::BASE == 20'000'000) frq = 0b10;
 				else frq = 0b00;
 				device::SYSTEM::HOCOCR2.HCFRQ = frq;
-				device::SYSTEM::HOCOCR = device::SYSTEM::HOCOCR.HCSTP.b(0);  // 動作
-				while(device::SYSTEM::OSCOVFSR.MOOVF() == 0) { asm("nop"); }
+				device::SYSTEM::HOCOCR.HCSTP = 0;  // 動作
+				while(device::SYSTEM::OSCOVFSR.HCOVF() == 0) { asm("nop"); }
+				device::SYSTEM::PLLCR.PLLSRCSEL = 1;
 			} else {
 				device::SYSTEM::PRCR = 0xA500;
 				return;
@@ -155,16 +150,14 @@
 				}
 			}

-			if(OSC_TYPE_ == OSC_TYPE::HOCO) {
-				device::SYSTEM::PLLCR.PLLSRCSEL = 1;
-			}
-
 			device::SYSTEM::SCKCR3.CKSEL = 0b100;   ///< PLL 選択

 			if(OSC_TYPE_ == OSC_TYPE::XTAL || OSC_TYPE_ == OSC_TYPE::EXT) {
 				device::SYSTEM::LOCOCR.LCSTP = 1;  ///< 低速オンチップオシレータ停止
 				device::SYSTEM::HOCOCR.HCSTP = 1;  ///< 高速オンチップオシレータ停止
 				device::SYSTEM::HOCOPCR.HOCOPCNT = 1;  ///< 高速オンチップオシレーター電源 OFF
+			} else if(OSC_TYPE_ == OSC_TYPE::HOCO) {
+				device::SYSTEM::LOCOCR.LCSTP = 1;  ///< 低速オンチップオシレータ停止
 			}

 			// クロック関係書き込み不許可


Added auto generated comment and fixed include path for Class.h

--- Reflect/Reflect.cpp
+++ Reflect/Reflect.cpp
@@ -26,7 +26,7 @@
 #include <boost/filesystem/path.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
-
+#include <boost/date_time/posix_time/posix_time.hpp>

 #include "Reflect.h"
 #include <fstream>
@@ -389,8 +389,9 @@

 	ofs << "#ifndef " << guardName << std::endl;
 	ofs << "#define " << guardName << std::endl;
+	ofs << "/* This file was generated on " << boost::posix_time::second_clock::local_time() << " by Reflect */" << std::endl;
 	ofs << std::endl;
-	ofs << "#include <Enseed/Reflect/Class.h>" << std::endl;
+	ofs << "#include <Enseed/Reflect/API/Class.h>" << std::endl;
 	ofs << std::endl;
 	ofs << "namespace reflect {" << std::endl;
 	for (const Reflect::Enum &e : header._enums)


fixed compile issue (issue #64)

fixed compile issue (issue #64)

--- zend/extensionimpl.cpp
+++ zend/extensionimpl.cpp
@@ -115,16 +115,16 @@
     auto *extension = find(module_number TSRMLS_CC);

     // array contains ini settings
-    _ini = new zend_ini_entry[extension->_data->iniVariables()+1];
+    auto *entries = extension->_ini = new zend_ini_entry[extension->_data->iniVariables()+1];

     // the entry that we're filling
     int i=0;

     // Fill the php.ini entries
-    extension->_data->iniVariables([this, &i, module_number](Ini &ini) {
+    extension->_data->iniVariables([entries, &i, module_number](Ini &ini) {

         // initialize the function
-        zend_ini_entry *entry = &_ini[i];
+        zend_ini_entry *entry = &entries[i];

         // fill the property
         ini.fill(entry, module_number);
@@ -134,10 +134,10 @@
     });

     // last entry should be set to all zero's
-    memset(&_ini[i], 0, sizeof(zend_ini_entry));
+    memset(&entries[i], 0, sizeof(zend_ini_entry));

     // register ini entries in Zend core
-    zend_register_ini_entries(_ini, module_number TSRMLS_CC);
+    zend_register_ini_entries(entries, module_number TSRMLS_CC);

     // initialize the extension
     extension->initialize(TSRMLS_C);


Removed superfluous template disambiguators.

--- systems/plants/joints/QuaternionFloatingJoint.cpp
+++ systems/plants/joints/QuaternionFloatingJoint.cpp
@@ -67,7 +67,7 @@
 {
   qdot_to_v.resize(getNumVelocities(), getNumPositions());

-  auto quat = q.template middleRows<QUAT_SIZE>(SPACE_DIMENSION);
+  auto quat = q.middleRows<QUAT_SIZE>(SPACE_DIMENSION);
   Matrix3d R = quat2rotmat(quat);

   Vector4d quattilde;
@@ -104,7 +104,7 @@
 {
   v_to_qdot.resize(getNumPositions(), getNumVelocities());

-  auto quat = q.template middleRows<QUAT_SIZE>(SPACE_DIMENSION);
+  auto quat = q.middleRows<QUAT_SIZE>(SPACE_DIMENSION);
   Matrix3d R = quat2rotmat(quat);

   Matrix<double, QUAT_SIZE, SPACE_DIMENSION> M;


improved QToolBar popup position

improved QToolBar popup position

--- ferocious/converterconfigurationdialog.cpp
+++ ferocious/converterconfigurationdialog.cpp
@@ -86,9 +86,10 @@
     connect(browseButton, &QPushButton::clicked, this, &ConverterConfigurationDialog::promptForResamplerLocation);
     connect(&tableView, &QWidget::customContextMenuRequested, this, [this](const QPoint& pos){
         contextMenu->popup(QPoint{this->mapToGlobal(pos).x(), this->mapToGlobal(pos).y() + contextMenu->sizeHint().height()});
+        contextToolBar->hide();
     });
     connect(&tableView, &QTableView::clicked, this, [this](const QModelIndex& modelIndex) {
-        QPoint p{tableView.columnViewportPosition(modelIndex.column()) , tableView.rowViewportPosition(modelIndex.row())};
+        QPoint p{tableView.columnViewportPosition(modelIndex.column()) , tableView.rowViewportPosition(std::min(tableView.model()->rowCount() - 2,  modelIndex.row()))};
         contextToolBar->move(p + QPoint{0, (int)tableView.geometry().top() + contextToolBar->sizeHint().height() * 3} );
         contextToolBar->show();
         contextToolBar->raise();


fix filament_test on aarch64 mac

fix filament_test on aarch64 mac

don't use slog from a static variable, because it might not have been
constructed yet, due to static initialized order.
For some reason, this happens on aarch64 macs, but this was actually
a real problem.


INTEGRATION: CWS os2port01 (1.17.8); FILE MERGED 2007/08/07 14:22:45 obr 1.17.8.2: RESYNC: (1.17-1.24); FILE MERGED 2006/12/28 14:55:51 ydario 1.17.8.1: OS/2 initial import.

--- filter/source/config/cache/filtercache.cxx
+++ filter/source/config/cache/filtercache.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: filtercache.cxx,v $
  *
- *  $Revision: 1.24 $
+ *  $Revision: 1.25 $
  *
- *  last change: $Author: obo $ $Date: 2007-01-23 07:09:00 $
+ *  last change: $Author: vg $ $Date: 2007-09-20 14:59:28 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -274,7 +274,7 @@
     if ((m_eFillState & eRequired) == eRequired)
         return;

-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 1 && !defined(OS2)
     if (
         (!bByThread) &&
         (


Change simple_switch_grpc priority zero test

As per the P4Runtime spec, zero is not a valid priority any more for
ternary matches.

--- targets/simple_switch_grpc/tests/test_ternary.cpp
+++ targets/simple_switch_grpc/tests/test_ternary.cpp
@@ -173,24 +173,14 @@
   }
 }

-// zero is the lowest priority in P4Runtime (which corresponds to a high
-// priority value in bmv2); this test was added for the following issue:
-// https://github.com/p4lang/behavioral-model/issues/618
+// zero is not a valid priority value in P4Runtime
 TEST_F(SimpleSwitchGrpcTest_Ternary, PriorityZero) {
   int priority = 0;
-  int ig_port = 3;
   std::string pkt("\xaa\xbb");
   p4::bm::PacketStreamResponse rcv_pkt;
   auto entity = make_entry("\xaa\xbb", "\xff\xff", priority, a_s1_id);
-  {
-    auto status = add_entry(entity);
-    EXPECT_TRUE(status.ok());
-  }
-  {
-    auto status = send_and_receive(pkt, ig_port, &rcv_pkt);
-    EXPECT_TRUE(status.ok());
-    EXPECT_EQ(1, rcv_pkt.port());
-  }
+  auto status = add_entry(entity);
+  EXPECT_FALSE(status.ok());
 }

 }  // namespace


Serialize state before shutdown (#502)

Serialize state before shutdown (#502)

--- cartographer_ros/cartographer_ros/node_main.cc
+++ cartographer_ros/cartographer_ros/node_main.cc
@@ -31,6 +31,8 @@
 DEFINE_bool(
     start_trajectory_with_default_topics, true,
     "Enable to immediately start the first trajectory with default topics.");
+DEFINE_string(save_map_filename, "",
+              "If non-empty, serialize state and write it to disk before shutting down.");

 namespace cartographer_ros {
 namespace {
@@ -57,6 +59,10 @@

   node.FinishAllTrajectories();
   node.RunFinalOptimization();
+
+  if (!FLAGS_save_map_filename.empty()) {
+    node.SerializeState(FLAGS_save_map_filename);
+  }
 }

 }  // namespace


Base structure for matrix multiplication function

--- lab9_v2/lab9_v2/main.cpp
+++ lab9_v2/lab9_v2/main.cpp
@@ -14,6 +14,7 @@
 int arr3[ 3 ][ 3 ] = { { 0, 0, 0 },{ 0, 0, 0 },{ 0, 0, 0 } };
 int arr4[ 3 ][ 3 ] = { { 0, 0, 0 },{ 0, 0, 0 },{ 0, 0, 0 } };
 int arr5[ 3 ][ 3 ] = { { 0, 0, 0 },{ 0, 0, 0 },{ 0, 0, 0 } };
+int arr6[ 3 ][ 3 ] = { { 0, 0, 0 },{ 0, 0, 0 },{ 0, 0, 0 } };

 void MTransponse( int nrows, int ncols ) {
 	__asm {
@@ -94,6 +95,53 @@

 }

+void MMul( int n, int m, int p ) {
+
+	int i, j, k;
+
+	__asm {
+
+		jmp start;
+
+		start:
+			mov i, 0; i = 0
+
+		outer_loop:
+			mov eax, i; eax = i
+			cmp eax, n; if i == n
+			je do_exit; then exit
+			mov j, 0; else j = 0 and jmp middle_loop
+
+		middle_loop:
+			mov eax, j; eax = j
+			cmp eax, m; if j == m
+			je outer_loop_end; then exit middle_loop
+
+			mov k, 0; else k = 0 and jmp inner_loop
+
+		inner_loop:
+			mov eax, k; eax = k
+			cmp eax, p; if k == p
+			je middle_loop_end; then exit inner loop
+
+
+
+			inc k; k++
+			jmp inner_loop; start new inner_loop iteration
+
+		middle_loop_end:
+			inc j; j++
+			jmp middle_loop; start new middle_loop iteration
+
+		outer_loop_end:
+			inc i; i++
+			jmp outer_loop; start new outer_loop iteration
+
+		do_exit:
+	}
+
+}
+
 void PrintArray3x3( HDC _hdc, const RECT & _client, int _array[ 3 ][ 3 ], int _padding_x, int _padding_y, char * _buf ) {

 	for ( int row = 0; row < 3; ++row ) {
@@ -120,7 +168,7 @@

 	padding_x += 140;

-	TextOut( _hdc, padding_x, padding_y, buff, wsprintf( buff, "Mul result:" ) );
+	TextOut( _hdc, padding_x, padding_y, buff, wsprintf( buff, "EW Mul result:" ) );
 	PrintArray3x3( _hdc, _client, arr3, padding_x, padding_y, buff );

 	padding_x = 10;
@@ -134,6 +182,10 @@
 	TextOut( _hdc, padding_x, padding_y, buff, wsprintf( buff, "Src 1 tranposed:" ) );
 	PrintArray3x3( _hdc, _client, arr5, padding_x, padding_y, buff );

+	padding_x += 140;
+
+	TextOut( _hdc, padding_x, padding_y, buff, wsprintf( buff, "Src1 x Src2 = " ) );
+	PrintArray3x3( _hdc, _client, arr6, padding_x, padding_y, buff );
 }

 //
@@ -237,6 +289,7 @@
 		MElementWiseMul( 3, 3 );
 		MSum( 3, 3 );
 		MTransponse( 3, 3 );
+		MMul( 3, 3, 3 );
 		break;

 	case WM_PAINT:  //


PROTON-2021: [c] Round out the ssl certificate verification tests

--- c/tests/ssl_proactor_test.cpp
+++ c/tests/ssl_proactor_test.cpp
@@ -49,16 +49,16 @@

 /* Note must be run in the current directory to find certificate files */
 #define SSL_FILE(NAME) "ssl-certs/" NAME
-#define SSL_PW "tclientpw"
+#define SSL_PW(NAME) NAME "pw"
 /* Windows vs. OpenSSL certificates */
 #if defined(_WIN32)
 #  define CERTIFICATE(NAME) SSL_FILE(NAME "-certificate.p12")
 #  define SET_CREDENTIALS(DOMAIN, NAME)                                 \
-  pn_ssl_domain_set_credentials(DOMAIN, SSL_FILE(NAME "-full.p12"), "", SSL_PW)
+  pn_ssl_domain_set_credentials(DOMAIN, SSL_FILE(NAME "-full.p12"), "", SSL_PW(NAME))
 #else
 #  define CERTIFICATE(NAME) SSL_FILE(NAME "-certificate.pem")
 #  define SET_CREDENTIALS(DOMAIN, NAME)                                 \
-  pn_ssl_domain_set_credentials(DOMAIN, CERTIFICATE(NAME), SSL_FILE(NAME "-private-key.pem"), SSL_PW)
+  pn_ssl_domain_set_credentials(DOMAIN, CERTIFICATE(NAME), SSL_FILE(NAME "-private-key.pem"), SSL_PW(NAME))
 #endif

@@ -73,9 +73,7 @@
      pn_transport_t *t = pn_transport();
      pn_transport_set_server(t); /* Must call before pn_sasl() */
      pn_sasl_allowed_mechs(pn_sasl(t), "ANONYMOUS");
-     if (app->server_ssl_domain) {
-       pn_ssl_init(pn_ssl(t), app->server_ssl_domain, NULL);
-     }
+     pn_ssl_init(pn_ssl(t), app->server_ssl_domain, NULL);
      pn_listener_accept2(l, NULL, t);

      /* Accept only one connection */
@@ -164,7 +162,7 @@
   } while(true);
 }

-TEST_CASE("ssl") {
+TEST_CASE("ssl certificate verification tests") {
   struct app_data_t app = {0};

   app.container_id = "ssl-test";
@@ -182,19 +180,63 @@
   pn_test::auto_free<pn_ssl_domain_t, pn_ssl_domain_free>
     cd(pn_ssl_domain(PN_SSL_MODE_CLIENT));

-  SECTION("Default connections don't verify") {
+  SECTION("Default connections don't verify to self signed server (even with correct name)") {
+    REQUIRE(SET_CREDENTIALS(sd, "tserver") == 0);
     REQUIRE(pn_ssl_init(pn_ssl(t), NULL, NULL) == 0);
-
-    pn_proactor_listen(proactor, pn_listener(), "", 16);
-    pn_proactor_connect2(proactor, NULL, t, "");
-
-    run(proactor, &app, server_handler, client_handler);
-    CHECK(app.connection_succeeded==false);
-    CHECK(app.transport_error==true);
-  }
-
-  SECTION("Anonymous connections don't verify") {
-    REQUIRE(pn_ssl_domain_set_trusted_ca_db(cd, CERTIFICATE("tclient")) == 0);
+    REQUIRE(pn_ssl_set_peer_hostname(pn_ssl(t), "test_server") == 0);
+
+    pn_proactor_listen(proactor, pn_listener(), "", 16);
+    pn_proactor_connect2(proactor, NULL, t, "");
+
+    run(proactor, &app, server_handler, client_handler);
+    CHECK(app.connection_succeeded==false);
+    CHECK(app.transport_error==true);
+  }
+
+  SECTION("Connections noname verify to self signed cert if cert allowed (even with no name)") {
+    REQUIRE(SET_CREDENTIALS(sd, "tserver") == 0);
+    REQUIRE(pn_ssl_domain_set_trusted_ca_db(cd, CERTIFICATE("tserver")) == 0);
+    REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_VERIFY_PEER, NULL) == 0);
+    REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
+
+    pn_proactor_listen(proactor, pn_listener(), "", 16);
+    pn_proactor_connect2(proactor, NULL, t, "");
+
+    run(proactor, &app, server_handler, client_handler);
+    CHECK(app.connection_succeeded==true);
+    CHECK(app.transport_error==false);
+  }
+
+  SECTION("Connections don't noname verify to self signed cert without cert allowed") {
+    REQUIRE(SET_CREDENTIALS(sd, "tserver") == 0);
+    REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_VERIFY_PEER, NULL) == 0);
+    REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
+
+    pn_proactor_listen(proactor, pn_listener(), "", 16);
+    pn_proactor_connect2(proactor, NULL, t, "");
+
+    run(proactor, &app, server_handler, client_handler);
+    CHECK(app.connection_succeeded==false);
+    CHECK(app.transport_error==true);
+  }
+
+  SECTION("Connections verify with self signed server if cert allowed") {
+    REQUIRE(SET_CREDENTIALS(sd, "tserver") == 0);
+    REQUIRE(pn_ssl_domain_set_trusted_ca_db(cd, CERTIFICATE("tserver")) == 0);
+    REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_VERIFY_PEER_NAME, NULL) == 0);
+    REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
+    REQUIRE(pn_ssl_set_peer_hostname(pn_ssl(t), "test_server") == 0);
+
+    pn_proactor_listen(proactor, pn_listener(), "", 16);
+    pn_proactor_connect2(proactor, NULL, t, "");
+
+    run(proactor, &app, server_handler, client_handler);
+    CHECK(app.connection_succeeded==true);
+    CHECK(app.transport_error==false);
+  }
+
+  SECTION("Anonymous server connections don't verify") {
+    REQUIRE(pn_ssl_domain_set_trusted_ca_db(cd, CERTIFICATE("tserver")) == 0);
     REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_VERIFY_PEER_NAME, NULL) == 0);
     REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);

@@ -221,4 +263,33 @@
     SUCCEED("Skipped: Windows schannel does not support anonymous connections");
 #endif
   }
-}
+
+  SECTION("Default server (anonymous) doesn't verify against default client (verify peername)") {
+    app.server_ssl_domain = 0;
+    REQUIRE(pn_ssl_init(pn_ssl(t), NULL, NULL) == 0);
+
+    pn_proactor_listen(proactor, pn_listener(), "", 16);
+    pn_proactor_connect2(proactor, NULL, t, "");
+
+    run(proactor, &app, server_handler, client_handler);
+    CHECK(app.connection_succeeded==false);
+    CHECK(app.transport_error==true);
+  }
+
+  SECTION("Default server (anonymous) connects if anonymous allowed") {
+#ifndef _WIN32
+    app.server_ssl_domain = 0;
+    REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_ANONYMOUS_PEER, NULL) == 0);
+    REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
+
+    pn_proactor_listen(proactor, pn_listener(), "", 16);
+    pn_proactor_connect2(proactor, NULL, t, "");
+
+    run(proactor, &app, server_handler, client_handler);
+    CHECK(app.connection_succeeded==true);
+    CHECK(app.transport_error==false);
+#else
+    SUCCEED("Skipped: Windows schannel does not support anonymous connections");
+#endif
+  }
+}


Fix clang warning

Fix clang warning

--- SPEC_PC_N/INCLUDE.H
+++ SPEC_PC_N/INCLUDE.H
@@ -49,11 +49,11 @@
 #define LocalString(x) Lsz##x
 #define DefValueName(x) local char Lsz##x[]=#x
 #define ValueName(x) Lsz##x
-#define Align(x,b) (x)=(x)&~((b)-1)
+#define Align(x,b) ((x)=(x)&~((b)-1))

 void DebugPrint(const char* message);
 void Log_backend(char type, char* fmt, ...);
-inline void Log_real(char ctype, char* type, char* fmt, ...)
+inline void Log_real(char ctype, const char* type, const char* fmt, ...)
 {
 	char buf[128], pbuf[1024];
 	char tbuf[15];


Add VibratePad()

Add VibratePad()

--- SPEC_PSX/PSOUTPUT.C
+++ SPEC_PSX/PSOUTPUT.C
@@ -1,14 +1,99 @@
 #include "PSOUTPUT.H"

+#include "PSXINPUT.H"
+#include "SAVEGAME.H"
 #include "SPECTYPES.H"
-#include "SPECIFIC.H"

 static struct VIBRATION vib[2];

+void VibratePad()//604EC(<), 61064(<) (F)
+{
+	int i;
+	struct VIBRATION* v;

-void VibratePad()//604EC, 61064
-{
-	return;
+	if (DualShock == 0 && savegame.VibrateOn)
+	{
+		//loc_60510
+		Motors[0] = 0;
+		Motors[1] = 0;
+		return;
+	}
+
+	//loc_6052C
+	for (i = 0; i < 2; i++, v = &vib[i])
+	{
+		if (v->Len != 0)
+		{
+			if (v->Flag == 0)
+			{
+				v->Rate += v->Acc;
+
+				if (v->Rate > v->Lev)
+				{
+					v->Rate = v->Lev;
+					v->Flag = 1;
+				}//loc_605DC
+			}
+			else if (v->Flag == 1)
+			{
+				//loc_60588
+				if (v->Sus > v->Len)
+				{
+					v->Flag = 2;
+				}//loc_605DC
+			}
+			else if (v->Flag == 2)
+			{
+				//loc_605AC
+				v->Rate -= v->Dec;
+
+				if (v->Rate * 65536 < 0)
+				{
+					v->Rate = 0;
+					v->Flag = 3;
+				}//loc_605DC
+			}
+
+			//loc_605DC
+			v->Vib += v->Rate;
+
+			if (i != 0)
+			{
+				if (v->Vib / 16 != 0)
+				{
+					Motors[1] = v->Vib / 16;
+					v->Vib &= 0xFF;
+				}//loc_60650
+				else
+				{
+					//loc_60618
+					Motors[1] = 0;
+				}//loc_60650
+			}
+			else
+			{
+				//loc_60628
+				if (v->Vib / 24 != 0)
+				{
+					Motors[0] = 1;
+					v->Vib -= 4096;
+				}
+				else
+				{
+					//loc_60648
+					Motors[0] = 0;
+				}
+
+				//loc_60650
+				v->Len--;
+			}
+		}
+		else
+		{
+			//loc_60664
+			Motors[i] = 0;
+		}
+	}
 }

 void SetupPadVibration(short num, short acc, short lev, short sus, int dec, int len)//604A4(<), 6101C(<) (F)
@@ -23,6 +108,4 @@
 	v->Sus = len - dec;
 	v->Dec = dec;
 	v->Len = len;
-
-	return;
 }


[Specific-PSX]: Correct DoPauseMenu.

[Specific-PSX]: Correct DoPauseMenu.

--- SPEC_PSX/SPECIFIC.C
+++ SPEC_PSX/SPECIFIC.C
@@ -336,7 +336,9 @@
 			}
 			//loc_61144
 			savegame.AutoTarget ^= 1;
-
+		}
+		else
+		{
 			//loc_61160
 			if (SettingsReq.CursorPos < 2)
 			{


workaround for #2243 segfault due to hcc compiler bug (#2246)

--- src/solver/conv_hip_implicit_gemm_v4.cpp
+++ src/solver/conv_hip_implicit_gemm_v4.cpp
@@ -32,7 +32,7 @@
 #include "miopen/implicitgemm_params.hpp"
 #include "miopen/hip_build_utils.hpp"

-#define WORKAROUND_ISSUE_2174_2222_2224 1
+#define WORKAROUND_ISSUE_2174_2222_2224_2243 1

 namespace miopen {
 namespace solver {
@@ -422,10 +422,10 @@

 bool ConvHipImplicitGemmV4Fwd::IsApplicable(const ConvolutionContext& ctx) const
 {
-#if WORKAROUND_ISSUE_2174_2222_2224
+#if WORKAROUND_ISSUE_2174_2222_2224_2243
     if(miopen::HipGetHccVersion() >= external_tool_version_t{2, 6, 0})
     {
-        if((ctx.kernel_dilation_h != 1 || ctx.kernel_dilation_w != 1) && ctx.n_outputs < 64)
+        if(!(ctx.kernel_dilation_h == 1 && ctx.kernel_dilation_w == 1))
             return false;
     }
 #endif
@@ -463,7 +463,7 @@
     if(!(ctx.IsFp32() || ctx.IsFp16() || ctx.IsBfp16()))
         return false;

-#if WORKAROUND_ISSUE_2174_2222_2224
+#if WORKAROUND_ISSUE_2174_2222_2224_2243
     if(miopen::HipGetHccVersion() >= external_tool_version_t{2, 6, 0})
     {
         if(!(ctx.kernel_stride_w == 1 && ctx.kernel_stride_h == 1))


* Remove the QtDeclarative header includes as QSparqlResultsList doesn't have any declarative code in it

--- src/sparql/models/qsparqlresultslist.cpp
+++ src/sparql/models/qsparqlresultslist.cpp
@@ -40,8 +40,6 @@
 ****************************************************************************/

 #include <QtCore/QDebug>
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
-#include <QtDeclarative/qdeclarative.h>

 #include "qsparqlresultslist_p.h"


update eosc with benchmark commands

update eosc with benchmark commands

--- programs/eosc/main.cpp
+++ programs/eosc/main.cpp
@@ -36,6 +36,7 @@
 const string chain_func_base = "/v1/chain";
 const string get_info_func = chain_func_base + "/get_info";
 const string push_txn_func = chain_func_base + "/push_transaction";
+const string push_txns_func = chain_func_base + "/push_transactions";
 const string json_to_bin_func = chain_func_base + "/abi_json_to_bin";
 const string get_block_func = chain_func_base + "/get_block";
 const string get_account_func = chain_func_base + "/get_account";
@@ -277,6 +278,120 @@

       std::cout << fc::json::to_pretty_string( call( push_txn_func, trx )) << std::endl;
    });
+
+   // Benchmark subcommand
+   auto benchmark = app.add_subcommand( "benchmark", "Configure and execute benchmarks", false );
+   auto benchmark_setup = benchmark->add_subcommand( "setup", "Configures initial condition for benchmark" );
+   uint64_t number_of_accounts = 2;
+   benchmark_setup->add_option("accounts", number_of_accounts, "the number of accounts in transfer among")->required();
+   benchmark_setup->set_callback([&]{
+      std::cerr << "Creating " << number_of_accounts <<" accounts with initial balances\n";
+      FC_ASSERT( number_of_accounts >= 2, "must create at least 2 accounts" );
+
+      auto info = get_info();
+
+      vector<SignedTransaction> batch;
+      batch.reserve( number_of_accounts );
+      for( uint32_t i = 0; i < number_of_accounts; ++i ) {
+        Name newaccount( Name("benchmark").value + i );
+        public_key_type owner, active;
+        Name creator("inita" );
+
+        auto owner_auth   = eos::chain::Authority{1, {{owner, 1}}, {}};
+        auto active_auth  = eos::chain::Authority{1, {{active, 1}}, {}};
+        auto recovery_auth = eos::chain::Authority{1, {}, {{{creator, "active"}, 1}}};
+
+        uint64_t deposit = 1;
+
+        SignedTransaction trx;
+        trx.scope = sort_names({creator,config::EosContractName});
+        transaction_emplace_message(trx, config::EosContractName, vector<types::AccountPermission>{{creator,"active"}}, "newaccount",
+                                             types::newaccount{creator, newaccount, owner_auth,
+                                                               active_auth, recovery_auth, deposit});
+
+        trx.expiration = info.head_block_time + 100;
+        transaction_set_reference_block(trx, info.head_block_id);
+        batch.emplace_back(trx);
+      }
+      auto result = call( push_txns_func, batch );
+      std::cout << fc::json::to_pretty_string(result) << std::endl;
+   });
+
+   auto benchmark_transfer = benchmark->add_subcommand( "transfer", "executes random transfers among accounts" );
+   uint64_t number_of_transfers = 0;
+   bool loop = false;
+   benchmark_transfer->add_option("accounts", number_of_accounts, "the number of accounts in transfer among")->required();
+   benchmark_transfer->add_option("count", number_of_transfers, "the number of transfers to execute")->required();
+   benchmark_transfer->add_option("loop", loop, "whether or not to loop for ever");
+   benchmark_transfer->set_callback([&]{
+      FC_ASSERT( number_of_accounts > 1 );
+
+      std::cerr << "funding "<< number_of_accounts << " accounts from init\n";
+      auto info = get_info();
+      vector<SignedTransaction> batch;
+      batch.reserve(100);
+      for( uint32_t i = 0; i < number_of_accounts; ++i ) {
+         Name sender( "initb" );
+         Name recipient( Name("benchmark").value + i);
+         uint32_t amount = 10000;
+
+         SignedTransaction trx;
+         trx.scope = sort_names({sender,recipient});
+         transaction_emplace_message(trx, config::EosContractName,
+                                              vector<types::AccountPermission>{{sender,"active"}},
+                                              "transfer", types::transfer{sender, recipient, amount, memo});
+         trx.expiration = info.head_block_time + 100;
+         transaction_set_reference_block(trx, info.head_block_id);
+
+         batch.emplace_back(trx);
+         if( batch.size() == 100 ) {
+            auto result = call( push_txns_func, batch );
+      //      std::cout << fc::json::to_pretty_string(result) << std::endl;
+            batch.resize(0);
+         }
+      }
+      if( batch.size() ) {
+         auto result = call( push_txns_func, batch );
+         //std::cout << fc::json::to_pretty_string(result) << std::endl;
+         batch.resize(0);
+      }
+
+
+      std::cerr << "generating random "<< number_of_transfers << " transfers among " << number_of_accounts << " benchmark accounts\n";
+      while( true ) {
+         auto info = get_info();
+         uint64_t amount = 1;
+
+         for( uint32_t i = 0; i < number_of_transfers; ++i ) {
+            SignedTransaction trx;
+
+            Name sender( Name("benchmark").value + rand() % number_of_accounts );
+            Name recipient( Name("benchmark").value + rand() % number_of_accounts );
+
+            while( recipient == sender )
+               recipient = Name( Name("benchmark").value + rand() % number_of_accounts );
+
+
+            auto memo = fc::variant(fc::time_point::now()).as_string() + " " + fc::variant(fc::time_point::now().time_since_epoch()).as_string();
+            trx.scope = sort_names({sender,recipient});
+            transaction_emplace_message(trx, config::EosContractName,
+                                                 vector<types::AccountPermission>{{sender,"active"}},
+                                                 "transfer", types::transfer{sender, recipient, amount, memo});
+            trx.expiration = info.head_block_time + 100;
+            transaction_set_reference_block(trx, info.head_block_id);
+
+            batch.emplace_back(trx);
+            if( batch.size() == 300 ) {
+               auto result = call( push_txns_func, batch );
+               //std::cout << fc::json::to_pretty_string(result) << std::endl;
+               batch.resize(0);
+            }
+         }
+         if( !loop ) break;
+      }
+   });
+
+

    // Push subcommand
    auto push = app.add_subcommand("push", "Push arbitrary data to the blockchain", false);
@@ -331,6 +446,15 @@
       std::cout << fc::json::to_pretty_string(trx_result) << std::endl;
    });

+
+   string trxsJson;
+   auto trxsSubcommand = push->add_subcommand("transactions", "Push an array of arbitrary JSON transactions");
+   trxsSubcommand->add_option("transactions", trxsJson, "The JSON array of the transactions to push")->required();
+   trxsSubcommand->set_callback([&] {
+      auto trxs_result = call(push_txn_func, fc::json::from_string(trxsJson));
+      std::cout << fc::json::to_pretty_string(trxs_result) << std::endl;
+   });
+
    try {
        app.parse(argc, argv);
    } catch (const CLI::ParseError &e) {


INTEGRATION: CWS warnings01 (1.11.62); FILE MERGED 2005/11/15 15:13:06 pl 1.11.62.1: #i55991# removed warnings

--- svtools/inc/ruler.hxx
+++ svtools/inc/ruler.hxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ruler.hxx,v $
  *
- *  $Revision: 1.11 $
- *
- *  last change: $Author: rt $ $Date: 2005-09-08 10:12:50 $
+ *  $Revision: 1.12 $
+ *
+ *  last change: $Author: hr $ $Date: 2006-06-19 20:26:32 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -740,6 +740,7 @@
     SVT_DLLPRIVATE void                ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom );
     SVT_DLLPRIVATE void                ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle );
     SVT_DLLPRIVATE void                ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom );
+    using Window::ImplInit;
     SVT_DLLPRIVATE void                ImplInit( WinBits nWinBits );
     SVT_DLLPRIVATE void                ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
     SVT_DLLPRIVATE void                ImplCalc();
@@ -749,6 +750,7 @@
     SVT_DLLPRIVATE void                ImplDraw();
     SVT_DLLPRIVATE void                ImplDrawExtra( BOOL bPaint = FALSE );
     SVT_DLLPRIVATE void                ImplUpdate( BOOL bMustCalc = FALSE );
+    using Window::ImplHitTest;
     SVT_DLLPRIVATE BOOL                ImplHitTest( const Point& rPos,
                                      ImplRulerHitTest* pHitTest,
                                      BOOL bRequiredStyle = FALSE,
@@ -829,6 +831,7 @@
     long                GetClickPos() const { return mnDragPos; }
     RulerType           GetClickType() const { return meDragType; }
     USHORT              GetClickAryPos() const { return mnDragAryPos; }
+    using Window::GetType;
     RulerType           GetType( const Point& rPos,
                                  USHORT* pAryPos = NULL ) const;


fix typo

fix typo

--- Util/make_unique.hpp
+++ Util/make_unique.hpp
@@ -35,7 +35,7 @@
 namespace osrm
 {
 // Taken from http://msdn.microsoft.com/en-us/library/dn439780.asp
-// Note, that the snippet is broken there and needed minor massaging
+// Note, that the snippet was broken there and needed minor massaging

 // make_unique<T>
 template <class T, class... Types> std::unique_ptr<T> make_unique(Types &&... Args)


Add Ctrl-Break functionality

Add Ctrl-Break functionality

--- VMGS/Scene/scene.cpp
+++ VMGS/Scene/scene.cpp
@@ -41,6 +41,9 @@
 	}

 	void SceneManager::key_callback(GLFWwindow* window, int key, int scancode, int action, int mods) {
+		if (key == GLFW_KEY_PAUSE && action == GLFW_PRESS && (mods & GLFW_MOD_CONTROL)) {
+			abort();
+		}
 		if (key == GLFW_KEY_F3 && action == GLFW_PRESS) {
 			render_debug_info = !render_debug_info;
 			return;


Print out keys for maps/lists now

Print out keys for maps/lists now

--- tests/pulltest.cpp
+++ tests/pulltest.cpp
@@ -7,12 +7,6 @@

 void OutputValue(BNJ::PullParser& parser){
 	const bnj_val& val = parser.GetValue();
-
-	if(val.key_length){
-		char key[512];
-		BNJ::GetKey(key, 1024, parser);
-		fprintf(stdout, "key: '%s'\n", key);
-	}

 	switch(bnj_val_type(&val)){
 		case BNJ_NUMERIC:
@@ -116,7 +110,18 @@
 		/* Begin a tree walk. */
 		bool running = true;
 		while(running){
-			switch(parser.Pull()){
+			unsigned ret = parser.Pull();
+
+			if(parser.ValidValue()){
+				const bnj_val& val = parser.GetValue();
+				if(val.key_length){
+					char key[512];
+					BNJ::GetKey(key, 1024, parser);
+					fprintf(stdout, "key: '%s'\n", key);
+				}
+			}
+
+			switch(ret){
 				/* Stop when there is no more data. */
 				case BNJ::PullParser::ST_NO_DATA:
 					running = false;


INTEGRATION: CWS tkr11_DEV300 (1.14.18); FILE MERGED 2008/03/05 09:06:36 tkr 1.14.18.3: #154182# new property to set standard dir on open/save dialog 2008/03/03 08:13:43 tkr 1.14.18.2: #154182# new property to set standard dir on open/save dialog 2008/02/28 13:08:14 tkr 1.14.18.1: #154182# new member for standard dir

--- fpicker/source/office/OfficeFilePicker.cxx
+++ fpicker/source/office/OfficeFilePicker.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: OfficeFilePicker.cxx,v $
  *
- *  $Revision: 1.14 $
+ *  $Revision: 1.15 $
  *
- *  last change: $Author: obo $ $Date: 2008-01-07 08:44:06 $
+ *  last change: $Author: vg $ $Date: 2008-03-18 17:30:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -88,6 +88,9 @@
 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_
 #include <com/sun/star/uno/Sequence.hxx>
 #endif
+#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_
+#include <com/sun/star/beans/NamedValue.hpp>
+#endif

 #ifndef _UNOTOOLS_UCBHELPER_HXX
 #include <unotools/ucbhelper.hxx>
@@ -540,7 +543,16 @@
     WinBits nExtraBits;
     WinBits nBits = getWinBits( nExtraBits );

-    return new SvtFileDialog( _pParent, nBits, nExtraBits );
+    SvtFileDialog* dialog = new SvtFileDialog( _pParent, nBits, nExtraBits );
+
+    // Set StandardDir if present
+    if ( m_aStandardDir.getLength() > 0)
+    {
+        String sStandardDir = String( m_aStandardDir );
+        dialog->SetStandardDir( sStandardDir );
+    }
+
+    return dialog;
 }

 //------------------------------------------------------------------------------------
@@ -1093,13 +1105,32 @@

     m_nServiceType = TemplateDescription::FILEOPEN_SIMPLE;

-    if ( _rArguments.getLength() == 1 )
+    if ( _rArguments.getLength() >= 1 )
     {
         // compatibility: one argument, type sal_Int16 , specifies the service type
-        if ( _rArguments.getLength() )
-        {
-            if ( _rArguments[0] >>= m_nServiceType )
-                return;
+        _rArguments[0] >>= m_nServiceType;
+
+        // NOTE: _rArguments[1] not used here
+
+        for ( int i = 0; i < _rArguments.getLength(); i++)
+        {
+            NamedValue namedValue;
+
+            if (_rArguments[i] >>= namedValue )
+            {
+                if ( namedValue.Name.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StandardDir" ) ) ) )
+                {
+                    ::rtl::OUString sStandardDir;
+
+                    namedValue.Value >>= sStandardDir;
+
+                    // Set the directory for the "back to the default dir" button
+                        if ( sStandardDir.getLength() > 0 )
+                    {
+                        m_aStandardDir = sStandardDir;
+                    }
+                }
+            }
         }
     }