disable debug logging

disable debug logging

--- include/pinba/dictionary.h
+++ include/pinba/dictionary.h
@@ -233,7 +233,7 @@
 		assert(w->id == word_id);
 		assert(!w->str.empty() && "got empty word ptr from wordlist, dangling word_id reference");

-		LOG_DEBUG(PINBA_LOOGGER_, "{0}; erasing {1} {2} {3}", __func__, w->str, w->id, w->refcount);
+		// LOG_DEBUG(PINBA_LOOGGER_, "{0}; erasing {1} {2} {3}", __func__, w->str, w->id, w->refcount);

 		if (0 == --w->refcount)
 		{
@@ -544,7 +544,7 @@
 		// move all wordslices that are only referenced from `slices' to the end of the range
 		auto const erased_begin = std::partition(slices.begin(), slices.end(), [](wordslice_ptr& ws)
 		{
-			LOG_DEBUG(PINBA_LOOGGER_, "{0}; ws: {1}, uc: {2}", __func__, ws.get(), ws->use_count());
+			// LOG_DEBUG(PINBA_LOOGGER_, "{0}; ws: {1}, uc: {2}", __func__, ws.get(), ws->use_count());
 			assert(ws->use_count() >= 1); // sanity
 			return (ws->use_count() != 1);
 		});
@@ -578,7 +578,7 @@
 					{
 						result.reaped_words_global += 1;

-						LOG_DEBUG(PINBA_LOOGGER_, "reap_unused_wordslices; erase global '{0}' {1} {2}", w->str, w->id, w->use_count());
+						// LOG_DEBUG(PINBA_LOOGGER_, "reap_unused_wordslices; erase global '{0}' {1} {2}", w->str, w->id, w->use_count());

 						// erase from local hash
 						size_t const erased_count = word_to_id.erase(w->str);


syscalls: add close_range() syscall

syscalls: add close_range() syscall

The syscall has been added a while ago so we should support resolving
it, too.

Signed-off-by: Sascha Grunert <70ab469ddb2ac3e35f32ed7c2fd1cca514b2e879@redhat.com>
Reviewed-by: Tom Hromatka <96b9c1f2c09b98d7a09b4688fc637f1494d8e182@oracle.com>
[PM: subject line tweak]
Signed-off-by: Paul Moore <a027184a55211cd23e3f3094f1fdc728df5e0500@paul-moore.com>

--- include/seccomp-syscalls.h
+++ include/seccomp-syscalls.h
@@ -476,6 +476,8 @@

 #define __SNR_close			__NR_close

+#define __SNR_close_range		__NR_close_range
+
 #ifdef __NR_connect
 #define __SNR_connect			__NR_connect
 #else


	reviewed by: John Sullivan <sullivan@eazel.com>

	Fixed bug 7328 (info pages no longer work):

	* components/help/converters/gnome-info2html2/main.c: (main):
	Fixed broken logic for handling both bzip and gzip.

	Fixed case when you change "View As" before the view change is
	complete.

	* src/nautilus-window-manage-views.c:
	(nautilus_window_set_content_view): Stop the view change if you
	make a change with the "View As" menu.

--- help-converters/info/main.c
+++ help-converters/info/main.c
@@ -44,9 +44,9 @@
 main(int argc, char **argv)
 {
 	gzFile f = NULL;
+	int bz = 0;
 #ifdef HAVE_LIBBZ2
 	BZFILE *bf=NULL;
-	int bz = 0;
 #endif
 	char line[250];
 	poptContext ctx;
@@ -168,47 +168,57 @@
 	/* No need to store all nodes, etc since we let web server */
 	/* handle resolving tags!                                  */
 	for (;1 || !foundit || !requested_nodename;) {
-#ifdef HAVE_LIBBZ2
-	  if(bz && !bf) {
-	     if(args && args[curarg])
-	      {
-		bf = bzopen(args[curarg++], "r");
-		if(!f)
-		  break;
-		num_files_left = args[curarg]?1:0;
-		for(work_line_number = 0, bzread(bf, line, sizeof(line)); *line != INFO_COOKIE;
-		    bzread(bf, line, sizeof(line)), work_line_number++)
-		  /**/ ;
-	      }
-	    else
-	      break;
-	  }
-	  if(!bzread(bf, line, sizeof(line)))
+	  if(bz)
 	    {
-	      bzclose(bf);
-	      bf = NULL;
-	      continue;
-	    }
-#endif
-	  if(!f) {
-	    if(args && args[curarg])
-	      {
-		f = gzopen(args[curarg++], "r");
-		if(!f)
-		  break;
-		num_files_left = args[curarg]?1:0;
-		for(work_line_number = 0, gzgets(f, line, sizeof(line)); *line != INFO_COOKIE;
-		    gzgets(f, line, sizeof(line)), work_line_number++)
-		  /**/ ;
-	      }
-	    else
-	      break;
-	  }
-	  if(!gzgets(f, line, sizeof(line)))
+#ifdef HAVE_LIBBZ2
+	      if(!bf)
+		{
+		  if(args && args[curarg])
+		    {
+		      bf = bzopen(args[curarg++], "r");
+		      if(!f)
+			break;
+		      num_files_left = args[curarg]?1:0;
+		      for(work_line_number = 0, bzread(bf, line, sizeof(line)); *line != INFO_COOKIE;
+			  bzread(bf, line, sizeof(line)), work_line_number++)
+			/**/ ;
+		    }
+		  else
+		    break;
+		}
+	      if(!bzread(bf, line, sizeof(line)))
+		{
+		  bzclose(bf);
+		  bf = NULL;
+		  continue;
+		}
+#else
+	      g_assert_not_reached();
+#endif
+	    }
+	  else
 	    {
-	      gzclose(f);
-	      f = NULL;
-	      continue;
+	      if(!f)
+		{
+		  if(args && args[curarg])
+		    {
+		      f = gzopen(args[curarg++], "r");
+		      if(!f)
+			break;
+		      num_files_left = args[curarg]?1:0;
+		      for(work_line_number = 0, gzgets(f, line, sizeof(line)); *line != INFO_COOKIE;
+			  gzgets(f, line, sizeof(line)), work_line_number++)
+			/**/ ;
+		    }
+		  else
+		    break;
+		}
+	      if(!gzgets(f, line, sizeof(line)))
+		{
+		  gzclose(f);
+		  f = NULL;
+		  continue;
+		}
 	    }

 	  work_line_number++;


Improve comments for SourceFile.

Improve comments for SourceFile.

Swift SVN r9081

--- include/swift/AST/Module.h
+++ include/swift/AST/Module.h
@@ -345,6 +345,13 @@
 };

+/// A file containing Swift source code; also, the smallest unit of code
+/// organization.
+///
+/// This is a .swift or .sil file (or a virtual file, such as the contents of
+/// the REPL). Since it contains raw source, it must be parsed and name-bound
+/// before being used for anything; a full type-check is also necessary for
+/// IR generation.
 class SourceFile {
   /// This is the list of modules that are imported by this module, with the
   /// second element of the pair declaring whether the module is reexported.
@@ -360,7 +367,7 @@
   /// The translation unit that this file is a part of.
   TranslationUnit &TU;

-  /// The list of top-level declarations for a translation unit.
+  /// The list of top-level declarations in the source file.
   std::vector<Decl*> Decls;

   /// A map of operator names to InfixOperatorDecls.
@@ -378,20 +385,17 @@
   /// binding is complete.
   llvm::StringMap<PrefixOperatorDecl*> PrefixOperators;

-  /// This describes how this file is parsed, which can affect some type
-  /// checking and other behavior.
   enum SourceKind {
-    Library,
-    Main,
-    REPL,
+    Library,  ///< A normal .swift file.
+    Main,     ///< A .swift file that can have top-level code.
+    REPL,     ///< A virtual file that holds the user's input in the REPL.
     SIL       ///< Came from a .sil file.
   };

+  /// Describes what kind of file this is, which can affect some type checking
+  /// and other behavior.
   const SourceKind Kind;

-  /// Defines what phases of parsing and semantic analysis are complete for a
-  /// source file.  This should only be used for assertions and verification
-  /// purposes.
   enum ASTStage_t {
     /// Parsing is underway.
     Parsing,
@@ -401,7 +405,12 @@
     NameBound,
     /// Type checking has completed.
     TypeChecked
-  } ASTStage = Parsing;
+  };
+
+  /// Defines what phases of parsing and semantic analysis are complete for a
+  /// source file.  This should only be used for assertions and verification
+  /// purposes.
+  ASTStage_t ASTStage = Parsing;

   SourceFile(TranslationUnit &tu, SourceKind K,
              int ImportID = -1) : ImportBufferID(ImportID), TU(tu), Kind(K) {}
@@ -431,8 +440,14 @@
 };

-/// TranslationUnit - This contains information about all of the decls and
-/// external references in a translation unit, which is one file.
+/// Represents a module composed of one or more input files.
+///
+/// A translation unit is made up of several input files, which all represent
+/// part of the same module. The intent is if all files in a translation unit
+/// were built and linked they would form a logical module (such as a single
+/// library or executable).
+///
+/// \sa SourceFile
 class TranslationUnit : public Module {
 private:
   /// The list of libraries specified as link-time dependencies at compile time.
@@ -443,7 +458,7 @@
   ExternalNameLookup *ExternalLookup = nullptr;

 public:
-  // FIXME: Make private.
+  // FIXME: Make private or eliminate altogether.
   SourceFile *MainSourceFile;

   /// If this is true, then the translation unit is allowed to access the


xen/trace: convert mmu events to use DECLARE_EVENT_CLASS()/DEFINE_EVENT()

Signed-off-by: Jeremy Fitzhardinge <35cfe9f678a9e9bbdcf2f6e68cd105ce06d149b1@citrix.com>

--- include/trace/events/xen.h
+++ include/trace/events/xen.h
@@ -127,7 +127,7 @@
 	);

 /* mmu */
-TRACE_EVENT(xen_mmu_set_pte,
+DECLARE_EVENT_CLASS(xen_mmu__set_pte,
 	    TP_PROTO(pte_t *ptep, pte_t pteval),
 	    TP_ARGS(ptep, pteval),
 	    TP_STRUCT__entry(
@@ -142,20 +142,13 @@
 		      (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval)
 	);

-TRACE_EVENT(xen_mmu_set_pte_atomic,
-	    TP_PROTO(pte_t *ptep, pte_t pteval),
-	    TP_ARGS(ptep, pteval),
-	    TP_STRUCT__entry(
-		    __field(pte_t *, ptep)
-		    __field(pteval_t, pteval)
-		    ),
-	    TP_fast_assign(__entry->ptep = ptep;
-			   __entry->pteval = pteval.pte),
-	    TP_printk("ptep %p pteval %0*llx (raw %0*llx)",
-		      __entry->ptep,
-		      (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)),
-		      (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval)
-	);
+#define DEFINE_XEN_MMU_SET_PTE(name)				\
+	DEFINE_EVENT(xen_mmu__set_pte, name,			\
+		     TP_PROTO(pte_t *ptep, pte_t pteval),	\
+		     TP_ARGS(ptep, pteval))
+
+DEFINE_XEN_MMU_SET_PTE(xen_mmu_set_pte);
+DEFINE_XEN_MMU_SET_PTE(xen_mmu_set_pte_atomic);

 TRACE_EVENT(xen_mmu_set_domain_pte,
 	    TP_PROTO(pte_t *ptep, pte_t pteval, unsigned domid),
@@ -307,7 +300,7 @@
 	    TP_printk("pgdp %p", __entry->pgdp)
 	);

-TRACE_EVENT(xen_mmu_ptep_modify_prot_start,
+DECLARE_EVENT_CLASS(xen_mmu_ptep_modify_prot,
 	    TP_PROTO(struct mm_struct *mm, unsigned long addr,
 		     pte_t *ptep, pte_t pteval),
 	    TP_ARGS(mm, addr, ptep, pteval),
@@ -326,26 +319,14 @@
 		      (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)),
 		      (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval)
 	);
-
-TRACE_EVENT(xen_mmu_ptep_modify_prot_commit,
-	    TP_PROTO(struct mm_struct *mm, unsigned long addr,
-		     pte_t *ptep, pte_t pteval),
-	    TP_ARGS(mm, addr, ptep, pteval),
-	    TP_STRUCT__entry(
-		    __field(struct mm_struct *, mm)
-		    __field(unsigned long, addr)
-		    __field(pte_t *, ptep)
-		    __field(pteval_t, pteval)
-		    ),
-	    TP_fast_assign(__entry->mm = mm;
-			   __entry->addr = addr;
-			   __entry->ptep = ptep;
-			   __entry->pteval = pteval.pte),
-	    TP_printk("mm %p addr %lx ptep %p pteval %0*llx (raw %0*llx)",
-		      __entry->mm, __entry->addr, __entry->ptep,
-		      (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)),
-		      (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval)
-	);
+#define DEFINE_XEN_MMU_PTEP_MODIFY_PROT(name)				\
+	DEFINE_EVENT(xen_mmu_ptep_modify_prot, name,			\
+		     TP_PROTO(struct mm_struct *mm, unsigned long addr,	\
+			      pte_t *ptep, pte_t pteval),		\
+		     TP_ARGS(mm, addr, ptep, pteval))
+
+DEFINE_XEN_MMU_PTEP_MODIFY_PROT(xen_mmu_ptep_modify_prot_start);
+DEFINE_XEN_MMU_PTEP_MODIFY_PROT(xen_mmu_ptep_modify_prot_commit);

 TRACE_EVENT(xen_mmu_alloc_ptpage,
 	    TP_PROTO(struct mm_struct *mm, unsigned long pfn, unsigned level, bool pinned),
@@ -381,7 +362,7 @@
 		      __entry->pinned ? "" : "un")
 	);

-TRACE_EVENT(xen_mmu_pgd_pin,
+DECLARE_EVENT_CLASS(xen_mmu_pgd,
 	    TP_PROTO(struct mm_struct *mm, pgd_t *pgd),
 	    TP_ARGS(mm, pgd),
 	    TP_STRUCT__entry(
@@ -392,18 +373,13 @@
 			   __entry->pgd = pgd),
 	    TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd)
 	);
-
-TRACE_EVENT(xen_mmu_pgd_unpin,
-	    TP_PROTO(struct mm_struct *mm, pgd_t *pgd),
-	    TP_ARGS(mm, pgd),
-	    TP_STRUCT__entry(
-		    __field(struct mm_struct *, mm)
-		    __field(pgd_t *, pgd)
-		    ),
-	    TP_fast_assign(__entry->mm = mm;
-			   __entry->pgd = pgd),
-	    TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd)
-	);
+#define DEFINE_XEN_MMU_PGD_EVENT(name)				\
+	DEFINE_EVENT(xen_mmu_pgd, name,				\
+		TP_PROTO(struct mm_struct *mm, pgd_t *pgd),	\
+		     TP_ARGS(mm, pgd))
+
+DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_pin);
+DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_unpin);

 TRACE_EVENT(xen_mmu_flush_tlb,
 	    TP_PROTO(int x),


print_helper using 3D vector argument

print_helper using 3D vector argument

closes #3380

--- include/utils/parameters.h
+++ include/utils/parameters.h
@@ -37,7 +37,8 @@
 namespace libMesh
 {
 /**
- * Helper functions for printing scalar, vector and vector<vector> types.  Called from Parameters::Parameter<T>::print(...).
+ * Helper functions for printing scalar, vector, vector<vector> and vector<vector<vector>>
+ * types.  Called from Parameters::Parameter<T>::print(...).
  */
 template<typename P>
 void print_helper(std::ostream & os, const P * param);
@@ -47,6 +48,9 @@

 template<typename P>
 void print_helper(std::ostream & os, const std::vector<std::vector<P>> * param);
+
+template<typename P>
+void print_helper(std::ostream & os, const std::vector<std::vector<std::vector<P>>> * param);

 template<typename P1, typename P2, typename C, typename A>
 void print_helper(std::ostream & os, const std::map<P1, P2, C, A> * param);
@@ -566,6 +570,16 @@
       os << p << " ";
 }

+//non-member vector<vector<vector>> print function
+template<typename P>
+void print_helper(std::ostream & os, const std::vector<std::vector<std::vector<P>>> * param)
+{
+  for (const auto & pvv : *param)
+    for (const auto & pv : pvv)
+      for (const auto & p : pv)
+        os << p << " ";
+}
+
 //non-member map print function
 template<typename P1, typename P2, typename C, typename A>
 void print_helper(std::ostream & os, const std::map<P1, P2, C, A> * param)


Fix minimum alignment for posix_memalign.

--- includes/acl/core/memory.h
+++ includes/acl/core/memory.h
@@ -80,7 +80,7 @@
 			return _aligned_malloc(size, alignment);
 #elif defined(__APPLE__)
 			void* ptr = nullptr;
-			posix_memalign(&ptr, alignment, size);
+			posix_memalign(&ptr, std::max<size_t>(alignment, sizeof(void*)), size);
 			return ptr;
 #else
 			return aligned_alloc(alignment, size);


remove union ValuePointer

remove union ValuePointer

Reviewed-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- src/cmocka.c
+++ src/cmocka.c
@@ -110,37 +110,17 @@

 /*
- * Declare and initialize the pointer member of ValuePointer variable name
- * with ptr.
+ * Declare and initialize a LargestIntegralType variable name
+ * with value the conversion of ptr.
  */
 #define declare_initialize_value_pointer_pointer(name, ptr) \
-    ValuePointer name ; \
-    name.value = 0; \
-    name.x.pointer = (void*)(ptr)
-
-/*
- * Declare and initialize the value member of ValuePointer variable name
- * with val.
- */
-#define declare_initialize_value_pointer_value(name, val) \
-    ValuePointer name ; \
-    name.value = val
-
-/* Cast a LargestIntegralType to pointer_type via a ValuePointer. */
+    LargestIntegralType name ; \
+    name = (LargestIntegralType) (uintptr_t) ptr
+
+/* Cast a LargestIntegralType to pointer_type. */
 #define cast_largest_integral_type_to_pointer( \
     pointer_type, largest_integral_type) \
