p9_cen_framelock -- 2nd version

p9_cen_framelock -- 2nd version

1) Replace MCSMODE4 register with MCMODE2 and MCBCFGQ register
   shift host attention enablement to p9c_set_inband_addr HWP

2) Update FIR registers'(ACT0,ACT1 and MASK) set from p8 to p9c

Change-Id: I622ce0c8cd0baff30b7a38f6dee43d6ac1c3e7f2
Original-Change-Id: Ifdce2d948c12ad2b82a74cfc6a8731617a3086df
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39558
Dev-Ready: Brent Wieman <cab499b31cd4c652b90b4682871101e72d52e19a@us.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: PPE CI <dc75934ba5befb9221434e67a247b93aec46b36b@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Reviewed-by: Thi N. Tran <25a2bca7ae5a8ea03be09ca8d282480c08c13052@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/p9c_set_inband_addr.C
+++ src/import/chips/p9/procedures/hwp/nest/p9c_set_inband_addr.C
@@ -55,16 +55,9 @@
 //
 fapi2::ReturnCode p9c_set_inband_addr(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target)
 {
+    uint64_t l_base_addr_nm0, l_base_addr_nm1, l_base_addr_m, l_base_addr_mmio;
+
     FAPI_DBG("Start");
-
-    auto l_dmi_chiplets = i_target.getChildren<fapi2::TARGET_TYPE_DMI>();
-    fapi2::ATTR_DMI_INBAND_BAR_ENABLE_Type l_bar_enable;
-    fapi2::ATTR_DMI_INBAND_BAR_BASE_ADDR_OFFSET_Type l_bar_offset;
-    uint8_t l_dmi_pos;
-    uint64_t l_base_addr_nm0, l_base_addr_nm1, l_base_addr_m, l_base_addr_mmio;
-    uint64_t l_dmi_inband_addr;
-    fapi2::buffer<uint64_t> l_scom_data;
-
     // determine base address of chip MMIO range
     FAPI_TRY(p9_fbc_utils_get_chip_base_address(i_target,
              EFF_FBC_GRP_CHIP_IDS,
@@ -74,14 +67,21 @@
              l_base_addr_mmio),
              "Error from p9_fbc_utils_get_chip_base_address");

-    for(auto l_dmi : l_dmi_chiplets)
+    for (auto l_dmi : i_target.getChildren<fapi2::TARGET_TYPE_DMI>())
     {
+        fapi2::ATTR_DMI_INBAND_BAR_ENABLE_Type l_bar_enable;
+
         // retrieve inband BAR enable
         FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_DMI_INBAND_BAR_ENABLE, l_dmi, l_bar_enable),
                  "Error from FAPI_ATTR_GET (ATTR_DMI_INBAND_BAR_ENABLE)");

         if (l_bar_enable == fapi2::ENUM_ATTR_DMI_INBAND_BAR_ENABLE_ENABLE)
         {
+            fapi2::ATTR_DMI_INBAND_BAR_BASE_ADDR_OFFSET_Type l_bar_offset;
+            uint64_t l_dmi_inband_addr;
+            fapi2::buffer<uint64_t> l_scom_data;
+            uint8_t l_dmi_pos;
+
             // retrieve inband BAR offset
             FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_DMI_INBAND_BAR_BASE_ADDR_OFFSET, l_dmi, l_bar_offset),
                      "Error from FAPI_ATTR_GET (ATTR_DMI_INBAND_BAR_BASE_ADDR_OFFSET)");
@@ -115,6 +115,43 @@
         }
     }

+    // configure host attention routing
+    for (auto l_mc : i_target.getChildren<fapi2::TARGET_TYPE_MC>())
+    {
+        fapi2::buffer<uint64_t> l_mcbcfg_data = 0;
+        fapi2::buffer<uint64_t> l_mcbcfg_mask = 0;
+        // Set P9 MCB Configuration Register
+        //   MCBCFGQ[62]=0 (disable special attention output)
+        //   MCBCFGQ[63]=1 (enable host attention output)
+        l_mcbcfg_mask.setBit<62>();
+        l_mcbcfg_mask.setBit<63>();
+        l_mcbcfg_data.setBit<63>();
+
+        FAPI_TRY(fapi2::putScomUnderMask(l_mc,
+                                         DMI_MCBCFG_0x070123E0,
+                                         l_mcbcfg_data,
+                                         l_mcbcfg_mask),
+                 "Error from putScom DMI_MCBCFG");
+    }
+
+    for (auto l_mi : i_target.getChildren<fapi2::TARGET_TYPE_MI>())
+    {
+        fapi2::buffer<uint64_t> l_mcmode2_data = 0;
+        fapi2::buffer<uint64_t> l_mcmode2_mask = 0;
+        // Set P9 MC Mode2 Register
+        //   MCMODE2Q[44]=0 (disable special attention output)
+        //   MCMODE2Q[45]=1 (enable host attention output)
+        l_mcmode2_mask.setBit<44>();
+        l_mcmode2_mask.setBit<45>();
+        l_mcmode2_data.setBit<45>();
+
+        FAPI_TRY(fapi2::putScomUnderMask(l_mi,
+                                         MI_MCMODE2_0x05010813,
+                                         l_mcmode2_data,
+                                         l_mcmode2_mask),
+                 "Error from putScom MI_MCMODE2");
+    }
+
 fapi_try_exit:
     FAPI_DBG("End");
     return fapi2::current_err;


Updating HWP's to use PROC_CHIP_MEM_TO_USE attribute

Change-Id: I649400f7675b1df10049d05336a80accd3bf63c9
RTC:176434
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54601
Tested-by: FSP CI Jenkins <aa9e4d9ac7cd25905e9c0dd36d4150516e73dd86@us.ibm.com>
Tested-by: PPE CI <dc75934ba5befb9221434e67a247b93aec46b36b@us.ibm.com>
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Tested-by: HWSV CI <ae069ce3805842f4ed79e0ef7868baadb5df0a6b@us.ibm.com>
Tested-by: Hostboot CI <52521565bd8ea18a2b112942dce4f4220a97c2c8@us.ibm.com>
Reviewed-by: Sachin Gupta <285b19a698aa558fba6ab25cf25b393d072fd749@in.ibm.com>
Reviewed-by: Richard J. Knight <94c04f3910596886be97211d492ad29f0ba29cd5@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C
+++ src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C
@@ -96,6 +96,8 @@
     ATTR_DISABLE_HBBL_VECTORS_BIT      = 3,
     ATTR_MC_SYNC_MODE_BIT              = 4,
     ATTR_SLOW_PCI_REF_CLOCK_BIT        = 5,
+    ATTR_PROC_CHIP_MEM_TO_USE_STARTBIT = 6,
+    ATTR_PROC_CHIP_MEM_TO_USE_LENGTH   = 4,

     // Scratch_reg_6
     ATTR_PROC_EFF_FABRIC_GROUP_ID_STARTBIT = 17,
@@ -422,6 +424,7 @@
         uint8_t l_disable_hbbl_vectors;
         uint32_t l_pll_mux;
         uint8_t l_mc_sync_mode;
+        uint8_t l_proc_chip_mem_to_use;
         uint8_t l_slow_pci_ref_clock;

         FAPI_DBG("Reading Scratch_reg5");
@@ -444,6 +447,7 @@
         FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SYS_FORCE_ALL_CORES, FAPI_SYSTEM, l_force_all_cores));
         FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_DISABLE_HBBL_VECTORS, FAPI_SYSTEM, l_disable_hbbl_vectors));
         FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_MC_SYNC_MODE, i_target_chip, l_mc_sync_mode));
+        FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_PROC_CHIP_MEM_TO_USE, FAPI_SYSTEM, l_proc_chip_mem_to_use));
         FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_DD1_SLOW_PCI_REF_CLOCK, FAPI_SYSTEM, l_slow_pci_ref_clock));

         // set cache contained flag
@@ -488,6 +492,11 @@
         {
             l_read_scratch_reg.clearBit<ATTR_MC_SYNC_MODE_BIT>();
         }
+
+        // set which proc memory to use
+        l_read_scratch_reg.insert<ATTR_PROC_CHIP_MEM_TO_USE_STARTBIT,
+                                  ATTR_PROC_CHIP_MEM_TO_USE_LENGTH,
+                                  4>(l_proc_chip_mem_to_use);

         // set slow PCI ref clock bit
         if (l_slow_pci_ref_clock == fapi2::ENUM_ATTR_DD1_SLOW_PCI_REF_CLOCK_SLOW)


build(dcmtk): fix warning for redefinition of __STDC_FORMAT_MACROS

--- src/io/internal/pipelines/dicom/structured-report-to-html.cxx
+++ src/io/internal/pipelines/dicom/structured-report-to-html.cxx
@@ -41,6 +41,10 @@

 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */

+// Fix warning for redefinition of __STDC_FORMAT_MACROS in the header include tree for dsrdoc.h
+#ifdef __STDC_FORMAT_MACROS
+  #undef __STDC_FORMAT_MACROS
+#endif
 #include "dcmtk/dcmsr/dsrdoc.h"       /* for main interface class DSRDocument */

 #include "dcmtk/dcmdata/dctk.h"       /* for typical set of "dcmdata" headers */


Updated help text for "breakpoint command add" to reflect r113596 changeset.

git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@113607 91177308-0d34-0410-b5e6-96231b3b80d8

--- source/Commands/CommandObjectBreakpointCommand.cpp
+++ source/Commands/CommandObjectBreakpointCommand.cpp
@@ -161,6 +161,22 @@
 Enter your Python command(s). Type 'DONE' to end. \n\
 > print \"Hit this breakpoint!\" \n\
 > DONE \n\
+ \n\
+As a convenience, this also works for a short Python one-liner: \n\
+(lldb) breakpoint command add -p 1 \"import time; print time.asctime()\" \n\
+(lldb) run \n\
+Launching '.../a.out'  (x86_64) \n\
+(lldb) Fri Sep 10 12:17:45 2010 \n\
+Process 21778 Stopped \n\
+* thread #1: tid = 0x2e03, 0x0000000100000de8 a.out`c + 7 at main.c:39, stop reason = breakpoint 1.1, queue = com.apple.main-thread \n\
+  36   	\n\
+  37   	int c(int val)\n\
+  38   	{\n\
+  39 ->	    return val + 3;\n\
+  40   	}\n\
+  41   	\n\
+  42   	int main (int argc, char const *argv[])\n\
+(lldb) \n\
  \n\
 Example multiple line Python breakpoint command, using function definition: \n\
  \n\


Updated the basic interpreter to LLVM 3.2

--- codegen.cpp
+++ codegen.cpp
@@ -6,8 +6,7 @@
 {
 	std::cout << "Genrating code..." << std::endl;

-	std::vector<const Type*> l_ArgTypes;
-	FunctionType* l_FType = FunctionType::get(Type::getVoidTy(getGlobalContext()), l_ArgTypes, false);
+	FunctionType* l_FType = FunctionType::get(Type::getVoidTy(getGlobalContext()), std::vector<Type*>(), false);
 	m_MainFunction = Function::Create(l_FType, GlobalValue::InternalLinkage, "main", Mod);
 	BasicBlock* l_Block = BasicBlock::Create(getGlobalContext(), "entry", m_MainFunction);

@@ -19,21 +18,20 @@
 	std::cout << "Done" << std::endl;
 	PassManager l_PassMgr;
 	l_PassMgr.add(createPrintModulePass(&outs()));
-	l_PassMgr.run();
+	l_PassMgr.run(*Mod);
 }

 GenericValue CodeGenContext::RunCode()
 {
 	std::cout << "Running code..." << std::endl;
-	ExistingModuleProvider* l_EMP = new ExistingModuleProvider(Mod);
-	ExecutionEngine* l_EEngine = ExecutionEngine::create(l_EMP, false);
+	ExecutionEngine* l_EEngine = ExecutionEngine::create(Mod);
 	std::vector<GenericValue> l_NoArgs;
 	GenericValue l_GenValue = l_EEngine->runFunction(m_MainFunction, l_NoArgs);
 	std::cout << "Code was run" << std::endl;
 	return l_GenValue;
 }

