CharClass not as global static object

CharClass not as global static object

--- starmath/source/parse.cxx
+++ starmath/source/parse.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: parse.cxx,v $
  *
- *  $Revision: 1.8 $
+ *  $Revision: 1.9 $
  *
- *  last change: $Author: tl $ $Date: 2001-05-02 16:58:48 $
+ *  last change: $Author: jp $ $Date: 2001-05-11 16:40:35 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -408,8 +408,12 @@

 ///////////////////////////////////////////////////////////////////////////

-static CharClass aCharClass( SvxCreateLocale(
+CharClass& GetCharClass()
+{
+    static CharClass aCharClass( SvxCreateLocale(
                         Application::GetAppInternational().GetLanguage() ) );
+    return aCharClass;
+}

 BOOL SmParser::IsDelimiter( const String &rTxt, xub_StrLen nPos )
@@ -429,7 +433,7 @@

     BOOL bIsDelim = *pDelim != 0;

-    INT16 nTypJp = aCharClass.getType( rTxt, nPos );
+    INT16 nTypJp = ::GetCharClass().getType( rTxt, nPos );
     bIsDelim |= nTypJp == com::sun::star::i18n::UnicodeType::SPACE_SEPARATOR ||
                 nTypJp == com::sun::star::i18n::UnicodeType::CONTROL;

@@ -464,15 +468,16 @@
     ParseResult aRes;
     xub_StrLen  nRealStart;
     BOOL        bCont;
+    CharClass& rCC = ::GetCharClass();
     do
     {
         //?? does parseAnyToken handles Japanese (CJK) spaces correct ??
         // seems not to be so...
         while (UnicodeType::SPACE_SEPARATOR ==
-                         aCharClass.getType( BufferString, BufferIndex ))
+                         rCC.getType( BufferString, BufferIndex ))
             ++BufferIndex;

-        aRes = aCharClass.parseAnyToken( BufferString, BufferIndex,
+        aRes = rCC.parseAnyToken( BufferString, BufferIndex,
                                             coStartFlags, aEmptyStr,
                                             coContFlags, aEmptyStr );

@@ -703,7 +708,7 @@
                                 "unexpected comment start" );

                         // get identifier of user-defined character
-                        ParseResult aTmpRes = aCharClass.parseAnyToken(
+                        ParseResult aTmpRes = rCC.parseAnyToken(
                                 BufferString, rnEndPos,
                                 KParseTokens::ANY_LETTER,
                                 aEmptyStr,


Drawing the line in the wrong place

Drawing the line in the wrong place

--- gui/CanvasPipe.cc
+++ gui/CanvasPipe.cc
@@ -1,3 +1,4 @@
+#include "app.hh"
 #include "canvas.hh"

 CanvasPipe::CanvasPipe(CanvasBlock *from, CanvasBlock *to) : from(from), to(to) {
@@ -13,6 +14,6 @@
 }

 void CanvasPipe::paint(QPainter *p, const QStyleOptionGraphicsItem *sogi, QWidget *w) {
-
+	p->drawLine(from->boundingRect().bottomRight(), to->boundingRect().topRight());
 }


[ADDED] config color setting for etexture

Former-commit-id: 7a0cf78d6d7120d957159c0b6936e3b5db3e8f19

--- easyshape/src/libshape/DrawPolygonCMPT.cpp
+++ easyshape/src/libshape/DrawPolygonCMPT.cpp
@@ -9,9 +9,12 @@
 #include <ee/EmptyVerifyVisitor.h>
 #include <ee/FetchAllVisitor.h>
 #include <ee/RGBColorSettingDlg.h>
+#include <ee/HSLColorSettingDlg.h>
 #include <ee/SymbolMgr.h>
 #include <ee/panel_msg.h>
 #include <ee/ImageSymbol.h>
+#include <ee/Config.h>
+#include <ee/SettingData.h>

 namespace eshape
 {
@@ -96,18 +99,20 @@
 	switch (m_filling_type_choice->GetSelection())
 	{
 	case 0:
-// 		{
-// 			// todo trans between wxColor and ee::Colorf
-// 			ee::Colorf col;
-// 			col.r = m_color.Red() / 255.0f;
-// 			col.g = m_color.Green() / 255.0f;
-// 			col.b = m_color.Blue() / 255.0f;
-// 			ee::HSLColorSettingDlg dlg(m_stage_wnd, NULL, col);
-// 			if (dlg.ShowModal() == wxID_OK) {
-// 				col = dlg.GetColor();
-// 				m_color.Set(col.r * 255, col.g * 255, col.b * 255);
-// 			}
-// 		}
+		if (ee::Config::Instance()->GetSettings().color_setting_dlg_type == ee::CSDT_HSL)
+		{
+ 			// todo trans between wxColor and ee::Colorf
+ 			ee::Colorf col;
+ 			col.r = m_color.Red() / 255.0f;
+ 			col.g = m_color.Green() / 255.0f;
+ 			col.b = m_color.Blue() / 255.0f;
+ 			ee::HSLColorSettingDlg dlg(m_stage_wnd, NULL, col);
+ 			if (dlg.ShowModal() == wxID_OK) {
+ 				col = dlg.GetColor();
+ 				m_color.Set(col.r * 255, col.g * 255, col.b * 255);
+ 			}
+		}
+		else
 		{
 			// todo trans between wxColor and ee::Colorf
 			ee::Colorf col;


Update from ekb

Update from ekb

Signed-off-by: Kahn Evans <88417bcf564329fca88ff3071c3628a57ed3e5c7@us.ibm.com>

--- ecmd-core/ext/fapi2/capi/hwp_data_stream.H
+++ ecmd-core/ext/fapi2/capi/hwp_data_stream.H
@@ -322,7 +322,7 @@
          */
         ReturnCodes get8(uint8_t& o_value)
         {
-            uint64_t l_tmp;
+            uint64_t l_tmp = 0;
             const ReturnCodes l_rc = get(l_tmp, 8);
             o_value = l_tmp;
             return l_rc;
@@ -338,7 +338,7 @@
          */
         ReturnCodes get16(uint16_t& o_value)
         {
-            uint64_t l_tmp;
+            uint64_t l_tmp = 0;
             const ReturnCodes l_rc = get(l_tmp, 16);
             o_value = l_tmp;
             return l_rc;
@@ -354,7 +354,7 @@
          */
         ReturnCodes get32(uint32_t& o_value)
         {
-            uint64_t l_tmp;
+            uint64_t l_tmp = 0;
             const ReturnCodes l_rc = get(l_tmp, 32);
             o_value = l_tmp;
             return l_rc;


Strip validation extensions from replay

Strip validation extensions from replay

--- renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
+++ renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
@@ -169,7 +169,8 @@
       return true;

     // this is debug only, nothing to capture, so nothing to replay
-    if(ext == "VK_EXT_tooling_info" || ext == "VK_EXT_private_data")
+    if(ext == "VK_EXT_tooling_info" || ext == "VK_EXT_private_data" ||
+       ext == "VK_EXT_validation_features" || ext == "VK_EXT_validation_flags")
       return true;

     return false;


Remove platform specific external object extension on vulkan

--- renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
+++ renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
@@ -163,6 +163,16 @@
     // remove direct display extensions
     if(ext == "VK_KHR_display" || ext == "VK_EXT_direct_mode_display" ||
        ext == "VK_EXT_acquire_xlib_display" || ext == "VK_EXT_display_surface_counter")
+    {
+      return true;
+    }
+
+    // remove platform-specific external extensions, as we don't replay external objects. We leave
+    // the base extensions since they're widely supported and we don't strip all uses of e.g.
+    // feature structs.
+    if(ext == "VK_KHR_external_fence_fd" || ext == "VK_KHR_external_fence_win32" ||
+       ext == "VK_KHR_external_memory_fd" || ext == "VK_KHR_external_memory_win32" ||
+       ext == "VK_KHR_external_semaphore_fd" || ext == "VK_KHR_external_semaphore_win32")
     {
       return true;
     }


Demote a log print to a debug log

Demote a log print to a debug log

--- renderdoc/driver/vulkan/wrappers/vk_shader_funcs.cpp
+++ renderdoc/driver/vulkan/wrappers/vk_shader_funcs.cpp
@@ -525,8 +525,8 @@
           VkResourceRecord *baserecord = GetRecord(pCreateInfos[i].basePipelineHandle);
           record->AddParent(baserecord);

-          RDCLOG("Creating pipeline %llu base is %llu", record->GetResourceID(),
-                 baserecord->GetResourceID());
+          RDCDEBUG("Creating pipeline %llu base is %llu", record->GetResourceID(),
+                   baserecord->GetResourceID());
         }
         else if(pCreateInfos[i].basePipelineIndex != -1 && pCreateInfos[i].basePipelineIndex < (int)i)
         {


use bitmaps for markRowStarts

use bitmaps for markRowStarts

--- software/SparseMatrix.cpp
+++ software/SparseMatrix.cpp
@@ -1,6 +1,7 @@
 #include "SparseMatrix.h"
 #include <string.h>
 #include <iostream>
+#include <vector>

 using namespace std;

@@ -49,15 +50,21 @@
 	if(!m_rowStartsMarked) {
 		m_rowStartsMarked = true;
 		// flags to mark encountered row indices
-		char * encounteredRow = new char[m_rows];
+		// packed as 32-bit fields for smaller memory/cache footprint
+		unsigned int encSize = (m_rows/32)+1;
+		unsigned int * encounteredRow = new unsigned int[encSize];
+
 		// set all encountered flags to zero
-		memset(encounteredRow, 0, m_rows);
+		memset(encounteredRow, 0, sizeof(unsigned int)*encSize);

 		for(SpMVIndex nz = 0; nz < m_nz; nz++) {
 			SpMVIndex rowInd = m_inds[nz];
-			if(!encounteredRow[rowInd]) {
+			unsigned int bitInd = rowInd / 32;
+			unsigned int bitMod = rowInd % 32;
+			unsigned int bVal = encounteredRow[bitInd];
+			if((bVal & (1 << bitMod)) == 0) {
 				// set as encountered + add cold miss bit at highest position
-				encounteredRow[rowInd] = 1;
+				encounteredRow[bitInd] = bVal | (1 << bitMod);
 				m_inds[nz] = rowInd | (1 << 31);
 			}
 		}


- optimized code generation

- optimized code generation

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@14736 27541ba8-7e3a-0410-8455-c3a389f83636

--- gui/src/TGTab.cxx
+++ gui/src/TGTab.cxx
@@ -1,4 +1,4 @@
-// @(#)root/gui:$Name:  $:$Id: TGTab.cxx,v 1.29 2006/04/12 12:56:32 antcheva Exp $
+// @(#)root/gui:$Name:  $:$Id: TGTab.cxx,v 1.30 2006/04/13 15:32:35 brun Exp $
 // Author: Fons Rademakers   13/01/98

 /*************************************************************************
@@ -692,6 +692,7 @@
    }

    TGCompositeFrame *cf;
+   TGLayoutManager * lm;
    for (Int_t i=0; i<GetNumberOfTabs(); i++) {
       cf = GetTabContainer(i);
       out << endl << "   // container of " << quote
@@ -700,13 +701,22 @@
       out << "   " << cf->GetName() << " = " << GetName()
                    << "->AddTab(" << quote << GetTabTab(i)->GetString()
                    << quote << ");" << endl;
-
+      lm = cf->GetLayoutManager();
+      if (lm) {
+         if ((cf->GetOptions() & kHorizontalFrame) &&
+            (lm->InheritsFrom(TGHorizontalLayout::Class()))) {
+            ;
+         } else if ((GetOptions() & kVerticalFrame) &&
+            (lm->InheritsFrom(TGVerticalLayout::Class()))) {
+            ;
+         } else {
+            out << "   " << cf->GetName() <<"->SetLayoutManager(";
+            lm->SavePrimitive(out, option);
+            out << ");" << endl;
+         }
+      }
       cf->SavePrimitiveSubframes(out, option);
-      // setting layout manager
-      out << "   " << cf->GetName() <<"->SetLayoutManager(";
-      cf->GetLayoutManager()->SavePrimitive(out, option);
-      out << ");"<< endl;
-
+
       if (GetTabTab(i)->GetBackground() != GetTabTab(i)->GetDefaultFrameBackground()) {
          GetTabTab(i)->SaveUserColor(out, option);
          out << "   TGTabElement *tab" << i << " = "


Minor doc fixes.

Minor doc fixes.

--- include/mp++.hpp
+++ include/mp++.hpp
@@ -762,12 +762,12 @@
  * primitive types, and it provides overloaded arithmetic operators. Differently from the builtin types, however, this
  * class does not allow any implicit conversion to/from other types (apart from \p bool): construction from and
  * conversion to primitive types must always be requested explicitly. As a side effect, syntax such as
- * @code
+ * @code{.cpp}
  * mp_integer<1> n = 5;
  * int m = n;
  * @endcode
  * will not work, and direct initialization and explicit casting should be used instead:
- * @code
+ * @code{.cpp}
  * mp_integer<1> n{5};
  * int m = static_cast<int>(n);
  * @endcode
@@ -784,11 +784,11 @@
  * Most of the functionality of this class is exposed via inline friend functions, with the general convention
  * that the functions are named after the corresponding GMP functions minus the leading \p mpz_ prefix. For instance,
  * the GMP call
- * @code
+ * @code{.cpp}
  * mpz_add(rop,a,b);
  * @endcode
  * that writes the result of <tt>a+b</tt> into \p rop becomes simply
- * @code
+ * @code{.cpp}
  * add(rop,a,b);
  * @endcode
  * where the add() function is resolved via argument-dependent lookup. Function calls with overlapping arguments
@@ -805,7 +805,7 @@
  *
  * This allows to avoid having to set up a return value for one-off invocations of pow_ui() (the binary overload will
  * do it for you). For example:
- * @code
+ * @code{.cpp}
  * mp_integer<1> r1, r2, n{3};
  * pow_ui(r1,n,2);   // Ternary pow_ui(): computes n**2 and stores the result in r1.
  * r2 = pow_ui(n,2); // Binary pow_ui(): returns n**2, which is then assigned to r2.
@@ -817,7 +817,7 @@
  * - a nullary member function that modifies the calling object in-place.
  *
  * For instance, here are three possible ways of computing the absolute value:
- * @code
+ * @code{.cpp}
  * mp_integer<1> r1, r2, n{-5};
  * abs(r1,n);   // Binary abs(): computes and stores the absolute value of n into r1.
  * r2 = abs(n); // Unary abs(): returns the absolute value of n, which is then assigned to r2.
@@ -837,7 +837,7 @@
  * rules are a natural extension of the corresponding rules for native C++ types: if the other argument
  * is a C++ integral, the result will be of type mp_integer, if the other argument is a C++ floating-point the result
  * will be of the same floating-point type. For example:
- * @code
+ * @code{.cpp}
  * mp_integer<1> n1{1}, n2{2};
  * auto res1 = n1 + n2; // res1 is an mp_integer
  * auto res2 = n1 * 2; // res2 is an mp_integer
@@ -868,7 +868,7 @@
  *
  * The \p mpz_view class represent a read-only view of an mp_integer object which is implicitly convertible to the type
  * <tt>const mpz_t</tt> and which is thus usable as an argument to GMP functions. For example:
- * @code
+ * @code{.cpp}
  * mpz_t m;
  * mpz_init_set_si(m,1); // Create an mpz_t with the value 1.
  * mp_integer<1> n{1}; // Initialize an mp_integer with the value 1.
@@ -879,7 +879,7 @@
  *
  * # Hashing #
  *
- * This class provides an hash() function to compute a hash value for an integer. A specialisation
+ * This class provides a hash() function to compute a hash value for an integer. A specialisation
  * of the standard \p std::hash functor is also provided, so that it is possible to use mp_integer in standard
  * unordered associative containers out of the box.
  */
@@ -1277,7 +1277,7 @@
      * \b NOTE: this assignment operator is enabled only if \p T is an interoperable type.
      *
      * The body of this operator is equivalent to:
-     * @code
+     * @code{.cpp}
      * return *this = mp_integer{x};
      * @endcode
      * That is, a temporary integer is constructed from \p x and it is then move-assigned to \p this.


Oops, should have tested that.

Oops, should have tested that.

git-svn-id: 1d207c470b2136084517b1b032773f9117bf89a1@170 27a91dd4-ec73-4ff0-838b-64dfa05f697e

--- source/Engine/sludger.cpp
+++ source/Engine/sludger.cpp
@@ -1134,7 +1134,7 @@
 					retVal = 69;
 			}
 #else
-			retVal = launchFile(launchMe);
+			retVal = launch(launchMe);
 #endif
 			setVariable (* launchResult, SVT_INT, retVal > 31);
 			launchMe = NULL;


Remove player validation where non-valid player IDs are allowed.

--- source/Misc/Functions.cpp
+++ source/Misc/Functions.cpp
@@ -591,9 +591,6 @@
 // ------------------------------------------------------------------------------------------------
 void CreateExplosion(Int32 world, Int32 type, const Vector3 & pos, CPlayer & source, bool grounded)
 {
-    // Validate the specified player
-    source.Validate();
-    // Perform the requested operation
     if (_Func->CreateExplosion(world, type, pos.x, pos.y, pos.z,
                                 source.GetID(), grounded) == vcmpErrorArgumentOutOfBounds)
     {
@@ -604,9 +601,6 @@
 // ------------------------------------------------------------------------------------------------
 void CreateExplosionEx(Int32 world, Int32 type, Float32 x, Float32 y, Float32 z, CPlayer & source, bool grounded)
 {
-    // Validate the specified player
-    source.Validate();
-    // Perform the requested operation
     if (_Func->CreateExplosion(world, type, x, y, z,
                                 source.GetID(), grounded) == vcmpErrorArgumentOutOfBounds)
     {


Expose setup and reconnect in SmartCardModule.cc

--- source/SmartCardModule.cc
+++ source/SmartCardModule.cc
@@ -15,6 +15,8 @@

     SetPrototypeMethod(tpl, "poll", SmartCardWrapper::Poll);
     SetPrototypeMethod(tpl, "query", SmartCardWrapper::Query);
+    SetPrototypeMethod(tpl, "setup", SmartCardWrapper::Setup);
+    SetPrototypeMethod(tpl, "release", SmartCardWrapper::Release);

     Nan::Set(target, Nan::New(cls).ToLocalChecked(), tpl->GetFunction());
 };


Scope all API calls in example. Add GPIO checks.

--- examples/i2c/ToF1/ToF1.cpp
+++ examples/i2c/ToF1/ToF1.cpp
@@ -140,94 +140,128 @@
 	manager.begin();
 	display_memory(out);

-	out << F("Read VL53L0X status") << endl;
 	uint8_t result = 0;
-	bool ok = tof.get_revision(result);
-	display_memory(out);
-	out << F("tof.get_revision(result) = ") << ok << F(", result = ") << hex << result << endl;
-	DEBUG(out);
-
-	ok = tof.get_model(result);
-	display_memory(out);
-	out << F("tof.get_model(result) = ") << ok << F(", result = ") << hex << result << endl;
-	DEBUG(out);
-
-	PowerMode mode = PowerMode::STANDBY;
-	ok = tof.get_power_mode(mode);
-	display_memory(out);
-	out << F("tof.get_power_mode(mode) = ") << ok << F(", mode = ") << mode << endl;
-	DEBUG(out);
-
-	DeviceStatus status;
-	ok = tof.get_range_status(status);
-	display_memory(out);
-	out << F("tof.get_range_status(status) = ") << ok
-		<< F(", status = ") << status << endl;
-	DEBUG(out);
-
-	SequenceSteps steps1;
-	ok = tof.get_sequence_steps(steps1);
-	display_memory(out);
-	out << F("tof.get_sequence_steps(status) = ") << ok << F(", steps =") << steps1 << endl;
-	DEBUG(out);
-
-	uint8_t period = 0;
-	ok = tof.get_vcsel_pulse_period<VcselPeriodType::PRE_RANGE>(period);
-	display_memory(out);
-	out << F("tof.get_vcsel_pulse_period<PRE_RANGE>(period) = ") << ok << F(", period = ") << dec << period << endl;
-	ok = tof.get_vcsel_pulse_period<VcselPeriodType::FINAL_RANGE>(period);
-	display_memory(out);
-	out << F("tof.get_vcsel_pulse_period<FINAL_RANGE>(period) = ") << ok << F(", period = ") << dec << period << endl;
-	DEBUG(out);
-
-	// The following block adds 3KB to program size (float arithmetic libs)
-	float signal_rate = 0.0;
-	ok = tof.get_signal_rate_limit(signal_rate);
-	display_memory(out);
-	out << F("tof.get_signal_rate_limit(signal_rate) = ") << ok << F(", signal_rate = ")
-		<< fixed << signal_rate << endl;
-	DEBUG(out);
-
-	TOF::GetSPADInfoFuture future3{};
-	int error = tof.get_SPAD_info(future3);
-	// while (true)
-	// 	display_memory(out);
-	//FIXME the following LOC gets executed then nothing!
-	out << F("tof.get_SPAD_info(future) = ") << dec << error << endl;
-	// for (uint8_t i = 0; i < 10; ++i)
-	// {
-	// 	out << '.' << flush;
-	// 	time::delay_ms(100);
-	// }
-	// out << endl;
-	time::delay_ms(1000);
-	// time::delay_us(50);
-	DEBUG(out);
-	out << F("future.status() = ") << future3.status() << endl;
-	SPADInfo SPAD_info{};
-	future3.get(SPAD_info);
-	out << F("SPADInfo = ") << SPAD_info << endl;
-	DEBUG(out);
-
-	// TOF::GetSequenceStepsTimeoutFuture future2{};
-	// error = tof.get_sequence_steps_timeout(future2);
-	// out << F("tof.get_sequence_steps_timeout(future) = ") << dec << error << endl;
-	// time::delay_ms(100);
-	// DEBUG(out);
-	// out << F("future.status() = ") << future2.status() << endl;
-	// SequenceStepsTimeout timeouts{};
-	// future2.get(timeouts);
-	// out << F("tof.get_sequence_steps_timeout(timeouts) = ") << ok << flush
-	// 	<< F(", pre_range_vcsel_period_pclks = ") << dec << timeouts.pre_range_vcsel_period_pclks() << flush
-	// 	<< F(", final_range_vcsel_period_pclks = ") << dec << timeouts.final_range_vcsel_period_pclks() << flush
-	// 	<< F(", msrc_dss_tcc_mclks = ") << dec << timeouts.msrc_dss_tcc_mclks() << flush
-	// 	<< F(", pre_range_mclks = ") << dec << timeouts.pre_range_mclks() << flush
-	// 	<< F(", final_range_mclks = ") << dec << timeouts.final_range_mclks() << endl;
-	// // check calculated values
-	// out << F("timeouts.msrc_dss_tcc_us() = ") << dec << timeouts.msrc_dss_tcc_us() << flush
-	// 	<< F(", timeouts.pre_range_us() = ") << dec << timeouts.pre_range_us() << flush
-	// 	<< F(", timeouts.final_range_us() = ") << dec << timeouts.final_range_us() << endl;
-	// DEBUG(out);
+	bool ok = false;
+	int error = 0;
+
+	{
+		out << F("Read VL53L0X status") << endl;
+		ok = tof.get_revision(result);
+		display_memory(out);
+		out << F("tof.get_revision(result) = ") << ok << F(", result = ") << hex << result << endl;
+		DEBUG(out);
+	}
+
+	{
+		ok = tof.get_model(result);
+		display_memory(out);
+		out << F("tof.get_model(result) = ") << ok << F(", result = ") << hex << result << endl;
+		DEBUG(out);
+	}
+
+	{
+		PowerMode mode = PowerMode::STANDBY;
+		ok = tof.get_power_mode(mode);
+		display_memory(out);
+		out << F("tof.get_power_mode(mode) = ") << ok << F(", mode = ") << mode << endl;
+		DEBUG(out);
+	}
+
+	{
+		DeviceStatus status;
+		ok = tof.get_range_status(status);
+		display_memory(out);
+		out << F("tof.get_range_status(status) = ") << ok
+			<< F(", status = ") << status << endl;
+		DEBUG(out);
+	}
+
+	{
+		SequenceSteps steps1;
+		ok = tof.get_sequence_steps(steps1);
+		display_memory(out);
+		out << F("tof.get_sequence_steps(status) = ") << ok << F(", steps =") << steps1 << endl;
+		DEBUG(out);
+	}
+
+	{
+		uint8_t period = 0;
+		ok = tof.get_vcsel_pulse_period<VcselPeriodType::PRE_RANGE>(period);
+		display_memory(out);
+		out << F("tof.get_vcsel_pulse_period<PRE_RANGE>(period) = ") << ok << F(", period = ") << dec << period << endl;
+		ok = tof.get_vcsel_pulse_period<VcselPeriodType::FINAL_RANGE>(period);
+		display_memory(out);
+		out << F("tof.get_vcsel_pulse_period<FINAL_RANGE>(period) = ") << ok << F(", period = ") << dec << period << endl;
+		DEBUG(out);
+	}
+
+	{
+		// The following block adds 3KB to program size (float arithmetic libs)
+		float signal_rate = 0.0;
+		ok = tof.get_signal_rate_limit(signal_rate);
+		display_memory(out);
+		out << F("tof.get_signal_rate_limit(signal_rate) = ") << ok << F(", signal_rate = ")
+			<< fixed << signal_rate << endl;
+		DEBUG(out);
+	}
+
+	{
+		TOF::GetSPADInfoFuture future3{};
+		error = tof.get_SPAD_info(future3);
+		display_memory(out);
+		out << F("tof.get_SPAD_info(future) = ") << dec << error << endl;
+		time::delay_ms(500);
+		DEBUG(out);
+		out << F("future.status() = ") << future3.status() << endl;
+		SPADInfo SPAD_info{};
+		future3.get(SPAD_info);
+		out << F("SPADInfo = ") << SPAD_info << endl;
+		DEBUG(out);
+	}
+
+	{
+		TOF::GetSequenceStepsTimeoutFuture future2{};
+		error = tof.get_sequence_steps_timeout(future2);
+		display_memory(out);
+		out << F("tof.get_sequence_steps_timeout(future) = ") << dec << error << endl;
+		time::delay_ms(100);
+		DEBUG(out);
+		out << F("future.status() = ") << future2.status() << endl;
+		SequenceStepsTimeout timeouts{};
+		future2.get(timeouts);
+		out << F("tof.get_sequence_steps_timeout(timeouts) = ") << ok << flush
+			<< F(", pre_range_vcsel_period_pclks = ") << dec << timeouts.pre_range_vcsel_period_pclks() << flush
+			<< F(", final_range_vcsel_period_pclks = ") << dec << timeouts.final_range_vcsel_period_pclks() << flush
+			<< F(", msrc_dss_tcc_mclks = ") << dec << timeouts.msrc_dss_tcc_mclks() << flush
+			<< F(", pre_range_mclks = ") << dec << timeouts.pre_range_mclks() << flush
+			<< F(", final_range_mclks = ") << dec << timeouts.final_range_mclks() << endl;
+		// check calculated values
+		out << F("timeouts.msrc_dss_tcc_us() = ") << dec << timeouts.msrc_dss_tcc_us() << flush
+			<< F(", timeouts.pre_range_us() = ") << dec << timeouts.pre_range_us() << flush
+			<< F(", timeouts.final_range_us() = ") << dec << timeouts.final_range_us() << endl;
+		DEBUG(out);
+	}
+
+	{
+		TOF::GetGPIOSettingsFuture future{};
+		error = tof.get_GPIO_settings(future);
+		display_memory(out);
+		out << F("tof.get_GPIO_settings(future) = ") << dec << error << endl;
+		time::delay_ms(100);
+		DEBUG(out);
+		out << F("future.status() = ") << future.status() << endl;
+		GPIOSettings settings{};
+		future.get(settings);
+		out << F("GPIO setting=") << settings << endl;
+	}
+
+	{
+		uint8_t status = 0;
+		ok = tof.get_interrupt_status(status);
+		display_memory(out);
+		out << F("tof.get_interrupt_status(status) = ") << ok
+			<< F(", status = ") << hex << status << endl;
+	}

 	manager.end();
 }


Better comment

Better comment

--- core/utils/src/rootcling.cxx
+++ core/utils/src/rootcling.cxx
@@ -524,8 +524,8 @@
 {
    // In order to store the meaningful for the IO comments we have to transform
    // the comment into annotation of the given decl.
-   // This works only with comments in the headers, so no selectionrules in an xml
-   // file.
+   // This works only with comments in the headers, so no selection rules in an
+   // xml file.

    using namespace clang;
    SourceLocation commentSLoc;
@@ -535,9 +535,6 @@
    Sema &S = interpreter.getCI()->getSema();

    SourceRange commentRange;
-
-//    if (genreflex::verbose)
-//       std::cout << "\nInspecting class declaration " << thisClassName << " for annotations\n";

    // Fetch the selection rule associated to this class
    clang::Decl *declBaseClassPtr = static_cast<clang::Decl *>(&CXXRD);


Updated to reflect changes in Chrono (related to the shaft LCP variables).

--- src/unit_PARALLEL/chrono_parallel/physics/ChSystemParallel.cpp
+++ src/unit_PARALLEL/chrono_parallel/physics/ChSystemParallel.cpp
@@ -277,7 +277,7 @@
     shaftlist[i]->VariablesQbLoadSpeed();

     shaft_rot[i] = shaftlist[i]->GetPos();
-    shaft_inr[i] = shaftlist[i]->Variables().GetInvMass().GetElementN(0);
+    shaft_inr[i] = shaftlist[i]->Variables().GetInvInertia();
     shaft_active[i] = shaftlist[i]->IsActive();

     data_manager->host_data.v[data_manager->num_bodies * 6 + i] = shaftlist[i]->Variables().Get_qb().GetElementN(0);


Used internal pointers for expression creation where possible.

--- copasi/math/CMathObject.cpp
+++ copasi/math/CMathObject.cpp
@@ -774,7 +774,7 @@
         }

       mpCorrespondingPropertyValue = static_cast< const C_FLOAT64 * >(mpCorrespondingProperty->getValuePointer());
-      mpCompartmentValue = static_cast< const C_FLOAT64 * >(container.getMathObject(pSpecies->getCompartment()->getValueReference())->getValuePointer());
+      mpCompartmentValue = static_cast< const C_FLOAT64 * >(mpCompartmentValue);
       mpQuantity2NumberValue = static_cast< const C_FLOAT64 * >(container.getQuantity2NumberFactorObject()->getValuePointer());
     }

@@ -1165,7 +1165,7 @@

   if (pReaction->hasNoise())
     {
-      std::string Infix = pointerToString(&container.getQuantity2NumberFactor());
+      std::string Infix = pointerToString(mpQuantity2NumberValue);
       Infix += "*" + pointerToString(container.getMathObject(pReaction->getNoiseReference())->getValuePointer());

       mpExpression = new CMathExpression("ReactionParticleNoiseExpression", container);
@@ -1602,8 +1602,6 @@
   bool success = true;

   // mConc = *mpValue / (mpModel->getQuantity2NumberFactor() * mpCompartment->getValue());
-  CObjectInterface * pNumber = NULL;
-  CObjectInterface * pCompartment = NULL;

   std::ostringstream Infix;
   Infix.imbue(std::locale::classic());
@@ -1637,20 +1635,6 @@

   // mConc * mpCompartment->getValue() * mpModel->getQuantity2NumberFactor();

-  CObjectInterface * pIntensiveValue = NULL;
-  CObjectInterface * pCompartment = NULL;
-
-  if (mIsInitialValue)
-    {
-      pIntensiveValue = pSpecies->getInitialConcentrationReference();
-      pCompartment = pSpecies->getCompartment()->getInitialValueReference();
-    }
-  else
-    {
-      pIntensiveValue = pSpecies->getConcentrationReference();
-      pCompartment = pSpecies->getCompartment()->getValueReference();
-    }
-
   std::ostringstream Infix;
   Infix.imbue(std::locale::classic());
   Infix.precision(std::numeric_limits<double>::digits10 + 2);
@@ -1693,18 +1677,18 @@
   Infix << "(";
   Infix << pointerToString(container.getMathObject(pSpecies->getRateReference())->getValuePointer());
   Infix << "/";
-  Infix << pointerToString(&container.getQuantity2NumberFactor());
+  Infix << pointerToString(mpQuantity2NumberValue);

   if (pSpecies->getCompartment()->getStatus() != CModelEntity::Status::FIXED)
     {
       Infix << "-";
-      Infix << pointerToString(container.getMathObject(pSpecies->getConcentrationReference())->getValuePointer());
+      Infix << pointerToString(mpCorrespondingPropertyValue);
       Infix << "*";
       Infix << pointerToString(container.getMathObject(pSpecies->getCompartment()->getRateReference())->getValuePointer());
     }

   Infix << ")/";
-  Infix << pointerToString(container.getMathObject(pSpecies->getCompartment()->getValueReference())->getValuePointer());
+  Infix << pointerToString(mpCompartmentValue);

   if (mpExpression == NULL)
     {
@@ -1734,9 +1718,9 @@

   if (!pSpecies->getExpression().empty())
     {
-      Infix << pointerToString(&container.getQuantity2NumberFactor());
+      Infix << pointerToString(mpQuantity2NumberValue);
       Infix << "*";
-      Infix << pointerToString(container.getMathObject(pSpecies->getCompartment()->getValueReference())->getValuePointer());
+      Infix << pointerToString(mpCompartmentValue);
       Infix << "*(";
       Infix << pSpecies->getExpression();
       Infix << ")";
@@ -1914,8 +1898,8 @@
        */

       std::string Infix;
-      Infix = pointerToString(&container.getQuantity2NumberFactor());
-      Infix += "*" + pointerToString(container.getMathObject(pSpecies->getCompartment()->getValueReference())->getValuePointer());
+      Infix = pointerToString(mpQuantity2NumberValue);
+      Infix += "*" + pointerToString(mpCompartmentValue);
       Infix += "*(" + pSpecies->getNoiseExpression() + ")";

       CExpression E("ExtensiveNoiseExpression", &container);
@@ -1947,7 +1931,7 @@

   std::ostringstream Infix;
   Infix.imbue(std::locale::classic());
-  Infix.precision(16);
+  Infix.precision(std::numeric_limits<double>::digits10 + 2);

   std::string Key = pSpecies->getKey();
   bool First = true;
@@ -1983,6 +1967,18 @@
               else if (Multiplicity == -std::numeric_limits< C_FLOAT64 >::infinity())
                 {
                   Infix << "-infinity";
+                }
+              // Remove multiplying with -1.0
+              else if (-1.0 - 100.0 * std::numeric_limits< C_FLOAT64 >::epsilon() < Multiplicity &&
+                       Multiplicity < -1.0 + 100.0 * std::numeric_limits< C_FLOAT64 >::epsilon())
+                {
+                  Infix << "-";
+                }
+              // Remove multiplying with 1.0
+              else if (1.0 - 100.0 * std::numeric_limits< C_FLOAT64 >::epsilon() < Multiplicity &&
+                       Multiplicity < 1.0 + 100.0 * std::numeric_limits< C_FLOAT64 >::epsilon())
+                {
+                  // Infix << "+";
                 }
               else
                 {
@@ -1995,6 +1991,12 @@
                 {
                   Infix << "+infinity";
                 }
+              // Remove multiplying with 1.0
+              else if (1.0 - 100.0 * std::numeric_limits< C_FLOAT64 >::epsilon() < Multiplicity &&
+                       Multiplicity < 1.0 + 100.0 * std::numeric_limits< C_FLOAT64 >::epsilon())
+                {
+                  Infix << "+";
+                }
               else
                 {
                   Infix << "+" << Multiplicity;


enhance autotest a bit

enhance autotest a bit

--- tests/auto/qsystemscreensaver/tst_qsystemscreensaver.cpp
+++ tests/auto/qsystemscreensaver/tst_qsystemscreensaver.cpp
@@ -67,15 +67,25 @@
 void tst_QSystemScreenSaver::tst_screenSaverInhibited()
 {
     QSystemScreenSaver si;
-    bool enabled = si.screenSaverInhibited();
-    QVERIFY( enabled || !enabled);
+    QDesktopWidget wid;
+   bool enabled = si.setScreenSaverInhibit();
+    if(wid.screenCount() > 0) {
+        QVERIFY( si.screenSaverInhibited() && enabled);
+    } else{
+        QVERIFY(!si.screenSaverInhibited() && !enabled);
+    }
 }

 void tst_QSystemScreenSaver::tst_setScreenSaverInhibit()
 {
     QSystemScreenSaver si;
+    QDesktopWidget wid;
     bool enabled = si.setScreenSaverInhibit();
-    QVERIFY( enabled || !enabled);
+    if(wid.screenCount() > 0) {
+        QVERIFY(enabled);
+    } else{
+        QVERIFY(!enabled);
+    }
 }

 void tst_QSystemScreenSaver::tst_setScreenSaverInhibited()
@@ -85,6 +95,8 @@
     si.setScreenSaverInhibited(true);
     if(wid.screenCount() > 0) {
         QVERIFY(si.screenSaverInhibited());
+    } else{
+        QVERIFY(!si.screenSaverInhibited());
     }
     si.setScreenSaverInhibited(false);
     QVERIFY(!si.screenSaverInhibited());


Added missing return for move assignment

--- math/MatrixTemplate.cpp
+++ math/MatrixTemplate.cpp
@@ -255,6 +255,7 @@
   jstride = a.jstride;
   n = a.n;
   a.vals = NULL;
+  return *this;
 }


StateChangeScript doc.

StateChangeScript doc.

--- src/declarative/util/qdeclarativestateoperations.cpp
+++ src/declarative/util/qdeclarativestateoperations.cpp
@@ -494,9 +494,31 @@
     \qmlclass StateChangeScript QDeclarativeStateChangeScript
     \brief The StateChangeScript element allows you to run a script in a state.

-    The script specified will be run immediately when the state is made current.
-    Alternatively you can use a ScriptAction to specify at which point in the transition
+    StateChangeScripts are run when entering the state. You can use
+    ScriptAction to specify at which point in the transition
     you want the StateChangeScript to be run.
+
+    \qml
+    State {
+        name "state1"
+        StateChangeScript {
+            name: "myScript"
+            script: doStateStuff();
+        }
+        ...
+    }
+    ...
+    Transition {
+        to: "state1"
+        SequentialAnimation {
+            NumberAnimation { ... }
+            ScriptAction { scriptName: "myScript" }
+            NumberAnimation { ... }
+        }
+    }
+    \endqml
+
+    \sa ScriptAction
 */

 QDeclarativeStateChangeScript::QDeclarativeStateChangeScript(QObject *parent)


INTEGRATION: CWS changefileheader (1.4.154); FILE MERGED 2008/04/01 15:40:15 thb 1.4.154.3: #i85898# Stripping all external header guards 2008/04/01 12:41:11 thb 1.4.154.2: #i85898# Stripping all external header guards 2008/03/31 13:17:08 rt 1.4.154.1: #i87441# Change license header to LPGL v3.

--- shell/source/backends/wininetbe/wininetbackend.hxx
+++ shell/source/backends/wininetbe/wininetbackend.hxx
@@ -1,64 +1,42 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: wininetbackend.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.4 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: hr $ $Date: 2006-06-19 14:17:27 $
+ * $RCSfile: wininetbackend.hxx,v $
+ * $Revision: 1.5 $
  *
- *  The Contents of this file are made available subject to
- *  the terms of GNU Lesser General Public License Version 2.1.
+ * This file is part of OpenOffice.org.
  *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
  *
- *    GNU Lesser General Public License Version 2.1
- *    =============================================
- *    Copyright 2005 by Sun Microsystems, Inc.
- *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
  *
- *    This library is free software; you can redistribute it and/or
- *    modify it under the terms of the GNU Lesser General Public
- *    License version 2.1, as published by the Free Software Foundation.
- *
- *    This library is distributed in the hope that it will be useful,
- *    but WITHOUT ANY WARRANTY; without even the implied warranty of
- *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *    Lesser General Public License for more details.
- *
- *    You should have received a copy of the GNU Lesser General Public
- *    License along with this library; if not, write to the Free Software
- *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *    MA  02111-1307  USA
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
  *
  ************************************************************************/

 #ifndef _FIXEDVALUEBACKEND_HXX_
 #define _FIXEDVALUEBACKEND_HXX_

-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XSINGLELAYERSTRATUM_HPP_
 #include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
 #include <com/sun/star/uno/XComponentContext.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#endif
-
-#ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XBACKENDCHANGESNOTIFIER_HPP_
 #include <com/sun/star/configuration/backend/XBackendChangesNotifier.hpp>
-#endif
-
-#ifndef _CPPUHELPER_IMPLBASE2_HXX_
 #include <cppuhelper/implbase2.hxx>
-#endif
-
-#ifndef _RTL_STRING_HXX_
 #include <rtl/string.hxx>
-#endif

 #if defined _MSC_VER
 #pragma warning(push, 1)


Don't need futexaddr::lock_

Don't need futexaddr::lock_

--- kernel/futex.cc
+++ kernel/futex.cc
@@ -113,8 +113,6 @@

   futexkey_t key_;
   bool inserted_;
-  struct spinlock lock_;
-
   xns<u32, proc*, proc::hash>* const nspid_;

 private:
@@ -148,7 +146,6 @@
 futexaddr::futexaddr(futexkey_t key, xns<u32, proc*, proc::hash>* nspid)
   : rcu_freed("futexaddr"), key_(key), inserted_(false), nspid_(nspid)
 {
-  initlock(&lock_, "futexaddr::lock_", LOCKSTAT_FUTEX);
 }

 void


Avoid confusing xlC by being overly complicated.

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@21004 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/base/source/geometry_info.cc
+++ deal.II/base/source/geometry_info.cc
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors
+//    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1747,10 +1747,10 @@
 alternating_form_at_vertices
 #ifndef DEAL_II_ARRAY_ARG_BUG
 (const Point<1> (&vertices)[vertices_per_cell],
- Tensor<1-1,1> (&forms)[vertices_per_cell])
+ Tensor<0,1> (&forms)[vertices_per_cell])
 #else
   (const Point<1> *vertices,
-   Tensor<1-1,1> *forms)
+   Tensor<0,1> *forms)
 #endif
   ;

@@ -1760,10 +1760,10 @@
 alternating_form_at_vertices
 #ifndef DEAL_II_ARRAY_ARG_BUG
 (const Point<2> (&vertices)[vertices_per_cell],
- Tensor<2-1,2> (&forms)[vertices_per_cell])
+ Tensor<1,2> (&forms)[vertices_per_cell])
 #else
   (const Point<2> *vertices,
-   Tensor<2-1,2> *forms)
+   Tensor<1,2> *forms)
 #endif
   ;

@@ -1773,10 +1773,10 @@
 alternating_form_at_vertices
 #ifndef DEAL_II_ARRAY_ARG_BUG
 (const Point<2> (&vertices)[vertices_per_cell],
- Tensor<2-2,2> (&forms)[vertices_per_cell])
+ Tensor<0,2> (&forms)[vertices_per_cell])
 #else
   (const Point<2> *vertices,
-   Tensor<2-2,2> *forms)
+   Tensor<0,2> *forms)
 #endif
   ;

@@ -1786,10 +1786,10 @@
 alternating_form_at_vertices
 #ifndef DEAL_II_ARRAY_ARG_BUG
 (const Point<3> (&vertices)[vertices_per_cell],
- Tensor<3-2,3> (&forms)[vertices_per_cell])
+ Tensor<1,3> (&forms)[vertices_per_cell])
 #else
 (const Point<3> *vertices,
- Tensor<3-2,3> *forms)
+ Tensor<1,3> *forms)
 #endif
   ;

@@ -1800,10 +1800,10 @@
 alternating_form_at_vertices
 #ifndef DEAL_II_ARRAY_ARG_BUG
 (const Point<3> (&vertices)[vertices_per_cell],
- Tensor<3-3,3> (&forms)[vertices_per_cell])
+ Tensor<0,3> (&forms)[vertices_per_cell])
 #else
 (const Point<3> *vertices,
- Tensor<3-3,3> *forms)
+ Tensor<0,3> *forms)
 #endif
  ;


fixed FileSystem::GetFileBaseName () to use rfind (.)

--- Library/Sources/Stroika/Foundation/IO/FileSystem/PathName.cpp
+++ Library/Sources/Stroika/Foundation/IO/FileSystem/PathName.cpp
@@ -217,7 +217,7 @@
         baseName = baseName.RemoveAt (baseName.size () - 1);
     }
     {
-        size_t i = baseName.find ('.');
+        size_t i = baseName.rfind ('.');
         // Strip the trailing .XXX if that isn't the entire string
         if (i != String::kBadIndex and i != 0) {
             baseName =  baseName.SubString (0, i);


ENH: Add ISU to radiometric indices app

ENH: Add ISU to radiometric indices app

--- Modules/Applications/AppIndices/app/otbRadiometricIndices.cxx
+++ Modules/Applications/AppIndices/app/otbRadiometricIndices.cxx
@@ -155,11 +155,11 @@
     m_Map.push_back({"list.ndwi2","Water:NDWI2",new otb::Functor::NDWI2<InputType,OutputType>()});
     m_Map.push_back({"list.mndwi","Water:MNDWI",new otb::Functor::MNDWI<InputType,OutputType>()});
     m_Map.push_back({"list.ndti","Water:NDTI",new otb::Functor::NDTI<InputType,OutputType>()});
-    m_Map.push_back({"list.si","Soil:RI",new otb::Functor::RI<InputType,OutputType>()});
+    m_Map.push_back({"list.ri","Soil:RI",new otb::Functor::RI<InputType,OutputType>()});
     m_Map.push_back({"list.ci","Soil:CI",new otb::Functor::CI<InputType,OutputType>()});
     m_Map.push_back({"list.bi","Soil:BI",new otb::Functor::BI<InputType,OutputType>()});
     m_Map.push_back({"list.bi2","Soil:BI2",new otb::Functor::BI2<InputType,OutputType>()});
-
+    m_Map.push_back({"list.isu","BuiltUp:ISU",new otb::Functor::ISU<InputType,OutputType>()});
     ClearChoices("list");
     for ( unsigned int i=0; i<m_Map.size(); i++ )
       {


BUG: fix uninitialized memory warning in PeriodicBoundaryCondition test

The image buffer needs to be filled with values before usage. Also,
convert a print statement to a check for an expected value.

--- Modules/Core/Common/test/itkPeriodicBoundaryConditionTest.cxx
+++ Modules/Core/Common/test/itkPeriodicBoundaryConditionTest.cxx
@@ -20,6 +20,7 @@

 #include "itkPeriodicBoundaryCondition.h"
 #include "itkVectorImage.h"
+#include "itkTestingMacros.h"

 using ImageType = itk::Image<int, 2>;
 using RegionType = ImageType::RegionType;
@@ -290,6 +291,7 @@
   ImageType::RegionType testRegion(testSize);
   testImage->SetRegions(testRegion);
   testImage->Allocate();
+  testImage->FillBuffer(1);

   using BoundaryConditionType = itk::PeriodicBoundaryCondition<ImageType, ImageType>;
   using IterType = itk::ConstNeighborhoodIterator<ImageType, BoundaryConditionType>;
@@ -312,7 +314,7 @@
     }
     ++testIter;
   }
-  std::cout << "Dummy sum: " << sum << std::endl;
+  ITK_TEST_EXPECT_EQUAL(sum, testSize[0] * testSize[1] * 3);

   return EXIT_SUCCESS;
 }


fix indent

fix indent

--- neighlist_cpu_simd.hpp
+++ neighlist_cpu_simd.hpp
@@ -505,9 +505,9 @@

 public:
   NeighListSIMD(const double search_length,
-            const double Lx,
-            const double Ly,
-            const double Lz) {
+                const double Lx,
+                const double Ly,
+                const double Lz) {
     cell_numb_[0] = static_cast<int32_t>(Lx / search_length);
     cell_numb_[1] = static_cast<int32_t>(Ly / search_length);
     cell_numb_[2] = static_cast<int32_t>(Lz / search_length);


handle heart beat msg

handle heart beat msg

--- NFServer/NFLoginNet_ServerPlugin/NFCLoginNet_ServerModule.cpp
+++ NFServer/NFLoginNet_ServerPlugin/NFCLoginNet_ServerModule.cpp
@@ -250,6 +250,8 @@
 	int nMsgID = msg.GetMsgHead()->GetMsgID();
 	switch (nMsgID)
 	{
+	case NFMsg::EGameMsgID::EGMI_STS_HEART_BEAT:
+		break;

 	case NFMsg::EGameMsgID::EGMI_REQ_LOGIN:
 		OnLoginProcess(msg);


Adds empty string test case - algorithm still works

--- src/exercises/longest-subseq-size/longest_subseq.cpp
+++ src/exercises/longest-subseq-size/longest_subseq.cpp
@@ -31,7 +31,8 @@
     {"c", 1},
     {"abca", 3},
     {"ababc", 3},
-    {"abcdaf", 5}
+    {"abcdaf", 5},
+    {"", 0}
   };

   for (const auto& x : test_cases) {


INTEGRATION: CWS xmlfilter05 (1.3.6); FILE MERGED 2008/05/09 08:44:25 os 1.3.6.1: i88938# import document properties - re-checkin

--- oox/source/core/facreg.cxx
+++ oox/source/core/facreg.cxx
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: facreg.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -50,6 +50,13 @@
         const uno::Reference< lang::XMultiServiceFactory > & rSMgr )                \
     throw( uno::Exception )

+#define SERVICE2( className )                                       \
+extern OUString SAL_CALL className##_getImplementationName() throw();   \
+extern uno::Sequence< OUString > SAL_CALL className##_getSupportedServiceNames() throw();\
+extern uno::Reference< uno::XInterface > SAL_CALL className##_createInstance(           \
+        const uno::Reference< uno::XComponentContext > & xContext )             \
+    throw( uno::Exception )
+
 namespace oox {
     namespace core { SERVICE( FilterDetect ); }
     namespace ppt { SERVICE( PowerPointImport ); }
@@ -58,6 +65,7 @@
     namespace xls { SERVICE( ExcelBiffFilter ); }
     namespace shape { SERVICE( ShapeContextHandler ); }
     namespace shape { SERVICE( FastTokenHandlerService ); }
+    namespace docprop { SERVICE2( OOXMLDocPropImportImpl ); }
 }

 //
@@ -99,6 +107,7 @@
             WRITEINFO( ::oox::xls::ExcelBiffFilter );
             WRITEINFO( ::oox::shape::ShapeContextHandler );
             WRITEINFO( ::oox::shape::FastTokenHandlerService );
+            WRITEINFO( ::oox::docprop::OOXMLDocPropImportImpl );
         }
         catch (registry::InvalidRegistryException &)
         {
@@ -117,6 +126,15 @@
                 classname##_getSupportedServiceNames() );\
         }

+#define SINGLEFACTORY2(classname)\
+        if( classname##_getImplementationName().equalsAsciiL( pImplName, nImplNameLen ) )\
+        {\
+            xCompFactory = ::cppu::createSingleComponentFactory(\
+                classname##_createInstance,\
+                classname##_getImplementationName(),\
+                classname##_getSupportedServiceNames() );\
+        }
+
 OOX_DLLPUBLIC void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * )
 {
     void * pRet = 0;
@@ -125,6 +143,7 @@
         uno::Reference< lang::XMultiServiceFactory > xMSF( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );

         uno::Reference< lang::XSingleServiceFactory > xFactory;
+        uno::Reference< lang::XSingleComponentFactory > xCompFactory;

         const sal_Int32 nImplNameLen = strlen( pImplName );

@@ -136,11 +155,17 @@
         else SINGLEFACTORY( ::oox::xls::ExcelBiffFilter )
         else SINGLEFACTORY( ::oox::shape::ShapeContextHandler)
         else SINGLEFACTORY( ::oox::shape::FastTokenHandlerService)
+        else SINGLEFACTORY2( ::oox::docprop::OOXMLDocPropImportImpl )

         if( xFactory.is())
         {
             xFactory->acquire();
             pRet = xFactory.get();
+        }
+        else if ( xCompFactory.is() )
+        {
+            xCompFactory->acquire();
+            pRet = xCompFactory.get();
         }
     }
     return pRet;


Added number comparisons in operator<().

--- cpp/rt/DynamicObjectImpl.cpp
+++ cpp/rt/DynamicObjectImpl.cpp
@@ -581,41 +581,103 @@
    }
    else
    {
-      // compare based on string values
-      switch(mType)
-      {
-         case String:
-         case Boolean:
-         case Int32:
-         case Int64:
-         case UInt32:
-         case UInt64:
-         case Double:
-            switch(rhs.mType)
+      // FIXME: make isNumber() and isNumeric() functions?
+
+      // determine if lhs is a number and is negative
+      bool lhsDouble = (mType == Double);
+      bool lhsNumber = false;
+      bool lhsNegative = false;
+      if(mType == Int32 || mType == Int64 || lhsDouble)
+      {
+         lhsNegative = getDouble() < 0;
+         lhsNumber = true;
+      }
+      else if(mType == UInt32 || mType == UInt64)
+      {
+         lhsNumber = true;
+      }
+
+      // determine if rhs is a number and is negative
+      bool rhsDouble = (rhs.mType == Double);
+      bool rhsNumber = false;
+      bool rhsNegative = false;
+      if(rhs.mType == Int32 || rhs.mType == Int64 || rhsDouble)
+      {
+         rhsNegative = getDouble() < 0;
+         rhsNumber = true;
+      }
+      else if(rhs.mType == UInt32 || rhs.mType == UInt64)
+      {
+         rhsNumber = true;
+      }
+
+      // do number comparison if both lhs and rhs are numbers
+      if(lhsNumber && rhsNumber)
+      {
+         if(lhsNegative == rhsNegative)
+         {
+            if(lhsDouble || rhsDouble)
             {
-               case String:
-               case Boolean:
-               case Int32:
-               case UInt32:
-               case Int64:
-               case UInt64:
-               case Double:
-                  rval = (strcmp(getString(), rhs.getString()) < 0);
-                  break;
-               default:
-                  // maps/arrays "greater/equal" to other types
-                  rval = false;
-                  break;
+               rval = getDouble() < rhs.getDouble();
             }
-            break;
-         case Map:
-            // map is "less" than array, nothing else
-            rval = (rhs.mType == Array);
-            break;
-         case Array:
-            // array is "greatest" type
+            else if(lhsNegative || rhsNegative)
+            {
+               rval = getInt64() < rhs.getInt64();
+            }
+            else
+            {
+               rval = getUInt64() < rhs.getUInt64();
+            }
+         }
+         else if(lhsNegative)
+         {
+            // lhs is negative, rhs is not
+            rval = true;
+         }
+         else
+         {
+            // rhs is negative, lhs is not
             rval = false;
-            break;
+         }
+      }
+      else
+      {
+         // compare based on string values
+         switch(mType)
+         {
+            case String:
+            case Boolean:
+            case Int32:
+            case Int64:
+            case UInt32:
+            case UInt64:
+            case Double:
+               switch(rhs.mType)
+               {
+                  case String:
+                  case Boolean:
+                  case Int32:
+                  case UInt32:
+                  case Int64:
+                  case UInt64:
+                  case Double:
+                     rval = (strcmp(getString(), rhs.getString()) < 0);
+                     break;
+                  default:
+                     // maps/arrays "greater/equal" to other types
+                     rval = false;
+                     break;
+               }
+               break;
+            case Map:
+               // map is "less" than array, nothing else
+               rval = (rhs.mType == Array);
+               break;
+            case Array:
+               // array is "greatest" type
+               rval = false;
+               break;
+         }
       }
    }


[C++] Run algo unit test for each solvers.

--- cpp/tests/test_algorithm.cpp
+++ cpp/tests/test_algorithm.cpp
@@ -7,6 +7,13 @@
 #include <toppra/geometric_path.hpp>
 #include <toppra/geometric_path/piecewise_poly_path.hpp>
 #include <toppra/parametrizer/const_accel.hpp>
+#ifdef BUILD_WITH_qpOASES
+#include <toppra/solver/qpOASES-wrapper.hpp>
+#endif
+#ifdef BUILD_WITH_GLPK
+#include <toppra/solver/glpk-wrapper.hpp>
+#endif
+#include <toppra/solver/seidel.hpp>
 #include <toppra/toppra.hpp>

 #include "gtest/gtest.h"
@@ -50,6 +57,7 @@
  */
 // clang-format on

+template<typename Solver>
 class ProblemInstance : public testing::Test {
  public:
   ProblemInstance() {
@@ -74,21 +82,26 @@
   int nDof = 2;
 };

-TEST_F(ProblemInstance, GridpointsHasCorrectShape) {
-  toppra::algorithm::TOPPRA problem{v, path};
+using SolverTypes = ::testing::Types<
+#ifdef BUILD_WITH_qpOASES
+  toppra::solver::qpOASESWrapper,
+#endif
+#ifdef BUILD_WITH_GLPK
+  // toppra::solver::GLPKWrapper, // Failure due to numerical issue.
+#endif
+  toppra::solver::Seidel>;
+TYPED_TEST_SUITE(ProblemInstance, SolverTypes);
+
+TYPED_TEST(ProblemInstance, ControllableSets) {
+  toppra::algorithm::TOPPRA problem{this->v, this->path};
   problem.setN(50);
-  problem.computePathParametrization();
+  problem.solver(std::make_shared<TypeParam>());
+  auto ret_code = problem.computePathParametrization();
   const auto& data = problem.getParameterizationData();

   ASSERT_EQ(data.gridpoints.size(), 51);
   ASSERT_TRUE(data.gridpoints.isApprox(toppra::Vector::LinSpaced(51, 0, 3)));
-}

-TEST_F(ProblemInstance, ControllableSets) {
-  toppra::algorithm::TOPPRA problem{v, path};
-  problem.setN(50);
-  auto ret_code = problem.computePathParametrization();
-  const auto& data = problem.getParameterizationData();
   toppra::Vector e_K_max(51);
   e_K_max << 0.06666667, 0.07624309, 0.08631706, 0.09690258, 0.1005511, 0.09982804,
       0.09979021, 0.1004364, 0.10178673, 0.10184412, 0.09655088, 0.09173679, 0.08734254,
@@ -106,9 +119,10 @@
         << "idx: " << i;
 }

-TEST_F(ProblemInstance, OutputParmetrization) {
-  toppra::algorithm::TOPPRA problem{v, path};
+TYPED_TEST(ProblemInstance, OutputParmetrization) {
+  toppra::algorithm::TOPPRA problem{this->v, this->path};
   problem.setN(50);
+  problem.solver(std::make_shared<TypeParam>());
   auto ret_code = problem.computePathParametrization();
   const auto& data = problem.getParameterizationData();
   toppra::Vector expected_parametrization(51);
@@ -134,9 +148,10 @@
   EXPECT_DOUBLE_EQ(data.parametrization(50), 0);
 }

-TEST_F(ProblemInstance, FeasibleSets) {
-  toppra::algorithm::TOPPRA problem{v, path};
+TYPED_TEST(ProblemInstance, FeasibleSets) {
+  toppra::algorithm::TOPPRA problem{this->v, this->path};
   problem.setN(50);
+  problem.solver(std::make_shared<TypeParam>());
   auto ret_code = problem.computeFeasibleSets();
   const auto& data = problem.getParameterizationData();
   toppra::Vector expected_feasible_max(51);
@@ -158,14 +173,15 @@
         << ", abs diff=" << data.parametrization(i) - expected_feasible_max(i);
 }

-TEST_F(ProblemInstance, ParametrizeOutputTrajectory) {
-  toppra::algorithm::TOPPRA problem{v, path};
+TYPED_TEST(ProblemInstance, ParametrizeOutputTrajectory) {
+  toppra::algorithm::TOPPRA problem{this->v, this->path};
   problem.setN(50);
+  problem.solver(std::make_shared<TypeParam>());
   auto ret_code = problem.computePathParametrization();

   TOPPRA_LOG_DEBUG("Pre constructed");
   toppra::parametrizer::ConstAccel output_traj{
-      path, problem.getParameterizationData().gridpoints,
+      this->path, problem.getParameterizationData().gridpoints,
       problem.getParameterizationData().parametrization};

   // Qualitative assertion
@@ -175,9 +191,9 @@
   auto interval = output_traj.pathInterval();

   // Qualitative assertion
-  for (int i = 0; i < path->dof(); i++) {
-    ASSERT_EQ(output_traj.eval_single(0)[i], path->eval_single(0)[i]);
+  for (int i = 0; i < this->path->dof(); i++) {
+    ASSERT_EQ(output_traj.eval_single(0)[i], this->path->eval_single(0)[i]);
     ASSERT_EQ(output_traj.eval_single(output_traj.pathInterval()[1])[i],
-              path->eval_single(path->pathInterval()[1])[i]);
+              this->path->eval_single(this->path->pathInterval()[1])[i]);
   }
 }


telnet: Accept concurrent connections

telnet: Accept concurrent connections

Use double fork so telnetd can accept more than one connection at a
time.

--- bin/telnetd.cc
+++ bin/telnetd.cc
@@ -1,6 +1,31 @@
 #include "types.h"
 #include "user.h"
 #include "unet.h"
+
+int
+dfork(void)
+{
+  // First fork
+  int pid = fork(0);
+  if (pid < 0) {
+    fprintf(2, "telnetd fork 1: %d\n", pid);
+    return pid;
+  } else if (pid > 0) {
+    // Wait for intermediate process
+    wait(-1);
+    return pid;
+  }
+
+  // Second fork
+  pid = fork(0);
+  if (pid == 0) {
+    // Second child does the real work
+    return 0;
+  } else if (pid < 0) {
+    fprintf(2, "telnetd fork 2: %d\n", pid);
+  }
+  exit();
+}

 int
 main(void)
@@ -29,7 +54,6 @@
   for (;;) {
     socklen_t socklen;
     int ss;
-    int pid;

     socklen = sizeof(sin);
     ss = accept(s, (struct sockaddr *)&sin, &socklen);
@@ -39,13 +63,7 @@
     }
     fprintf(1, "telnetd: connection %s\n", ipaddr(&sin));

-    pid = fork(0);
-    if (pid < 0) {
-      fprintf(2, "telnetd fork: %d\n", pid);
-      close(ss);
-      continue;
-    }
-    if (pid == 0) {
+    if (dfork() == 0) {
       static const char *argv[] = { "/login", 0 };
       close(0);
       close(1);
@@ -57,7 +75,5 @@
       exit();
     }
     close(ss);
-    wait(-1);
-    fprintf(1, "telnetd: connection closed\n");
   }
 }


fixed include - error caused by renaming

--- image-processing/infrastructure/networking/websockets/message/Message.cpp
+++ image-processing/infrastructure/networking/websockets/message/Message.cpp
@@ -14,7 +14,7 @@
 #include <Poco\JSON\Object.h>

 #include "Message.h"
-#include "MessageParams.h"
+#include "MessageHeaders.h"

 using std::string;
 using std::stringstream;


INTEGRATION: CWS pchfix02 (1.70.6); FILE MERGED 2006/09/01 17:17:04 kaib 1.70.6.1: #i68856# Added header markers and pch files

--- basic/source/runtime/methods.cxx
+++ basic/source/runtime/methods.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: methods.cxx,v $
  *
- *  $Revision: 1.70 $
+ *  $Revision: 1.71 $
  *
- *  last change: $Author: ihi $ $Date: 2006-08-04 10:54:34 $
+ *  last change: $Author: obo $ $Date: 2006-09-17 10:05:16 $
  *
  *  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_basic.hxx"

 #ifndef _DATE_HXX //autogen


INTEGRATION: CWS ab11clonepp4 (1.55.16); FILE MERGED 2004/10/19 14:08:56 ab 1.55.16.2: #118087# Support WB_ABORT_RETRY_IGNORE in MsgBox 2004/10/18 14:39:00 ab 1.55.16.1: #118089# #118085# #118088# #118090# #118096# #118091# PP4 migration tasks -> SO 8

--- basic/source/runtime/methods.cxx
+++ basic/source/runtime/methods.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: methods.cxx,v $
  *
- *  $Revision: 1.57 $
+ *  $Revision: 1.58 $
  *
- *  last change: $Author: kz $ $Date: 2004-09-30 13:57:52 $
+ *  last change: $Author: pjunck $ $Date: 2004-11-02 11:57:20 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -1337,14 +1337,39 @@
     else
     {
         String aStr;
-        rPar.Get( 1 )->Format( aStr );
+        SbxVariableRef pArg = rPar.Get( 1 );
+        pArg->Format( aStr );
+
         // Numbers start with a space
-        if( rPar.Get( 1 )->IsNumericRTL() )
-        {
-            aStr.Insert( ' ', 0 );
-
+        if( pArg->IsNumericRTL() )
+        {
             // Kommas durch Punkte ersetzen, damit es symmetrisch zu Val ist!
             aStr.SearchAndReplace( ',', '.' );
+
+            SbiInstance* pInst = pINST;
+            bool bCompatibility = ( pInst && pInst->IsCompatibility() );
+            if( bCompatibility )
+            {
+                xub_StrLen nLen = aStr.Len();
+
+                const sal_Unicode* pBuf = aStr.GetBuffer();
+
+                bool bNeg = ( pBuf[0] == '-' );
+                USHORT iZeroSearch = 0;
+                if( bNeg )
+                    iZeroSearch++;
+
+                USHORT iNext = iZeroSearch + 1;
+                if( pBuf[iZeroSearch] == '0' && nLen > iNext && pBuf[iNext] == '.' )
+                {
+                    aStr.Erase( iZeroSearch, 1 );
+                    pBuf = aStr.GetBuffer();
+                }
+                if( !bNeg )
+                    aStr.Insert( ' ', 0 );
+            }
+            else
+                aStr.Insert( ' ', 0 );
         }
         rPar.Get(0)->PutString( aStr );
     }
@@ -1724,26 +1749,6 @@
     }
 }

-RTLFUNC(Weekday)
-{
-    if ( rPar.Count() < 2 )
-        StarBASIC::Error( SbERR_BAD_ARGUMENT );
-    else
-    {
-        Date aRefDate( 1,1,1900 );
-        long nDays = (long) rPar.Get(1)->GetDate();
-        nDays -= 2; // normieren: 1.1.1900 => 0
-        aRefDate += nDays;
-        DayOfWeek aDay = aRefDate.GetDayOfWeek();
-        INT16 nDay;
-        if ( aDay != SUNDAY )
-            nDay = (INT16)aDay + 2;
-        else
-            nDay = 1;   // 1==Sonntag
-        rPar.Get(0)->PutInteger( nDay );
-    }
-}
-
 RTLFUNC(Year)
 {
     if ( rPar.Count() < 2 )
@@ -1755,6 +1760,17 @@
     }
 }

+INT16 implGetHour( double dDate )
+{
+    if( dDate < 0.0 )
+        dDate *= -1.0;
+    double nFrac = dDate - floor( dDate );
+    nFrac *= 86400.0;
+    INT32 nSeconds = (INT32)(nFrac + 0.5);
+    INT16 nHour = (INT16)(nSeconds / 3600);
+    return nHour;
+}
+
 RTLFUNC(Hour)
 {
     if ( rPar.Count() < 2 )
@@ -1762,16 +1778,22 @@
     else
     {
         double nArg = rPar.Get(1)->GetDate();
-        if ( nArg < 0.0 )
-            nArg *= -1.0;
-        double nFrac = nArg - floor( nArg );
-        nFrac *= 86400.0;
-        INT32 nSeconds = (INT32)nFrac;
-        INT16 nHour = (INT16)(nSeconds / 3600);
+        INT16 nHour = implGetHour( nArg );
         rPar.Get(0)->PutInteger( nHour );
     }
 }

+INT16 implGetMinute( double dDate )
+{
+    if( dDate < 0.0 )
+        dDate *= -1.0;
+    double nFrac = dDate - floor( dDate );
+    nFrac *= 86400.0;
+    INT32 nSeconds = (INT32)(nFrac + 0.5);
+    INT16 nTemp = (INT16)(nSeconds % 3600);
+    INT16 nMin = nTemp / 60;
+    return nMin;
+}

 RTLFUNC(Minute)
 {
@@ -1780,13 +1802,7 @@
     else
     {
         double nArg = rPar.Get(1)->GetDate();
-        if ( nArg < 0.0 )
-            nArg *= -1.0;
-        double nFrac = nArg - floor( nArg );
-        nFrac *= 86400.0;
-        INT32 nSeconds = (INT32)nFrac;
-        INT16 nTemp = (INT16)(nSeconds % 3600);
-        INT16 nMin = nTemp / 60;
+        INT16 nMin = implGetMinute( nArg );
         rPar.Get(0)->PutInteger( nMin );
     }
 }
@@ -1802,6 +1818,22 @@
     }
 }

+INT16 implGetSecond( double dDate )
+{
+    if( dDate < 0.0 )
+        dDate *= -1.0;
+    double nFrac = dDate - floor( dDate );
+    nFrac *= 86400.0;
+    INT32 nSeconds = (INT32)(nFrac + 0.5);
+    INT16 nTemp = (INT16)(nSeconds / 3600);
+    nSeconds -= nTemp * 3600;
+    nTemp = (INT16)(nSeconds / 60);
+    nSeconds -= nTemp * 60;
+
+    INT16 nRet = (INT16)nSeconds;
+    return nRet;
+}
+
 RTLFUNC(Second)
 {
     if ( rPar.Count() < 2 )
@@ -1809,16 +1841,8 @@
     else
     {
         double nArg = rPar.Get(1)->GetDate();
-        if ( nArg < 0.0 )
-            nArg *= -1.0;
-        double nFrac = nArg - floor( nArg );
-        nFrac *= 86400.0;
-        INT32 nSeconds = (INT32)nFrac;
-        INT16 nTemp = (INT16)(nSeconds / 3600);
-        nSeconds -= nTemp * 3600;
-        nTemp = (INT16)(nSeconds / 60);
-        nSeconds -= nTemp * 60;
-        rPar.Get(0)->PutInteger( (INT16)nSeconds );
+        INT16 nSecond = implGetSecond( nArg );
+        rPar.Get(0)->PutInteger( nSecond );
     }
 }

@@ -3681,7 +3705,7 @@
     {
         WB_OK,              // MB_OK
         WB_OK_CANCEL,       // MB_OKCANCEL
-        WB_RETRY_CANCEL,    // MB_ABORTRETRYIGNORE
+        WB_ABORT_RETRY_IGNORE,    // MB_ABORTRETRYIGNORE
         WB_YES_NO_CANCEL,   // MB_YESNOCANCEL
         WB_YES_NO,          // MB_YESNO
         WB_RETRY_CANCEL     // MB_RETRYCANCEL
@@ -3697,7 +3721,7 @@

     USHORT nArgCount = (USHORT)rPar.Count();
-    if( nArgCount < 2 || nArgCount > 4 )
+    if( nArgCount < 2 || nArgCount > 6 )
     {
         StarBASIC::Error( SbERR_BAD_ARGUMENT );
         return;
@@ -3717,18 +3741,27 @@
     nWinDefBits = (WB_DEF_OK | WB_DEF_RETRY | WB_DEF_YES);
     if( nType & 256 )
     {
-        if( nStyle == 5 || nStyle == 2)
+        if( nStyle == 5 )
             nWinDefBits = WB_DEF_CANCEL;
+        else if( nStyle == 2 )
+            nWinDefBits = WB_DEF_RETRY;
         else
             nWinDefBits = (WB_DEF_CANCEL | WB_DEF_RETRY | WB_DEF_NO);
     }
-    if( nType & 512 )
+    else if( nType & 512 )
+    {
+        if( nStyle == 2)
+            nWinDefBits = WB_DEF_IGNORE;
+        else
+            nWinDefBits = WB_DEF_CANCEL;
+    }
+    else if( nStyle == 2)
         nWinDefBits = WB_DEF_CANCEL;
     nWinBits |= nWinDefBits;

     String aMsg = rPar.Get(1)->GetString();
     String aTitle;
-    if( nArgCount == 4 )
+    if( nArgCount >= 4 )
         aTitle = rPar.Get(3)->GetString();
     else
         aTitle = GetpApp()->GetAppName();
@@ -3757,7 +3790,18 @@
     USHORT nRet = (USHORT)pBox->Execute();
     if( nRet == TRUE )
         nRet = 1;
-    rPar.Get(0)->PutInteger( nButtonMap[ nRet ] );
+
+    INT16 nMappedRet;
+    if( nStyle == 2 )
+    {
+        nMappedRet = nRet;
+        if( nMappedRet == 0 )
+            nMappedRet = 3; // Abort
+    }
+    else
+        nMappedRet = nButtonMap[ nRet ];
+
+    rPar.Get(0)->PutInteger( nMappedRet );
     delete pBox;
 }


output to cout, not cerr, the actual results

--- bench/analyze-blocking-sizes.cpp
+++ bench/analyze-blocking-sizes.cpp
@@ -680,38 +680,38 @@
       }
     }

-    cerr << "All results:" << endl;
+    cout << "All results:" << endl;
     for (auto it = results.begin(); it != results.end(); ++it) {
-      cerr << *it << endl;
-    }
-    cerr << endl;
+      cout << *it << endl;
+    }
+    cout << endl;

     sort(results.begin(), results.end(), lower_efficiency);

     const size_t n = min<size_t>(20, results.size());
-    cerr << n << " worst results:" << endl;
+    cout << n << " worst results:" << endl;
     for (size_t i = 0; i < n; i++) {
-      cerr << results[i] << endl;
-    }
-    cerr << endl;
-
-    cerr << "cubic results:" << endl;
+      cout << results[i] << endl;
+    }
+    cout << endl;
+
+    cout << "cubic results:" << endl;
     for (auto it = cubic_results.begin(); it != cubic_results.end(); ++it) {
-      cerr << *it << endl;
-    }
-    cerr << endl;
+      cout << *it << endl;
+    }
+    cout << endl;

     sort(cubic_results.begin(), cubic_results.end(), lower_efficiency);

-    cerr.precision(2);
+    cout.precision(2);
     vector<float> a = {0.5f, 0.20f, 0.10f, 0.05f, 0.02f, 0.01f};
     for (auto it = a.begin(); it != a.end(); ++it) {
       size_t n = min(results.size() - 1, size_t(*it * results.size()));
-      cerr << (100.0f * n / (results.size() - 1))
+      cout << (100.0f * n / (results.size() - 1))
            << " % of product sizes have default efficiency <= "
            << 100.0f * results[n].default_efficiency << " %" << endl;
     }
-    cerr.precision(default_precision);
+    cout.precision(default_precision);
   }
 };