-    ((pointer_type)((ValuePointer*)&(largest_integral_type))->x.pointer)
-
-/* Used to cast LargetIntegralType to void* and vice versa. */
-typedef union ValuePointer {
-    LargestIntegralType value;
-    struct {
-#if defined(WORDS_BIGENDIAN) && (WORDS_SIZEOF_VOID_P == 4)
-        unsigned int padding;
-#endif
-        void *pointer;
-    } x;
-} ValuePointer;
+    ((pointer_type)(uintptr_t)(largest_integral_type))

 /* Doubly linked list node. */
 typedef struct ListNode {
@@ -1489,7 +1469,7 @@
     check_integer_set->size_of_set = number_of_values;
     _expect_check(
         function, parameter, file, line, check_function,
-        check_data.value, &check_integer_set->event, count);
+        check_data, &check_integer_set->event, count);
 }

@@ -1552,7 +1532,7 @@
     check_integer_range->minimum = minimum;
     check_integer_range->maximum = maximum;
     _expect_check(function, parameter, file, line, check_function,
-                  check_data.value, &check_integer_range->event, count);
+                  check_data, &check_integer_range->event, count);
 }

@@ -1631,7 +1611,7 @@
     declare_initialize_value_pointer_pointer(string_pointer,
                                              discard_const(string));
     _expect_check(function, parameter, file, line, check_string,
-                  string_pointer.value, NULL, count);
+                  string_pointer, NULL, count);
 }

@@ -1653,7 +1633,7 @@
     declare_initialize_value_pointer_pointer(string_pointer,
                                              discard_const(string));
     _expect_check(function, parameter, file, line, check_not_string,
-                  string_pointer.value, NULL, count);
+                  string_pointer, NULL, count);
 }

 /* CheckParameterValue callback to check whether a parameter equals an area of
@@ -1686,7 +1666,7 @@
     check_data->memory = mem;
     check_data->size = size;
     _expect_check(function, parameter, file, line, check_function,
-                  check_data_pointer.value, &check_data->event, count);
+                  check_data_pointer, &check_data->event, count);
 }


src: Rename values_equal_display_error()

--- src/cmocka.c
+++ src/cmocka.c
@@ -1237,9 +1237,10 @@

 /* Returns 1 if the specified values are equal.  If the values are not equal
  * an error is displayed and 0 is returned. */