-static const Type* TypeOf(const NIdentifier & in_Type)
+static Type* TypeOf(const NIdentifier & in_Type)
 {
 	if(in_Type.Name.compare("int") == 0)
 	{
@@ -84,7 +82,7 @@
 	{
 		l_Args.push_back(in_Arg->CodeGen(io_Context));
 	}
-	CallInst* l_Call = CallInst::Create(l_Function, l_Args.begin(), l_Args.end(), "", io_Context);
+	CallInst* l_Call = CallInst::Create(l_Function, l_Args, "", io_Context.CurrentBlock());
 	std::cout << "Creating method call: " << ID.Name << std::endl;
 	return l_Call;
 }
@@ -155,11 +153,11 @@

 Value* NFunctionDeclaration::CodeGen(CodeGenContext & io_Context)
 {
-	std::vector<const Type*> l_ArgTypes;
+	std::vector<llvm::Type*> l_ArgTypes;

 	for(auto& in_Arg : Arguments)
 	{
-		l_ArgTypes.push_back(TypeOf(in_Arg).Type);
+		l_ArgTypes.push_back(TypeOf((*in_Arg).Type));
 	}

 	FunctionType* l_FType = FunctionType::get(TypeOf(Type), l_ArgTypes, false);


refactor: Simplify loop with DWARFCompileUnit::Extract

Forgotten small simplification in D40212.

Differential revision: https://reviews.llvm.org/D40635

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@319402 91177308-0d34-0410-b5e6-96231b3b80d8

--- source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
@@ -97,12 +97,8 @@
   if (m_compile_units.empty()) {
     if (m_dwarf2Data != NULL) {
       lldb::offset_t offset = 0;
-      for (;;) {
-        DWARFCompileUnitSP cu_sp =
-            DWARFCompileUnit::Extract(m_dwarf2Data, &offset);
-        if (cu_sp.get() == NULL)
-          break;
-
+      DWARFCompileUnitSP cu_sp;
+      while ((cu_sp = DWARFCompileUnit::Extract(m_dwarf2Data, &offset))) {
         m_compile_units.push_back(cu_sp);

         offset = cu_sp->GetNextCompileUnitOffset();


Fix TestURLRequestContext leaks in MalwareDetailsTest.HTTPCache.

Need to call ResetRequestContext() if we use it.

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7016047

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

--- chrome/browser/safe_browsing/malware_details_unittest.cc
+++ chrome/browser/safe_browsing/malware_details_unittest.cc
@@ -105,7 +105,7 @@
   disk_cache::Backend* cache;
   int rv =
       context_getter->GetURLRequestContext()->http_transaction_factory()->
-      GetCache()-> GetBackend(&cache, &cb);
+      GetCache()->GetBackend(&cache, &cb);
   ASSERT_EQ(net::OK, cb.GetResult(rv));

   std::string empty;
@@ -559,6 +559,7 @@
   expected.set_complete(true);

   VerifyResults(actual, expected);
+  profile()->ResetRequestContext();
 }

 // Tests the interaction with the HTTP cache (where the cache is empty).


clover: Factor kernel argument parsing into its own function v2

v2:
  - Code cleanups.

Reviewed-by: Francisco Jerez <5906ff32bdd9fd8db196f6ba5ad3afd6f9257ea5@riseup.net>

--- src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -293,6 +293,105 @@
       PM.run(*mod);
    }

+   compat::vector<module::argument>
+   get_kernel_args(const llvm::Module *mod, const std::string &kernel_name,
+                   const clang::LangAS::Map &address_spaces) {
+
+      compat::vector<module::argument> args;
+      llvm::Function *kernel_func = mod->getFunction(kernel_name);
+
+#if HAVE_LLVM < 0x0302
+         llvm::TargetData TD(kernel_func->getParent());
+#elif HAVE_LLVM < 0x0305
+         llvm::DataLayout TD(kernel_func->getParent()->getDataLayout());
+#else
+         llvm::DataLayout TD(mod);
+#endif
+
+      for (llvm::Function::const_arg_iterator I = kernel_func->arg_begin(),
+                                      E = kernel_func->arg_end(); I != E; ++I) {
+         const llvm::Argument &arg = *I;
+
+         llvm::Type *arg_type = arg.getType();
+         const unsigned arg_store_size = TD.getTypeStoreSize(arg_type);
+
+         // OpenCL 1.2 specification, Ch. 6.1.5: "A built-in data
+         // type that is not a power of two bytes in size must be
+         // aligned to the next larger power of two".  We need this
+         // alignment for three element vectors, which have
+         // non-power-of-2 store size.
+         const unsigned arg_api_size = util_next_power_of_two(arg_store_size);
+
+         llvm::Type *target_type = arg_type->isIntegerTy() ?
+               TD.getSmallestLegalIntType(mod->getContext(), arg_store_size * 8)
+               : arg_type;
+         unsigned target_size = TD.getTypeStoreSize(target_type);
+         unsigned target_align = TD.getABITypeAlignment(target_type);
+
+         if (llvm::isa<llvm::PointerType>(arg_type) && arg.hasByValAttr()) {
+            arg_type =
+                  llvm::dyn_cast<llvm::PointerType>(arg_type)->getElementType();
+         }
+
+         if (arg_type->isPointerTy()) {
+            unsigned address_space = llvm::cast<llvm::PointerType>(arg_type)->getAddressSpace();
+            if (address_space == address_spaces[clang::LangAS::opencl_local
+                                                     - clang::LangAS::Offset]) {
+               args.push_back(module::argument(module::argument::local,
+                                               arg_api_size, target_size,
+                                               target_align,
+                                               module::argument::zero_ext));
+            } else {
+               // XXX: Correctly handle constant address space.  There is no
+               // way for r600g to pass a handle for constant buffers back
+               // to clover like it can for global buffers, so
+               // creating constant arguments will break r600g.  For now,
+               // continue treating constant buffers as global buffers
+               // until we can come up with a way to create handles for
+               // constant buffers.
+               args.push_back(module::argument(module::argument::global,
+                                               arg_api_size, target_size,
+                                               target_align,
+                                               module::argument::zero_ext));
+           }
+
+         } else {
+            llvm::AttributeSet attrs = kernel_func->getAttributes();
+            enum module::argument::ext_type ext_type =
+                  (attrs.hasAttribute(arg.getArgNo() + 1,
+                                     llvm::Attribute::SExt) ?
+                   module::argument::sign_ext :
+                   module::argument::zero_ext);
+
+            args.push_back(
+               module::argument(module::argument::scalar, arg_api_size,
+                                target_size, target_align, ext_type));
+         }
+      }
+
+      // Append implicit arguments.  XXX - The types, ordering and
+      // vector size of the implicit arguments should depend on the
+      // target according to the selected calling convention.
+      llvm::Type *size_type =
+         TD.getSmallestLegalIntType(mod->getContext(), sizeof(cl_uint) * 8);
+
+      args.push_back(
+         module::argument(module::argument::scalar, sizeof(cl_uint),
+                          TD.getTypeStoreSize(size_type),
+                          TD.getABITypeAlignment(size_type),
+                          module::argument::zero_ext,
+                          module::argument::grid_dimension));
+
+      args.push_back(
+         module::argument(module::argument::scalar, sizeof(cl_uint),
+                          TD.getTypeStoreSize(size_type),
+                          TD.getABITypeAlignment(size_type),
+                          module::argument::zero_ext,
+                          module::argument::grid_offset));
+
+      return args;
+   }
+
    module
    build_module_llvm(llvm::Module *mod,
                      const std::vector<llvm::Function *> &kernels,
@@ -308,97 +407,9 @@
       bitcode_ostream.flush();

       for (unsigned i = 0; i < kernels.size(); ++i) {
-         llvm::Function *kernel_func = kernels[i];
-         const std::string kernel_name = kernel_func->getName();
-#if HAVE_LLVM < 0x0302
-         llvm::TargetData TD(kernel_func->getParent());
-#elif HAVE_LLVM < 0x0305
-         llvm::DataLayout TD(kernel_func->getParent()->getDataLayout());
-#else
-         llvm::DataLayout TD(mod);
-#endif
-         compat::vector<module::argument> args;
-
-         for (llvm::Function::arg_iterator I = kernel_func->arg_begin(),
-                                      E = kernel_func->arg_end(); I != E; ++I) {
-            llvm::Argument &arg = *I;
-            llvm::Type *arg_type = arg.getType();
-            const unsigned arg_store_size = TD.getTypeStoreSize(arg_type);
-
-            // OpenCL 1.2 specification, Ch. 6.1.5: "A built-in data
-            // type that is not a power of two bytes in size must be
-            // aligned to the next larger power of two".  We need this
-            // alignment for three element vectors, which have
-            // non-power-of-2 store size.
-            const unsigned arg_api_size =
-               util_next_power_of_two(arg_store_size);
-
-            llvm::Type *target_type = arg_type->isIntegerTy() ?
-               TD.getSmallestLegalIntType(mod->getContext(), arg_store_size * 8)
-               : arg_type;
-            unsigned target_size = TD.getTypeStoreSize(target_type);
-            unsigned target_align = TD.getABITypeAlignment(target_type);
-
-            if (llvm::isa<llvm::PointerType>(arg_type) && arg.hasByValAttr()) {
-               arg_type =
-                  llvm::dyn_cast<llvm::PointerType>(arg_type)->getElementType();
-            }
-
-            if (arg_type->isPointerTy()) {
-               unsigned address_space = llvm::cast<llvm::PointerType>(arg_type)->getAddressSpace();
-               if (address_space == address_spaces[clang::LangAS::opencl_local
-                                                     - clang::LangAS::Offset]) {
-                  args.push_back(module::argument(module::argument::local,
-                                                  arg_api_size, target_size,
-                                                  target_align,
-                                                  module::argument::zero_ext));
-               } else {
-                  // XXX: Correctly handle constant address space.  There is no
-                  // way for r600g to pass a handle for constant buffers back
-                  // to clover like it can for global buffers, so
-                  // creating constant arguments will break r600g.  For now,
-                  // continue treating constant buffers as global buffers
-                  // until we can come up with a way to create handles for
-                  // constant buffers.
-                  args.push_back(module::argument(module::argument::global,
-                                                  arg_api_size, target_size,
-                                                  target_align,
-                                                  module::argument::zero_ext));
-              }
-
-            } else {
-               llvm::AttributeSet attrs = kernel_func->getAttributes();
-               enum module::argument::ext_type ext_type =
-                  (attrs.hasAttribute(arg.getArgNo() + 1,
-                                     llvm::Attribute::SExt) ?
-                   module::argument::sign_ext :
-                   module::argument::zero_ext);
-
-               args.push_back(
-                  module::argument(module::argument::scalar, arg_api_size,
-                                   target_size, target_align, ext_type));
-            }
-         }
-
-         // Append implicit arguments.  XXX - The types, ordering and
-         // vector size of the implicit arguments should depend on the
-         // target according to the selected calling convention.
-         llvm::Type *size_type =
-            TD.getSmallestLegalIntType(mod->getContext(), sizeof(cl_uint) * 8);
-
-         args.push_back(
-            module::argument(module::argument::scalar, sizeof(cl_uint),
-                             TD.getTypeStoreSize(size_type),
-                             TD.getABITypeAlignment(size_type),
-                             module::argument::zero_ext,
-                             module::argument::grid_dimension));
-
-         args.push_back(
-            module::argument(module::argument::scalar, sizeof(cl_uint),
-                             TD.getTypeStoreSize(size_type),
-                             TD.getABITypeAlignment(size_type),
-                             module::argument::zero_ext,
-                             module::argument::grid_offset));
+         std::string kernel_name = kernels[i]->getName();
+         compat::vector<module::argument> args =
+               get_kernel_args(mod, kernel_name, address_spaces);

          m.syms.push_back(module::symbol(kernel_name, 0, i, args ));
       }


Fixed compilation error in cmiss_rendition.cpp as the compare class used by stl list expects to take const object as its arguments. Tracker item 1047, https://tracker.physiomeproject.org/show_bug.cgi?id=1047

--- source/graphics/scene.cpp
+++ source/graphics/scene.cpp
@@ -136,9 +136,9 @@
 	{
 	}

-	int region_sorting(Cmiss_region *region1, Cmiss_region *region2)
-	{
-		int return_code = 0;
+	bool isRegionPlacedBefore(Cmiss_region *region1, Cmiss_region *region2)
+	{
+		bool return_code = false;
 		if (region1 == region2)
 		{
 			return false;
@@ -197,12 +197,12 @@
 			{
 				if (child_region == child_region1)
 				{
-					return_code = 1;
+					return_code = true;
 					break;
 				}
 				else if (child_region == child_region2)
 				{
-					return_code = 0;
+					return_code = false;
 					break;
 				}
 				Cmiss_region_reaccess_next_sibling(&child_region);
@@ -221,13 +221,12 @@
 		return return_code;
 	}

-	bool operator() (Cmiss_rendition *rendition1, Cmiss_rendition *rendition2)
-	{
-		Cmiss_region *region1 = Cmiss_rendition_get_region(rendition1);
-		Cmiss_region *region2 = Cmiss_rendition_get_region(rendition2);
-		int return_code = region_sorting(region1, region2);
-
-		return return_code;
+	bool operator() (const Cmiss_rendition *rendition1, const Cmiss_rendition *rendition2)
+	{
+		Cmiss_region *region1 = Cmiss_rendition_get_region(const_cast<Cmiss_rendition *>(rendition1));
+		Cmiss_region *region2 = Cmiss_rendition_get_region(const_cast<Cmiss_rendition *>(rendition2));
+
+		return isRegionPlacedBefore(region1, region2);
 	}
 };


fixed Bayes filter memory leak

fixed Bayes filter memory leak

git-svn-id: 5c3bb4a0fea81dff653294223dbc7ab7b926c710@580 f169173b-cf89-36c8-b27e-44dbe73f0c83

--- corelib/src/BayesFilter.cpp
+++ corelib/src/BayesFilter.cpp
@@ -168,7 +168,7 @@
 	int j=0;
 	// Recursive Bayes estimation...
 	// STEP 1 - Prediction : Prior*lastPosterior
-	prediction = cvCreateMat(likelihood.size(), likelihood.size(), CV_32FC1);
+	prediction = cv::Mat(likelihood.size(), likelihood.size(), CV_32FC1);
 	if(this->generatePrediction(prediction, memory, uKeys(likelihood)))
 	{
 		ULOGGER_DEBUG("STEP1-generate prior=%fs, rows=%d, cols=%d", timer.ticks(), prediction.rows, prediction.cols);


fixed proper parameters

fixed proper parameters

--- bitwisetrie.hxx
+++ bitwisetrie.hxx
@@ -56,11 +56,11 @@
 		public:
 			explicit bitwisetrie(void) : root{new bitnode<B>} {}

-			inline bool insertOnEmpty(conref<B> a) noexcept {
+			inline bool insertOnEmpty(conref<A> a, conref<B> b) noexcept {
 				bitnode<B>* leafNode = bitwisetrie<A,B>::navigate(root, a);

 				if (leafNode->isEmpty()) {
-					leafNode->setData(a);
+					leafNode->setData(b);

 					return true;
 				}
@@ -68,11 +68,11 @@
 				return false;
 			}

-			inline bool insertOnNotEmpty(conref<B> a) noexcept {
+			inline bool insertOnNotEmpty(conref<A> a, conref<B> b) noexcept {
 				bitnode<B>* leafNode = bitwisetrie<A,B>::navigate(root, a);

 				if (leafNode->isNotEmpty()) {
-					leafNode->setData(a);
+					leafNode->setData(b);

 					return true;
 				}
@@ -80,13 +80,13 @@
 				return false;
 			}

-			inline void insert(conref<B> a) noexcept {
+			inline void insert(conref<A> a, conref<B> b) noexcept {
 				bitnode<B>* leafNode = bitwisetrie<A,B>::navigate(root, a);

 				leafNode->setData(a);
 			}

-			inline bool remove(conref<B> a) noexcept {
+			inline bool remove(conref<A> a) noexcept {
 				bitnode<B>* leafNode = bitwisetrie<A,B>::navigate(root, a);

 				if (leafNode->isNotEmpty()) {
@@ -98,13 +98,13 @@
 				return false;
 			}

-			inline bool contains(conref<B> a) noexcept {
+			inline bool contains(conref<A> a) noexcept {
 				bitnode<B>* leafNode = bitwisetrie<A,B>::navigate(root, a);

 				return leafNode->isNotEmpty();
 			}

-			inline bool notContains(conref<B> a) noexcept {
+			inline bool notContains(conref<A> a) noexcept {
 				bitnode<B>* leafNode = bitwisetrie<A,B>::navigate(root, a);

 				return leafNode->isEmpty();
@@ -113,8 +113,5 @@
 		private:
 			bitnode<B>* root;
 		};
-
-		template <typename A>
-		bitwisetrie<A,A>;
 	}
 }


PM: deprecate p9_ppe_dump in favor of p9_ppe_state

Change-Id: I547796c9b3501c6e85c079228fa0d275681b267d
RTC: 174667
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40930
Tested-by: Jenkins Server <8e3f934e4c44875bc48d33da3ea13d93ba9a233f@us.ibm.com>
Reviewed-by: Gregory S. Still <4249770c9038596e9483266bcd48707ac69ee60b@us.ibm.com>
Reviewed-by: YUE DU <be312ad93b9ad4a5a20c1d9e86951b5929a52e94@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <ab93eca12e43608f33daa16a67357cd7b7e867ab@us.ibm.com>

--- src/import/chips/p9/procedures/hwp/lib/p9_ppe_state.H
+++ src/import/chips/p9/procedures/hwp/lib/p9_ppe_state.H
@@ -66,4 +66,4 @@

 } // extern C

-#endif  // __P9_PPE_DUMP_H__
+#endif  // __P9_PPE_STATE_H__


laptop: 2nd 'Fix' of Qwt crash from too many samples Sun, Feb 16, 2014 12:55:22 PM

--- source/gui/mainwindow.cpp
+++ source/gui/mainwindow.cpp
@@ -410,7 +410,7 @@
         if (num_steps==0) num_steps = 1;

             //Shrink the buffer if need be
-        while (pts.at(0).size() + num_steps > XY_SAMPLES_SHOWN)
+        while (pts.at(0).size() + num_steps > MAX_BUF_SIZE)
             for (int i=0; i<num_diffs; ++i)
                 pts[i].pop_front();
         while (ip.size() + num_steps > IP_SAMPLES_SHOWN)
@@ -508,10 +508,15 @@
 #endif
         const int num_saved_pts = (int)pts[0].size();
         int tail_len = std::min(num_saved_pts, ui->spnTailLength->text().toInt());
-        if (tail_len==-1) tail_len = std::min(num_saved_pts, XY_SAMPLES_SHOWN);
-        QPolygonF points(tail_len);
+        if (tail_len==-1) tail_len = num_saved_pts;
+        const int inc = tail_len < XY_SAMPLES_SHOWN/2
+                ? 1
+                : tail_len / (XY_SAMPLES_SHOWN/2);
+        const int num_drawn_pts = tail_len / inc;
+        QPolygonF points(num_drawn_pts);
+//        qDebug() << tail_len << inc;
         int ct_begin = std::max(0,num_saved_pts-tail_len);
-        for (int k=0, ct=ct_begin; k<tail_len; ++k, ++ct)
+        for (int k=0, ct=ct_begin; k<num_drawn_pts; ++k, ct+=inc)
             points[k] = QPointF(pts.at(0).at(ct), pts.at(1).at(ct));
         curve->setSamples(points);


Thread: access internal ThreadControlBlock object only through accessor

Access internal ThreadControlBlock object of the thread only through
Thread::getThreadControlBlock().

--- source/threads/Thread.cpp
+++ source/threads/Thread.cpp
@@ -45,21 +45,22 @@

 int Thread::generateSignal(const uint8_t signalNumber)
 {
-	const auto signalsReceiverControlBlock = threadControlBlock_.getSignalsReceiverControlBlock();
+	auto& threadControlBlock = getThreadControlBlock();
+	const auto signalsReceiverControlBlock = threadControlBlock.getSignalsReceiverControlBlock();
 	if (signalsReceiverControlBlock == nullptr)
 		return ENOTSUP;

-	return signalsReceiverControlBlock->generateSignal(signalNumber, threadControlBlock_);
+	return signalsReceiverControlBlock->generateSignal(signalNumber, threadControlBlock);
 }

 uint8_t Thread::getEffectivePriority() const
 {
-	return threadControlBlock_.getEffectivePriority();
+	return getThreadControlBlock().getEffectivePriority();
 }

 SignalSet Thread::getPendingSignalSet() const
 {
-	const auto signalsReceiverControlBlock = threadControlBlock_.getSignalsReceiverControlBlock();
+	const auto signalsReceiverControlBlock = getThreadControlBlock().getSignalsReceiverControlBlock();
 	if (signalsReceiverControlBlock == nullptr)
 		return SignalSet{SignalSet::empty};

@@ -69,22 +70,22 @@

 uint8_t Thread::getPriority() const
 {
-	return threadControlBlock_.getPriority();
+	return getThreadControlBlock().getPriority();
 }

 SchedulingPolicy Thread::getSchedulingPolicy() const
 {
-	return threadControlBlock_.getSchedulingPolicy();
+	return getThreadControlBlock().getSchedulingPolicy();
 }

 scheduler::ThreadControlBlock::State Thread::getState() const
 {
-	return threadControlBlock_.getState();
+	return getThreadControlBlock().getState();
 }

 int Thread::join()
 {
-	if (&threadControlBlock_ == &scheduler::getScheduler().getCurrentThreadControlBlock())
+	if (&getThreadControlBlock() == &scheduler::getScheduler().getCurrentThreadControlBlock())
 		return EDEADLK;

 	int ret;
@@ -94,21 +95,22 @@

 int Thread::queueSignal(const uint8_t signalNumber, const sigval value)
 {
-	const auto signalsReceiverControlBlock = threadControlBlock_.getSignalsReceiverControlBlock();
+	auto& threadControlBlock = getThreadControlBlock();
+	const auto signalsReceiverControlBlock = threadControlBlock.getSignalsReceiverControlBlock();
 	if (signalsReceiverControlBlock == nullptr)
 		return ENOTSUP;

-	return signalsReceiverControlBlock->queueSignal(signalNumber, value, threadControlBlock_);
+	return signalsReceiverControlBlock->queueSignal(signalNumber, value, threadControlBlock);
 }

 void Thread::setPriority(const uint8_t priority, const bool alwaysBehind)
 {
-	threadControlBlock_.setPriority(priority, alwaysBehind);
+	getThreadControlBlock().setPriority(priority, alwaysBehind);
 }

 void Thread::setSchedulingPolicy(const SchedulingPolicy schedulingPolicy)
 {
-	threadControlBlock_.setSchedulingPolicy(schedulingPolicy);
+	getThreadControlBlock().setSchedulingPolicy(schedulingPolicy);
 }

 int Thread::start()
@@ -116,7 +118,7 @@
 	if (getState() != scheduler::ThreadControlBlock::State::New)
 		return EINVAL;

-	return scheduler::getScheduler().add(threadControlBlock_);
+	return scheduler::getScheduler().add(getThreadControlBlock());
 }

 /*---------------------------------------------------------------------------------------------------------------------+
@@ -152,7 +154,7 @@
 void Thread::terminationHook()
 {
 	joinSemaphore_.post();
-	threadControlBlock_.setList(nullptr);
+	getThreadControlBlock().setList(nullptr);
 }

 }	// namespace distortos


[rocksplicator] more tests to verify seq no behavior during bulk upload (#152)

--- rocksdb_replicator/tests/rocksdb_assumption_test.cpp
+++ rocksdb_replicator/tests/rocksdb_assumption_test.cpp
@@ -187,86 +187,142 @@
   EXPECT_EQ(db->GetLatestSequenceNumber(), 7);

-  // close, destroy and reopen DB, sequence # should start from zero again
-  db.reset(nullptr);
-  Options options;
-  s = DestroyDB(db_path, options);
-  EXPECT_TRUE(s.ok());
-  db = OpenDB(db_path);
-  EXPECT_TRUE(db != nullptr);
-  EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
-
-
-  // manually write two SST files
-  SstFileWriter sst_file_writer1(EnvOptions(), options, options.comparator);
-  SstFileWriter sst_file_writer2(EnvOptions(), options, options.comparator);
-  string sst_file1 = "/tmp/file1.sst";
-  string sst_file2 = "/tmp/file2.sst";
-  s = sst_file_writer1.Open(sst_file1);
-  EXPECT_TRUE(s.ok());
-  s = sst_file_writer2.Open(sst_file2);
-  EXPECT_TRUE(s.ok());
-
-  const int nKeys = 5;
-  for (int i = 0; i < nKeys; ++i) {
-    s = sst_file_writer1.Add(to_string(i), to_string(i));
-    EXPECT_TRUE(s.ok());
-    s = sst_file_writer2.Add(to_string(i + nKeys), to_string(i + nKeys));
-    EXPECT_TRUE(s.ok());
-  }
-
-  s = sst_file_writer1.Finish();
-  EXPECT_TRUE(s.ok());
-  s = sst_file_writer2.Finish();
-  EXPECT_TRUE(s.ok());
-
-
-  // add two SST files to the empty DB, the sequence # should still be zero
-  rocksdb::IngestExternalFileOptions ifo;
-  ifo.move_files = true;
-  /* allow for overlapping keys */
-  ifo.allow_global_seqno = true;
-  EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
-  s = db->IngestExternalFile({sst_file1}, ifo);
-  EXPECT_TRUE(s.ok());
-  ifo.move_files = false;
-  EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
-  s = db->IngestExternalFile({sst_file2}, ifo);
-  EXPECT_TRUE(s.ok());
-  EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
-
-
-  // verify the data is correct
-  for (int i = 0; i < 2 * nKeys; ++i) {
-    string value;
-    ReadOptions read_options;
-    s = db->Get(read_options, to_string(i), &value);
-    EXPECT_TRUE(s.ok());
-    EXPECT_EQ(value, to_string(i));
-  }
-  EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
-
-
-  // Online writes after adding files
-  s = db->Put(rocksdb::WriteOptions(), to_string(2 * nKeys),
-              to_string(2 * nKeys));
-  EXPECT_TRUE(s.ok());
-  EXPECT_EQ(db->GetLatestSequenceNumber(), 1);
-
-  s = db->Get(rocksdb::ReadOptions(), to_string(2 * nKeys), &value);
-  EXPECT_TRUE(s.ok());
-  EXPECT_EQ(value, to_string(2 * nKeys));
-
-  // Adding files after online writes
-  s = db->IngestExternalFile({sst_file2}, ifo);
-  EXPECT_EQ(db->GetLatestSequenceNumber(), 2);
-  // verify the data is correct
-  for (int i = 0; i <= 2 * nKeys; ++i) {
-    string value;
-    ReadOptions read_options;
-    s = db->Get(read_options, to_string(i), &value);
-    EXPECT_TRUE(s.ok());
-    EXPECT_EQ(value, to_string(i));
+  // We should be very careful to support both bulk update and online writes in
+  // one service.
+  // If we have to support both, we need to make sure we do it strictly in the
+  // following order: 1) stop online writes, 2) clean up DB, 3) do bulk upload
+  // and 4) resume online writes.
+  const std::vector<bool> allow_overlappings = { true, false };
+  for (const auto allow_overlapping : allow_overlappings) {
+    // close, destroy and reopen DB, sequence # should start from zero again
+    db.reset(nullptr);
+    Options options;
+    s = DestroyDB(db_path, options);
+    EXPECT_TRUE(s.ok());
+    db = OpenDB(db_path);
+    EXPECT_TRUE(db != nullptr);
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
+
+
+    // manually write three SST files
+    SstFileWriter sst_file_writer1(EnvOptions(), options, options.comparator);
+    SstFileWriter sst_file_writer2(EnvOptions(), options, options.comparator);
+    SstFileWriter sst_file_writer3(EnvOptions(), options, options.comparator);
+    string sst_file1 = "/tmp/file1.sst";
+    string sst_file2 = "/tmp/file2.sst";
+    string sst_file3 = "/tmp/file3.sst";
+    s = sst_file_writer1.Open(sst_file1);
+    EXPECT_TRUE(s.ok());
+    s = sst_file_writer2.Open(sst_file2);
+    EXPECT_TRUE(s.ok());
+    s = sst_file_writer3.Open(sst_file3);
+    EXPECT_TRUE(s.ok());
+
+    // file1 contains key 0-4, file2 contains key 5-9, file3 contains 10-14
+    const int nKeys = 5;
+    for (int i = 0; i < nKeys; ++i) {
+      s = sst_file_writer1.Add(to_string(i), to_string(i));
+      EXPECT_TRUE(s.ok());
+      s = sst_file_writer2.Add(to_string(i + nKeys), to_string(i + nKeys));
+      EXPECT_TRUE(s.ok());
+      s = sst_file_writer3.Add(to_string(i + 2 * nKeys),
+                               to_string(i + 2 * nKeys));
+      EXPECT_TRUE(s.ok());
+    }
+
+    s = sst_file_writer1.Finish();
+    EXPECT_TRUE(s.ok());
+    s = sst_file_writer2.Finish();
+    EXPECT_TRUE(s.ok());
+    s = sst_file_writer3.Finish();
+    EXPECT_TRUE(s.ok());
+
+    // add two SST files to the empty DB, the sequence # should still be zero
+    rocksdb::IngestExternalFileOptions ifo;
+    ifo.move_files = true;
+    ifo.allow_global_seqno = allow_overlapping;
+    ifo.allow_blocking_flush = allow_overlapping;
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
+    s = db->IngestExternalFile({sst_file1}, ifo);
+    EXPECT_TRUE(s.ok());
+    ifo.move_files = false;
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
+    s = db->IngestExternalFile({sst_file2}, ifo);
+    EXPECT_TRUE(s.ok());
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
+
+
+    // verify the data is correct
+    for (int i = 0; i < 2 * nKeys; ++i) {
+      string value;
+      ReadOptions read_options;
+      s = db->Get(read_options, to_string(i), &value);
+      EXPECT_TRUE(s.ok());
+      EXPECT_EQ(value, to_string(i));
+    }
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 0);
+
+
+    // Online writes after adding files
+    s = db->Put(rocksdb::WriteOptions(), to_string(-1), to_string(-1));
+    EXPECT_TRUE(s.ok());
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 1);
+
+    s = db->Get(rocksdb::ReadOptions(), to_string(-1), &value);
+    EXPECT_TRUE(s.ok());
+    EXPECT_EQ(value, to_string(-1));
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 1);
+
+    // Add a file without overlapping keys, seq no is unchanged no matter if
+    // we allow overlapping or not.
+    s = db->IngestExternalFile({ sst_file3 }, ifo);
+    EXPECT_TRUE(s.ok());
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 1);
+
+    // Adding a file with overlapping keys, seq no is changed if we allow
+    // overlapping keys. It fails if we don't allow overlapping keys.
+    s = db->IngestExternalFile({ sst_file2 }, ifo);
+    if (allow_overlapping) {
+      EXPECT_TRUE(s.ok());
+      EXPECT_EQ(db->GetLatestSequenceNumber(), 2);
+    } else {
+      EXPECT_FALSE(s.ok());
+      EXPECT_EQ(db->GetLatestSequenceNumber(), 1);
+    }
+
+    // We are able to get online write through GetUpdatesSince() even after
+    // bulk uploads.
+    std::unique_ptr<rocksdb::TransactionLogIterator> iter;
+    s = db->GetUpdatesSince(1, &iter);
+    EXPECT_TRUE(s.ok());
+    EXPECT_TRUE(iter->Valid());
+    auto result = iter->GetBatch();
+    EXPECT_EQ(result.writeBatchPtr->Count(), 1);
+
+    // We are able to successfully call GetUpdatesSince() on seq no bumped by
+    // ingesting overlapping files, but the generated iterator is invalid.
+    iter.reset(nullptr);
+    EXPECT_EQ(db->GetLatestSequenceNumber(), 1 + allow_overlapping);
+    s = db->GetUpdatesSince(2, &iter);
+    if (allow_overlapping) {
+      EXPECT_TRUE(s.ok());
+      EXPECT_FALSE(iter->Valid());
+      iter->Next();
+      EXPECT_FALSE(iter->Valid());
+    } else {
+      EXPECT_FALSE(s.ok());
+      EXPECT_TRUE(s.IsNotFound());
+      EXPECT_EQ(iter, nullptr);
+    }
+
+    // verify the data is correct
+    for (int i = -1; i < 3 * nKeys; ++i) {
+      string value;
+      ReadOptions read_options;
+      s = db->Get(read_options, to_string(i), &value);
+      EXPECT_TRUE(s.ok());
+      EXPECT_EQ(value, to_string(i));
+    }
   }
 }


INTEGRATION: CWS ooo19126 (1.4.198); FILE MERGED 2005/09/05 13:24:17 rt 1.4.198.1: #i54170# Change license header: remove SISSL

--- sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -1,61 +1,35 @@
 /*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: SlsQueueProcessor.cxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.5 $
  *
- *  last change: $Author: vg $ $Date: 2005-02-17 09:43:47 $
+ *  last change: $Author: rt $ $Date: 2005-09-09 06:11:52 $
  *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  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
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
  *
  *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
  *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
+ *    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.
  *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *    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.
  *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *    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
  *
  ************************************************************************/


ENH:  Adding convergence spec. option.

ENH:  Adding convergence spec. option.

--- Examples/Atropos.cxx
+++ Examples/Atropos.cxx
@@ -373,6 +373,11 @@
     parser->GetOption( "convergence" );
   if( convergenceOption && convergenceOption->GetNumberOfFunctions() )
     {
+    if( convergenceOption->GetFunction( 0 )->GetNumberOfParameters() == 0 )
+      {
+      segmenter->SetMaximumNumberOfIterations( parser->Convert<unsigned int>(
+                                                 convergenceOption->GetFunction( 0 )->GetName() ) );
+      }
     if( convergenceOption->GetFunction( 0 )->GetNumberOfParameters() > 0 )
       {
       segmenter->SetMaximumNumberOfIterations( parser->Convert<unsigned int>(
@@ -1443,7 +1448,8 @@
   OptionType::Pointer option = OptionType::New();
   option->SetLongName( "convergence" );
   option->SetShortName( 'c' );
-  option->SetUsageOption( 0, "[<numberOfIterations=5>,<convergenceThreshold=0.001>]" );
+  option->SetUsageOption( 0, "numberOfIterations" );
+  option->SetUsageOption( 1, "[<numberOfIterations=5>,<convergenceThreshold=0.001>]" );
   option->SetDescription( description );
   parser->AddOption( option );
   }


Removed 1 Hz output

Removed 1 Hz output

--- apps/examples/kalman_demo/KalmanNav.cpp
+++ apps/examples/kalman_demo/KalmanNav.cpp
@@ -247,8 +247,8 @@
 	// output
 	if (newTimeStamp - _outTimeStamp > 10e6) { // 0.1 Hz
 		_outTimeStamp = newTimeStamp;
-		printf("nav: %4d Hz, miss #: %4d\n",
-		       _navFrames / 10, _miss / 10);
+		//printf("nav: %4d Hz, miss #: %4d\n",
+		//       _navFrames / 10, _miss / 10);
 		_navFrames = 0;
 		_miss = 0;
 	}


More fixes.

More fixes.

--- cpp/cgi_progs/zotero_cgi.cc
+++ cpp/cgi_progs/zotero_cgi.cc
@@ -602,7 +602,7 @@
     db_connection->queryOrDie("DELETE FROM metadata_presence_tracer"
                               " WHERE journal_id " + journal_id_to_delete +
                               " AND marc_field_tag = " + db_connection->escapeAndQuoteString(delete_tag) +
-                              " AND subfield_code = " + db_connection->escapeAndQuoteString(delete_subfield_code));
+                              " AND marc_subfield_code = " + db_connection->escapeAndQuoteString(delete_subfield_code));

     return true;
 }
@@ -634,7 +634,7 @@
     db_connection->queryOrDie("SELECT * FROM metadata_presence_tracer WHERE journal_id IS NULL "
                              "OR journal_id IN (SELECT id FROM zeder_journals WHERE zeder_id=" + db_connection->escapeAndQuoteString(zeder_id) +
                              " AND zeder_instance=" + db_connection->escapeAndQuoteString(zeder_instance) + ")"
-                             " ORDER BY marc_field_tag ASC, journal_id ASC");
+                             " ORDER BY marc_field_tag ASC, marc_subfield_code ASC, journal_id ASC");

     auto result_set(db_connection->getLastResultSet());
     std::map<std::string, std::pair<std::string, std::string>> tags_and_subfield_codes_to_settings_map;


RegexMatcher::Escape => more generic solution

--- cpp/lib/src/RegexMatcher.cc
+++ cpp/lib/src/RegexMatcher.cc
@@ -388,12 +388,9 @@
 std::string RegexMatcher::Escape(const std::string &subpattern) {
     std::string escaped_subpattern(subpattern);

+    // see `man pcrepattern`
     // escape backslashes first to keep from overwriting other escape sequences
-    escaped_subpattern = StringUtil::ReplaceString("\\", "\\\\", escaped_subpattern);
-    escaped_subpattern = StringUtil::ReplaceString("(", "\\(", escaped_subpattern);
-    escaped_subpattern = StringUtil::ReplaceString(")", "\\)", escaped_subpattern);
-    escaped_subpattern = StringUtil::ReplaceString(".", "\\.", escaped_subpattern);
-    escaped_subpattern = StringUtil::ReplaceString("/", "\\/", escaped_subpattern);
+    StringUtil::BackslashEscape("\\^$.[]|()?*+{}", &escaped_subpattern);

     return escaped_subpattern;
 }


Pointterin tunniste `*` muuttujatyypin perään ennen välilyöntiä.

Muutos tehty Vim:n regexillä:

`:%s/\v \*([^ ])/\* \1/g`.

	modified:   cpp/ylikuutio/ylikuutio.cpp

--- cpp/ylikuutio/ylikuutio.cpp
+++ cpp/ylikuutio/ylikuutio.cpp
@@ -161,28 +161,28 @@
     glEnable(GL_CULL_FACE);

     // Create the world, store it in `my_world`.
-    model::World *my_world = new model::World();
+    model::World* my_world = new model::World();

     // Create the shader, store it in `my_shader`.
     SHADERSTRUCT(shader_struct);
     shader_struct.parent_pointer = my_world;
     shader_struct.vertex_shader = "StandardShading.vertexshader";
     shader_struct.fragment_shader = "StandardShading.fragmentshader";
-    model::Shader *my_shader = new model::Shader(shader_struct);
+    model::Shader* my_shader = new model::Shader(shader_struct);

     // Create the material, store it in `grass_material`.
     MATERIALSTRUCT(grass_material_struct);
     grass_material_struct.parent_pointer = my_shader;
     grass_material_struct.texture_file_format = g_texture_file_format;
     grass_material_struct.texture_filename = g_texture_filename;
-    model::Material *grass_material = new model::Material(grass_material_struct);
+    model::Material* grass_material = new model::Material(grass_material_struct);

     // Create the material, store it in `uvmap_material`.
     MATERIALSTRUCT(uvmap_material_struct);
     uvmap_material_struct.parent_pointer = my_shader;
     uvmap_material_struct.texture_file_format = "dds";
     uvmap_material_struct.texture_filename = "uvmap.DDS";
-    model::Material *uvmap_material = new model::Material(uvmap_material_struct);
+    model::Material* uvmap_material = new model::Material(uvmap_material_struct);

 #ifdef TESTING_SPHERICAL_WORLD_IN_USE
     // Create the species, store it in `terrain_species`.
@@ -194,7 +194,7 @@
     SRTM_terrain_species_struct.color_channel = g_height_data_color_channel;
     SRTM_terrain_species_struct.light_position = glm::vec3(4, 4, 4);
     SRTM_terrain_species_struct.is_world = true;
-    model::Species *terrain_species = new model::Species(SRTM_terrain_species_struct);
+    model::Species* terrain_species = new model::Species(SRTM_terrain_species_struct);
 #else
     // Create the species, store it in `terrain_species`.
     SPECIESSTRUCT(bmp_terrain_species_struct);
@@ -204,7 +204,7 @@
     bmp_terrain_species_struct.color_channel = g_height_data_color_channel;
     bmp_terrain_species_struct.light_position = glm::vec3(4, 4, 4);
     bmp_terrain_species_struct.is_world = true;
-    model::Species *terrain_species = new model::Species(bmp_terrain_species_struct);
+    model::Species* terrain_species = new model::Species(bmp_terrain_species_struct);
 #endif

     // Create terrain1, store it in `terrain1`.
@@ -214,14 +214,14 @@
     terrain_object_struct1.rotate_angle = 0.0f;
     terrain_object_struct1.rotate_vector = glm::vec3(0.0f, 0.0f, 0.0f);
     terrain_object_struct1.translate_vector = glm::vec3(0.0f, 0.0f, 0.0f);
-    model::Object *terrain1 = new model::Object(terrain_object_struct1);
+    model::Object* terrain1 = new model::Object(terrain_object_struct1);

     SPECIESSTRUCT(suzanne_species_struct);
     suzanne_species_struct.parent_pointer = uvmap_material;
     suzanne_species_struct.model_file_format = "obj";
     suzanne_species_struct.model_filename = "suzanne.obj";
     suzanne_species_struct.light_position = glm::vec3(4, 4, 4);
-    model::Species *suzanne_species = new model::Species(suzanne_species_struct);
+    model::Species* suzanne_species = new model::Species(suzanne_species_struct);

     // Create suzanne1, store it in `suzanne1`.
     OBJECTSTRUCT(suzanne_object_struct1);
@@ -230,7 +230,7 @@
     suzanne_object_struct1.rotate_angle = 0.10f;
     suzanne_object_struct1.rotate_vector = glm::vec3(1.0f, 0.0f, 0.0f);
     suzanne_object_struct1.translate_vector = glm::vec3(1.0f, 0.0f, 0.0f);
-    model::Object *suzanne1 = new model::Object(suzanne_object_struct1);
+    model::Object* suzanne1 = new model::Object(suzanne_object_struct1);

     OBJECTSTRUCT(suzanne_object_struct2);
     suzanne_object_struct2.species_parent_pointer = suzanne_species;
@@ -238,7 +238,7 @@
     suzanne_object_struct2.rotate_angle = 0.20f;
     suzanne_object_struct2.rotate_vector = glm::vec3(1.0f, 0.0f, 0.0f);
     suzanne_object_struct2.translate_vector = glm::vec3(0.0f, 1.0f, 0.0f);
-    model::Object *suzanne2 = new model::Object(suzanne_object_struct2);
+    model::Object* suzanne2 = new model::Object(suzanne_object_struct2);

     OBJECTSTRUCT(suzanne_object_struct3);
     suzanne_object_struct3.species_parent_pointer = suzanne_species;
@@ -246,7 +246,7 @@
     suzanne_object_struct3.rotate_angle = 0.05f;
     suzanne_object_struct3.rotate_vector = glm::vec3(1.0f, 0.0f, 0.0f);
     suzanne_object_struct3.translate_vector = glm::vec3(0.0f, 0.0f, 1.0f);
-    model::Object *suzanne3 = new model::Object(suzanne_object_struct3);
+    model::Object* suzanne3 = new model::Object(suzanne_object_struct3);

     OBJECTSTRUCT(suzanne_object_struct4);
     suzanne_object_struct4.species_parent_pointer = suzanne_species;
@@ -254,7 +254,7 @@
     suzanne_object_struct4.rotate_angle = 0.15f;
     suzanne_object_struct4.rotate_vector = glm::vec3(1.0f, 0.0f, 0.0f);
     suzanne_object_struct4.translate_vector = glm::vec3(0.0f, 0.0f, 0.0f);
-    model::Object *suzanne4 = new model::Object(suzanne_object_struct4);
+    model::Object* suzanne4 = new model::Object(suzanne_object_struct4);

     OBJECTSTRUCT(suzanne_object_struct5);
     suzanne_object_struct5.species_parent_pointer = suzanne_species;
@@ -263,13 +263,13 @@
     suzanne_object_struct5.rotate_angle = 0.03f;
     suzanne_object_struct5.rotate_vector = glm::vec3(1.0f, 1.0f, 1.0f);
     suzanne_object_struct5.translate_vector = glm::vec3(0.0f, 0.0f, 0.0f);
-    model::Object *suzanne5 = new model::Object(suzanne_object_struct5);
+    model::Object* suzanne5 = new model::Object(suzanne_object_struct5);

     FONTSTRUCT(kongtext_font_struct);
     kongtext_font_struct.parent_pointer = grass_material;
     kongtext_font_struct.font_file_format = g_font_file_format;
     kongtext_font_struct.font_filename = g_font_filename;
-    model::Font *kongtext_font = new model::Font(kongtext_font_struct);
+    model::Font* kongtext_font = new model::Font(kongtext_font_struct);

     std::cout << "number of vertices: " << terrain_species->vertices.size() << ".\n";
     std::cout << "number of UVs: " << terrain_species->UVs.size() << ".\n";


32/64-bit fixes.

32/64-bit fixes.

git-svn-id: b36ee6b6e70810a25e81bc801db00a83677983fc@340252 13f79535-47bb-0310-9956-ffa450edef68

--- src/ICUBridge/ICUBridgeCollationCompareFunctor.cpp
+++ src/ICUBridge/ICUBridgeCollationCompareFunctor.cpp
@@ -150,7 +150,7 @@
 			const XalanDOMChar*		theLocale,
 			UErrorCode&				theStatus)
 {
-	const unsigned int	theLength = length(theLocale);
+	const XalanDOMString::size_type		theLength = length(theLocale);

 	if (theLength >= ULOC_FULLNAME_CAPACITY)
 	{


atomic_base.hpp: Add linkes for example use of atomic functions.

git-svn-id: 3f5418f4deb1796ec361794c2e3ca0aec3c9c1fd@2904 0e562018-b8fb-0310-a933-ecf073c7c197

--- cppad/local/atomic_base.hpp
+++ cppad/local/atomic_base.hpp
@@ -290,6 +290,7 @@
 $begin atomic_afun$$

 $spell
+	mul
 	afun
 	const
 	CppAD
@@ -339,6 +340,13 @@
 are not specified (must not matter).
 Upon return, it is an $codei%AD<%Base%>%$$ version of
 $latex y = f(x)$$.
+
+$head Examples$$
+The following files contain example uses of atomic functions:
+$cref%get_started.cpp%atomic_get_started.cpp%Use Atomic Function%$$,
+$cref%reciprocal.cpp%atomic_reciprocal.cpp%Use Atomic Function%$$,
+$cref%tangent.cpp%atomic_tangent.cpp%Use Atomic Function%$$,
+$cref%matrix_mul.cpp%atomic_mat_mul.cpp%Use Atomic Function%$$.

 $end
 -----------------------------------------------------------------------------


INTEGRATION: CWS ooo19126 (1.2.78); FILE MERGED 2005/09/05 13:54:17 rt 1.2.78.1: #i54170# Change license header: remove SISSL

--- cppu/inc/uno/dispatcher.hxx
+++ cppu/inc/uno/dispatcher.hxx
@@ -1,61 +1,35 @@
 /*************************************************************************
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: dispatcher.hxx,v $
  *
- *  $Revision: 1.2 $
+ *  $Revision: 1.3 $
  *
- *  last change: $Author: vg $ $Date: 2003-10-06 13:01:32 $
+ *  last change: $Author: rt $ $Date: 2005-09-08 08:40:02 $
  *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  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
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
  *
  *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
  *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
+ *    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.
  *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *    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.
  *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *    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
  *
  ************************************************************************/


Add comphelp and stocservices UNO component mapping


[PD] add expressions to primitive dialog

see https://forum.freecadweb.org/viewtopic.php?f=3&t=36458
(a step forward to fix bug https://tracker.freecadweb.org/view.php?id=3981 )

--- src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp
+++ src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp
@@ -117,64 +117,101 @@
         case PartDesign::FeaturePrimitive::Box:
             index = 1;
             ui->boxLength->setValue(static_cast<PartDesign::Box*>(vp->getObject())->Length.getValue());
+            ui->boxLength->bind(static_cast<PartDesign::Box*>(vp->getObject())->Length);
             ui->boxHeight->setValue(static_cast<PartDesign::Box*>(vp->getObject())->Height.getValue());
+            ui->boxHeight->bind(static_cast<PartDesign::Box*>(vp->getObject())->Height);
             ui->boxWidth->setValue(static_cast<PartDesign::Box*>(vp->getObject())->Width.getValue());
+            ui->boxWidth->bind(static_cast<PartDesign::Box*>(vp->getObject())->Width);
             break;
         case PartDesign::FeaturePrimitive::Cylinder:
             index = 2;
             ui->cylinderAngle->setValue(static_cast<PartDesign::Cylinder*>(vp->getObject())->Angle.getValue());
+            ui->cylinderAngle->bind(static_cast<PartDesign::Cylinder*>(vp->getObject())->Angle);
             ui->cylinderHeight->setValue(static_cast<PartDesign::Cylinder*>(vp->getObject())->Height.getValue());
+            ui->cylinderHeight->bind(static_cast<PartDesign::Cylinder*>(vp->getObject())->Height);
             ui->cylinderRadius->setValue(static_cast<PartDesign::Cylinder*>(vp->getObject())->Radius.getValue());
+            ui->cylinderRadius->bind(static_cast<PartDesign::Cylinder*>(vp->getObject())->Radius);
             break;
         case PartDesign::FeaturePrimitive::Sphere:
             index = 4;
             ui->sphereAngle1->setValue(static_cast<PartDesign::Sphere*>(vp->getObject())->Angle1.getValue());
+            ui->sphereAngle1->bind(static_cast<PartDesign::Sphere*>(vp->getObject())->Angle1);
             ui->sphereAngle2->setValue(static_cast<PartDesign::Sphere*>(vp->getObject())->Angle2.getValue());
+            ui->sphereAngle2->bind(static_cast<PartDesign::Sphere*>(vp->getObject())->Angle2);
             ui->sphereAngle3->setValue(static_cast<PartDesign::Sphere*>(vp->getObject())->Angle3.getValue());
+            ui->sphereAngle3->bind(static_cast<PartDesign::Sphere*>(vp->getObject())->Angle3);
             ui->sphereRadius->setValue(static_cast<PartDesign::Sphere*>(vp->getObject())->Radius.getValue());
+            ui->sphereRadius->bind(static_cast<PartDesign::Sphere*>(vp->getObject())->Radius);
             break;
         case PartDesign::FeaturePrimitive::Cone:
             index = 3;
             ui->coneAngle->setValue(static_cast<PartDesign::Cone*>(vp->getObject())->Angle.getValue());
+            ui->coneAngle->bind(static_cast<PartDesign::Cone*>(vp->getObject())->Angle);
             ui->coneHeight->setValue(static_cast<PartDesign::Cone*>(vp->getObject())->Height.getValue());
+            ui->coneHeight->bind(static_cast<PartDesign::Cone*>(vp->getObject())->Height);
             ui->coneRadius1->setValue(static_cast<PartDesign::Cone*>(vp->getObject())->Radius1.getValue());
+            ui->coneRadius1->bind(static_cast<PartDesign::Cone*>(vp->getObject())->Radius1);
             ui->coneRadius2->setValue(static_cast<PartDesign::Cone*>(vp->getObject())->Radius2.getValue());
+            ui->coneRadius2->bind(static_cast<PartDesign::Cone*>(vp->getObject())->Radius2);
             break;
         case PartDesign::FeaturePrimitive::Ellipsoid:
             index = 5;
             ui->ellipsoidAngle1->setValue(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Angle1.getValue());
+            ui->ellipsoidAngle1->bind(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Angle1);
             ui->ellipsoidAngle2->setValue(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Angle2.getValue());
+            ui->ellipsoidAngle2->bind(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Angle2);
             ui->ellipsoidAngle3->setValue(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Angle3.getValue());
+            ui->ellipsoidAngle3->bind(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Angle3);
             ui->ellipsoidRadius1->setValue(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Radius1.getValue());
+            ui->ellipsoidRadius1->bind(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Radius1);
             ui->ellipsoidRadius2->setValue(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Radius2.getValue());
+            ui->ellipsoidRadius2->bind(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Radius2);
             ui->ellipsoidRadius3->setValue(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Radius3.getValue());
+            ui->ellipsoidRadius3->bind(static_cast<PartDesign::Ellipsoid*>(vp->getObject())->Radius3);
             break;
         case PartDesign::FeaturePrimitive::Torus:
             index = 6;
             ui->torusAngle1->setValue(static_cast<PartDesign::Torus*>(vp->getObject())->Angle1.getValue());
+            ui->torusAngle1->bind(static_cast<PartDesign::Torus*>(vp->getObject())->Angle1);
             ui->torusAngle2->setValue(static_cast<PartDesign::Torus*>(vp->getObject())->Angle2.getValue());
+            ui->torusAngle2->bind(static_cast<PartDesign::Torus*>(vp->getObject())->Angle2);
             ui->torusAngle3->setValue(static_cast<PartDesign::Torus*>(vp->getObject())->Angle3.getValue());
+            ui->torusAngle3->bind(static_cast<PartDesign::Torus*>(vp->getObject())->Angle3);
             ui->torusRadius1->setValue(static_cast<PartDesign::Torus*>(vp->getObject())->Radius1.getValue());
+            ui->torusRadius1->bind(static_cast<PartDesign::Torus*>(vp->getObject())->Radius1);
             ui->torusRadius2->setValue(static_cast<PartDesign::Torus*>(vp->getObject())->Radius2.getValue());
+            ui->torusRadius2->bind(static_cast<PartDesign::Torus*>(vp->getObject())->Radius2);
             break;
         case PartDesign::FeaturePrimitive::Prism:
             index = 7;
             ui->prismPolygon->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->Polygon.getValue());
             ui->prismCircumradius->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->Circumradius.getValue());
+            ui->prismCircumradius->bind(static_cast<PartDesign::Prism*>(vp->getObject())->Circumradius);
             ui->prismHeight->setValue(static_cast<PartDesign::Prism*>(vp->getObject())->Height.getValue());
+            ui->prismHeight->bind(static_cast<PartDesign::Prism*>(vp->getObject())->Height);
             break;
         case PartDesign::FeaturePrimitive::Wedge:
             index = 8;
             ui->wedgeXmax->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Xmax.getValue());
+            ui->wedgeXmax->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Xmax);
             ui->wedgeXmin->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Xmin.getValue());
+            ui->wedgeXmin->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Xmin);
             ui->wedgeX2max->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->X2max.getValue());
+            ui->wedgeX2max->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->X2max);
             ui->wedgeX2min->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->X2min.getValue());
+            ui->wedgeX2min->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->X2min);
             ui->wedgeYmax->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Ymax.getValue());
+            ui->wedgeYmax->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Ymax);
             ui->wedgeYmin->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Ymin.getValue());