完善字符串操作

完善字符串操作

--- lcxl_string.cpp
+++ lcxl_string.cpp
@@ -45,14 +45,16 @@
 	std::wstring str1;

 	textlen = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0);
+	if (textlen > 0) {
+		result = (wchar_t *)malloc((textlen + 1)*sizeof(wchar_t));
+		if (result != NULL) {
+			memset(result, 0, sizeof(wchar_t)* (textlen + 1));
+			MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, result, textlen);
+			str1 = result;
+			free(result);
+		}
+	}

-	result = (wchar_t *)malloc((textlen + 1)*sizeof(wchar_t));
-	if (result != NULL) {
-		memset(result, 0, sizeof(wchar_t)* (textlen + 1));
-		MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, result, textlen);
-		str1 = result;
-		free(result);
-	}
 	return str1;
 }

@@ -60,14 +62,19 @@
 {
 	char* result;
 	int textlen;
+	std::string str1;
 	textlen = WideCharToMultiByte(CP_UTF8, 0, str.c_str(), -1, NULL, 0, NULL, NULL);
+	if (textlen > 0) {
+		result = (char *)malloc((textlen + 1)*sizeof(char));
+		if (result != NULL) {
+			memset(result, 0, sizeof(char)* (textlen + 1));
+			WideCharToMultiByte(CP_UTF8, 0, str.c_str(), -1, result, textlen, NULL, NULL);
+
+			str1 = result;
+			free(result);
+		}
+	}

-	result = (char *)malloc((textlen + 1)*sizeof(char));
-	memset(result, 0, sizeof(char)* (textlen + 1));
-	WideCharToMultiByte(CP_UTF8, 0, str.c_str(), -1, result, textlen, NULL, NULL);
-
-	std::string str1(result);
-	free(result);
 	return str1;
 }