-static int values_equal_display_error(const uintmax_t left,
-                                       const uintmax_t right) {
-    const int equal = left == right;
+static bool uint_values_equal_display_error(const uintmax_t left,
+                                            const uintmax_t right)
+{
+    const bool equal = left == right;
     if (!equal) {
         cmocka_print_error("%ju (%#jx) != %ju (%#jx)\n",
                            left,
@@ -1560,7 +1561,7 @@
  * expected value. */
 static int check_value(const uintmax_t value,
                        const uintmax_t check_value_data) {
-    return values_equal_display_error(value, check_value_data);
+    return uint_values_equal_display_error(value, check_value_data);
 }

@@ -1850,7 +1851,7 @@
 void _assert_int_equal(
         const uintmax_t a, const uintmax_t b,
         const char * const file, const int line) {
-    if (!values_equal_display_error(a, b)) {
+    if (!uint_values_equal_display_error(a, b)) {
         _fail(file, line);
     }
 }


Fix a syntax error

Fix a syntax error

--- src/cmsopt.c
+++ src/cmsopt.c
@@ -641,12 +641,12 @@
         // Ops, something went wrong, Restore stages
         if (KeepPreLin != NULL) {
             if (!cmsPipelineInsertStage(Src, cmsAT_BEGIN, KeepPreLin)) {
-                _cmsAssert(0) // This never happens
+                _cmsAssert(0); // This never happens
             }
 	}
         if (KeepPostLin != NULL) {
             if (!cmsPipelineInsertStage(Src, cmsAT_END,   KeepPostLin)) {
-                 _cmsAssert(0) // This never happens
+                 _cmsAssert(0); // This never happens
             }
 	}
         cmsPipelineFree(Dest);


generic: new TX intr scheme in txqdisc mode

With this scheme we ask for events only when necessary (when
the transmitter would block because the tx ring is empty).

--- sys/dev/netmap/netmap_generic.c
+++ sys/dev/netmap/netmap_generic.c
@@ -619,8 +619,10 @@
 		struct nm_os_gen_arg a;
 		u_int event = -1;

-		if (gna->txqdisc) {
-			event = generic_tx_event_middle(nm_i, kring->nr_hwtail, lim);
+		if (gna->txqdisc && nm_kr_txempty(kring)) {
+			event = generic_tx_event_middle(nm_i, head, lim);
+			RD(3,"hwcur %u event %u head %u hwtail %u (space %u)", nm_i, event, head, kring->nr_hwtail,
+			   nm_kr_rxspace(kring));
 		}

 		a.ifp = ifp;
@@ -718,7 +720,7 @@
 		 */
 		generic_set_tx_event(kring, nm_i);
 	}
-	ND("tx #%d, hwtail = %d", n, kring->nr_hwtail);
+	ND("hwcur = %d, hwtail = %d", kring->nr_hwcur, kring->nr_hwtail);

 	generic_netmap_tx_clean(kring, gna->txqdisc);


Remove bogus vrele() call added in previous.

--- sys/fs/msdosfs/msdosfs_vfsops.c
+++ sys/fs/msdosfs/msdosfs_vfsops.c
@@ -315,8 +315,6 @@
 	if (error) {
 		if ((mp->mnt_flag & MNT_UPDATE) == 0)
 			msdosfs_unmount(mp, MNT_FORCE, td);
-		else
-			vrele(devvp);
 		return error;
 	}
 	(void) copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1,


Turn all RenderLayer booleans into bit fields

This should help have better padding on MSVC as we had one unsigned
bit field in the class. This was spotted by the style checker while
refactoring the class for another change.

R=tkent@chromium.org

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

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@154580 bbb929c8-8fbe-4397-9dbb-9b2b20218538

--- Source/core/rendering/RenderLayer.h
+++ Source/core/rendering/RenderLayer.h
@@ -1120,68 +1120,69 @@
     // The bitfields are up here so they will fall into the padding from ScrollableArea on 64-bit.

     // Keeps track of whether the layer is currently resizing, so events can cause resizing to start and stop.
-    bool m_inResizeMode : 1;
-
-    bool m_scrollDimensionsDirty : 1;
-    bool m_zOrderListsDirty : 1;
-    bool m_normalFlowListDirty: 1;
-    bool m_isNormalFlowOnly : 1;
-
-    bool m_isSelfPaintingLayer : 1;
+    unsigned m_inResizeMode : 1;
+
+    unsigned m_scrollDimensionsDirty : 1;
+    unsigned m_zOrderListsDirty : 1;
+    unsigned m_normalFlowListDirty: 1;
+    unsigned m_isNormalFlowOnly : 1;
+
+    unsigned m_isSelfPaintingLayer : 1;

     // If have no self-painting descendants, we don't have to walk our children during painting. This can lead to
     // significant savings, especially if the tree has lots of non-self-painting layers grouped together (e.g. table cells).
-    bool m_hasSelfPaintingLayerDescendant : 1;
-    bool m_hasSelfPaintingLayerDescendantDirty : 1;
-
-    bool m_hasOutOfFlowPositionedDescendant : 1;
-    bool m_hasOutOfFlowPositionedDescendantDirty : 1;
+    unsigned m_hasSelfPaintingLayerDescendant : 1;
+    unsigned m_hasSelfPaintingLayerDescendantDirty : 1;
+
+    unsigned m_hasOutOfFlowPositionedDescendant : 1;
+    unsigned m_hasOutOfFlowPositionedDescendantDirty : 1;

     // This is true if we have an out-of-flow positioned descendant whose
     // containing block is our ancestor. If this is the case, the descendant
     // may fall outside of our clip preventing things like opting into
     // composited scrolling (which causes clipping of all descendants).
-    bool m_hasUnclippedDescendant : 1;
-
-    bool m_needsCompositedScrolling : 1;
+    unsigned m_hasUnclippedDescendant : 1;
+
+    unsigned m_needsCompositedScrolling : 1;

     // If this is true, then no non-descendant appears between any of our
     // descendants in stacking order. This is one of the requirements of being
     // able to safely become a stacking context.
-    bool m_canBePromotedToStackingContainer : 1;
-    bool m_canBePromotedToStackingContainerDirty : 1;
-
-    const bool m_isRootLayer : 1;
-
-    bool m_usedTransparency : 1; // Tracks whether we need to close a transparent layer, i.e., whether
+    unsigned m_canBePromotedToStackingContainer : 1;
+    unsigned m_canBePromotedToStackingContainerDirty : 1;
+
+    const unsigned m_isRootLayer : 1;
+
+    unsigned m_usedTransparency : 1; // Tracks whether we need to close a transparent layer, i.e., whether
                                  // we ended up painting this layer or any descendants (and therefore need to
                                  // blend).
-    bool m_paintingInsideReflection : 1;  // A state bit tracking if we are painting inside a replica.
-    bool m_inOverflowRelayout : 1;
+    unsigned m_paintingInsideReflection : 1; // A state bit tracking if we are painting inside a replica.
+    unsigned m_inOverflowRelayout : 1;
     unsigned m_repaintStatus : 2; // RepaintStatus

-    bool m_visibleContentStatusDirty : 1;
-    bool m_hasVisibleContent : 1;
-    bool m_visibleDescendantStatusDirty : 1;
-    bool m_hasVisibleDescendant : 1;
-
-    bool m_isPaginated : 1; // If we think this layer is split by a multi-column ancestor, then this bit will be set.
-
-    bool m_3DTransformedDescendantStatusDirty : 1;
-    bool m_has3DTransformedDescendant : 1;  // Set on a stacking context layer that has 3D descendants anywhere
-                                            // in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
-
-    bool m_containsDirtyOverlayScrollbars : 1;
+    unsigned m_visibleContentStatusDirty : 1;
+    unsigned m_hasVisibleContent : 1;
+    unsigned m_visibleDescendantStatusDirty : 1;
+    unsigned m_hasVisibleDescendant : 1;
+
+    unsigned m_isPaginated : 1; // If we think this layer is split by a multi-column ancestor, then this bit will be set.
+
+    unsigned m_3DTransformedDescendantStatusDirty : 1;
+    // Set on a stacking context layer that has 3D descendants anywhere
+    // in a preserves3D hierarchy. Hint to do 3D-aware hit testing.
+    unsigned m_has3DTransformedDescendant : 1;
+
+    unsigned m_containsDirtyOverlayScrollbars : 1;

 #if !ASSERT_DISABLED
-    bool m_layerListMutationAllowed : 1;
+    unsigned m_layerListMutationAllowed : 1;
 #endif
     // This is an optimization added for <table>.
     // Currently cells do not need to update their repaint rectangles when scrolling. This also
     // saves a lot of time when scrolling on a table.
-    const bool m_canSkipRepaintRectsUpdateOnScroll : 1;
-
-    bool m_hasFilterInfo : 1;
+    const unsigned m_canSkipRepaintRectsUpdateOnScroll : 1;
+
+    unsigned m_hasFilterInfo : 1;

     BlendMode m_blendMode;


MFC rev. 1.3: repair ext2fs writes.

MFC rev. 1.3: repair ext2fs writes.

Approved by:	re (scottl)


sys/shell: add missing stdio include in sc_loramac.c

--- sys/shell/commands/sc_loramac.c
+++ sys/shell/commands/sc_loramac.c
@@ -18,6 +18,7 @@
  * @}
  */

+#include <stdio.h>
 #include <string.h>

 #include "shell.h"


unittests: add unittests for fmt_hex_byte

--- tests/unittests/tests-fmt/tests-fmt.c
+++ tests/unittests/tests-fmt/tests-fmt.c
@@ -118,6 +118,31 @@
     TEST_ASSERT_EQUAL_STRING("zz", &out[9]);
 }

+static void test_fmt_hex_byte(void)
+{
+    char hex[3] = "00";
+    uint8_t byte;
+
+    byte = fmt_hex_byte(hex);
+    TEST_ASSERT_EQUAL_INT(0x00, byte);
+
+    memcpy(hex, "12", 2);
+    byte = fmt_hex_byte(hex);
+    TEST_ASSERT_EQUAL_INT(0x12, byte);
+
+    memcpy(hex, "AB", 2);
+    byte = fmt_hex_byte(hex);
+    TEST_ASSERT_EQUAL_INT(0xAB, byte);
+
+    memcpy(hex, "CD", 2);
+    byte = fmt_hex_byte(hex);
+    TEST_ASSERT_EQUAL_INT(0xCD, byte);
+
+    memcpy(hex, "EF", 2);
+    byte = fmt_hex_byte(hex);
+    TEST_ASSERT_EQUAL_INT(0xEF, byte);
+}
+
 static void test_fmt_hex_bytes(void)
 {
     uint8_t val = 0;
@@ -772,6 +797,7 @@
         new_TestFixture(test_fmt_byte_hex),
         new_TestFixture(test_fmt_bytes_hex),
         new_TestFixture(test_fmt_bytes_hex_reverse),
+        new_TestFixture(test_fmt_hex_byte),
         new_TestFixture(test_fmt_hex_bytes),
         new_TestFixture(test_fmt_u32_hex),
         new_TestFixture(test_fmt_u64_hex),


Table class changes to add method for returning point weight.

--- fastlib/trunk/contrib/dongryel/thesis_research/core/table/table.h
+++ fastlib/trunk/contrib/dongryel/thesis_research/core/table/table.h
@@ -629,14 +629,33 @@
                 new_from_old_.get(), max_num_leaf_nodes, &num_nodes, rank_);
     }

+    /** @brief Gets the point with the specific ID.
+     */
     template<typename PointType>
     void get(int point_id, PointType *point_out) const {
       direct_get_(point_id, point_out);
     }

+    /** @brief Gets the point with the specific ID.
+     */
     template<typename PointType>
     void get(int point_id, PointType *point_out) {
       direct_get_(point_id, point_out);
+    }
+
+    /** @brief Gets the point with the specific ID and its weight.
+     */
+    template<typename PointType>
+    void get(
+      int point_id, PointType *point_out, double *point_weight_out) const {
+      direct_get_(point_id, point_out, point_weight_out);
+    }
+
+    /** @brief Gets the point with the specific ID and its weight.
+     */
+    template<typename PointType>
+    void get(int point_id, PointType *point_out, double *point_weight_out) {
+      direct_get_(point_id, point_out, point_weight_out);
     }

     /** @brief Prints the tree owned by the table.
@@ -680,6 +699,35 @@
         data_.MakeColumnVector(
           IndexUtil<int>::Extract(
             new_from_old_.get(), point_id), entry);
+      }
+    }
+
+    template<typename PointType>
+    void direct_get_(
+      int point_id, PointType *entry, double *point_weight) const {
+      if(this->IsIndexed() == false) {
+        data_.MakeColumnVector(point_id, entry);
+        *point_weight = weights_.get(0, point_id);
+      }
+      else {
+        int located_position = IndexUtil<int>::Extract(
+                                 new_from_old_.get(), point_id);
+        data_.MakeColumnVector(located_position, entry);
+        *point_weight = weights_.get(0, located_position);
+      }
+    }
+
+    template<typename PointType>
+    void direct_get_(int point_id, PointType *entry, double *point_weight) {
+      if(this->IsIndexed() == false) {
+        data_.MakeColumnVector(point_id, entry);
+        *point_weight = weights_.get(0, point_id);
+      }
+      else {
+        int located_position = IndexUtil<int>::Extract(
+                                 new_from_old_.get(), point_id);
+        data_.MakeColumnVector(located_position, entry);
+        *point_weight = weights_.get(0, located_position);
       }
     }


minor theme updates

minor theme updates

--- lv_themes/lv_theme_zen.c
+++ lv_themes/lv_theme_zen.c
@@ -335,25 +335,19 @@
     lv_style_copy(&high_days, &def);
     high_days.text.color = lv_color_hsv_to_rgb(_hue, 50, 90);

-    static lv_style_t week_box;
-    lv_style_copy(&week_box, &def);
-    week_box.body.empty = 1;
-    week_box.body.border.color = theme.panel->body.border.color;
-    week_box.body.padding.ver = LV_DPI / 20;
-
     static lv_style_t today_box;
     lv_style_copy(&today_box, &def);
-    today_box.body.main_color = LV_COLOR_WHITE;
-    today_box.body.grad_color = LV_COLOR_WHITE;
+    today_box.body.empty = 1;
+    today_box.body.border.color = theme.panel->body.border.color;
     today_box.body.padding.ver = LV_DPI / 20;
-    today_box.body.radius = 0;
+    today_box.body.radius = LV_RADIUS_CIRCLE;

     theme.calendar.bg = theme.panel;
     theme.calendar.header = &lv_style_transp;
     theme.calendar.inactive_days = &ina_days;
     theme.calendar.highlighted_days = &high_days;
-    theme.calendar.week_box = &week_box;
-    theme.calendar.today_box = &week_box;
+    theme.calendar.week_box = &lv_style_transp_fit;
+    theme.calendar.today_box = &today_box;
 #endif
 }


Corrected Doxygen error reported in issue #219

--- Tudat/SimulationSetup/PropagationSetup/dynamicsSimulator.h
+++ Tudat/SimulationSetup/PropagationSetup/dynamicsSimulator.h
@@ -272,9 +272,9 @@
      *  \param areEquationsOfMotionToBeIntegrated Boolean to denote whether equations of motion should be integrated
      *  immediately at the end of the contructor or not (default true).
      *  \param clearNumericalSolutions Boolean to determine whether to clear the raw numerical solution member variables
-     *  after propagation and resetting ephemerides (default true).
+     *  after propagation and resetting ephemerides (default false).
      *  \param setIntegratedResult Boolean to determine whether to automatically use the integrated results to set
-     *  ephemerides (default true).
+     *  ephemerides (default false).
      */
     SingleArcDynamicsSimulator(
             const simulation_setup::NamedBodyMap& bodyMap,


Remove module_types.h from lz4ex-src

Remove module_types.h from lz4ex-src

--- lz4ex-src/module_types.h
+++ lz4ex-src/module_types.h
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2015, Jerry Ryle
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the copyright holder nor the names of its
- *    contributors may be used to endorse or promote products derived from this
- *    software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- */
-#ifndef MODULE_TYPES_H_
-#define MODULE_TYPES_H_
-
-#if defined(_WIN32) && defined(_MSC_VER)
-# define inline __inline
-# if _MSC_VER >= 1600
-#  include <stdint.h>
-# else /* _MSC_VER >= 1600 */
-   typedef signed char       int8_t;
-   typedef signed short      int16_t;
-   typedef signed int        int32_t;
-   typedef unsigned char     uint8_t;
-   typedef unsigned short    uint16_t;
-   typedef unsigned int      uint32_t;
-# endif /* _MSC_VER >= 1600 */
-#else
-#include <stdint.h>
-#endif
-
-#endif /* MODULE_TYPES_H_ */


vout: Create the drawable variable from the vout, not libvlc.

--- src/video_output/vout_intf.c
+++ src/video_output/vout_intf.c
@@ -104,8 +104,8 @@
     *pi_height_hint = p_vout->i_window_height;

     /* Check whether someone provided us with a window ID */
-    var_Get( p_vout->p_libvlc, "drawable", &val );
-    if( val.i_int ) return (void *)(intptr_t)val.i_int;
+    int drawable = var_CreateGetInteger( p_vout, "drawable" );
+    if( drawable ) return (void *)(intptr_t)drawable;

 #if 0
     /* FIXME:


Document exceptions when connection ports

--- src/vistk/pipeline/process.h
+++ src/vistk/pipeline/process.h
@@ -68,6 +68,9 @@
     /**
      * \brief Connects an edge to an input port on the process.
      *
+     * \throws null_edge_port_connection Thrown when \p edge is \c NULL.
+     * \throws no_such_port_exception Thrown when \p port does not exist on the process.
+     *
      * \param port The port to connect to.
      * \param edge The edge to connect to the port.
      */
@@ -76,6 +79,7 @@
      * \brief Connects an edge to an output port on the process.
      *
      * \throws null_edge_port_connection Thrown when \p edge is \c NULL.
+     * \throws no_such_port_exception Thrown when \p port does not exist on the process.
      *
      * \param port The port to connect to.
      * \param edge The edge to connect to the port.


Don't use numbers (old scirun) but instead enum values.

--- src/Core/Algorithms/Visualization/RenderFieldState.h
+++ src/Core/Algorithms/Visualization/RenderFieldState.h
@@ -32,19 +32,20 @@
 #include <Core/Algorithms/Visualization/DataConversions.h>
 #include <Core/Datatypes/Material.h>
 #include <Core/Datatypes/Color.h>
+#include <Core/Datatypes/Geometry.h>

 /// \todo Create color scheme enumeration, instead of 0, 1, and 2...
 namespace SCIRun {

 template <typename Val>
-void valueToColor(unsigned int colorScheme,
+void valueToColor(Core::Datatypes::GeometryObject::ColorScheme colorScheme,
                   Val val, double& scol, Core::Datatypes::Material& vcol)
 {
-  if (colorScheme == 1)
+  if (colorScheme == Core::Datatypes::GeometryObject::COLOR_MAP)
   {
     valToDouble(val, scol);
   }
-  else if (colorScheme == 2)
+  else if (colorScheme == Core::Datatypes::GeometryObject::COLOR_IN_SITU)
   {
     valToColor(val, vcol.ambient);
     valToColor(val, vcol.diffuse);


Disabled the audio sample generation log that should not have been enabled.

--- src/apu/sound.c
+++ src/apu/sound.c
@@ -27,7 +27,7 @@
 //#define FAULT_ON_PITCH_MODULATION_USE

 #define DSP_SPEED_HACK
-#define DUMP_SOUND
+//#define DUMP_SOUND

 #define ZERO_ENVX_ON_VOICE_OFF
 #define ZERO_OUTX_ON_VOICE_OFF


auth workers: Don't unnecessary connect to anvil.

--- src/auth/main.c
+++ src/auth/main.c
@@ -111,7 +111,8 @@
 	modules = module_dir_load(AUTH_MODULE_DIR, NULL, &mod_set);
 	module_dir_init(modules);

-	auth_penalty = auth_penalty_init(AUTH_PENALTY_ANVIL_PATH);
+	if (!worker)
+		auth_penalty = auth_penalty_init(AUTH_PENALTY_ANVIL_PATH);
 	mech_init(global_auth_settings);
 	mech_reg = mech_register_init(global_auth_settings);
 	auths_preinit(global_auth_settings, auth_set_pool,
@@ -152,8 +153,10 @@

 static void main_deinit(void)
 {
-	/* cancel all pending anvil penalty lookups */
-	auth_penalty_deinit(&auth_penalty);
+	if (auth_penalty != NULL) {
+		/* cancel all pending anvil penalty lookups */
+		auth_penalty_deinit(&auth_penalty);
+	}
 	/* deinit auth workers, which aborts pending requests */
         auth_worker_server_deinit();
 	/* deinit passdbs and userdbs. it aborts any pending async requests. */


auth: Unregister SCRAM-SHA-1 at deinit.

auth: Unregister SCRAM-SHA-1 at deinit.

--- src/auth/mech.c
+++ src/auth/mech.c
@@ -205,6 +205,7 @@
 #endif
 	}
 	mech_unregister_module(&mech_otp);
+	mech_unregister_module(&mech_scram_sha1);
 	mech_unregister_module(&mech_skey);
 	mech_unregister_module(&mech_rpa);
 	mech_unregister_module(&mech_anonymous);


STM32 PWM : avoid glitch after duty cycle change

--- targets/TARGET_STM/pwmout_api.c
+++ targets/TARGET_STM/pwmout_api.c
@@ -276,7 +276,9 @@
     } else {
         // If channel already enabled, only update compare value to avoid glitch
         __HAL_TIM_SET_COMPARE(&TimHandle, channel, sConfig.Pulse);
-    }
+        return;
+    }
+
 #if !defined(PWMOUT_INVERTED_NOT_SUPPORTED)
     if (obj->inverted) {
         HAL_TIMEx_PWMN_Start(&TimHandle, channel);


android: use local addresses as opposed to prefix (#2081)

Signed-off-by: Martin Conte Mac Donell <528c4abc032aa2276e76a8dbff8944ac2e46d280@gmail.com>

--- third_party/android/ifaddrs-android.h
+++ third_party/android/ifaddrs-android.h
@@ -198,7 +198,7 @@
                     rtattr* rta = IFA_RTA(address);
                     size_t ifaPayloadLength = IFA_PAYLOAD(hdr);
                     while (RTA_OK(rta, ifaPayloadLength)) {
-                        if (rta->rta_type == IFA_ADDRESS) {
+                        if (rta->rta_type == IFA_LOCAL) {
                             int family = address->ifa_family;
                             if (family == AF_INET || family == AF_INET6) {
                                 *result = new ifaddrs(*result);


Fixed comment

Fixed comment

See commit ff86781b9b18ba376a8983fcb83847a09820ef79, where it becomes
clear that it was meant to say 7 bits, which explains the bit about the
padding bit.

--- src/xmlpatterns/acceltree/qacceltree_p.h
+++ src/xmlpatterns/acceltree/qacceltree_p.h
@@ -217,7 +217,7 @@
             Depth                           m_depth;

             /**
-             * Technically it is sufficient with 8 bits. However, at least MSVC
+             * Technically it is sufficient with 7 bits. However, at least MSVC
              * 2005 miscompiles it such that QXmlNodeModelIndex::Text becomes
              * -64 instead of 64 with hilarious crashes as result.
              *


Different arg to GetEventHandler (but I cannot really remember fixing this.... Hope it is correct)

--- Mac/Modules/ae/AEmodule.c
+++ Mac/Modules/ae/AEmodule.c
@@ -14,6 +14,7 @@
 #include <Controls.h>

 extern PyObject *ResObj_New(Handle);
+extern PyObject *ResObj_OptNew(Handle);
 extern int ResObj_Convert(PyObject *, Handle *);

 extern PyObject *WinObj_New(WindowPtr);
@@ -1051,19 +1052,20 @@
 	OSErr _err;
 	AEEventClass theAEEventClass;
 	AEEventID theAEEventID;
-	long procptr, handlerptr;
-
+	AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
+	PyObject *handler;
 	if (!PyArg_ParseTuple(_args, "O&O&",
 	                      PyMac_GetOSType, &theAEEventClass,
 	                      PyMac_GetOSType, &theAEEventID))
 		return NULL;
 	_err = AEGetEventHandler(theAEEventClass,
 	                         theAEEventID,
-	                         (AEEventHandlerUPP *)&procptr, &handlerptr,
+	                         &handler__proc__, (long *)&handler,
 	                         0);
 	if (_err != noErr) return PyMac_Error(_err);
-	_res = Py_BuildValue("ll",
-	                     (long)procptr, (long)handlerptr);
+	_res = Py_BuildValue("O",
+	                     handler);
+	Py_INCREF(handler); /* XXX leak, but needed */
 	return _res;
 }


fixed reach program cache check to follow API

--- node_prog/reach_program.h
+++ node_prog/reach_program.h
@@ -178,8 +178,6 @@
     check_context(std::vector<std::pair<db::element::remote_node, db::caching::node_cache_context>>& context)
     {
         WDEBUG  << "$$$$$ checking context of size "<< context.size() << std::endl;
-        db::caching::node_cache_context* prev = NULL;
-        uint64_t prev_handle = 0;
         // path not valid if broken by:
         for (auto& pair : context)
         {
@@ -187,14 +185,18 @@
                 WDEBUG  << "Cache entry invalid because of node deletion" << std::endl;
                 return false;
             }
-            // edge deletion, path to dest is stored backwards so see if edge to previous node has been deleted
-            for(auto edge :  pair.second.edges_deleted){
-                if (edge.nbr.handle == prev_handle){
-                    WDEBUG  << "Cache entry invalid because of edge deletion" << std::endl;
-                    return false;
+            // edge deletion, currently n^2 check for any edge deletion between two nodes in watch set, could poss be better
+            if (!pair.second.edges_deleted.empty()) {
+                for(auto edge :  pair.second.edges_deleted){
+                    for (auto& pair2 : context)
+                    {
+                        if (edge.nbr.handle == pair2.first.handle){
+                            WDEBUG  << "Cache entry invalid because of edge deletion" << std::endl;
+                            return false;
+                        }
+                    }
                 }
             }
-            prev_handle = pair.first.handle;
         }
         return true;
     }


feat: added iterations reduction

feat: added iterations reduction

--- opensfm/src/robust.h
+++ opensfm/src/robust.h
@@ -255,25 +255,38 @@

   ScoreInfo<typename MODEL::MODEL> Estimate(){
     ScoreInfo<typename MODEL::MODEL> best_score;
-    for( int i = 0; i < params_.iterations; ++i){
+    bool should_stop = false;
+    for( int i = 0; i < params_.iterations && !should_stop; ++i){
       const auto random_samples = GetRandomSamples();
       typename MODEL::MODEL models[MODEL::MAX_MODELS];
       const auto models_count = MODEL::Model(random_samples.begin(), random_samples.end(), &models[0]);
-      for(int i = 0; i < models_count; ++i){
+      for(int i = 0; i < models_count && !should_stop; ++i){
         auto errors = MODEL::Errors(
             models[i], samples_.begin(), samples_.end());
         ScoreInfo<typename MODEL::MODEL> score = scorer_.Score(errors.begin(), errors.end(), best_score);
         score.model = models[i];
         best_score = std::max(score, best_score);
+        should_stop = ShouldStop(best_score, i);
       }
     }
     return best_score;
   }

-  const std::vector<typename MODEL::DATA> samples_;
-  SCORING scorer_;
-  RobustEstimatorParams params_;
-  RandomSamplesGenerator random_generator_;
+private:
+ bool ShouldStop(const ScoreInfo<typename MODEL::MODEL>& best_score,
+                 int iteration) {
+   const double inliers_ratio = double(best_score.inliers_indices.size()) / samples_.size();
+   const double proba_one_outlier =
+       std::min(1.0 - std::numeric_limits<double>::epsilon(),
+                1.0 - std::pow(inliers_ratio, double(MODEL::MINIMAL_SAMPLES)));
+   const auto max_iterations = std::log(1.0 - params_.probability) / std::log(proba_one_outlier);
+   return max_iterations < iteration;
+ }
+
+ const std::vector<typename MODEL::DATA> samples_;
+ SCORING scorer_;
+ RobustEstimatorParams params_;
+ RandomSamplesGenerator random_generator_;
 };

 enum RansacType{


anv/batch_chain: Clean up the reloc list swapping code

--- src/vulkan/anv_batch_chain.c
+++ src/vulkan/anv_batch_chain.c
@@ -895,21 +895,19 @@
     */
    if (first_batch_bo->bo.index != cmd_buffer->execbuf2.bo_count - 1) {
       uint32_t idx = first_batch_bo->bo.index;
+      uint32_t last_idx = cmd_buffer->execbuf2.bo_count - 1;

       struct drm_i915_gem_exec_object2 tmp_obj =
          cmd_buffer->execbuf2.objects[idx];
       assert(cmd_buffer->execbuf2.bos[idx] == &first_batch_bo->bo);

-      cmd_buffer->execbuf2.objects[idx] =
-         cmd_buffer->execbuf2.objects[cmd_buffer->execbuf2.bo_count - 1];
-      cmd_buffer->execbuf2.bos[idx] =
-         cmd_buffer->execbuf2.bos[cmd_buffer->execbuf2.bo_count - 1];
+      cmd_buffer->execbuf2.objects[idx] = cmd_buffer->execbuf2.objects[last_idx];
+      cmd_buffer->execbuf2.bos[idx] = cmd_buffer->execbuf2.bos[last_idx];
       cmd_buffer->execbuf2.bos[idx]->index = idx;

-      cmd_buffer->execbuf2.objects[cmd_buffer->execbuf2.bo_count - 1] = tmp_obj;
-      cmd_buffer->execbuf2.bos[cmd_buffer->execbuf2.bo_count - 1] =
-         &first_batch_bo->bo;
-      first_batch_bo->bo.index = cmd_buffer->execbuf2.bo_count - 1;
+      cmd_buffer->execbuf2.objects[last_idx] = tmp_obj;
+      cmd_buffer->execbuf2.bos[last_idx] = &first_batch_bo->bo;
+      first_batch_bo->bo.index = last_idx;
    }

    /* Now we go through and fixup all of the relocation lists to point to


vk/gen7: Fix gen of emitted packet in gen7_batch_lri()

Emit GEN7_MI_LOAD_REGISTER_IMM, not the GEN8 version.

--- src/vulkan/gen7_cmd_buffer.c
+++ src/vulkan/gen7_cmd_buffer.c
@@ -387,7 +387,7 @@
 static void
 gen7_batch_lri(struct anv_batch *batch, uint32_t reg, uint32_t imm)
 {
-   anv_batch_emit(batch, GEN8_MI_LOAD_REGISTER_IMM,
+   anv_batch_emit(batch, GEN7_MI_LOAD_REGISTER_IMM,
                   .RegisterOffset = reg,
                   .DataDWord = imm);
 }


Missing a few static casts. Added more typedefs.

--- src/vw/Camera/BundleAdjust.h
+++ src/vw/Camera/BundleAdjust.h
@@ -1088,8 +1088,10 @@
       VW_DEBUG_ASSERT(m_control_net->size() == m_model.num_points(), LogicErr() << "BundleAdjustment::update() : Number of bundles does not match the number of points in the bundle adjustment model.");

       // Jacobian Matrices and error values
-      boost_sparse_matrix<Matrix<double, 2, BundleAdjustModelT::camera_params_n> > A(m_model.num_points(), m_model.num_cameras());
-      boost_sparse_matrix<Matrix<double, 2, BundleAdjustModelT::point_params_n> > B(m_model.num_points(), m_model.num_cameras());
+      typedef Matrix<double, 2, BundleAdjustModelT::camera_params_n> matrix_2_camera;
+      typedef Matrix<double, 2, BundleAdjustModelT::point_params_n> matrix_2_point;
+      boost_sparse_matrix< matrix_2_camera  > A(m_model.num_points(), m_model.num_cameras());
+      boost_sparse_matrix< matrix_2_point > B(m_model.num_points(), m_model.num_cameras());
       boost_sparse_matrix<Vector2> epsilon(m_model.num_points(), m_model.num_cameras());
       boost_sparse_matrix<Vector2> new_epsilon(m_model.num_points(), m_model.num_cameras());

@@ -1097,14 +1099,19 @@
       // boost::numeric::ublas::mapped_matrix<Vector2> Jp(m_model.num_points(), m_model.num_cameras());

       // Intermediate Matrices and vectors
-      boost_sparse_vector< Matrix<double,BundleAdjustModelT::camera_params_n,BundleAdjustModelT::camera_params_n> > U(m_model.num_cameras());
-      boost_sparse_vector< Matrix<double,BundleAdjustModelT::point_params_n,BundleAdjustModelT::point_params_n> > V(m_model.num_points());
-      boost_sparse_matrix<Matrix<double,BundleAdjustModelT::camera_params_n,BundleAdjustModelT::point_params_n> > W(m_model.num_cameras(), m_model.num_points());
+      typedef Matrix<double,BundleAdjustModelT::camera_params_n,BundleAdjustModelT::camera_params_n> matrix_camera_camera;
+      typedef Matrix<double,BundleAdjustModelT::point_params_n,BundleAdjustModelT::point_params_n> matrix_point_point;
+      typedef Matrix<double,BundleAdjustModelT::camera_params_n,BundleAdjustModelT::point_params_n> matrix_camera_point;
+      boost_sparse_vector< matrix_camera_camera > U(m_model.num_cameras());
+      boost_sparse_vector< matrix_point_point > V(m_model.num_points());
+      boost_sparse_matrix< matrix_camera_point > W(m_model.num_cameras(), m_model.num_points());

       // Copies of Intermediate Marices
-      boost_sparse_vector< Vector<double,BundleAdjustModelT::camera_params_n> > epsilon_a(m_model.num_cameras());
-      boost_sparse_vector< Vector<double,BundleAdjustModelT::point_params_n > > epsilon_b(m_model.num_points());
-      boost_sparse_matrix<Matrix<double,BundleAdjustModelT::camera_params_n,BundleAdjustModelT::point_params_n> > Y(m_model.num_cameras(), m_model.num_points());
+      typedef Vector<double,BundleAdjustModelT::camera_params_n> vector_camera;
+      typedef Vector<double,BundleAdjustModelT::point_params_n> vector_point;
+      boost_sparse_vector< vector_camera > epsilon_a(m_model.num_cameras());
+      boost_sparse_vector< vector_point > epsilon_b(m_model.num_points());
+      boost_sparse_matrix< matrix_camera_point > Y(m_model.num_cameras(), m_model.num_points());

       unsigned num_cam_params = BundleAdjustModelT::camera_params_n;
@@ -1152,9 +1159,12 @@
 	    inverse_cov * static_cast<Vector2>(epsilon(i,j));

           // Store intermediate values
-          U(j) += transpose(A(i,j).ref()) * inverse_cov * A(i,j).ref();
-          V(i) += transpose(B(i,j).ref()) * inverse_cov * B(i,j).ref();
-          W(j,i) = transpose(A(i,j).ref()) * inverse_cov * B(i,j).ref();
+          U(j) += transpose(static_cast< vector_camera >(A(i,j))) *
+	    inverse_cov * A(i,j);
+          V(i) += transpose(static_cast< vector_point >(B(i,j))) *
+	    inverse_cov * B(i,j);
+          W(j,i) = transpose(static_cast<vector_camera > (A(i,j))) *
+	    inverse_cov * B(i,j);

 	  epsilon_a(j) += transpose(A(i,j)) * inverse_cov * epsilon(i,j);
           epsilon_b(i) += transpose(B(i,j)) * inverse_cov * epsilon(i,j);


Update possible values for onnxTensorDescriptor.dataType (#1169)

Data types added after the first proposal were not documented as possible values for onnxTensorDescriptor.dataType, although they should be.

--- onnx/onnxifi.h
+++ onnx/onnxifi.h
@@ -506,12 +506,17 @@
    * Possible values:
    *     ONNXIFI_DATATYPE_FLOAT16
    *     ONNXIFI_DATATYPE_FLOAT32
+   *     ONNXIFI_DATATYPE_FLOAT64
    *     ONNXIFI_DATATYPE_INT8
    *     ONNXIFI_DATATYPE_INT16
    *     ONNXIFI_DATATYPE_INT32
+   *     ONNXIFI_DATATYPE_INT64
    *     ONNXIFI_DATATYPE_UINT8
    *     ONNXIFI_DATATYPE_UINT16
    *     ONNXIFI_DATATYPE_UINT32
+   *     ONNXIFI_DATATYPE_UINT64
+   *     ONNXIFI_DATATYPE_COMPLEX64
+   *     ONNXIFI_DATATYPE_COMPLEX128
    */
   onnxEnum dataType;
   /**


glx: Fix build in CMAKE_BUILD_TYPE=Debug

Fix this error.

glx_context.c: In function ‘glx_context_fill_attrib_list’:
glx_context.c:112:24: error: ‘dpy’ undeclared
  assert(dpy->ARB_create_context_profile);

Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- src/waffle/glx/glx_context.c
+++ src/waffle/glx/glx_context.c
@@ -109,8 +109,6 @@
     switch (attrs->context_api) {
         case WAFFLE_CONTEXT_OPENGL:
             if (attrs->context_full_version >= 32) {
-                assert(dpy->ARB_create_context_profile);
-
                 switch (attrs->context_profile) {
                     case WAFFLE_CONTEXT_CORE_PROFILE:
                         attrib_list[i++] = GLX_CONTEXT_PROFILE_MASK_ARB;


c model for transiXNOR

c model for transiXNOR

error: pathspec 'transiNXOR_modeling/c_model/device_model.h' did not match any file(s) known to git

--- transiNXOR_modeling/c_model/device_model.h
+++ transiNXOR_modeling/c_model/device_model.h
@@ -0,0 +1,9 @@
+#ifndef _DEVICE_MODEL_H_   /* Include guard */
+#define _DEVICE_MODEL_H_
+
+float device_model(
+	const float vtg, const float vbg,
+  	const float vds, const float w
+);
+
+#endif // _DEVICE_MODEL_H_


add matrix text output

add matrix text output


Remove _controls list

Remove _controls list

--- Settings/Tab.h
+++ Settings/Tab.h
@@ -28,9 +28,6 @@
     HWND _hWnd;
     UIContext *_ctxt;

-    /// <summary>A vector of all the controls present on this tab.</summary>
-    std::vector<Control *> _controls;
-
     /// <summary>
     /// Performs intitialization for the tab page, similar to a constructor.
     /// Since tab page windows are created on demand, this method could be


Change version to 0.2.0 now that 0.1.0 is released.

--- MockHTTP.h
+++ MockHTTP.h
@@ -664,7 +664,7 @@

 mhError_t mhInitHTTPSserver(MockHTTP *mh, ...);

-#define MOCKHTTP_VERSION 0.1.0
+#define MOCKHTTP_VERSION 0.2.0

 #ifdef __cplusplus
 }


jesus: Added open entry

jesus: Added open entry

--- src/bin/hooks.c
+++ src/bin/hooks.c
@@ -35,6 +35,12 @@
 }

 static void
+_open_cb2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
+{
+   _open_cb(NULL, NULL, NULL, event);
+}
+
+static void
 _open_with_choosen(Efm_File *f, const char *cmd)
 {
     exec_run(cmd, f);
@@ -56,8 +62,10 @@
     //open with entry
     if (!eo_do_ret(file, dir, efm_file_obj_is_type(EFM_FILE_TYPE_DIRECTORY)))
       {
+         elm_menu_item_add(ev->menu, NULL, NULL, "Open", _open_cb2, ev->file);
          elm_menu_item_add(ev->menu, NULL, NULL, "Open with", _open_with_cb, ev->file);
       }
+
     return EINA_TRUE;
 }


Fix compilation warning

Fix compilation warning

--- src/bin/image.c
+++ src/bin/image.c
@@ -155,12 +155,9 @@

    sd = evas_object_smart_data_get(obj);
    if (!sd)
-      return 0;
-
+      return;

    evas_object_image_load_size_set(sd->obj, w, h);
-
-
 }

 EAPI void


fix home/end to match xterm.

fix home/end to match xterm.

SVN revision: 72471


handle gif loop none and loop count 0 vs actual loop counts (or -1)

--- src/bin/media.c
+++ src/bin/media.c
@@ -31,7 +31,7 @@
    int w, h;
    int iw, ih;
    int sw, sh;
-   int fr, frnum;
+   int fr, frnum, loops;
    int mode, type;
    int resizes;
    struct {
@@ -269,6 +269,27 @@
    if (!sd) return EINA_FALSE;
    sd->fr++;
    fr = ((sd->fr - 1) % (sd->frnum)) + 1;
+   if ((sd->fr >= sd->frnum) && (fr == 1))
+     {
+        int loops;
+
+        if (evas_object_image_animated_loop_type_get(sd->o_img) ==
+            EVAS_IMAGE_ANIMATED_HINT_NONE)
+          {
+             sd->anim = NULL;
+             return EINA_FALSE;
+          }
+        sd->loops++;
+        loops = evas_object_image_animated_loop_count_get(sd->o_img);
+        if (loops != 0) // loop == 0 -> loop forever
+          {
+             if (loops < sd->loops)
+               {
+                  sd->anim = NULL;
+                  return EINA_FALSE;
+               }
+          }
+     }
    evas_object_image_animated_frame_set(sd->o_img, fr);
    t = evas_object_image_animated_frame_duration_get(sd->o_img, fr, 0);
    ecore_timer_interval_set(sd->anim, t);


don't double free current presence on contact logout

--- src/bin/contact_list.c
+++ src/bin/contact_list.c
@@ -799,7 +799,6 @@
    Shotgun_Event_Presence *pres;
    if ((!c->plist) || (!ev))
      {
-        shotgun_event_presence_free(c->cur);
         if (c->list_item)
           {
              INF("Removing user %s", c->base->jid);


staging: comedi: addi_apci_3120: remove APCI3120_DISABLE_EOS_INT

For aesthetics, remove this define and just use ~APCI3120_ENABLE_EOS_INT.

Signed-off-by: H Hartley Sweeten <382ff55d8e07d1082d179e669636cd1552da4f36@visionengravers.com>
Reviewed-by: Ian Abbott <9e6ba6483b6a3e14d61f7c987e72ecb5b46122d6@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>


E17: Remove erroneous flush. Check for connection error before trying
to kill dialog.

SVN revision: 62540

--- src/bin/e_alert_main.c
+++ src/bin/e_alert_main.c
@@ -314,7 +314,6 @@
 static void
 _e_alert_sync(void)
 {
-   xcb_flush(conn);
    free(xcb_get_input_focus_reply(conn,
                                   xcb_get_input_focus(conn), NULL));
 }
@@ -322,13 +321,16 @@
 static void
 _e_alert_shutdown(void)
 {
-   xcb_close_font(conn, font);
-   xcb_destroy_window(conn, btn1);
-   xcb_destroy_window(conn, btn2);
-   xcb_destroy_window(conn, win);
-   if (comp_win) xcb_destroy_window(conn, comp_win);
-   xcb_free_gc(conn, gc);
-   xcb_disconnect(conn);
+   if (!xcb_connection_has_error(conn))
+     {
+        xcb_close_font(conn, font);
+        xcb_destroy_window(conn, btn1);
+        xcb_destroy_window(conn, btn2);
+        xcb_destroy_window(conn, win);
+        if (comp_win) xcb_destroy_window(conn, comp_win);
+        xcb_free_gc(conn, gc);
+        xcb_disconnect(conn);
+     }
 }

 static void


Staging: lustre: libcfs: Drop unnecessary cast on void*

This patch does away with the cast on void * as it is unnecessary.

Semantic patch used is as follows:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <74574f368155e7f02126012c7f4911815f6e96d4@gmail.com>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@linuxfoundation.org>


fixed sensekey bug

fixed sensekey bug

--- OOps/bus.c
+++ OOps/bus.c
@@ -1342,7 +1342,7 @@
             return NOTOK;
           }
           //if n==0 then EOF which we treat as empty
-          else ch = '\0';
+          if(n==0) ch = '\0';
           keyCode = (int)((unsigned char) ch);
           /* FD_ISSET(0, &rfds) will be true. */
         }


*Major clean up, but I'm not finished with it.  Too tired to continue,
I'll finish this after a good nights sleep.  In particular, the border
menu "Create Icon" stuff needs some attention, it will likely loose it's
original icon.

*When you open up the fsel to select a new icon, the directory of the
current icon is shown, or the usual home directory if there is no
current icon file.

git-svn-id: 0f3f1c46c6da7ffd142db61e503a7ff63af3a195@26148 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

--- src/bin/e_eap_editor.c
+++ src/bin/e_eap_editor.c
@@ -6,27 +6,10 @@
 struct _E_Config_Dialog_Data
 {
    E_App eap;
-   /*- BASIC -*/
-   char  *name;
    char  *exe;
-   /*- ADVANCED -*/
-   char  *generic;
-   char  *comment;
-   char  *wname;
-   char  *wclass;
-   char  *wtitle;
-   char  *wrole;
-   char  *itheme;
-   char  *icon;
-   char  *iclass;
-   char  *ipath;
+   int    icon_theme;
    int    startup_notify;
    int    wait_exit;
-   /*- common -*/
-   char  *image;
-   int    width;
-   int    height;
-   int    icon_theme;
    E_App_Edit *editor;
    Evas_Object *themed;
 };
@@ -34,7 +17,6 @@
 /* local subsystem functions */

 static void           _e_eap_edit_free(E_App_Edit *editor);
-static void           _e_eap_edit_fill_data(E_Config_Dialog_Data *cdfata);
 static void          *_e_eap_edit_create_data(E_Config_Dialog *cfd);
 static void           _e_eap_edit_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *data);
 static int            _e_eap_edit_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *data);
@@ -109,6 +91,7 @@
      }
    if (editor->eap)
       {
+         /* This frees up the temp file created by the border menu "Create Icon". */
          if (editor->eap->tmpfile) ecore_file_unlink(editor->eap->image);
          editor->eap->tmpfile = 0;
          IFDEL(editor->eap->image);
@@ -124,132 +107,129 @@
    e_object_del(E_OBJECT(editor));
 }

-static void
-_e_eap_edit_fill_data(E_Config_Dialog_Data *cfdata)
-{
-   char *exe;
-   /*- BASIC -*/
-   IFDUP(cfdata->editor->eap->name, cfdata->name);
-   IFDUP(cfdata->editor->eap->exe, cfdata->exe);
-   exe = ecore_desktop_merge_command((char *)cfdata->editor->eap->exe, (char *)cfdata->editor->eap->exe_params);
-   if (exe)
-      cfdata->exe = exe;
-   /*- ADVANCED -*/
-   IFDUP(cfdata->editor->eap->generic, cfdata->generic);
-   IFDUP(cfdata->editor->eap->comment, cfdata->comment);
-   IFDUP(cfdata->editor->eap->win_name, cfdata->wname);
-   IFDUP(cfdata->editor->eap->win_class, cfdata->wclass);
-   IFDUP(cfdata->editor->eap->win_title, cfdata->wtitle);
-   IFDUP(cfdata->editor->eap->win_role, cfdata->wrole);
-   IFDUP(cfdata->editor->eap->icon_theme, cfdata->itheme);
-   IFDUP(cfdata->editor->eap->icon, cfdata->icon);
-   IFDUP(cfdata->editor->eap->icon_class, cfdata->iclass);
-   IFDUP(cfdata->editor->eap->icon_path, cfdata->ipath);
-   cfdata->startup_notify = cfdata->editor->eap->startup_notify;
-   cfdata->wait_exit = cfdata->editor->eap->wait_exit;
+static void *
+_e_eap_edit_create_data(E_Config_Dialog *cfd)
+{
+   E_Config_Dialog_Data *cfdata;
+
+   cfdata = E_NEW(E_Config_Dialog_Data, 1);
+   if (!cfdata) return NULL;
+   cfdata->editor = cfd->data;
    /*- COMMON -*/
-   IFDUP(cfdata->editor->eap->image, cfdata->image);
-   cfdata->height = cfdata->editor->eap->height;
-   cfdata->width = cfdata->editor->eap->width;
-
    IFADD(cfdata->editor->eap->path, cfdata->eap.path);
+   IFADD(cfdata->editor->eap->name, cfdata->eap.name);
+   IFADD(cfdata->editor->eap->exe, cfdata->eap.exe);
+   IFADD(cfdata->editor->eap->exe_params, cfdata->eap.exe_params);
+   cfdata->exe = ecore_desktop_merge_command((char *)cfdata->editor->eap->exe, (char *)cfdata->editor->eap->exe_params);
+   IFADD(cfdata->editor->eap->image, cfdata->eap.image);
+   cfdata->eap.height = cfdata->editor->eap->height;
+   cfdata->eap.width = cfdata->editor->eap->width;
    IFADD(cfdata->editor->eap->icon_theme, cfdata->eap.icon_theme);
    IFADD(cfdata->editor->eap->icon, cfdata->eap.icon);
    IFADD(cfdata->editor->eap->icon_class, cfdata->eap.icon_class);
    IFADD(cfdata->editor->eap->icon_path, cfdata->eap.icon_path);
+   /*- ADVANCED -*/
+   IFADD(cfdata->editor->eap->generic, cfdata->eap.generic);
+   IFADD(cfdata->editor->eap->comment, cfdata->eap.comment);
+   IFADD(cfdata->editor->eap->win_name, cfdata->eap.win_name);
+   IFADD(cfdata->editor->eap->win_class, cfdata->eap.win_class);
+   IFADD(cfdata->editor->eap->win_title, cfdata->eap.win_title);
+   IFADD(cfdata->editor->eap->win_role, cfdata->eap.win_role);
+   cfdata->startup_notify = cfdata->editor->eap->startup_notify;
+   cfdata->wait_exit = cfdata->editor->eap->wait_exit;
+
    if (!cfdata->eap.icon_path)
-      cfdata->icon_theme = 1;
-}
-
-static void *
-_e_eap_edit_create_data(E_Config_Dialog *cfd)
-{
-   E_Config_Dialog_Data *cfdata;
-
-   cfdata = E_NEW(E_Config_Dialog_Data, 1);
-   if (!cfdata) return NULL;
-   cfdata->editor = cfd->data;
-   cfdata->image = NULL;
-   _e_eap_edit_fill_data(cfdata);
+     {
+        IFADD(cfdata->eap.image, cfdata->eap.icon_path);
+        if (!cfdata->eap.icon_path)
+           cfdata->icon_theme = 1;
+     }
    return cfdata;
 }

 static void
-_e_eap_edit_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *data)
-{
-   IFFREE(data->name);
-   IFFREE(data->exe);
-   IFFREE(data->generic);
-   IFFREE(data->comment);
-   IFFREE(data->wname);
-   IFFREE(data->wclass);
-   IFFREE(data->wtitle);
-   IFFREE(data->wrole);
-   IFFREE(data->itheme);
-   IFFREE(data->icon);
-   IFFREE(data->iclass);
-   IFFREE(data->ipath);
-   IFFREE(data->image);
-
-   IFDEL(data->eap.icon_class);
-   IFDEL(data->eap.icon);
-   IFDEL(data->eap.icon_theme);
-   IFDEL(data->eap.icon_path);
-
-   if (data->editor)
+_e_eap_edit_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
+{
+   IFDEL(cfdata->eap.path);
+   IFDEL(cfdata->eap.name);
+   IFDEL(cfdata->eap.exe);
+   IFDEL(cfdata->eap.exe_params);
+   IFFREE(cfdata->exe);
+   IFDEL(cfdata->eap.image);
+   IFDEL(cfdata->eap.icon_theme);
+   IFDEL(cfdata->eap.icon);
+   IFDEL(cfdata->eap.icon_class);
+   IFDEL(cfdata->eap.icon_path);
+   IFDEL(cfdata->eap.generic);
+   IFDEL(cfdata->eap.comment);
+   IFDEL(cfdata->eap.win_name);
+   IFDEL(cfdata->eap.win_class);
+   IFDEL(cfdata->eap.win_title);
+   IFDEL(cfdata->eap.win_role);
+
+   if (cfdata->editor)
      {
 	E_Object *obj;

-	obj = E_OBJECT(data->editor);
-	data->editor = NULL;
+	obj = E_OBJECT(cfdata->editor);
+	cfdata->editor = NULL;
 	e_object_del(obj);
      }

-   free(data);
+   free(cfdata);
 }

 static int
-_e_eap_edit_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *data)
+_e_eap_edit_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
 {
    E_App_Edit *editor;
    E_App *eap;

-   editor = data->editor;
+   editor = cfdata->editor;
    eap = editor->eap;

-   IFDEL(eap->name);
-   IFDEL(eap->exe);
-   IFDEL(eap->exe_params);
-   IFDEL(eap->image);
-
-   IFADD(data->name, eap->name);
-   IFADD(data->itheme, eap->icon_theme);
-   IFADD(data->iclass, eap->icon_class);
-   IFADD(data->icon, eap->icon);
-   IFADD(data->eap.icon_path, eap->icon_path);
-   IFADD(data->eap.icon, eap->icon);
-   if (data->exe)
+   e_app_fields_empty(eap);
+
+   IFADD(cfdata->eap.path, eap->path);
+   IFADD(cfdata->eap.name, eap->name);
+   if (cfdata->exe)
       {
          char *exe;

-         exe = strchr(data->exe, ' ');
+         exe = strchr(cfdata->exe, ' ');
 	 if (exe)
 	    {
 	       *exe = '\0';
                eap->exe_params = evas_stringshare_add(++exe);
 	       *exe = ' ';
 	    }
-         eap->exe = evas_stringshare_add(data->exe);
+         eap->exe = evas_stringshare_add(cfdata->exe);
       }
-
-   eap->startup_notify = data->startup_notify;
-   eap->wait_exit = data->wait_exit;
+/* FIXME: eap->image was created by the border menu "Create Icon" and it's the
+ * path to a temporary file.  This was fine for .eaps' as the file got saved
+ * into the .eap.  For .desktops, we need to copy this file inte ~/.e/e/icons
+ * and find a decent name for it.
+ */
+//   IFADD(cfdata->eap.image, eap->image);
+   IFADD(cfdata->eap.icon_theme, eap->icon_theme);
+   IFADD(cfdata->eap.icon, eap->icon);
+   IFADD(cfdata->eap.icon_class, eap->icon_class);
+   IFADD(cfdata->eap.icon_path, eap->icon_path);

    /* FIXME: hardcoded until the eap editor provides fields to change it */
-   if (data->width) eap->width = data->width;
+   if (cfdata->eap.width) eap->width = cfdata->eap.width;
    else eap->width = 128;
-   if (data->height) eap->height = data->height;
+   if (cfdata->eap.height) eap->height = cfdata->eap.height;
    else eap->height = 128;
+
+   IFADD(cfdata->eap.generic, eap->generic);
+   IFADD(cfdata->eap.comment, eap->comment);
+   IFADD(cfdata->eap.win_name, eap->win_name);
+   IFADD(cfdata->eap.win_class, eap->win_class);
+   IFADD(cfdata->eap.win_title, eap->win_title);
+   IFADD(cfdata->eap.win_role, eap->win_role);
+   eap->startup_notify = cfdata->startup_notify;
+   eap->wait_exit = cfdata->wait_exit;

    if ((eap->name) && (eap->exe))
       e_app_fields_save(eap);
@@ -258,38 +238,21 @@
 }

 static int
-_e_eap_edit_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *data)
-{
-   E_App_Edit *editor;
-   E_App *eap;
-
-   editor = data->editor;
-   eap = editor->eap;
-
-   e_app_fields_empty(eap);
-
-   IFADD(data->generic, eap->generic);
-   IFADD(data->comment, eap->comment);
-   IFADD(data->wname, eap->win_name);
-   IFADD(data->wclass, eap->win_class);
-   IFADD(data->wtitle, eap->win_title);
-   IFADD(data->wrole, eap->win_role);
-
-   _e_eap_edit_basic_apply_data(cfd, data);
-
-   return 1;
+_e_eap_edit_advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
+{
+   return _e_eap_edit_basic_apply_data(cfd, cfdata);
 }

 static Evas_Object *
-_e_eap_edit_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *data)
+_e_eap_edit_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
 {
    E_App_Edit *editor;
    E_App *eap;
    Evas_Object *ol, *o;
    Evas_Object *entry;

-   editor = data->editor;
+   editor = cfdata->editor;
    editor->evas = evas;
    eap = editor->eap;

@@ -303,33 +266,25 @@
 	editor->img = NULL;
      }

-   editor->img = e_app_icon_add(evas, &(data->eap));
+   editor->img = e_app_icon_add(evas, &(cfdata->eap));

    if (editor->img_widget) evas_object_del(editor->img_widget);
    editor->img_widget = e_widget_button_add(evas, "", NULL,
-					    _e_eap_editor_cb_icon_select, data, editor);
+					    _e_eap_editor_cb_icon_select, cfdata, editor);
    e_widget_button_icon_set(editor->img_widget, editor->img);
    e_widget_min_size_set(editor->img_widget, 48, 48);
    e_widget_frametable_object_append(o, editor->img_widget,
 				     0, 0, 1, 1,
 				     1, 1, 1, 1);

-   data->themed = e_widget_check_add(evas, _("Use Icon Theme"), &(data->icon_theme));
-   evas_object_smart_callback_add(data->themed, "changed",
-				  _cb_files_icon_theme_changed, data);
-   e_widget_frametable_object_append(o, data->themed,
-				     1, 0, 1, 1,
-				     1, 1, 1, 1);
-
    e_widget_table_object_append(ol, o, 0, 0, 1, 1, 1 ,1, 1, 1);

-
    o = e_widget_frametable_add(evas, _("Basic Info"), 0);
-   e_widget_frametable_object_append(o, e_widget_label_add(evas, _("App name")),
+   e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Name")),
 				     0, 0, 1, 1,
 				     1, 1, 1, 1);

-   entry = e_widget_entry_add(evas, &(data->name));
+   entry = e_widget_entry_add(evas, (char **) &(cfdata->eap.name));
    e_widget_min_size_set(entry, 100, 1);
    e_widget_frametable_object_append(o, entry,
 				     1, 0, 1, 1,
@@ -337,7 +292,7 @@
    e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Executable")),
 				     0, 1, 1, 1,
 				     1, 1, 1, 1);
-   e_widget_frametable_object_append(o, e_widget_entry_add(evas, &(data->exe)),
+   e_widget_frametable_object_append(o, e_widget_entry_add(evas, &(cfdata->exe)),
 				     1, 1, 1, 1,
 				     1, 1, 1, 1);
    e_widget_table_object_append(ol, o, 1, 0, 1, 1, 1 ,1, 1, 1);
@@ -346,17 +301,17 @@
 }

 static Evas_Object *
-_e_eap_edit_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *data)
+_e_eap_edit_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
 {
    E_App_Edit *editor;
    E_App *eap;
    Evas_Object *ol, *o;
    Evas_Object *entry;

-   editor = data->editor;
+   editor = cfdata->editor;
    eap = editor->eap;

-   ol = _e_eap_edit_basic_create_widgets(cfd, evas, data);
+   ol = _e_eap_edit_basic_create_widgets(cfd, evas, cfdata);

    o = e_widget_frametable_add(evas, _("General"), 0);

@@ -365,7 +320,7 @@
 				     0, 0, 1, 1,
 				     1, 1, 1, 1);

-   entry = e_widget_entry_add(evas, &(data->generic));
+   entry = e_widget_entry_add(evas, (char **) &(cfdata->eap.generic));
    e_widget_min_size_set(entry, 100, 1);
    e_widget_frametable_object_append(o, entry,
 				     1, 0, 1, 1,
@@ -373,7 +328,7 @@
    e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Comment")),
 				     0, 1, 1, 1,
 				     1, 1, 1, 1);
-   e_widget_frametable_object_append(o, e_widget_entry_add(evas, &(data->comment)),
+   e_widget_frametable_object_append(o, e_widget_entry_add(evas, (char **) &(cfdata->eap.comment)),
 				     1, 1, 1, 1,
 				     1, 1, 1, 1);
    e_widget_table_object_append(ol, o, 0, 1, 1, 1, 1 ,1, 1, 1);
@@ -386,7 +341,7 @@
 				     0, 0, 1, 1,
 				     1, 1, 1, 1);

-   entry = e_widget_entry_add(evas, &(data->wname));
+   entry = e_widget_entry_add(evas, (char **) &(cfdata->eap.win_name));
    e_widget_min_size_set(entry, 100, 1);
    e_widget_frametable_object_append(o, entry,
 				     1, 0, 1, 1,
@@ -394,19 +349,19 @@
    e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Window Class")),
 				     0, 1, 1, 1,
 				     1, 1, 1, 1);
-   e_widget_frametable_object_append(o, e_widget_entry_add(evas, &(data->wclass)),
+   e_widget_frametable_object_append(o, e_widget_entry_add(evas, (char **) &(cfdata->eap.win_class)),
 				     1, 1, 1, 1,
 				     1, 1, 1, 1);
    e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Window Title")),
 				     0, 2, 1, 1,
 				     1, 1, 1, 1);
-   e_widget_frametable_object_append(o, e_widget_entry_add(evas, &(data->wtitle)),
+   e_widget_frametable_object_append(o, e_widget_entry_add(evas, (char **) &(cfdata->eap.win_title)),
 				     1, 2, 1, 1,
 				     1, 1, 1, 1);
    e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Window Role")),
 				     0, 3, 1, 1,
 				     1, 1, 1, 1);
-   e_widget_frametable_object_append(o, e_widget_entry_add(evas, &(data->wrole)),
+   e_widget_frametable_object_append(o, e_widget_entry_add(evas, (char **) &(cfdata->eap.win_role)),
 				     1, 3, 1, 1,
 				     1, 1, 1, 1);
    e_widget_table_object_append(ol, o, 0, 2, 1, 1, 1 ,1, 1, 1);
@@ -414,14 +369,21 @@
    /*- icon info -*/
    o = e_widget_frametable_add(evas, _("Icon Theme"), 0);

+   cfdata->themed = e_widget_check_add(evas, _("Use Icon Theme"), &(cfdata->icon_theme));
+   evas_object_smart_callback_add(cfdata->themed, "changed",
+				  _cb_files_icon_theme_changed, cfdata);
+   e_widget_frametable_object_append(o, cfdata->themed,
+				     1, 0, 1, 1,
+				     1, 1, 1, 1);
+
    e_widget_frametable_object_append(o, e_widget_label_add(evas, _("Icon Class")),
-				     0, 0, 1, 1,
-				     1, 1, 1, 1);
-
-   entry = e_widget_entry_add(evas, &(data->iclass));
+				     0, 1, 1, 1,
+				     1, 1, 1, 1);
+
+   entry = e_widget_entry_add(evas, (char **) &(cfdata->eap.icon_class));
    e_widget_min_size_set(entry, 100, 1);
    e_widget_frametable_object_append(o, entry,
-				     1, 0, 1, 1,
+				     1, 1, 1, 1,
 				     1, 1, 1, 1);

    e_widget_table_object_append(ol, o, 1, 1, 1, 1, 1 ,1, 1, 1);
@@ -429,10 +391,10 @@

    /*- misc info -*/
    o = e_widget_frametable_add(evas, _("Misc"), 0);
-   e_widget_frametable_object_append(o, e_widget_check_add(evas, _("Startup Notify"), &(data->startup_notify)),
+   e_widget_frametable_object_append(o, e_widget_check_add(evas, _("Startup Notify"), &(cfdata->startup_notify)),
 				     0, 0, 1, 1,
 				     1, 1, 1, 1);
-   e_widget_frametable_object_append(o, e_widget_check_add(evas, _("Wait Exit"), &(data->wait_exit)),
+   e_widget_frametable_object_append(o, e_widget_check_add(evas, _("Wait Exit"), &(cfdata->wait_exit)),
 				     0, 1, 1, 1,
 				     1, 1, 1, 1);
    e_widget_table_object_append(ol, o, 1, 2, 1, 1, 1 ,1, 1, 1);
@@ -449,6 +411,7 @@
    Evas_Object *o;
    Evas_Coord mw, mh;
    E_App_Edit *editor;
+   char *dir = NULL;

    editor = data2;
    cfdata = data1;
@@ -458,9 +421,21 @@
    dia->data = cfdata;
    e_object_del_attach_func_set(E_OBJECT(dia), _e_eap_edit_cb_icon_select_del);

-   o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL,
-			 _e_eap_edit_select_cb, cfdata,
-			 _e_eap_edit_change_cb, cfdata, 1);
+   if (cfdata->eap.icon_path)
+      dir = ecore_file_get_dir(cfdata->eap.icon_path);
+   if (dir)
+     {
+        o = e_widget_fsel_add(dia->win->evas, dir, "/", NULL, NULL,
+		              _e_eap_edit_select_cb, cfdata,
+		              _e_eap_edit_change_cb, cfdata, 1);
+	free(dir);
+     }
+   else
+     {
+        o = e_widget_fsel_add(dia->win->evas, "~/", "/", NULL, NULL,
+			      _e_eap_edit_select_cb, cfdata,
+			      _e_eap_edit_change_cb, cfdata, 1);
+     }
    evas_object_show(o);
    editor->fsel = o;
    e_widget_min_size_get(o, &mw, &mh);
@@ -494,8 +469,8 @@
    file = e_widget_fsel_selection_path_get(obj);
    if (!file) return;

-   IFFREE(cfdata->image);
-   IFDUP(file, cfdata->image);
+   IFDEL(cfdata->eap.image);
+   IFADD(file, cfdata->eap.image);
 }

 static void
@@ -515,7 +490,7 @@
    E_Config_Dialog_Data *cfdata;

    cfdata = data;
-   if (cfdata->image)
+   if (cfdata->eap.image)
      {
         e_widget_check_checked_set(cfdata->themed, 0);
         _cb_files_icon_theme_changed(cfdata, NULL, NULL);
@@ -544,7 +519,7 @@
    IFDEL(cfdata->eap.icon_path);
    if (!cfdata->icon_theme)
       {
-         IFADD(cfdata->image, cfdata->eap.icon_path);
+         IFADD(cfdata->eap.image, cfdata->eap.icon_path);
       }
    if (cfdata->editor->img) evas_object_del(cfdata->editor->img);
    cfdata->editor->img = e_app_icon_add(cfdata->editor->evas, &(cfdata->eap));


Fixing a duh

Fixing a duh

--- Tester/main.c
+++ Tester/main.c
@@ -174,11 +174,12 @@
     }
     /* Ugly unportable code! :( */
 #ifdef __APPLE__
-    unsigned int length = sizeof(path) - 1;
+    size_t length = sizeof(path) - 1;
     _NSGetExecutablePath(&path[0], &length);
 #else
 #ifdef __linux__
-    assert (readlink("/proc/self/exe", &path[0], sizeof(path) - 1) != -1);
+    size_t __attribute__((unused)) length = readlink("/proc/self/exe", &path[0], sizeof(path) - 1);
+    assert(length != -1);
 #else
 #ifdef _WIN32
     HMODULE hModule = GetModuleHandle(NULL);


formatfloat.c: Typo fix in comment.

formatfloat.c: Typo fix in comment.

--- py/formatfloat.c
+++ py/formatfloat.c
@@ -75,7 +75,7 @@

     if (buf_size < 7) {
         // Smallest exp notion is -9e+99 which is 6 chars plus terminating
-        // nulll.
+        // null.

         if (buf_size >= 2) {
             *s++ = '?';


python: don't ignore virInitialize failure in module initialization

* python/libvirt-override.c (initlibvirtmod): Upon virInitialize
failure, skip the Py_InitModule call.

--- python/libvirt-override.c
+++ python/libvirt-override.c
@@ -3543,7 +3543,8 @@
     if (initialized != 0)
         return;

-    virInitialize();
+    if (virInitialize() < 0)
+        return;

     /* initialize the python extension module */
     Py_InitModule((char *)


Defined useful macro to extend QTest

Defined useful macro to extend QTest

--- pqTestSuite.h
+++ pqTestSuite.h
@@ -44,4 +44,15 @@
     return result; \
 }

+// Define check macros
+#define pqVERIFY QVERIFY2
+#define pqVERIFY_FALSE(false_stm, comment) QVERIFY2(!false_stm, comment)
+#define pqVERIFY_NULL(null_ptr, comment) QVERIFY2(null_ptr == NULL, comment)
+#define pqVERIFY_NOT_NULL(null_ptr, comment) QVERIFY2(null_ptr != NULL, comment)
+#define pqVERIFY_GREATER_THEN(value, ref_val, comment) QVERIFY2((value) > (ref_val), comment)
+#define pqVERIFY_GREATER_THEN_OR_EQUAL(value, ref_val, comment) QVERIFY2((value) >= (ref_val), comment)
+#define pqVERIFY_LOWER_THEN(value, ref_val, comment) QVERIFY2((value) < (ref_val), comment)
+#define pqVERIFY_LOWER_THEN_OR_EQUAL(value, ref_val, comment) QVERIFY2((value) <= (ref_val), comment)
+#define pqCOMPARE QCOMPARE
+
 #endif // pqTestSuite_H


Create Polymer.h

Create Polymer.h

error: pathspec 'Thermostaten/Thermostaten/Polymer.h' did not match any file(s) known to git

--- Thermostaten/Thermostaten/Polymer.h
+++ Thermostaten/Thermostaten/Polymer.h
@@ -0,0 +1,11 @@
+class Polymer {
+	private:
+		int length;
+		Monomer *A_monomer;
+		double Temp_soll, Ekin, Epot;
+
+	public:
+
+
+
+}


Черный = 1, Белый = 0. Удобно для монохромных экранов.

--- MakiseGUI/makise_colors.h
+++ MakiseGUI/makise_colors.h
@@ -13,8 +13,8 @@
 #if defined MAKISEGUI_BUFFER_DEPTH && MAKISEGUI_BUFFER_DEPTH <= 4
 typedef enum
 {
-    MC_Black        = 0,
-    MC_White           ,
+    MC_White        = 0,
+    MC_Black        = 1,
 #if MAKISEGUI_BUFFER_DEPTH >= 2
     MC_Red             ,
     MC_Green           ,


pragma pack also for non GCC, pragma pack() after the structs

git-svn-id: 40dd595c6684d839db675001a64203a1457e7319@11248 67ed7778-7388-44ab-90cf-0a291f65f57c

--- camlibs/sierra/sierra-usbwrap.c
+++ camlibs/sierra/sierra-usbwrap.c
@@ -138,9 +138,7 @@
 #define UW_PACKET_DATA ((uw4c_t){ 0x02, 0x00, 0xff, 0x9f })
 #define UW_PACKET_STAT ((uw4c_t){ 0x03, 0x00, 0xff, 0x9f })

-#ifdef __GNUC__
-# pragma pack(1)
-#endif
+#pragma pack(1)
 /*
  * The rest of the USB wrapper packet looks like this:
  */
@@ -207,6 +205,7 @@
       uw32_t sessionid;        /* A copy of whatever value the host made up */
       char   zero[5];  /* 00 00 00 00 00 */
 } uw_response_t;
+#pragma pack()

 /*
  * This routine is called after every UW_REQUEST_XXX to get an OK


Rename include guards.

Rename include guards.

--- oroch/zigzag.h
+++ oroch/zigzag.h
@@ -21,8 +21,8 @@
 // THE SOFTWARE.
 //

-#ifndef OROCH_ZIGZAG_CODEC_H_
-#define OROCH_ZIGZAG_CODEC_H_
+#ifndef OROCH_ZIGZAG_H_
+#define OROCH_ZIGZAG_H_

 #include "integer_traits.h"

@@ -61,4 +61,4 @@

 } // namespace oroch

-#endif /* OROCH_ZIGZAG_CODEC_H_ */
+#endif /* OROCH_ZIGZAG_H_ */


Corrected the commands

Corrected the commands

--- src/commit.c
+++ src/commit.c
@@ -29,6 +29,8 @@
     print_hash_size(cm->sha1, 3, stdout);
     if (IF_TAG(cm->flags))
         printf(RESET" ("YELLOW"%s"RESET")", cm->tag);
+    else
+        printf(RESET " ("DIM"empty"RESET")");
     printf(RESET" ]   %s\n", cm->cmt_msg.buf);

     if (cm->cmt_desc.len) {
@@ -533,14 +535,14 @@

     commit_options_init();
     if (argc < 2)
-        die("empty args\n\t:(\n. See --help for usage.\n");
+        die("empty args. See --help for usage.\n");

     for (int i = 1; i < argc; i++) {
         if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
             printf("Usage: "PEG_NAME" commit -m message -d description\n");
             exit(0);
         } else
-        if (!strcmp(argv[i], "-m")) {
+        if (!strcmp(argv[i], "-m") || !strcmp(argv[i], "--message")) {
             strbuf_addstr(&msg, argv[i + 1]);
             i++;
         } else
@@ -548,11 +550,11 @@
             strbuf_addstr(&desc, argv[i + 1]);
             i++;
         } else
-        if (!strcmp(argv[i], "log")) {
+        if (!strcmp(argv[i], "--log")) {
             print_commits();
             exit(0);
         } else
-        if (!strcmp(argv[i], "-t")) {
+        if (!strcmp(argv[i], "-t") || !strcmp(argv[i], "--tag")) {
             if (strlen(argv[i + 1]) > TAG_SIZE)
                 die("length of tag should be less than %d\n", TAG_SIZE);
             strcpy(tag, argv[i + 1]);


Fixed bug on Agent structure. Lacking pointer to n

--- src/common.c
+++ src/common.c
@@ -13,6 +13,7 @@

     Agent *a = NULL;
     a = (Agent *)malloc(sizeof(Agent));
+    a->n = n;
     a->v = NULL;

     switch (opt_id){


issue-455: Adds another size for large pages in tcmalloc through the new define TCMALLOC_LARGE_PAGES64K

git-svn-id: fd9111c40b205d66967632edc39949c9c6e1565b@155 6b5cf1ce-ec42-a296-1ba9-69fdba395a50

--- src/common.h
+++ src/common.h
@@ -64,6 +64,9 @@
 #if defined(TCMALLOC_LARGE_PAGES)
 static const size_t kPageShift  = 15;
 static const size_t kNumClasses = 78;
+#elif defined(TCMALLOC_LARGE_PAGES64K)
+static const size_t kPageShift  = 16;
+static const size_t kNumClasses = 82;
 #else
 static const size_t kPageShift  = 13;
 static const size_t kNumClasses = 86;


common.h: flow_key to tcp_key, sflow_key defn's

--- src/common.h
+++ src/common.h
@@ -253,7 +253,7 @@

 /* TCP SUPPORT */

-struct ss_flow_key_s {
+struct ss_tcp_key_s {
     uint8_t  sip[IPV6_ALEN];
     uint8_t  dip[IPV6_ALEN];
     uint16_t sport;
@@ -261,7 +261,7 @@
     uint8_t  protocol;
 } __attribute__((packed));

-typedef struct ss_flow_key_s ss_flow_key_t;
+typedef struct ss_tcp_key_s ss_tcp_key_t;

 enum ss_tcp_state_e {
     SS_TCP_CLOSED   = 0,
@@ -276,7 +276,7 @@

 // RFC 793, RFC 1122
 struct ss_tcp_socket_s {
-    ss_flow_key_t  key;
+    ss_tcp_key_t key;
     uint64_t id;

     rte_spinlock_recursive_t lock;
@@ -295,6 +295,28 @@

 #define TH_PSH TH_PUSH

+/* SFLOW SUPPORT */
+
+struct sflow_key_s {
+    uint8_t  agent_ip[IPV6_ALEN];
+    uint32_t agent_sub_id;
+    uint8_t  protocol;
+} __attribute__((packed));
+
+typedef struct sflow_key_s sflow_key_t;
+
+struct sflow_socket_s {
+    sflow_key_t key;
+    uint64_t id;
+
+    rte_spinlock_recursive_t lock;
+
+    uint64_t rx_ticks;
+    uint32_t last_seq;
+} __rte_cache_aligned;
+
+typedef struct sflow_socket_s sflow_socket_t;
+
 /* PCAP CHAIN */

 struct ss_pcap_match_s {
@@ -379,7 +401,8 @@
 int ss_metadata_prepare(ss_frame_t* fbuf);
 ss_direction_t ss_direction_load(const char* direction);
 const char* ss_direction_dump(ss_direction_t direction);
-int ss_flow_key_dump(const char* message, ss_flow_key_t* key);
+int ss_tcp_key_dump(const char* message, ss_tcp_key_t* key);
+int sflow_key_dump(const char* message, sflow_key_t* key);
 const char* ss_tcp_flags_dump(uint8_t tcp_flags);
 const char* ss_ether_addr_dump(struct ether_addr* addr);
 int ss_pcap_chain_destroy(void);


Update the copyright notice

Update the copyright notice

--- src/compat.c
+++ src/compat.c
@@ -1,5 +1,5 @@
 /* $Id$ */
-/* Copyright (c) 2012-2015 Pierre Pronchery <khorben@defora.org> */
+/* Copyright (c) 2012-2016 Pierre Pronchery <khorben@defora.org> */
 /* This file is part of DeforaOS Desktop libDesktop */
 /* All rights reserved.
  *


config: stop destroying config if it was not created

--- src/config.c
+++ src/config.c
@@ -139,8 +139,9 @@
         config.exp_enable_3d = intval;
     }

+    config_destroy(&cfg);
+
 quit:
-    config_destroy(&cfg);
     g_free(local_config);
     g_free(global_config);


Fix cluster-replica-no-failover option name.

Thanks to @NicolasLM, see issue #5537.

--- src/config.c
+++ src/config.c
@@ -684,7 +684,7 @@
                 goto loaderr;
             }
         } else if ((!strcasecmp(argv[0],"cluster-slave-no-failover") ||
-                    !strcasecmp(argv[0],"cluster-replica-no-failiver")) &&
+                    !strcasecmp(argv[0],"cluster-replica-no-failover")) &&
                    argc == 2)
         {
             server.cluster_slave_no_failover = yesnotoi(argv[1]);