+            ui->wedgeYmin->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Ymin);
             ui->wedgeZmax->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Zmax.getValue());
+            ui->wedgeZmax->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Zmax);
             ui->wedgeZmin->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Zmin.getValue());
+            ui->wedgeZmin->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Zmin);
             ui->wedgeZ2max->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Z2max.getValue());
+            ui->wedgeZ2max->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Z2max);
             ui->wedgeZ2min->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Z2min.getValue());
+            ui->wedgeZ2min->bind(static_cast<PartDesign::Wedge*>(vp->getObject())->Z2min);
             break;
     }


Fixed segfault.

Fixed segfault.

Segfault appeared when closing program after visiting results page widget.

--- core/src/SearchManager.cpp
+++ core/src/SearchManager.cpp
@@ -21,7 +21,7 @@
 {
     mThread = new AlgorithmThread(algo);
     connect(mThread, SIGNAL(resultsReady()), this, SLOT(submitResults()));
-    connect(mThread, SIGNAL(finished()), this, SLOT(deleteLater()));
+    connect(mThread, SIGNAL(finished()), mThread, SLOT(deleteLater()));
     mThread->start();
 }


cleanup

cleanup

--- core/src/scene/filters.cpp
+++ core/src/scene/filters.cpp
@@ -6,10 +6,6 @@
 #include <cmath>

 namespace Tangram {
-
-void countTypes(const std::vector<Filter>& filters, int& global, int& function, int& property) {
-
-}

 void Filter::print(int _indent) const {

@@ -244,95 +240,6 @@
     return filters;
 }

-#if 0
-
-bool Filter::eval(const Feature& feat, StyleContext& ctx) const {
-
-    switch (data.get_type_index()) {
-
-    case Data::type<OperatorAny>::value: {
-        for (const auto& filt : data.get<OperatorAny>().operands) {
-            if (filt.eval(feat, ctx)) { return true; }
-        }
-        return false;
-    }
-    case Data::type<OperatorAll>::value: {
-        for (const auto& filt : data.get<OperatorAll>().operands) {
-            if (!filt.eval(feat, ctx)) { return false; }
-        }
-        return true;
-    }
-    case Data::type<OperatorNone>::value: {
-        for (const auto& filt : data.get<OperatorNone>().operands) {
-            if (filt.eval(feat, ctx)) { return false; }
-        }
-        return true;
-    }
-    case Data::type<Existence>::value: {
-        auto& f = data.get<Existence>();
-        return f.exists == feat.props.contains(f.key);
-    }
-    case Data::type<Equality>::value: {
-        auto& f = data.get<Equality>();
-
-        if (f.global == FilterGlobal::undefined) {
-            auto& value = feat.props.get(f.key);
-            for (const auto& v : f.values) {
-                if (v == value) {
-                    return true;
-                } else if (value.is<double>() && v.is<double>()) {
-                    auto& a = v.get<double>();
-                    auto& b = value.get<double>();
-                    if (std::fabs(a - b) <= std::numeric_limits<double>::epsilon()) { return true; }
-                }
-            }
-        } else {
-            auto& global = ctx.getGlobal(f.global);
-            if (!global.is<none_type>()) {
-                for (const auto& v : f.values) {
-                    if (v == global) { return true; }
-                }
-                return false;
-            }
-        }
-
-        return false;
-    }
-    case Data::type<Range>::value: {
-        auto& f = data.get<Range>();
-
-        if (f.global == FilterGlobal::undefined) {
-            auto& value = feat.props.get(f.key);
-            if (value.is<double>()) {
-                double num =  value.get<double>();
-                return num >= f.min && num < f.max;
-            }
-        } else {
-            auto& global = ctx.getGlobal(f.global);
-            if (!global.is<none_type>()) {
-                // only check range for numbers
-                if (global.is<double>()) {
-                    double num = global.get<double>();
-                    return num >= f.min && num < f.max;
-                }
-            }
-        }
-        return false;
-    }
-    case Data::type<Function>::value: {
-        auto& f = data.get<Function>();
-        return ctx.evalFilter(f.id);
-    }
-    default:
-        return true;
-    }
-
-    // Cannot be reached
-    //assert(false);
-    return false;
-}
-
-#else

 struct string_matcher {
     using result_type = bool;
@@ -477,6 +384,4 @@
     return Data::visit(data, matcher(feat, ctx));
 }

-#endif
-
-}
+}