change copyright, there is no original code left here, except some  timeing/trace-debugging routines that I wrote ...

--- opencog/atomspace/utils.cc
+++ opencog/atomspace/utils.cc
@@ -1,11 +1,10 @@
 /*
  * src/AtomSpace/utils.cc
  *
- * Copyright (C) 2002-2007 Novamente LLC
+ * Copyright (C) 2008 Linas Vepstas
  * All Rights Reserved
  *
- * Written by Thiago Maia <thiago@vettatech.com>
- *            Andre Senna <senna@vettalabs.com>
+ * Written by Linas Vepstas <linasvepstas@gmail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License v3 as


Doxygen

Doxygen


Adding init_generics

Adding init_generics

--- core/models/mctrl/mctrl.cpp
+++ core/models/mctrl/mctrl.cpp
@@ -107,6 +107,7 @@
     0x0F,                                        // dev: MCTRL
     0, 0,                                        // VER, IRQ
     APBIO, _pmask, 0, 0, _paddr);
+  init_generics();

   // Display APB slave information
   srInfo("/configuration/gptimer/apbslave")


properties

properties

--- packages/segmentation/src/irtkSegmentationFunction.cc
+++ packages/segmentation/src/irtkSegmentationFunction.cc
@@ -1056,13 +1056,13 @@
     classification->GetProbMap(0,tmpatest0);
     classification->GetProbMap(1,tmpatest1);
   }
-  char name[100];
-  for(int i=0;i<n;i++) {
-    sprintf(name, "emgmmseg%d.nii.gz",i);
-    atest[i].Write(name);
-  }
-  tmpatest0.Write("embackground.nii.gz");
-  tmpatest1.Write("emforeground.nii.gz");
+  //char name[100];
+  //for(int i=0;i<n;i++) {
+  //  sprintf(name, "emgmmseg%d.nii.gz",i);
+  //  atest[i].Write(name);
+  //}
+  //tmpatest0.Write("embackground.nii.gz");
+  //tmpatest1.Write("emforeground.nii.gz");
   //add weights for graph cut
   irtkImageGraphCut<float> graphcut;
   graphcut.SetInput(number,input,&tmpatest0,&tmpatest1);


INTEGRATION: CWS oasisbf2 (1.90.56); FILE MERGED 2004/11/04 15:30:21 dvo 1.90.56.1: #i31024# prevent headings with outline num-rules from being written as lists          (plus dependent changes for NO_NUM removal)

--- sw/inc/doc.hxx
+++ sw/inc/doc.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: doc.hxx,v $
  *
- *  $Revision: 1.92 $
+ *  $Revision: 1.93 $
  *
- *  last change: $Author: obo $ $Date: 2004-11-16 10:18:58 $
+ *  last change: $Author: rt $ $Date: 2004-11-26 13:21:57 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -1579,7 +1579,7 @@
                     const xub_StrLen nOffset = 0, sal_Bool bMoveCrsr = sal_False );

         // GliederungsRegeln erfragen / setzen
-    SwNumRule* GetOutlineNumRule() const { return pOutlineRule; }
+    SwNumRule* GetOutlineNumRule() const;
     void SetOutlineNumRule( const SwNumRule& rRule );
     // Gliederung - hoch-/runterstufen
     sal_Bool OutlineUpDown( const SwPaM& rPam, short nOffset = 1 );


Remove unused network code from targets/ChibiOS folder

Signed-off-by: José Simões <1616ff7a83d123f98f8f38fa2524eab406644781@eclo.solutions>

--- targets/CMSIS-OS/ChibiOS/nanoCLR/System.Net/sys_net_native.cpp
+++ targets/CMSIS-OS/ChibiOS/nanoCLR/System.Net/sys_net_native.cpp
@@ -1,133 +0,0 @@
-//
-// Copyright (c) 2018 The nanoFramework project contributors
-// Portions Copyright (c) Microsoft Corporation.  All rights reserved.
-// See LICENSE file in the project root for full license information.
-//
-
-
-#include "sys_net_native.h"
-
-
-static const CLR_RT_MethodHandler method_lookup[] =
-{
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::socket___STATIC__I4__I4__I4__I4,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::bind___STATIC__VOID__OBJECT__SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::connect___STATIC__VOID__OBJECT__SZARRAY_U1__BOOLEAN,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::send___STATIC__I4__OBJECT__SZARRAY_U1__I4__I4__I4__I4,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::recv___STATIC__I4__OBJECT__SZARRAY_U1__I4__I4__I4__I4,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::close___STATIC__I4__OBJECT,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::listen___STATIC__VOID__OBJECT__I4,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::accept___STATIC__I4__OBJECT,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::getaddrinfo___STATIC__VOID__STRING__BYREF_STRING__BYREF_SZARRAY_SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::shutdown___STATIC__VOID__OBJECT__I4__BYREF_I4,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::sendto___STATIC__I4__OBJECT__SZARRAY_U1__I4__I4__I4__I4__SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::recvfrom___STATIC__I4__OBJECT__SZARRAY_U1__I4__I4__I4__I4__BYREF_SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::getpeername___STATIC__VOID__OBJECT__BYREF_SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::getsockname___STATIC__VOID__OBJECT__BYREF_SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::getsockopt___STATIC__VOID__OBJECT__I4__I4__SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::setsockopt___STATIC__VOID__OBJECT__I4__I4__SZARRAY_U1,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::poll___STATIC__BOOLEAN__OBJECT__I4__I4,
-    Library_sys_net_native_System_Net_Sockets_NativeSocket::ioctl___STATIC__VOID__OBJECT__U4__BYREF_U4,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-};
-
-const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_System_Net =
-{
-    "System.Net",
-    0xDE2F601A,
-    method_lookup,
-    { 1, 0, 0, 0 }
-};


added second angle to drag-rotate + some cleanup

--- chart2/source/controller/main/ChartController_Window.cxx
+++ chart2/source/controller/main/ChartController_Window.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: ChartController_Window.cxx,v $
  *
- *  $Revision: 1.10 $
- *
- *  last change: $Author: iha $ $Date: 2003-12-10 18:29:23 $
+ *  $Revision: 1.11 $
+ *
+ *  last change: $Author: iha $ $Date: 2003-12-10 19:20:26 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -460,9 +460,10 @@
         Rectangle           m_aReferenceRect;
         Point               m_aStartPos;

-        drawing::Direction3D    m_aRotationAxis;
-        double                  m_fStartRotationAngleDegree;
-        Matrix4D                m_aParentTransform;
+        double              m_fXAngleDegree;
+        double              m_fYAngleDegree;
+        double              m_fZAngleDegree;
+        Matrix4D            m_aParentTransform;

         Matrix4D            m_aCurrentTransform;
         Polygon3D           m_aWireframePoly;
@@ -474,8 +475,9 @@
     , m_pScene(0)
     , m_aReferenceRect(100,100,100,100)
     , m_aStartPos(0,0)
-    , m_aRotationAxis(0,1,0)
-    , m_fStartRotationAngleDegree(0.0)
+    , m_fXAngleDegree(0.0)
+    , m_fYAngleDegree(0.0)
+    , m_fZAngleDegree(0.0)
     , m_aParentTransform()
     , m_aCurrentTransform()
     , m_aWireframePoly()
@@ -491,31 +493,22 @@
             pE3dObject->CreateWireframe(m_aWireframePoly, NULL, E3DDETAIL_DEFAULT ); //E3DDETAIL_ONEBOX, E3DDETAIL_ALLBOXES, E3DDETAIL_ALLLINES
             m_pScene = pE3dObject->GetScene();

-            //m_aCurrentTransform = m_pScene->GetFullTransform();
-            //--
+            //get pure rotation matrix
             Matrix4D aPureRotateMatrix = m_pScene->GetTransform();
             Matrix4D aTranslateM4Inverse;
             aTranslateM4Inverse.Translate(FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, 0.0);
             aPureRotateMatrix = aPureRotateMatrix*aTranslateM4Inverse;
-            //--
-            Matrix4D aSceneFullM4 = m_pScene->GetFullTransform();
-            Matrix4D aSceneM4 = m_pScene->GetTransform();
-            Matrix4D aObjM4 = pE3dObject->GetTransform();
-            Matrix4D aObjFullM4 = pE3dObject->GetFullTransform();
-            Rotation::getRotationAxisAngleFromMatrixRepresentation( m_aRotationAxis, m_fStartRotationAngleDegree, aPureRotateMatrix );
+
+            //get euler angles from pure rotation matrix
+            drawing::Direction3D aAxis; double fAngle;
+            Rotation::getRotationAxisAngleFromMatrixRepresentation( aAxis, fAngle, aPureRotateMatrix );
+            Rotation::getEulerFromAxisAngleRepresentation( aAxis, fAngle, m_fXAngleDegree, m_fYAngleDegree, m_fZAngleDegree );

             if(pE3dObject->GetParentObj())
             {
                 E3dObject* pParent = pE3dObject->GetParentObj();
                 m_aReferenceRect = pParent->GetLogicRect();
                 m_aParentTransform = pParent->GetTransform();
-
-                Matrix4D aParentM4 = pParent->GetTransform();
-                Matrix4D aParentFullM4 = pParent->GetFullTransform();
-                int i;
-                int j=i;
-                //m_aCurrentTransform = pParent->GetFullTransform();
-                //Rotation::getRotationAxisAngleFromMatrixRepresentation( m_aRotationAxis, m_fStartRotationAngleDegree, m_aCurrentTransform );
             }

             Matrix4D aTranslateM4;
@@ -540,17 +533,15 @@
     if( DragStat().CheckMinMoved(rPnt) )
     {
         //calculate new angle
-        double fWAngle = 180.0 * (double)(m_aStartPos.X() - rPnt.X())
+        double fWAngle = 180.0 * (double)(rPnt.X() - m_aStartPos.X())
             / (double)m_aReferenceRect.GetWidth();
-        double fHAngle = 180.0 * (double)(m_aStartPos.Y() - rPnt.Y())
+        double fHAngle = 90.0 * (double)(rPnt.Y() - m_aStartPos.Y())
             / (double)m_aReferenceRect.GetHeight();

-        //get new transformation from axis angle representation
-        Matrix4D aRotateM4 = Rotation::getRotationMatrixFromAxisAngleRepresentation( m_aRotationAxis, m_fStartRotationAngleDegree+fWAngle );
-        /*
-        Matrix4D aTranslateM4;
-        aTranslateM4.Translate(-FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, -FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, 0.0);
-        */
+        //get new transformation matrix from euler angles
+        drawing::Direction3D aAxis; double fAngle;
+        Rotation::getAxisAngleFromEulerRepresentation( aAxis, fAngle, m_fXAngleDegree+fHAngle, m_fYAngleDegree+fWAngle, m_fZAngleDegree );
+        Matrix4D aRotateM4 = Rotation::getRotationMatrixFromAxisAngleRepresentation( aAxis, fAngle );

         //use new matrix
         Hide();
@@ -731,39 +722,22 @@
     {
         if( pDrawViewWrapper->EndDragObj(false) )
         {
-            //@todo ... cleanup
             try
             {
                 SdrObject* pObj = pDrawViewWrapper->getSelectedObject();
-                Rectangle aObjectRect = pObj->GetSnapRect();
-                Rectangle aPageRect( Point(0,0),m_pChartWindow->GetOutputSize() );
-
-                //----------------
-
-                uno::Reference< beans::XPropertySet > xProp = ObjectIdentifier::getObjectPropertySet(
-                    m_aSelectedObjectCID, m_aModel->getModel() );
-                if( xProp.is() )
+                SdrDragMode eDragMode = pDrawViewWrapper->GetDragMode();
+
+                if( SDRDRAG_ROTATE==eDragMode )
                 {
-                    SdrDragMode eDragMode = pDrawViewWrapper->GetDragMode();
-                    if( SDRDRAG_ROTATE==eDragMode )
+                    if(pObj->ISA(E3dObject))
                     {
-                        Matrix4D aSceneMatrix;
-                        if(pObj->ISA(E3dObject))
-                        {
-                            E3dObject* pE3dObject = (E3dObject*)pObj;
-                            E3dScene* pScene = pE3dObject->GetScene();
-                            aSceneMatrix = pScene->GetFullTransform();
-                            /*
-                            if(pE3dObject->GetParentObj())
-                                aSceneMatrix = pE3dObject->GetParentObj()->GetFullTransform();
-                                */
-                            Matrix4D aTranslateM4Inverse;
-                            aTranslateM4Inverse.Translate(FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, 0.0);
-
-                            aSceneMatrix = aSceneMatrix*aTranslateM4Inverse;
-                        }
+                        Matrix4D aSceneMatrix(((E3dObject*)pObj)->GetScene()->GetFullTransform());
+                        Matrix4D aTranslateM4Inverse;
+                        aTranslateM4Inverse.Translate(FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, FIXED_SIZE_FOR_3D_CHART_VOLUME/2.0, 0.0);
+                        aSceneMatrix = aSceneMatrix*aTranslateM4Inverse;
+
                         SceneDescriptor aSceneDescriptor;
-                        xProp = uno::Reference< beans::XPropertySet >( ChartModelHelper::findDiagram( m_aModel->getModel() ), uno::UNO_QUERY );
+                        uno::Reference< beans::XPropertySet > xProp = uno::Reference< beans::XPropertySet >( ChartModelHelper::findDiagram( m_aModel->getModel() ), uno::UNO_QUERY );
                         if( xProp.is() && (xProp->getPropertyValue( C2U( "SceneProperties" ) )>>=aSceneDescriptor) )
                         {
                             Rotation::getRotationAxisAngleFromMatrixRepresentation( aSceneDescriptor.aDirection, aSceneDescriptor.fRotationAngle, aSceneMatrix );
@@ -771,17 +745,20 @@
                             xProp->setPropertyValue( C2U( "SceneProperties" ), uno::makeAny(aSceneDescriptor) );
                         }
                     }
-                    else
-                    {
-                        if(pObj->ISA(E3dObject))
-                            aObjectRect = ((E3dObject*)pObj)->GetScene()->GetSnapRect();
-
-                        PositionAndSizeHelper::moveObject( m_aSelectedObjectCID
-                                        , m_aModel->getModel()
-                                        , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight())
-                                        , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight())
-                                        );
-                    }
+                }
+                else //end move or size
+                {
+                    Rectangle aObjectRect = pObj->GetSnapRect();
+                    Rectangle aPageRect( Point(0,0),m_pChartWindow->GetOutputSize() );
+
+                    if(pObj->ISA(E3dObject))
+                        aObjectRect = ((E3dObject*)pObj)->GetScene()->GetSnapRect();
+
+                    PositionAndSizeHelper::moveObject( m_aSelectedObjectCID
+                                    , m_aModel->getModel()
+                                    , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight())
+                                    , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight())
+                                    );
                 }
             }
             catch( uno::Exception & ex )