Fix nan normals when two polyline points in a row are equals

--- core/src/util/builders.cpp
+++ core/src/util/builders.cpp
@@ -314,6 +314,10 @@
         coordCurr = coordNext;
         coordNext = _line[i + 1];

+        if (coordCurr == coordNext) {
+            continue;
+        }
+
         normPrev = normNext;
         normNext = glm::normalize(perp2d(coordCurr, coordNext));


Remove dead source line.

Remove dead source line.

--- common/trace_resource.cpp
+++ common/trace_resource.cpp
@@ -68,8 +68,6 @@
 }

-#define SCRIPTS_SUBDIR "lib/apitrace/scripts"
-
 os::String
 findScript(const char *name)
 {


Add #include needed by gcc 3.2

Add #include needed by gcc 3.2

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@25478 27541ba8-7e3a-0410-8455-c3a389f83636

--- core/utils/src/rlibmap.cxx
+++ core/utils/src/rlibmap.cxx
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <cctype>
 #include <string>
 #include <string.h>
 #include <vector>


Change token expire date of "12/31/69" to "Expiration time not available" in signin_internals page:

This Cl changes token expire date of "12/31/69" (base::Time()) to "Expiration time not available" in signin_internals page.

BUG=515993

Review URL: https://codereview.chromium.org/1307303002

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#345336}

--- components/signin/core/browser/about_signin_internals.cc
+++ components/signin/core/browser/about_signin_internals.cc
@@ -443,13 +443,17 @@
   } else if (!receive_time.is_null()) {
     if (error == GoogleServiceAuthError::AuthErrorNone()) {
       bool token_expired = expiration_time < base::Time::Now();
+      std::string expiration_time_string = GetTimeStr(expiration_time);
+      if (expiration_time.is_null()) {
+        token_expired = false;
+        expiration_time_string = "Expiration time not available";
+      }
       std::string status_str = "";
       if (token_expired)
         status_str = "
";
-      base::StringAppendF(&status_str,
-                          "Received token at %s. Expire at %s",
+      base::StringAppendF(&status_str, "Received token at %s. Expire at %s",
                           GetTimeStr(receive_time).c_str(),
-                          GetTimeStr(expiration_time).c_str());
+                          expiration_time_string.c_str());
       if (token_expired)
         base::StringAppendF(&status_str, "
");
       token_info->SetString("status", status_str);


FIX rendering

FIX rendering

--- src/lib/convenience/UpdateContextAttributeRequest.cpp
+++ src/lib/convenience/UpdateContextAttributeRequest.cpp
@@ -57,9 +57,9 @@
   std::string out = "";
   std::string indent2 = indent + "  ";

-  out += startTag(indent, tag, format);
-  out += valueTag(indent2, "type", type, format);
-  out += valueTag(indent2, "contextValue", contextValue, format);
+  out += startTag(indent, tag, format, false);
+  out += valueTag(indent2, "type", type, format, true);
+  out += valueTag(indent2, "contextValue", contextValue, format, true);
   out += metadataVector.render(format, indent2);
   out += endTag(indent, tag, format);


Remove dead code

Remove dead code

Remove code that removes the properties lastSetupProject and
lastSetupProduct. They are never set.

Change-Id: I2ec9fa84e05552f881fc3923f315267c89b43c17
Reviewed-by: Christian Kandeler <3aa99dcdd3f0cac61fb81c2a11771c0cc2497607@theqtcompany.com>

--- src/lib/corelib/buildgraph/rulesevaluationcontext.cpp
+++ src/lib/corelib/buildgraph/rulesevaluationcontext.cpp
@@ -86,9 +86,6 @@
     if (m_initScopeCalls++ > 0)
         return;

-    m_engine->setProperty("lastSetupProject", QVariant());
-    m_engine->setProperty("lastSetupProduct", QVariant());
-
     m_engine->clearImportsCache();
     m_engine->pushContext();
     m_scope = m_engine->newObject();


Fix a bug where the SQLITE_OPEN_DELETEONCLOSE flag wasn't being respected.
Review URL: http://codereview.chromium.org/7518041

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

--- content/browser/renderer_host/database_message_filter.cc
+++ content/browser/renderer_host/database_message_filter.cc
@@ -170,7 +170,8 @@
             VfsBackend::OpenFile(db_file,
                                  desired_flags | SQLITE_OPEN_DELETEONCLOSE,
                                  &file_handle);
-            db_tracker_->SaveIncognitoFileHandle(vfs_file_name, file_handle);
+            if (!(desired_flags & SQLITE_OPEN_DELETEONCLOSE))
+              db_tracker_->SaveIncognitoFileHandle(vfs_file_name, file_handle);
           }
         } else {
           VfsBackend::OpenFile(db_file, desired_flags, &file_handle);


Fix compilation error in ubuntu

Fix compilation error in ubuntu

git-svn-id: 9714148d14941aebeae8d7f7841217f5ffc02bc5@3063 4143565c-f3ec-42ea-b729-f8ce0cf5cbc3

--- apps/samsonConnector/DiskConnection.cpp
+++ apps/samsonConnector/DiskConnection.cpp
@@ -147,7 +147,7 @@
                     }

                     // Open a file to write
-                    int _fd = open( current_file_name.c_str() , O_WRONLY | O_CREAT );
+                    int _fd = open( current_file_name.c_str() , O_CREAT | O_WRONLY , 0644 );

                     if( _fd < 0 )
                     {
@@ -285,4 +285,4 @@

-}+}