nv50/ir: fix error finding free element in bitset in some situations

This really only hits for bitsets with a size of a multiple of 32. We
can end up with pos = -1 as a result of the ffs, which we in turn decide
is a valid position (since we fall through the loop and i == 1, we end
up adding 32 to it, so end up returning 31 again).

Up until recently this was largely unreachable, as the register file
sizes were all 63 or 255. However with the advent of compute shaders
which can restrict the number of registers, this can now happen.

Signed-off-by: Ilia Mirkin <bcbbb7aa705ec3a5fc5824c01a845186c3d62fca@alum.mit.edu>
Cc: "12.0" <59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org>

--- src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp
+++ src/gallium/drivers/nouveau/codegen/nv50_ir_util.cpp
@@ -365,6 +365,12 @@
          }
       }
    }
+
+   // If we couldn't find a position, we can have a left-over -1 in pos. Make
+   // sure to abort in such a case.
+   if (pos < 0)
+      return -1;
+
    pos += i * 32;

    return ((pos + count) <= size) ? pos : -1;


Fix includes in stubbed login that were broken by profile.h and profile_manager.h moving.

BUG=none
TEST=none
TBR=sky

Review URL: http://codereview.chromium.org/5561007
Patch from Ryan Harrison <rharrison@chromium.org>.

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@68601 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/chromeos/dom_ui/login/login_ui_helpers.cc
+++ chrome/browser/chromeos/dom_ui/login/login_ui_helpers.cc
@@ -12,8 +12,8 @@
 #include "chrome/browser/browser_list.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chromeos/dom_ui/login/login_ui_helpers.h"