Adds GlobalAlias awareness to the StripAndAccumulateConstantOffsets function (#493)

--- lib/BC/Util.cpp
+++ lib/BC/Util.cpp
@@ -2298,6 +2298,9 @@
     } else if (auto pti = llvm::dyn_cast<llvm::PtrToIntOperator>(base); pti) {
       base = pti->getOperand(0);

+    } else if (auto alias = llvm::dyn_cast<llvm::GlobalAlias>(base); alias) {
+      base = alias->getAliasee();
+
     } else {
       break;
     }


protecting bad group naming with warnings rather than seg faults

--- contrib/IECoreHoudini/src/ToHoudiniGeometryConverter.cpp
+++ contrib/IECoreHoudini/src/ToHoudiniGeometryConverter.cpp
@@ -229,7 +229,14 @@
 				group = geo->createElementGroup( GA_ATTRIB_POINT, name );
 			}

-			group->addRange( newPoints );
+			if ( group )
+			{
+				group->addRange( newPoints );
+			}
+			else
+			{
+				IECore::msg( IECore::MessageHandler::Warning, "ToHoudiniGeometryConverter", "Group " + nameData->readable() + " is invalid." );
+			}
 		}

 		if ( newPrims.isValid() )
@@ -240,7 +247,14 @@
 				group = geo->createElementGroup( GA_ATTRIB_PRIMITIVE, name );
 			}