-#include "chrome/browser/profile.h"
-#include "chrome/browser/profile_manager.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/jstemplate_builder.h"


nvc0/ir: remove useless NVC0LoweringPass::gMemBase

Signed-off-by: Samuel Pitoiset <506e97eed81d9e59d22f4c73fb51123bb62b4a30@gmail.com>

--- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
+++ src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
@@ -598,7 +598,6 @@
 NVC0LoweringPass::NVC0LoweringPass(Program *prog) : targ(prog->getTarget())
 {
    bld.setProgram(prog);
-   gMemBase = NULL;
 }

 bool
@@ -1979,9 +1978,7 @@
       }
       Instruction *red = bld.mkOp(OP_ATOM, su->dType, bld.getSSA());
       red->subOp = su->subOp;
-      if (!gMemBase)
-         gMemBase = bld.mkSymbol(FILE_MEMORY_GLOBAL, 0, TYPE_U32, 0);
-      red->setSrc(0, gMemBase);
+      red->setSrc(0, bld.mkSymbol(FILE_MEMORY_GLOBAL, 0, TYPE_U32, 0));
       red->setSrc(1, su->getSrc(3));
       if (su->subOp == NV50_IR_SUBOP_ATOM_CAS)
          red->setSrc(2, su->getSrc(4));


Enable extension tests now that upstream r53815 has fixed the crash in pthread_join on Linux.
BUG=33085
TEST=none
Review URL: http://codereview.chromium.org/552155

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@37149 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/extensions/extension_browsertests_misc.cc
+++ chrome/browser/extensions/extension_browsertests_misc.cc
@@ -377,21 +377,6 @@
   EXPECT_STREQ(expected_error.c_str(), error.c_str());
 }

-#if defined(OS_LINUX)
-// http://crbug.com/33085 Temporarily disabled some browser tests
-// that fail because of r53715 upstream.
-#define ParseFeedValidFeed0 DISABLED_ParseFeedValidFeed0
-#define ParseFeedValidFeed1 DISABLED_ParseFeedValidFeed1
-#define ParseFeedValidFeed2 DISABLED_ParseFeedValidFeed2
-#define ParseFeedValidFeed3 DISABLED_ParseFeedValidFeed3
-#define ParseFeedValidFeed4 DISABLED_ParseFeedValidFeed4
-#define ParseFeedValidFeed5 DISABLED_ParseFeedValidFeed5
-#define ParseFeedValidFeedNoLinks DISABLED_ParseFeedValidFeedNoLinks
-#define ParseFeedInvalidFeed1 DISABLED_ParseFeedInvalidFeed1
-#define ParseFeedInvalidFeed2 DISABLED_ParseFeedInvalidFeed2
-#define ParseFeedInvalidFeed3 DISABLED_ParseFeedInvalidFeed3
-#endif
-
 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, ParseFeedValidFeed1) {
   HTTPTestServer* server = StartHTTPServer();
   GetParsedFeedData(server, kValidFeed1, browser(),


- flag missing modifier as error, rather than exception

--- copasi/model/CReaction.cpp
+++ copasi/model/CReaction.cpp
@@ -1590,9 +1590,11 @@
                                     }
                                   else
                                     {
-                                      delete pVariableNode;
-                                      pVariableNode = NULL;
-                                      CCopasiMessage(CCopasiMessage::EXCEPTION, MCReaction + 7, id.c_str(), this->getSBMLId().c_str());
+                                      // rather than just fail to load the model alltogether, mark as invalid but
+                                      // continue loading the model
+                                      CCopasiMessage(CCopasiMessage::ERROR, MCReaction + 7, id.c_str(), this->getSBMLId().c_str());
+                                      found = true;
+                                      usage = CFunctionParameter::Role::MODIFIER;
                                     }
                                 }
                             }