-			group->addRange( newPrims );
+			if ( group )
+			{
+				group->addRange( newPrims );
+			}
+			else
+			{
+				IECore::msg( IECore::MessageHandler::Warning, "ToHoudiniGeometryConverter", "Group " + nameData->readable() + " is invalid." );
+			}
 		}
 	}
 }


Added a sample for the FareFamily

Added a sample for the FareFamily

--- stdair/batches/stdair.cpp
+++ stdair/batches/stdair.cpp
@@ -27,6 +27,8 @@
 #include <stdair/bom/SegmentDateTypes.hpp>
 #include <stdair/bom/SegmentCabin.hpp>
 #include <stdair/bom/SegmentCabinTypes.hpp>
+#include <stdair/bom/FareFamily.hpp>
+#include <stdair/bom/FareFamilyTypes.hpp>
 #include <stdair/bom/BookingClass.hpp>
 #include <stdair/bom/BookingClassTypes.hpp>
 #include <stdair/factory/FacBomManager.hpp>
@@ -72,6 +74,7 @@

   // Declare a group of options that will be allowed both on command
   // line and in config file
+
   boost::program_options::options_description config ("Configuration");
   config.add_options()
     ("builtin,b",
@@ -298,39 +301,74 @@
     // Display the leg-cabin
     // STDAIR_LOG_DEBUG ("LegCabin: " << lBKKLegYCabin.toString());

-    // Step 0.7: booking class level
-    // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y on BA's Inv
+    // Step 0.7: fare family level
+    // Create a FareFamily (1) for the Segment LHR-BKK, cabin Y on BA's Inv
+    const stdair::FamilyCode_T l1 ("1");
+    stdair::FareFamilyKey l1FareFamilyKey (l1);
+
+    stdair::FareFamily& lLHRBKKSegmentYCabin1Family =
+      stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
+    stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin,
+                                                 lLHRBKKSegmentYCabin1Family);
+
+    // Display the booking class
+    // STDAIR_LOG_DEBUG ("FareFamily: "
+    //                   << lLHRBKKSegmentYCabin1Family.toString());
+
+    // Create a FareFamily (1)  for the Segment BKK-SYD, cabin Y on BA's Inv
+    stdair::FareFamily& lBKKSYDSegmentYCabin1Family =
+      stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
+    stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin,
+                                                 lBKKSYDSegmentYCabin1Family);
+
+    // Display the booking class
+    // STDAIR_LOG_DEBUG ("FareFamily: "
+    //                   << lLHRBKKSegmentYCabin1Family.toString());
+
+    // Create a FareFamily (1)  for the Segment LHR-SYD, cabin Y on BA's Inv
+    stdair::FareFamily& lLHRSYDSegmentYCabin1Family =
+      stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
+    stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin,
+                                                 lLHRSYDSegmentYCabin1Family);
+
+    // Display the booking class
+    // STDAIR_LOG_DEBUG ("FareFamily: "
+    //                   << lLHRBKKSegmentYCabin1Family.toString());
+
+
+    // Step 0.8: booking class level
+    // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare family 1 on BA's Inv
     const stdair::ClassCode_T lQ ("Q");
     stdair::BookingClassKey lQBookingClassKey (lQ);