fix a bug when the parameter is null

fix a bug when the parameter is null

--- src/cpp/shared_core/include/shared_core/json/Json.hpp
+++ src/cpp/shared_core/include/shared_core/json/Json.hpp
@@ -1978,7 +1978,7 @@
 {
    // If the value is optional, no need to report that it's missing.
    Object::Iterator itr = in_object.find(in_name);
-   if (itr == in_object.end())
+   if (itr == in_object.end() || (*itr).getValue().isNull())
       return Success();

    if (!isType<T>((*itr).getValue()))
@@ -2021,7 +2021,6 @@
       return jsonReadError(JsonReadError::INVALID_TYPE,
                            "Member " + in_name + " is not an array.",
                            ERROR_LOCATION);
-

    Array array = (*itr).getValue().getArray();
    for (size_t i = 0, n = array.getSize(); i < n; ++i)


add missing file/static info

add missing file/static info

--- bin/rmf_cat.cpp
+++ bin/rmf_cat.cpp
@@ -39,7 +39,9 @@
     for (unsigned int i = 0; i < inputs.size(); ++i) {
       RMF::FileConstHandle rh = RMF::open_rmf_file_read_only(inputs[i]);
       if (i == 0) {
+        RMF::clone_file_info(rh, orh); // creator etc. (not essential)
         RMF::clone_hierarchy(rh, orh);
+        RMF::clone_static_frame(rh, orh);
       }
       orh.set_description(orh.get_description() + "\n" + rh.get_description());
       RMF_FOREACH(RMF::FrameID ni, rh.get_frames()) {


hecl: Allow Time instances to be constexpr

Some constructors accept primitive values. These can be made constexpr.

--- hecl/include/hecl/hecl.hpp
+++ hecl/include/hecl/hecl.hpp
@@ -485,20 +485,20 @@
   time_t ts;

 public:
-  Time() : ts(time(NULL)) {}
-  Time(time_t ti) : ts(ti) {}
-  Time(const Time& other) { ts = other.ts; }
-  time_t getTs() const { return ts; }
-  Time& operator=(const Time& other) {
+  Time() : ts(std::time(nullptr)) {}
+  constexpr Time(time_t ti) noexcept : ts{ti} {}
+  constexpr Time(const Time& other) noexcept : ts{other.ts} {}
+  [[nodiscard]] constexpr time_t getTs() const { return ts; }
+  constexpr Time& operator=(const Time& other) noexcept {
     ts = other.ts;
     return *this;
   }
-  bool operator==(const Time& other) const { return ts == other.ts; }
-  bool operator!=(const Time& other) const { return ts != other.ts; }
-  bool operator<(const Time& other) const { return ts < other.ts; }
-  bool operator>(const Time& other) const { return ts > other.ts; }
-  bool operator<=(const Time& other) const { return ts <= other.ts; }
-  bool operator>=(const Time& other) const { return ts >= other.ts; }
+  [[nodiscard]] constexpr bool operator==(const Time& other) const noexcept { return ts == other.ts; }
+  [[nodiscard]] constexpr bool operator!=(const Time& other) const noexcept { return ts != other.ts; }
+  [[nodiscard]] constexpr bool operator<(const Time& other) const noexcept { return ts < other.ts; }
+  [[nodiscard]] constexpr bool operator>(const Time& other) const noexcept { return ts > other.ts; }
+  [[nodiscard]] constexpr bool operator<=(const Time& other) const noexcept { return ts <= other.ts; }
+  [[nodiscard]] constexpr bool operator>=(const Time& other) const noexcept { return ts >= other.ts; }
 };

 /**


Updates for Cumulus dmi/mi/mc initfiles

Updates for Cumulus dmi/mi/mc initfiles

Includes workaround for HW413362
Replaces patches 43055 and 43056

Change-Id: I95a4602e36250f6ec9dcd8bb1a590c9f29d3f22a
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43158
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Reviewed-by: LENNARD G. STREAT <6ecb9723c17a1a1207b8816824e34c75045444cf@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Dev-Ready: Brent Wieman <cab499b31cd4c652b90b4682871101e72d52e19a@us.ibm.com>
Reviewed-by: SHELTON LEUNG <0860b58d0e48839f9ac78f20341df5869a122f43@us.ibm.com>
Reviewed-by: Joseph J. McGill <4a85c6614f9f065f63d8fd57cde15e48af07ea2a@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43159
Reviewed-by: Hostboot Team <6963c9c00f6fe376c46a8e103faee5c9a2f9eaf2@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+6963c9c00f6fe376c46a8e103faee5c9a2f9eaf2@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+6963c9c00f6fe376c46a8e103faee5c9a2f9eaf2@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+6963c9c00f6fe376c46a8e103faee5c9a2f9eaf2@us.ibm.com>
Reviewed-by: Daniel M. Crowell <912029ca9254ac7b5854e56910561d682e1fa2d0@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/nest/p9_chiplet_scominit.C
+++ src/import/chips/p9/procedures/hwp/nest/p9_chiplet_scominit.C
@@ -282,7 +282,7 @@
         {
             fapi2::toString(l_dmi_target, l_chipletTargetStr, sizeof(l_chipletTargetStr));
             FAPI_DBG("Invoking p9c.dmi.scom.initfile on target %s...", l_chipletTargetStr);
-            FAPI_EXEC_HWP(l_rc, p9c_dmi_scom, l_dmi_target, FAPI_SYSTEM);
+            FAPI_EXEC_HWP(l_rc, p9c_dmi_scom, l_dmi_target, FAPI_SYSTEM, i_target);

             if (l_rc)
             {


Secure memory allocation and setup

Secure memory allocation and setup

p9_mss_eff_grouping.C:
  - determines whether secure mem is requested, reserves smf space
  - always reserve smf at end of range because of end-of-range bit
  - set addr15 when reporting smf base address
  - mask off group_id(0) via chip address extension if smf is enabled
  - updated to set value of attr_smf_enabled
  - enhanced error reporting with smf config/supported values
  - made values reported to attr_mss_mcs_group_32 more clear

p9_mss_setup_bars.C:
  - set MCFGPA/MCFGPMA registers with SMF data
  - fixed scom registers for MCFGPA/MCFGPMA hole setup
  - added note to leave MCFIR_invalid_smf masked for HW451708/HW451711
  - added assert to check for HOLE1 and SMF enable overlaps

p9_query_mssinfo.C:
  - updated to print out SMF reservations
  - print out HTM/OCC/SMF reservations regardless of mirroring enable

p9_fbc_utils.C:
  - prevent group_id(0)=1 from affecting mappable memory ranges

p9_sbe_fabricinit.C:
  - mask off group_id(0) via chip address extension if smf is enabled

p9_setup_sbe_config.C, p9_sbe_attr_setup.C:
  - use scratch_reg6 bit(16) to pass smf_config value

initfiles:
  - removed setup to use other addr bits as secure bit; core only uses addr15
  - added setup for ncu addr15 value in hcode
  - always set addr15 config bit in bridge unit if smf is supported
  - set addr15 bit across all mcs if smf is enabled
  - added in settings to enable smf in nmmu unit
  - hardcode group_id(0) bit in chipext mask for bridge unit if smf is supported

attributes:
  - ATTR_SMF_ENABLE is a system level attribute
  - changed SMF_ENABLE->SMF_CONFIG; smf_enabled will be (config && supported)

CQ:HW451708
CQ:HW451711
Change-Id: I3dd05fa51d77bcf734ea774356657732aa7865b2
Original-Change-Id: I6cf85600354baa322e959c922f596ecc5c68a458
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57322
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Reviewed-by: Thi N. Tran <25a2bca7ae5a8ea03be09ca8d282480c08c13052@us.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: HWSV CI <ae069ce3805842f4ed79e0ef7868baadb5df0a6b@us.ibm.com>
Dev-Ready: Brent Wieman <cab499b31cd4c652b90b4682871101e72d52e19a@us.ibm.com>
Tested-by: PPE CI <dc75934ba5befb9221434e67a247b93aec46b36b@us.ibm.com>
Reviewed-by: Joseph J. McGill <4a85c6614f9f065f63d8fd57cde15e48af07ea2a@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/nest/p9_mss_eff_grouping.H
+++ src/import/chips/p9/procedures/hwp/nest/p9_mss_eff_grouping.H
@@ -55,7 +55,7 @@
 // Constants used for EffGroupingData struct
 const uint8_t DATA_GROUPS   = 16;   // 8 regular groups, 8 mirrored groups
 const uint8_t MIRR_OFFSET   = 8;    // Start of mirrored offset in DATA_GROUPS
-const uint8_t DATA_ELEMENTS = 18;   // 18 items of data for each group
+const uint8_t DATA_ELEMENTS = 21;   // 21 items of data for each group

 // Indexes used for EffGroupingData::iv_data DATA ELEMENTS
 const uint8_t PORT_SIZE = 0;         // Memory size of each port in group (GB)
@@ -63,9 +63,12 @@
 const uint8_t GROUP_SIZE = 2;        // Memory size of entire group (GB)
 const uint8_t BASE_ADDR = 3;         // Base Address
 #define MEMBER_IDX(X) ((X) + 4)      // List of MC ports in group
-#define ALT_VALID(X) ((X) + 12)      // Alt Memory valid (2 alt memory regions)
+#define ALT_VALID(X) ((X) + 12)      // Alt Memory Valid (2 alt memory regions)
 #define ALT_SIZE(X) ((X) + 14)       // Alt Memory Size
 #define ALT_BASE_ADDR(X) ((X) + 16)  // Alt Base Address
+const uint8_t SMF_VALID = 18;        // SMF Memory Valid
+const uint8_t SMF_SIZE = 19;         // SMF Memory Size
+const uint8_t SMF_BASE_ADDR = 20;    // SMF Base Address

 // Number of memory regions
 const uint8_t NUM_NON_MIRROR_REGIONS = 8;