-    stdair::BookingClass& lLHRBKKSegmentYCabinQClass =
+    stdair::BookingClass& lLHRBKKSegmentYCabin1FamilyQClass =
       stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
-    stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin,
-                                                 lLHRBKKSegmentYCabinQClass);
+    stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin1Family,
+                                                 lLHRBKKSegmentYCabin1FamilyQClass);

     // Display the booking class
     // STDAIR_LOG_DEBUG ("BookingClass: "
-    //                   << lLHRBKKSegmentYCabinQClass.toString());
-
-    // Create a BookingClass (Q) for the Segment BKK-LHR, cabin Y
-    stdair::BookingClass& lBKKSYDSegmentYCabinQClass =
+    //                   << lLHRBKKSegmentYCabin1FamilyQClass.toString());
+
+    // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare family 1 on BA's Inv
+    stdair::BookingClass& lBKKSYDSegmentYCabin1FamilyQClass =
       stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
-    stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin,
-                                                 lBKKSYDSegmentYCabinQClass);
+    stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin1Family,
+                                                 lBKKSYDSegmentYCabin1FamilyQClass);

     // Display the booking class
     // STDAIR_LOG_DEBUG ("BookingClass: "
-    //                   << lLHRBKKSegmentYCabinQClass.toString());
-
-    // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y
-    stdair::BookingClass& lLHRSYDSegmentYCabinQClass =
+    //                   << lLHRBKKSegmentYCabin1FamilyQClass.toString());
+
+    // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare family 1 on BA's Inv
+    stdair::BookingClass& lLHRSYDSegmentYCabin1FamilyQClass =
       stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
-    stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin,
-                                                 lLHRSYDSegmentYCabinQClass);
+    stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin1Family,
+                                                 lLHRSYDSegmentYCabin1FamilyQClass);

     // Display the booking class
     // STDAIR_LOG_DEBUG ("BookingClass: "
-    //                   << lLHRBKKSegmentYCabinQClass.toString());
+    //                   << lLHRBKKSegmentYCabin1FamilyQClass.toString());

     // ////// AF ///////
@@ -391,16 +429,29 @@
     // Display the leg-cabin
     // STDAIR_LOG_DEBUG ("LegCabin: " << lLHRLegYCabin.toString());

-    // Step 0.7: booking class level
-    // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y on AF's Inv
-    stdair::BookingClass& lCDGSFOSegmentYCabinQClass =
+
+    // Step 0.7: fare family level
+    // Create a fareFamily (1) for the Segment CDG-SFO, cabin Y on AF's Inv
+    stdair::FareFamily& lCDGSFOSegmentYCabin1Family =
+      stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey);
+    stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin,
+                                                 lCDGSFOSegmentYCabin1Family);
+
+    // Display the fare family
+    // STDAIR_LOG_DEBUG ("fareFamily: "
+    //
+    //                   << lCDGSFOSegmentYCabin1Family.toString());
+
+    // Step 0.8: booking class level
+    // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare family 1 on AF's Inv
+    stdair::BookingClass& lCDGSFOSegmentYCabin1FamilyQClass =
       stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey);
-    stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin,
-                                                 lCDGSFOSegmentYCabinQClass);
+    stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin1Family,
+                                                 lCDGSFOSegmentYCabin1FamilyQClass);

     // Display the booking class
     // STDAIR_LOG_DEBUG ("BookingClass: "
-    //                   << lCDGSFOSegmentYCabinQClass.toString());
+    //                   << lCDGSFOSegmentYCabin1FamilyQClass.toString());

     // /////////// Step 1.0: Display the BOM tree //////////
@@ -435,7 +486,7 @@
           const stdair::LegDate* lLD_ptr = *itLD;
           assert (lLD_ptr != NULL);

-          // STDAIR_LOG_DEBUG ("LegDate: " << lLD_ptr->toString());
+          // STDAIR_LOG_DEBUG ("LegDate: " <<f9 lLD_ptr->toString());
           STDAIR_LOG_DEBUG ("    " << lLD_ptr->toString());

           // 1.6. LegCabin level
@@ -476,17 +527,30 @@
             // STDAIR_LOG_DEBUG ("SegmentCabin: " << lSC_ptr->toString());
             STDAIR_LOG_DEBUG ("    " << lSC_ptr->toString());

-            // 1.7. BookingClass level
-            const stdair::BookingClassList_T& lBookingClassList =
-              stdair::BomManager::getList<stdair::BookingClass> (*lSC_ptr);
-            for (stdair::BookingClassList_T::const_iterator itBC =
-                   lBookingClassList.begin();
-                 itBC != lBookingClassList.end(); ++itBC) {
-              const stdair::BookingClass* lBC_ptr = *itBC;
-              assert (lBC_ptr != NULL);
+            // 1.7. FareFamily level
+            const stdair::FareFamilyList_T& lFareFamilyList =
+              stdair::BomManager::getList<stdair::FareFamily> (*lSC_ptr);
+            for (stdair::FareFamilyList_T::const_iterator itFF =
+                   lFareFamilyList.begin();
+                 itFF != lFareFamilyList.end(); ++itFF) {
+              const stdair::FareFamily* lFF_ptr = *itFF;
+              assert (lFF_ptr != NULL);

-              // STDAIR_LOG_DEBUG ("BookingClass: " << lBC_ptr->toString());
-              STDAIR_LOG_DEBUG ("    " << lBC_ptr->toString());
+              // STDAIR_LOG_DEBUG ("FareFamily: " << lFF_ptr->toString());
+              STDAIR_LOG_DEBUG ("    " << lFF_ptr->toString());
+
+              // 1.8. BookingClass level
+              const stdair::BookingClassList_T& lBookingClassList =
+                stdair::BomManager::getList<stdair::BookingClass> (*lFF_ptr);
+              for (stdair::BookingClassList_T::const_iterator itBC =
+                     lBookingClassList.begin();
+                   itBC != lBookingClassList.end(); ++itBC) {
+                const stdair::BookingClass* lBC_ptr = *itBC;
+                assert (lBC_ptr != NULL);
+
+                // STDAIR_LOG_DEBUG ("BookingClass: " << lBC_ptr->toString());
+                STDAIR_LOG_DEBUG ("    " << lBC_ptr->toString());
+              }
             }
           }
         }


Picks up gtest r453.

Picks up gtest r453.

git-svn-id: f2be60d55979b34ac5db539df6b28881faa6b372@310 8415998a-534a-0410-bf83-d39667b30386

--- test/gmock-spec-builders_test.cc
+++ test/gmock-spec-builders_test.cc
@@ -1855,7 +1855,7 @@
                   "Uninteresting mock function call - returning directly\\.\n"
                   "    Function call: VoidMethod"
                   "\\(false, 5, \"Hi\", NULL, @.+ "
-                  "Printable, 4-byte object <0000 0000>\\)"));
+                  "Printable, 4-byte object <00-00 00-00>\\)"));
   // A void function has no return value to print.
 }


Rework and fix Timer ISR size optimization.

--- cores/fastarduino/Timer.hh
+++ cores/fastarduino/Timer.hh
@@ -32,7 +32,7 @@
 using ISRCallback =																						\
 	timer_impl::ISRHandler<FOR_EACH_SEP(PREPEND_TIMER_, , EMPTY, COMMA, EMPTY, T0, ##__VA_ARGS__)>;		\
 																										\
-FOR_EACH(ISR_TIMER_, _0, T0, ##__VA_ARGS__)
+FOR_EACH(ISR_TIMER_, , T0, ##__VA_ARGS__)

 // Forward declaration necessary to be declared as friend
 // Complete declaration can be found at the end of this file


Fixed bug in PatchGenerator causing wrong sizes of patches.

Happens with regular images, and was introduced after patch overlap support was added.

--- source/FAST/Algorithms/ImagePatch/PatchGenerator.cpp
+++ source/FAST/Algorithms/ImagePatch/PatchGenerator.cpp
@@ -176,15 +176,15 @@
             mRuntimeManager->startRegularTimer("create patch");

             int patchWidth = m_width;
-            if(patchX*patchWidthWithoutOverlap + patchWidth - overlapInPixelsX >= width) {
+            if(patchX*patchWidthWithoutOverlap + patchWidth - overlapInPixelsX > width) {
                 patchWidth = width - patchX * patchWidthWithoutOverlap + overlapInPixelsX - 1;
             }
             int patchHeight = m_height;
-            if(patchY*patchHeightWithoutOverlap + patchHeight - overlapInPixelsY >= height) {
+            if(patchY*patchHeightWithoutOverlap + patchHeight - overlapInPixelsY > height) {
                 patchHeight = height - patchY * patchHeightWithoutOverlap + overlapInPixelsY - 1;
             }
             int patchDepth = m_depth;
-            if(patchZ*patchDepthWithoutOverlap + patchDepth - overlapInPixelsZ >= depth) {
+            if(patchZ*patchDepthWithoutOverlap + patchDepth - overlapInPixelsZ > depth) {
                 patchDepth = depth - patchZ * patchDepthWithoutOverlap + overlapInPixelsZ - 1;
             }

@@ -192,6 +192,7 @@
             int y = patchY * patchHeightWithoutOverlap - overlapInPixelsY;
             int z = patchZ * patchDepthWithoutOverlap - overlapInPixelsZ;

+            reportInfo() << "Creating 2D image patch at offset " << x << " " << y << " " << z << " with size " << patchWidth << " " << patchHeight << " " << patchDepth << reportEnd();
             auto patch = m_inputVolume->crop(Vector3i(x, y, z), Vector3i(patchWidth, patchHeight, patchDepth), true);
             patch->setFrameData("original-width", std::to_string(width));
             patch->setFrameData("original-height", std::to_string(height));


Small change to the previous checkin, read in the fpu register context
in one large block - and be sure toget the fpscr value as well when
processing a core file.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@181756 91177308-0d34-0410-b5e6-96231b3b80d8

--- source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -305,12 +305,18 @@

                 case FPURegSet:
                     {
-                        uint32_t *d = &fpu.floats.s[0];
-                        for (uint32_t i = 0; i < count && d < d + (sizeof (fpu.floats) / sizeof (uint32_t)); i++)
+                        uint8_t  *fpu_reg_buf = (uint8_t*) &fpu.floats.s[0];
+                        const int fpu_reg_buf_size = sizeof (fpu.floats);
+                        if (data.ExtractBytes (offset, fpu_reg_buf_size, eByteOrderLittle, fpu_reg_buf) == fpu_reg_buf_size)
                         {
-                            *d++ = data.GetU32(&offset);
+                            offset += fpu_reg_buf_size;
+                            fpu.fpscr = data.GetU32(&offset);
+                            SetError (FPURegSet, Read, 0);
                         }
-                        SetError (FPURegSet, Read, 0);
+                        else
+                        {
+                            done = true;
+                        }
                     }
                     break;


llvm-cov: fix a typo and rename a variable.

Rename Size to EndPos, which makes more sense because the variable
stores the last location of the blocks.

Patch by Yuchen Wu!

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@193189 91177308-0d34-0410-b5e6-96231b3b80d8

--- lib/IR/GCOV.cpp
+++ lib/IR/GCOV.cpp
@@ -85,7 +85,7 @@
   DeleteContainerPointers(Blocks);
 }

-/// read - Read a aunction from the buffer. Return false if buffer cursor
+/// read - Read a function from the buffer. Return false if buffer cursor
 /// does not point to a function tag.
 bool GCOVFunction::read(GCOVBuffer &Buff, GCOV::GCOVFormat Format) {
   if (!Buff.readFunctionTag())
@@ -136,14 +136,14 @@
   // read line table.
   while (Buff.readLineTag()) {
     uint32_t LineTableLength = Buff.readInt();
-    uint32_t Size = Buff.getCursor() + LineTableLength*4;
+    uint32_t EndPos = Buff.getCursor() + LineTableLength*4;
     uint32_t BlockNo = Buff.readInt();
     assert(BlockNo < BlockCount && "Unexpected Block number!");
     GCOVBlock *Block = Blocks[BlockNo];
     Buff.readInt(); // flag
-    while (Buff.getCursor() != (Size - 4)) {
+    while (Buff.getCursor() != (EndPos - 4)) {
       StringRef Filename = Buff.readString();
-      if (Buff.getCursor() == (Size - 4)) break;
+      if (Buff.getCursor() == (EndPos - 4)) break;
       while (uint32_t L = Buff.readInt())
         Block->addLine(Filename, L);
     }


[C++] fixed TestJoynrMessagingConnectorTest

Change-Id: I4d13e027a0e54383e725569b41e37372b10343da

--- cpp/tests/unit-tests/TestJoynrMessagingConnectorTest.cpp
+++ cpp/tests/unit-tests/TestJoynrMessagingConnectorTest.cpp
@@ -117,9 +117,7 @@
                                       std::shared_ptr<SubscriptionQos> qos,
                                       SubscriptionRequest& subscriptionRequest) {
         std::ignore = subscribeToName;
-        std::ignore = qos;
-        std::ignore = subscriptionRequest;
-
+        subscriptionRequest.setQos(qos);
         std::shared_ptr<SubscriptionCallback<joynr::types::Localisation::GpsLocation, float>> typedCallback =
                 std::dynamic_pointer_cast<SubscriptionCallback<joynr::types::Localisation::GpsLocation, float>>(callback);


INTEGRATION: CWS changefileheader (1.6.26); FILE MERGED 2008/03/31 13:07:08 rt 1.6.26.1: #i87441# Change license header to LPGL v3.

--- cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
+++ cppcanvas/source/mtfrenderer/transparencygroupaction.hxx
@@ -1,35 +1,30 @@
 /*************************************************************************
  *
- *  OpenOffice.org - a multi-platform office productivity suite
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
- *  $RCSfile: transparencygroupaction.hxx,v $
+ * Copyright 2008 by Sun Microsystems, Inc.
  *
- *  $Revision: 1.6 $
+ * OpenOffice.org - a multi-platform office productivity suite
  *
- *  last change: $Author: obo $ $Date: 2007-01-22 11:52:27 $
+ * $RCSfile: transparencygroupaction.hxx,v $
+ * $Revision: 1.7 $
  *
- *  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.
  *
  ************************************************************************/


We now also cache text for records that have no 856$u but have 520$a subfields.

--- cpp/create_full_text_db.cc
+++ cpp/create_full_text_db.cc
@@ -127,7 +127,10 @@
             continue;
         }

-        if (not FoundAtLeastOneNonReviewLink(record)) {
+        const bool insert_in_cache(FoundAtLeastOneNonReviewLink(record)
+                                   or (not MarcUtil::HasTagAndSubfield(record, "856", 'u')
+                                       and MarcUtil::HasTagAndSubfield(record, "520", 'a')));
+        if (not insert_in_cache) {
             MarcUtil::FileLockedComposeAndWriteRecord(marc_writer, &record);
             record_start = marc_reader->tell();
             continue;