Modif du nom de la classe PolatrimetricFunctor -> PolatrimetricSynthesisFunctor

--- Code/SARPolarimetry/otbPolarimetricFunctor.h
+++ Code/SARPolarimetry/otbPolarimetricFunctor.h
@@ -1,82 +0,0 @@
-/*=========================================================================
-
-  Program:   ORFEO Toolbox
-  Language:  C++
-  Date:      $Date$
-  Version:   $Revision$
-
-
-  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-  See OTBCopyright.txt for details.
-
-
-     This software is distributed WITHOUT ANY WARRANTY; without even
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE.  See the above copyright notices for more information.
-
-=========================================================================*/
-#ifndef __otbPolarimetricFunctor_h
-#define __otbPolarimetricFunctor_h
-#include "vcl_complex.h"
-
-namespace otb
-{
-namespace Functor
-  {
-    /** \class PolarimetricFunctor
-     *  \brief This functor calculate the polarimetric synthesis
-     *  using the electroMagneticField vectors.
-     *
-     *  \ingroup Functor
-     */
-    template <class TInput1, class TInput2, class TInput3, class TInput4, class TOutput>
-      class PolarimetricFunctor
-      {
-      public:
-        /** Some typedefs. */
-        typedef typename     std::complex <double>       ComplexType;
-        typedef typename     itk::FixedArray<ComplexType,2>    ComplexArrayType;
-
-        /** Set the ElectroMagneticField Incident */
-        void SetEi( ComplexArrayType ei ){
-                m_Ei = ei;
-        }
-
-        /** Set the ElectroMagneticField Reflected */
-        void SetEr( ComplexArrayType er ){
-                m_Er = er;
-        }
-
-        /** Constructor */
-	PolarimetricFunctor()
-        {
-                m_Ei.Fill(1);
-                m_Er.Fill(1);
-        };
-        /** Destructor */
-	virtual ~PolarimetricFunctor() {};
-        inline TOutput operator()(const TInput1 &Shh, const TInput2 &Shv, const TInput3 &Svh, const TInput4 &Svv)
-	{
-                ComplexType tmp;
-                double scalar;
-
-                tmp = vcl_conj(m_Er[0])*( m_Ei[0]*Shh + m_Ei[1]*Shv ) + vcl_conj(m_Er[1])*( m_Ei[0]*Svh + m_Ei[1]*Svv );
-
-                scalar=(double) ( vcl_pow( std::abs(tmp),2)  );
-
-                return ( static_cast<TOutput>(scalar) );
-        }
-
-      private :
-        /** Electromagnetic Field Incident */
-        ComplexArrayType m_Ei;
-        /** Electromagnetic Field Reflected */
-        ComplexArrayType m_Er;
-
-      };
-
-  } // namespace Functor
-} // namespace otb
-
-#endif
-


Avoid some warnings on FreeBSD

Avoid some warnings on FreeBSD

This adds casts to and from void * for the function pointers that are
passed around.

--- nss/bsdnss.c
+++ nss/bsdnss.c
@@ -6,7 +6,7 @@
    Copyright (C) 2003 Jacques Vidrine
    Copyright (C) 2006 Artem Kazakov
    Copyright (C) 2009 Alexander V. Chernikov
-   Copyright (C) 2011-2015 Arthur de Jong
+   Copyright (C) 2011-2016 Arthur de Jong
    Copyright (C) 2011 Tom Judge

    This library is free software; you can redistribute it and/or
@@ -55,39 +55,42 @@
 NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyaddr);

 static ns_mtab methods[] = {
-  { NSDB_GROUP, "getgrnam_r", __nss_compat_getgrnam_r, NSS_NAME(getgrnam_r) },
-  { NSDB_GROUP, "getgrgid_r", __nss_compat_getgrgid_r, NSS_NAME(getgrgid_r) },
-  { NSDB_GROUP, "getgrent_r", __nss_compat_getgrent_r, NSS_NAME(getgrent_r) },
-  { NSDB_GROUP, "setgrent",   __nss_compat_setgrent,   NSS_NAME(setgrent) },
-  { NSDB_GROUP, "endgrent",   __nss_compat_endgrent,   NSS_NAME(endgrent) },
+  { NSDB_GROUP, "getgrnam_r", __nss_compat_getgrnam_r, (void *)NSS_NAME(getgrnam_r) },
+  { NSDB_GROUP, "getgrgid_r", __nss_compat_getgrgid_r, (void *)NSS_NAME(getgrgid_r) },
+  { NSDB_GROUP, "getgrent_r", __nss_compat_getgrent_r, (void *)NSS_NAME(getgrent_r) },
+  { NSDB_GROUP, "setgrent",   __nss_compat_setgrent,   (void *)NSS_NAME(setgrent) },
+  { NSDB_GROUP, "endgrent",   __nss_compat_endgrent,   (void *)NSS_NAME(endgrent) },
   { NSDB_GROUP, "getgroupmembership", __freebsd_getgroupmembership, NULL },

-  { NSDB_PASSWD, "getpwnam_r", __nss_compat_getpwnam_r, NSS_NAME(getpwnam_r) },
-  { NSDB_PASSWD, "getpwuid_r", __nss_compat_getpwuid_r, NSS_NAME(getpwuid_r) },
-  { NSDB_PASSWD, "getpwent_r", __nss_compat_getpwent_r, NSS_NAME(getpwent_r) },
-  { NSDB_PASSWD, "setpwent",   __nss_compat_setpwent,   NSS_NAME(setpwent) },
-  { NSDB_PASSWD, "endpwent",   __nss_compat_endpwent,   NSS_NAME(endpwent) },
-
-  { NSDB_HOSTS, "gethostbyname",  __nss_compat_gethostbyname,  NSS_NAME(gethostbyname_r) },
-  { NSDB_HOSTS, "gethostbyaddr",  __nss_compat_gethostbyaddr,  NSS_NAME(gethostbyaddr_r) },
-  { NSDB_HOSTS, "gethostbyname2", __nss_compat_gethostbyname2, NSS_NAME(gethostbyname2_r) },
-
-  { NSDB_GROUP_COMPAT, "getgrnam_r", __nss_compat_getgrnam_r, NSS_NAME(getgrnam_r) },
-  { NSDB_GROUP_COMPAT, "getgrgid_r", __nss_compat_getgrgid_r, NSS_NAME(getgrgid_r) },
-  { NSDB_GROUP_COMPAT, "getgrent_r", __nss_compat_getgrent_r, NSS_NAME(getgrent_r) },
-  { NSDB_GROUP_COMPAT, "setgrent",   __nss_compat_setgrent,   NSS_NAME(setgrent) },
-  { NSDB_GROUP_COMPAT, "endgrent",   __nss_compat_endgrent,   NSS_NAME(endgrent) },
-
-  { NSDB_PASSWD_COMPAT, "getpwnam_r", __nss_compat_getpwnam_r, NSS_NAME(getpwnam_r) },
-  { NSDB_PASSWD_COMPAT, "getpwuid_r", __nss_compat_getpwuid_r, NSS_NAME(getpwuid_r) },
-  { NSDB_PASSWD_COMPAT, "getpwent_r", __nss_compat_getpwent_r, NSS_NAME(getpwent_r) },
-  { NSDB_PASSWD_COMPAT, "setpwent",   __nss_compat_setpwent,   NSS_NAME(setpwent) },
-  { NSDB_PASSWD_COMPAT, "endpwent",   __nss_compat_endpwent,   NSS_NAME(endpwent) },
+  { NSDB_PASSWD, "getpwnam_r", __nss_compat_getpwnam_r, (void *)NSS_NAME(getpwnam_r) },
+  { NSDB_PASSWD, "getpwuid_r", __nss_compat_getpwuid_r, (void *)NSS_NAME(getpwuid_r) },
+  { NSDB_PASSWD, "getpwent_r", __nss_compat_getpwent_r, (void *)NSS_NAME(getpwent_r) },
+  { NSDB_PASSWD, "setpwent",   __nss_compat_setpwent,   (void *)NSS_NAME(setpwent) },
+  { NSDB_PASSWD, "endpwent",   __nss_compat_endpwent,   (void *)NSS_NAME(endpwent) },
+
+  { NSDB_HOSTS, "gethostbyname",  __nss_compat_gethostbyname,  (void *)NSS_NAME(gethostbyname_r) },
+  { NSDB_HOSTS, "gethostbyaddr",  __nss_compat_gethostbyaddr,  (void *)NSS_NAME(gethostbyaddr_r) },
+  { NSDB_HOSTS, "gethostbyname2", __nss_compat_gethostbyname2, (void *)NSS_NAME(gethostbyname2_r) },
+
+  { NSDB_GROUP_COMPAT, "getgrnam_r", __nss_compat_getgrnam_r, (void *)NSS_NAME(getgrnam_r) },
+  { NSDB_GROUP_COMPAT, "getgrgid_r", __nss_compat_getgrgid_r, (void *)NSS_NAME(getgrgid_r) },
+  { NSDB_GROUP_COMPAT, "getgrent_r", __nss_compat_getgrent_r, (void *)NSS_NAME(getgrent_r) },
+  { NSDB_GROUP_COMPAT, "setgrent",   __nss_compat_setgrent,   (void *)NSS_NAME(setgrent) },
+  { NSDB_GROUP_COMPAT, "endgrent",   __nss_compat_endgrent,   (void *)NSS_NAME(endgrent) },
+
+  { NSDB_PASSWD_COMPAT, "getpwnam_r", __nss_compat_getpwnam_r, (void *)NSS_NAME(getpwnam_r) },
+  { NSDB_PASSWD_COMPAT, "getpwuid_r", __nss_compat_getpwuid_r, (void *)NSS_NAME(getpwuid_r) },
+  { NSDB_PASSWD_COMPAT, "getpwent_r", __nss_compat_getpwent_r, (void *)NSS_NAME(getpwent_r) },
+  { NSDB_PASSWD_COMPAT, "setpwent",   __nss_compat_setpwent,   (void *)NSS_NAME(setpwent) },
+  { NSDB_PASSWD_COMPAT, "endpwent",   __nss_compat_endpwent,   (void *)NSS_NAME(endpwent) },
 };

+typedef nss_status_t (*gethbn_t)(const char *, struct hostent *, char *, size_t, int *, int *);
+typedef nss_status_t (*gethba_t)(struct in_addr *, int, int, struct hostent *, char *, size_t, int *, int *);
+
 int __nss_compat_gethostbyname(void UNUSED(*retval), void *mdata, va_list ap)
 {
-  nss_status_t (*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
+  gethbn_t fn;
   const char *name;
   struct hostent *result;
   char buffer[BUFFER_SIZE];
@@ -95,7 +98,7 @@
   int h_errnop;
   int af;
   nss_status_t status;
-  fn = mdata;
+  fn = (gethbn_t)mdata;
   name = va_arg(ap, const char *);
   af = va_arg(ap, int);
   result = va_arg(ap, struct hostent *);
@@ -107,7 +110,7 @@

 int __nss_compat_gethostbyname2(void UNUSED(*retval), void *mdata, va_list ap)
 {
-  nss_status_t (*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
+  gethbn_t fn;
   const char *name;
   struct hostent *result;
   char buffer[BUFFER_SIZE];
@@ -115,7 +118,7 @@
   int h_errnop;
   int af;
   nss_status_t status;
-  fn = mdata;
+  fn = (gethbn_t)mdata;
   name = va_arg(ap, const char *);
   af = va_arg(ap, int);
   result = va_arg(ap, struct hostent *);
@@ -127,6 +130,7 @@

 int __nss_compat_gethostbyaddr(void UNUSED(*retval), void *mdata, va_list ap)
 {
+  gethba_t fn;
   struct in_addr *addr;
   int len;
   int type;
@@ -134,9 +138,8 @@
   char buffer[BUFFER_SIZE];
   int errnop;
   int h_errnop;
-  nss_status_t (*fn)(struct in_addr *, int, int, struct hostent *, char *, size_t, int *, int *);
   nss_status_t status;
-  fn = mdata;
+  fn = (gethba_t)mdata;
   addr = va_arg(ap, struct in_addr *);
   len = va_arg(ap, int);
   type = va_arg(ap, int);


Use int16_vector2_t for command table structs

--- libyaul/scu/bus/b/vdp/vdp1/cmdt.h
+++ libyaul/scu/bus/b/vdp/vdp1/cmdt.h
@@ -11,6 +11,8 @@
 #include <sys/cdefs.h>

 #include <stdint.h>
+
+#include <int16.h>

 #include <scu.h>

@@ -136,28 +138,18 @@
         uint16_t cs_height;

         union {
-                struct {
-                        int16_t x;
-                        int16_t y;
-                } cs_position;
-
-                struct {
-                        struct {
-                                int16_t x;
-                                int16_t y;
-                        } point;
-
-                        struct {
-                                int16_t x;
-                                int16_t y;
-                        } display;
+                int16_vector2_t cs_position;
+
+                struct {
+                        int16_vector2_t point;
+                        int16_vector2_t display;
                 } cs_zoom;

                 struct {
-                        struct {
-                                int16_t x;
-                                int16_t y;
-                        } a, b, c, d;
+                        int16_vector2_t a;
+                        int16_vector2_t b;
+                        int16_vector2_t c;
+                        int16_vector2_t d;
                 } cs_vertex;

                 int16_t cs_vertices[8];
@@ -177,10 +169,10 @@

         union {
                 struct {
-                        struct {
-                                int16_t x;
-                                int16_t y;
-                        } a, b, c, d;
+                        int16_vector2_t a;
+                        int16_vector2_t b;
+                        int16_vector2_t c;
+                        int16_vector2_t d;
                 } cp_vertex;

                 int16_t cp_vertices[8];
@@ -200,10 +192,10 @@

         union {
                 struct {
-                        struct {
-                                int16_t x;
-                                int16_t y;
-                        } a, b, c, d;
+                        int16_vector2_t a;
+                        int16_vector2_t b;
+                        int16_vector2_t c;
+                        int16_vector2_t d;
                 } cl_vertex;

                 int16_t cl_vertices[8];
@@ -223,10 +215,8 @@

         union {
                 struct {
-                        struct {
-                                int16_t x;
-                                int16_t y;
-                        } a, b;
+                        int16_vector2_t a;
+                        int16_vector2_t b;
                 } cl_vertex;

                 int16_t cl_vertices[4];
@@ -236,24 +226,15 @@
 };

 struct vdp1_cmdt_local_coord {
-        struct {
-                int16_t x;
-                int16_t y;
-        } lc_coord;
+        int16_vector2_t lc_coord;
 };

 struct vdp1_cmdt_system_clip_coord {
-        struct {
-                int16_t x;
-                int16_t y;
-        } scc_coord;
+        int16_vector2_t scc_coord;
 };

 struct vdp1_cmdt_user_clip_coord {
-        struct {
-                int16_t x;
-                int16_t y;
-        } ucc_coords[2];
+        int16_vector2_t ucc_coords[2];
 };

 static inline uint16_t __always_inline


Clean up coding style

Clean up coding style

--- libyaul/scu/bus/b/vdp/vdp2_scrn.c
+++ libyaul/scu/bus/b/vdp/vdp2_scrn.c
@@ -119,9 +119,9 @@
 static void
 _nbg0_scrn_bitmap_format_set(const vdp2_scrn_bitmap_format_t *format)
 {
-        _state_vdp2()->regs->chctla &= 0xFF80;      /* Bits 0,1,2,3,4,5,6 */
-        _state_vdp2()->regs->mpofn &= 0xFFF8;       /* Bits 0,1,2 */
-        _state_vdp2()->regs->bmpna &= 0xFFC8;       /* Bits 0,1,2,4,5 */
+        _state_vdp2()->regs->chctla &= 0xFF80; /* Bits 0, 1, 2, 3, 4, 5, 6 */
+        _state_vdp2()->regs->mpofn &= 0xFFF8;  /* Bits 0, 1, 2 */
+        _state_vdp2()->regs->bmpna &= 0xFFC8;  /* Bits 0, 1, 2, 4, 5 */
         _state_vdp2()->regs->sfsel &= 0xFFFE;
         _state_vdp2()->regs->sfprmd &= 0xFFFC;

@@ -181,9 +181,9 @@
 static void
 _nbg1_scrn_bitmap_format_set(const vdp2_scrn_bitmap_format_t *format)
 {
-        _state_vdp2()->regs->chctla &= 0xC0FF;      /* Bits 8,9,10,11,12,13 */
-        _state_vdp2()->regs->mpofn &= 0xFF8F;       /* Bits 4,5,6 */
-        _state_vdp2()->regs->bmpna &= 0xC8FF;       /* Bits 8,9,10,12,13 */
+        _state_vdp2()->regs->chctla &= 0xC0FF; /* Bits 8,9,10,11,12,13 */
+        _state_vdp2()->regs->mpofn &= 0xFF8F;  /* Bits 4,5,6 */
+        _state_vdp2()->regs->bmpna &= 0xC8FF;  /* Bits 8,9,10,12,13 */
         _state_vdp2()->regs->sfsel &= 0xFFFD;
         _state_vdp2()->regs->sfprmd &= 0xFFF3;

@@ -249,7 +249,7 @@
 #endif /* DEBUG */

         _state_vdp2()->regs->chctlb &= 0xC0FF; /* Bits 8, 9, 10, 12, 13, 14 */
-        _state_vdp2()->regs->bmpnb &= 0xFFC8;  /* Bits 0, 1, 2, 4, 5 */
+        _state_vdp2()->regs->bmpnb &= 0xFFC8;  /* Bits 0, 1,  2,  4,  5 */
         _state_vdp2()->regs->rpmd &= 0xFFFC;   /* Bits 0, 1 */
         _state_vdp2()->regs->sfsel &= 0xFFEF;
         _state_vdp2()->regs->sfprmd &= 0xFCFF;


- kernel/core/partition.c - contribution from Elouan Appere   * check thread id boundaries for pok_partition_stop_thread   * check thread id boundaries for pok_partition_restart_thread

--- kernel/core/partition.c
+++ kernel/core/partition.c
@@ -448,16 +448,24 @@
  */
 pok_ret_t pok_partition_stop_thread (const uint32_t tid)
 {
+   uint32_t id;
    if (POK_SCHED_CURRENT_THREAD != POK_CURRENT_PARTITION.thread_error)
    {
       return POK_ERRNO_THREAD;
    }
+
+   id = tid + POK_CURRENT_PARTITION.thread_index_low;
+   if (POK_CURRENT_PARTITION.thread_index_low > id || POK_CURRENT_PARTITION.thread_index_high < id)
+   {
+      return POK_ERRNO_THREADATTR;
+   }
+
    /*
     * We check which thread try to call this function. Only the error handling
     * thread can stop other threads.
     */

-   pok_sched_stop_thread (tid + POK_CURRENT_PARTITION.thread_index_low);
+   pok_sched_stop_thread (id);
    pok_sched ();
    return (POK_ERRNO_OK);
 }
@@ -467,16 +475,24 @@
  */
 pok_ret_t pok_partition_restart_thread (const uint32_t tid)
 {
+   uint32_t id;
    if (POK_SCHED_CURRENT_THREAD != POK_CURRENT_PARTITION.thread_error)
    {
       return POK_ERRNO_THREAD;
    }
+
+   id = tid + POK_CURRENT_PARTITION.thread_index_low;
+   if (POK_CURRENT_PARTITION.thread_index_low > id || POK_CURRENT_PARTITION.thread_index_high < id)
+   {
+      return POK_ERRNO_THREADATTR;
+   }
+
    /*
     * We check which thread try to call this function. Only the error handling
     * thread can stop other threads.
     */

-   pok_thread_restart (tid + POK_CURRENT_PARTITION.thread_index_low);
+   pok_thread_restart (id);
    pok_sched ();
    return (POK_ERRNO_OK);
 }


Slight cleanup

Slight cleanup

--- style/qtcurve.c
+++ style/qtcurve.c
@@ -1457,7 +1457,7 @@
                 double val=botTab ? INVERT_SHADE(grad->stops[i].val) : grad->stops[i].val;
                 shade(base, &col, botTab ? QTC_MAX(val, 0.9) : val);
             }
-            if(sel && opts.colorSelTab && (topTab || botTab) && i<grad->numStops-1)
+            if(colorTab && i<grad->numStops-1)
             {
                 GdkColor t;
                 tintColor(&col, &qtcPalette.menuitem[0], &t, (1.0-grad->stops[i].pos)*QTC_COLOR_SEL_TAB_FACTOR);


nicer error message

nicer error message

git-svn-id: 606cd7bb7c4874b1f27fc28ef6a6d76dca18f877@1733 be551aaa-1e26-0410-a405-d3ace91eadb9

--- validator/validator.c
+++ validator/validator.c
@@ -2102,7 +2102,7 @@

 	if(sec != sec_status_secure) {
 		log_nametypeclass(VERB_OPS, "failed to prime trust anchor -- "
-			"could not fetch secure DNSKEY rrset",
+			"DNSKEY rrset is not secure",
 			ta->name, LDNS_RR_TYPE_DNSKEY, ta->dclass);
 		/* NOTE: in this case, we should probably reject the trust
 		 * anchor for longer, perhaps forever. */


buffer update [skip ci]

buffer update [skip ci]

--- kernels/common/buffer.h
+++ kernels/common/buffer.h
@@ -27,11 +27,11 @@
   public:
     /*! Buffer construction */
     Buffer()
-      : device(nullptr), ptr(nullptr), stride(0), num(0), shared(false), modified(true), userData(0) {}
+      : device(nullptr), ptr(nullptr), stride(0), num(0), shared(false), modified(true) {}

     /*! Buffer construction */
     Buffer(Device* device, size_t num_in, size_t stride_in, void* ptr_in = nullptr)
-      : device(device), stride(stride_in), num(num_in), modified(true), userData(0)
+      : device(device), stride(stride_in), num(num_in), modified(true)
     {
       if (ptr_in)
       {
@@ -175,7 +175,6 @@
     size_t num;     //!< number of elements in the buffer
     bool shared;    //!< set if memory is shared with application
     bool modified;  //!< true if the buffer got modified
-    int userData;   //!< special data
   };

   /*! An untyped contiguous range of a buffer. This class does not own the buffer content. */
@@ -184,7 +183,7 @@
   public:
     /*! Buffer construction */
     RawBufferView()
-      : ptr_ofs(nullptr), stride(0), num(0), format(RTC_FORMAT_UNDEFINED) {}
+      : ptr_ofs(nullptr), stride(0), num(0), format(RTC_FORMAT_UNDEFINED), userData(0) {}

   public:
     /*! sets the buffer view */
@@ -244,11 +243,12 @@
       return ptr_ofs;
     }

-  protected:
+  public:
     char* ptr_ofs;      //!< base pointer plus offset
     size_t stride;      //!< stride of the buffer in bytes
     size_t num;         //!< number of elements in the buffer
     RTCFormat format;   //!< format of the buffer
+    int userData;       //!< special data
     Ref<Buffer> buffer; //!< reference to the parent buffer (optional)
   };


Move lsitview focus line 2 pixels higher

--- style/qtcurve.c
+++ style/qtcurve.c
@@ -5888,7 +5888,11 @@
         QTC_CAIRO_BEGIN

         if(FOCUS_LINE==opts.focus)
+        {
+            if(view || isListViewHeader(widget))
+                height-=2;
             drawFadedLine(cr, x, y+height-1, width, 1, col, area, NULL, TRUE, TRUE, TRUE);
+        }
         else
         {
             if(/*isList(widget) || */width<3 || height < 3)


Fix spacing

Fix spacing

--- kevin/playground/test.c
+++ kevin/playground/test.c
@@ -181,52 +181,52 @@

 /* Defining a struct. */
 struct Student {
-	char name[50];
-	char major[50];
-	int age;
-	double gpa;
+    char name[50];
+    char major[50];
+    int age;
+    double gpa;
 };

 void structs() {
-	struct Student studentOne;
-	studentOne.age = 22;
-	studentOne.gpa = 3.2;
-	// Need to use strcpy to set this field on the struct
-	strcpy(studentOne.name, "Jim");
-	strcpy(studentOne.major, "Business");
-
-	printf("%f\n", studentOne.gpa);
-	printf("%s\n", studentOne.name);
-
-	struct Student studentTwo;
-	studentTwo.age = 20;
-	studentTwo.gpa = 2.5;
-	strcpy(studentTwo.name, "Pam");
+    struct Student studentOne;
+    studentOne.age = 22;
+    studentOne.gpa = 3.2;
+    // Need to use strcpy to set this field on the struct
+    strcpy(studentOne.name, "Jim");
+    strcpy(studentOne.major, "Business");
+
+    printf("%f\n", studentOne.gpa);
+    printf("%s\n", studentOne.name);
+
+    struct Student studentTwo;
+    studentTwo.age = 20;
+    studentTwo.gpa = 2.5;
+    strcpy(studentTwo.name, "Pam");
 	strcpy(studentTwo.major, "Art");

-	printf("%f\n", studentTwo.gpa);
-	printf("%s\n", studentTwo.name);
+    printf("%f\n", studentTwo.gpa);
+    printf("%s\n", studentTwo.name);

 }

 void loopsWhile() {
-	int index = 1;
-	while (index <= 5) {
-		printf("%d\n", index);
-		index++;
-	}
-
-	do { } while(0 == 1);
-
-	const int secretNumber = 5;
-	int guess;
-
-	while (guess != secretNumber) {
-		printf("Enter a number: " );
-		scanf("%d", &guess);
-	}
-
-	printf("You win!\n");
+    int index = 1;
+    while (index <= 5) {
+        printf("%d\n", index);
+        index++;
+    }
+
+    do { } while(0 == 1);
+
+    const int secretNumber = 5;
+    int guess;
+
+    while (guess != secretNumber) {
+        printf("Enter a number: " );
+        scanf("%d", &guess);
+    }
+
+    printf("You win!\n");
 }

 int main() {


Fix spin widgets and editable combos resizing

--- style/qtcurve.c
+++ style/qtcurve.c
@@ -2009,7 +2009,9 @@
 #endif
     if(ROUNDED_ALL!=round)
     {
-        if(highlight)
+        if(WIDGET_SPIN==w || WIDGET_COMBO_BUTTON==w)
+            x--, width++;
+        else if(highlight)
         {
             if(doEtch)
                 if(ROUNDED_RIGHT==round)  /* RtoL */
@@ -2618,7 +2620,7 @@
         }

         if(isSpinButton && opts.unifySpin)
-            x-=2;
+            x--;

         if(sbar)
             switch(stepper)


yanglint CHANGE do not use GNU extension (strdupa()) when it is not necessary

Relates to #17

--- tools/lint/commands.c
+++ tools/lint/commands.c
@@ -19,7 +19,6 @@
  *    software without specific prior written permission.
  */

-#define _GNU_SOURCE
 #include <string.h>
 #include <stdio.h>
 #include <errno.h>
@@ -937,7 +936,7 @@
 cmd_help(const char *arg)
 {
     int i;
-    char *args = strdupa(arg);
+    char *args = strdup(arg);
     char *cmd = NULL;

     strtok(args, " ");
@@ -975,6 +974,7 @@
         }
     }

+    free(args);
     return 0;
 }


test: Use vlc's msleep. Only portable and working implementation we have.

Pointed by Remi.

--- test/libvlc/media_list_player.c
+++ test/libvlc/media_list_player.c
@@ -23,6 +23,10 @@

 #include "test.h"

+ // For msleep
+#include <vlc_common.h>
+#include <vlc_mtime.h>
+
 static void media_list_add_file_path(libvlc_instance_t *vlc, libvlc_media_list_t *ml, const char * file_path)
 {
     libvlc_media_t *md = libvlc_media_new (vlc, file_path, &ex);
@@ -73,7 +77,7 @@

     libvlc_media_release (md);

-    usleep(100000);
+    msleep(100000);

     libvlc_media_list_player_next (mlp, &ex);
     catch ();
@@ -81,7 +85,7 @@
     libvlc_media_list_player_pause (mlp, &ex);
     catch();

-    usleep(100000);
+    msleep(100000);

     libvlc_media_list_player_next (mlp, &ex);
     catch ();
@@ -89,7 +93,7 @@
     libvlc_media_list_player_stop (mlp, &ex);
     catch ();

-    usleep(100000);
+    msleep(100000);

     libvlc_media_list_player_next (mlp, &ex);
     catch ();


Update MOE_HAL_SPI.c

Update MOE_HAL_SPI.c


vcs-svn: suppress signed/unsigned comparison warnings

These are already safe because both sides of the comparison are
nonnegative.

This would normally not be important because Git is not -Wsign-compare
clean anyway, but we like to keep the vcs-svn/ lib to a higher
standard for convenience using it in other projects.

Signed-off-by: David Barr <07aa8457561a036d138863cd44fa5b033f6d1087@google.com>
Signed-off-by: Jonathan Nieder <b57189c5f2fd5b3daf3350a77fde90def1080fa5@gmail.com>

--- vcs-svn/fast_export.c
+++ vcs-svn/fast_export.c
@@ -254,7 +254,7 @@
 	}

 	/* Mode. */
-	if (response_end - response < strlen("100644") ||
+	if (response_end - response < (signed) strlen("100644") ||
 	    response[strlen("100644")] != ' ')
 		die("invalid ls response: missing mode: %s", response);
 	*mode = 0;
@@ -267,7 +267,7 @@
 	}

 	/* ' blob ' or ' tree ' */
-	if (response_end - response < strlen(" blob ") ||
+	if (response_end - response < (signed) strlen(" blob ") ||
 	    (response[1] != 'b' && response[1] != 't'))
 		die("unexpected ls response: not a tree or blob: %s", response);
 	response += strlen(" blob ");


İsmail Dönmez:  Change to mktemp template to make it compatible with Linux.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@180267 91177308-0d34-0410-b5e6-96231b3b80d8

--- test/support/platform_support.h
+++ test/support/platform_support.h
@@ -54,7 +54,7 @@
     std::string s(p);
     free( p );
 #else
-   std::string s("temp.XXXX");
+   std::string s("temp.XXXXXX");
    mktemp(&s[0]);
 #endif
    return s;


use version from standard

use version from standard

--- Framework/Commons/Source/Tools/Math/Common.h
+++ Framework/Commons/Source/Tools/Math/Common.h
@@ -56,7 +56,7 @@
 #ifdef WIN32
     return !_finite(x);
 #else
-    return !finite(x);
+    return !std::isinf(x);
 #endif
   }//end isInf


fixes from Carmelo AMOROSO to depend less on kernel headers

--- libc/sysdeps/linux/sh/sys/procfs.h
+++ libc/sysdeps/linux/sh/sys/procfs.h
@@ -29,9 +29,18 @@
 #include <sys/types.h>
 #include <sys/ucontext.h>
 #include <sys/user.h>
-#include <asm/elf.h>

 __BEGIN_DECLS
+
+/*
+ * ELF register definitions...
+ */
+typedef unsigned long elf_greg_t;
+
+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef struct user_fpu_struct elf_fpregset_t;

 struct elf_siginfo
   {


replaced buggy fxDDReadRGBAPixels() with read_R5G6B5_pixels()

--- src/mesa/drivers/glide/fxddspan.c
+++ src/mesa/drivers/glide/fxddspan.c
@@ -452,29 +452,46 @@
                        GR_LFB_SRC_FMT_8888,1,1,0,(void *) &fxMesa->color);
 }

-static void fxDDReadRGBAPixels(const GLcontext *ctx,
+
+static void read_R5G6B5_pixels(const GLcontext *ctx,
                                GLuint n, const GLint x[], const GLint y[],
                                GLubyte rgba[][4], const GLubyte mask[])
 {
-  fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
-  GLuint i;
-  GLint bottom=fxMesa->height+fxMesa->y_offset-1;
-
-  if (MESA_VERBOSE&VERBOSE_DRIVER) {
-     fprintf(stderr,"fxmesa: fxDDReadRGBAPixels(...)\n");
-  }
-
-  for(i=0;i<n;i++) {
-    if(mask[i]) {
-      GLushort pixel;
-      FX_grLfbReadRegion(fxMesa->currentFB,x[i],bottom-y[i],1,1,0,&pixel);
-      rgba[i][RCOMP] = FX_PixelToR[pixel];
-      rgba[i][GCOMP] = FX_PixelToG[pixel];
-      rgba[i][BCOMP] = FX_PixelToB[pixel];
-      rgba[i][ACOMP] = 255;
-    }
-  }
-}
+  fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx;
+  GrLfbInfo_t info;
+  BEGIN_BOARD_LOCK();
+  if (grLfbLock(GR_LFB_READ_ONLY,
+                fxMesa->currentFB,
+                GR_LFBWRITEMODE_ANY,
+                GR_ORIGIN_UPPER_LEFT,
+                FXFALSE,
+                &info)) {
+#ifdef XF86DRI
+    const GLint srcStride = (fxMesa->glCtx->Color.DrawBuffer == GL_FRONT)
+                          ? (fxMesa->screen_width) : (info.strideInBytes / 2);
+#else
+    const GLint srcStride = info.strideInBytes / 2; /* stride in GLushorts */
+#endif
+    const GLint winX = fxMesa->x_offset;
+    const GLint winY = fxMesa->y_offset + fxMesa->height - 1;
+    GLuint i;
+    for(i=0;i<n;i++) {
+      if(mask[i]) {
+        const GLushort *data16 = (const GLushort *) info.lfbPtr
+                               + (winY - y[i]) * srcStride
+                               + (winX + x[i]);
+        const GLushort pixel = *data16;
+        rgba[i][RCOMP] = FX_PixelToR[pixel];
+        rgba[i][GCOMP] = FX_PixelToG[pixel];
+        rgba[i][BCOMP] = FX_PixelToB[pixel];
+        rgba[i][ACOMP] = 255;
+      }
+    }
+    grLfbUnlock(GR_LFB_READ_ONLY, fxMesa->currentFB);
+  }
+  END_BOARD_LOCK();
+}
+

 /************************************************************************/
@@ -603,7 +620,7 @@

   /*  ctx->Driver.ReadRGBASpan        =fxDDReadRGBASpan;*/
   ctx->Driver.ReadRGBASpan = read_R5G6B5_span;
-  ctx->Driver.ReadRGBAPixels      =fxDDReadRGBAPixels;
+  ctx->Driver.ReadRGBAPixels      = read_R5G6B5_pixels;

   ctx->Driver.ReadCI32Span        =NULL;
   ctx->Driver.ReadCI32Pixels      =NULL;


mesa: fix GL error checking in TransformFeedbackVaryings

Reviewed-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Reviewed-by: Eric Anholt <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@anholt.net>

--- src/mesa/main/transformfeedback.c
+++ src/mesa/main/transformfeedback.c
@@ -603,7 +603,9 @@
       return;
    }

-   if (count < 0 || count > ctx->Const.MaxTransformFeedbackSeparateAttribs) {
+   if (count < 0 ||
+       (bufferMode == GL_SEPARATE_ATTRIBS &&
+        count > ctx->Const.MaxTransformFeedbackSeparateAttribs)) {
       _mesa_error(ctx, GL_INVALID_VALUE,
                   "glTransformFeedbackVaryings(count=%d)", count);
       return;


Update vntaptd.h

Update vntaptd.h

--- vnpy/api/tap/vntap/vntaptd/vntaptd.h
+++ vnpy/api/tap/vntap/vntaptd/vntaptd.h
@@ -821,32 +821,79 @@

 	int setITapTradeAPILogLevel(string level); //1

+	int setHostAddress(string IP, unsigned short port);
+
+	int login(const dict &req);
+
+	int requestVertificateCode(unsigned int *sessionID, string ContactInfo); //2
+
+	int setVertificateCode(string VertificateCode); //3
+
+	int disconnect();
+
+	int authPassword(unsigned int *sessionID, const dict &req);
+
+	int haveCertainRight(int rightID);
+
+	int insertOrder(unsigned int *sessionID, string *ClientOrderNo, TapAPINewOrder *order); //7
+
+	int cancelOrder(unsigned int *sessionID, TapAPIOrderCancelReq *order); //8
+
+
+
+
+
+	int qryTradingDate(unsigned int *session);
+
+	int qryAccount(unsigned int *session, const dict &data);
+
+	int qryFund(unsigned int *session, const dict &data);
+
+	int qryExchange(unsigned int *session);
+
+	int qryCommodity(unsigned int *session);
+
+	int qryContract(unsigned int *session, const dict &data);
+
+	int qryOrder(unsigned int *session, const dict &data);
+
+	int qryOrderProcess(unsigned int *session, const dict &data);
+
+	int qryFill(unsigned int *session, const dict &data);
+
+	int qryPosition(unsigned int *session, const dict &data);
+
+	int qryPositionSummary(unsigned int *session, const dict &data);
+
+	int qryCurrency(unsigned int *session);
+
+	int qryAccountCashAdjust(unsigned int *session, const dict &data);
+
+	int qryTradeMessage(unsigned int *session, const dict &data);
+
+	int qryBill(unsigned int *session, const dict &data);
+
+	int qryHisOrder(unsigned int *session, const dict &data);
+
+	int qryHisOrderProcess(unsigned int *session, const dict &data);
+
+	int qryHisMatch(unsigned int *session, const dict &data);
+
+	int qryHisPosition(unsigned int *session, const dict &data);
+
+	int qryHisDelivery(unsigned int *session, const dict &data);
+
+	int qryAccountFeeRent(unsigned int *session, const dict &data);
+
+	int qryAccountMarginRent(unsigned int *session, const dict &data);
+
 	//------------
 	// int setAPINotify(ITapTradeAPINotify *pSpi);

-	int setHostAddress(string IP, unsigned short port);
-
-	int login(const dict &req); //3
-
-	int requestVertificateCode(unsigned int *sessionID, string ContactInfo); //2
-
-	int setVertificateCode(string VertificateCode); //3
-
-	int disconnect();
-
 	//int changePassword(unsigned int *sessionID, TapAPIChangePasswordReq *req);

-	int authPassword(unsigned int *sessionID, const dict &req);
-
-	int haveCertainRight(int rightID);
-
 	//int setReservedInfo(unsigned int *sessionID, string info);

-	int insertOrder(unsigned int *sessionID, string *ClientOrderNo, TapAPINewOrder *order); //7
-
-	int cancelOrder(unsigned int *sessionID, TapAPIOrderCancelReq *order); //8
-
-
 	//int amendOrder(unsigned int *sessionID, TapAPIAmendOrder *order); //9

 	//int activateOrder(unsigned int * sessionID, TapAPIOrderActivateReq * order);
@@ -866,52 +913,4 @@
 	//int fillLocalInput(unsigned int *sessionID, TapAPIFillLocalInputReq *fill);

 	//int fillLocalRemove(unsigned int *sessionID, TapAPIFillLocalRemoveReq *fill);
-
-
-
-	int qryTradingDate(unsigned int *session);
-
-	int qryAccount(unsigned int *session, const dict &data);
-
-	int qryFund(unsigned int *session, const dict &data);
-
-	int qryExchange(unsigned int *session);
-
-	int qryCommodity(unsigned int *session);
-
-	int qryContract(unsigned int *session, const dict &data);
-
-	int qryOrder(unsigned int *session, const dict &data);
-
-	int qryOrderProcess(unsigned int *session, const dict &data);
-
-	int qryFill(unsigned int *session, const dict &data);
-
-	int qryPosition(unsigned int *session, const dict &data);
-
-	int qryPositionSummary(unsigned int *session, const dict &data);
-
-	int qryCurrency(unsigned int *session);
-
-	int qryAccountCashAdjust(unsigned int *session, const dict &data);
-
-	int qryTradeMessage(unsigned int *session, const dict &data);
-
-	int qryBill(unsigned int *session, const dict &data);
-
-	int qryHisOrder(unsigned int *session, const dict &data);
-
-	int qryHisOrderProcess(unsigned int *session, const dict &data);
-
-	int qryHisMatch(unsigned int *session, const dict &data);
-
-	int qryHisPosition(unsigned int *session, const dict &data);
-
-	int qryHisDelivery(unsigned int *session, const dict &data);
-
-	int qryAccountFeeRent(unsigned int *session, const dict &data);
-
-	int qryAccountMarginRent(unsigned int *session, const dict &data);
-
-
 };


fixed build issue on older versions of gcc

--- test/system/test_system_p2pop.c
+++ test/system/test_system_p2pop.c
@@ -212,9 +212,10 @@
     };

     KineticP2P_Operation p2pOp = {
-        .peer.hostname = KINETIC_TEST_HOST2,
-        .peer.port = KINETIC_TEST_PORT2,
-        .peer.tls = false,
+        .peer = { .hostname = KINETIC_TEST_HOST2,
+                  .port = KINETIC_TEST_PORT2,
+                  .tls = false,
+                },
         .numOperations = NUM_ELEMENTS(ops),
         .operations = ops
     };
@@ -344,17 +345,19 @@
     };

     KineticP2P_Operation p2pOp_copy_back1 = {
-        .peer.hostname = KINETIC_TEST_HOST1,
-        .peer.port = KINETIC_TEST_PORT1,
-        .peer.tls = false,
+        .peer = { .hostname = KINETIC_TEST_HOST1,
+                  .port = KINETIC_TEST_PORT1,
+                  .tls = false,
+                },
         .numOperations = NUM_ELEMENTS(ops_copy_back1),
         .operations = ops_copy_back1
     };

     KineticP2P_Operation p2pOp_copy_back2 = {
-        .peer.hostname = KINETIC_TEST_HOST1,
-        .peer.port = KINETIC_TEST_PORT1,
-        .peer.tls = false,
+        .peer = { .hostname = KINETIC_TEST_HOST1,
+                  .port = KINETIC_TEST_PORT1,
+                  .tls = false,
+                },
         .numOperations = NUM_ELEMENTS(ops_copy_back2),
         .operations = ops_copy_back2
     };
@@ -374,9 +377,10 @@

     KineticP2P_Operation p2pOp = {
-        .peer.hostname = KINETIC_TEST_HOST2,
-        .peer.port = KINETIC_TEST_PORT2,
-        .peer.tls = false,
+        .peer = { .hostname = KINETIC_TEST_HOST2,
+                  .port = KINETIC_TEST_PORT2,
+                  .tls = false,
+                },
         .numOperations = NUM_ELEMENTS(ops_copy_there),
         .operations = ops_copy_there
     };
@@ -447,9 +451,10 @@
     }

     KineticP2P_Operation p2pOp = {
-        .peer.hostname = KINETIC_TEST_HOST1,
-        .peer.port = KINETIC_TEST_PORT1,
-        .peer.tls = false,
+        .peer = { .hostname = KINETIC_TEST_HOST1,
+                  .port = KINETIC_TEST_PORT1,
+                  .tls = false,
+                },
         .numOperations = to_many_operations,
         .operations = ops
     };
@@ -476,9 +481,10 @@
             .chainedOperation = (i == (to_many_operations - 1)) ? NULL : &chained_ops[i + 1],
         };
         chained_ops[i] = (KineticP2P_Operation){
-            .peer.hostname = KINETIC_TEST_HOST1,
-            .peer.port = KINETIC_TEST_PORT1,
-            .peer.tls = false,
+            .peer = { .hostname = KINETIC_TEST_HOST1,
+                      .port = KINETIC_TEST_PORT1,
+                      .tls = false,
+                    },
             .numOperations = 1,
             .operations = &ops[i],
         };


printf --

 printf --

SVN revision: 35316

--- src/modules/gadman/e_mod_gadman.c
+++ src/modules/gadman/e_mod_gadman.c
@@ -95,9 +95,8 @@
 gadman_shutdown(void)
 {
    e_container_shape_change_callback_del(Man->container, on_shape_change, NULL);
-   printf("++++++++    UNPOPULATE BG\n");
-   e_gadcon_unpopulate(Man->gc); // TODO FIX ME !!
-   printf("++++++++    UNPOPULATE TOP\n");
+
+   e_gadcon_unpopulate(Man->gc);
    e_gadcon_unpopulate(Man->gc_top);

    /* free gadcons */


re-set gadman bg when updating zones

re-set gadman bg when updating zones

SVN revision: 76447

--- src/modules/gadman/e_mod_gadman.c
+++ src/modules/gadman/e_mod_gadman.c
@@ -93,6 +93,7 @@
      }

    _gadman_gadgets = eina_hash_string_superfast_new(NULL);
+   gadman_update_bg();
 }

 void
@@ -1592,6 +1593,7 @@
         gc = _gadman_gadcon_new(layer_name[layer], layer, zone, location);
         Man->gadcons[layer] = eina_list_append(Man->gadcons[layer], gc);
      }
+   gadman_update_bg();

    return ECORE_CALLBACK_PASS_ON;
 }


block gadman drags originating from other gadcons

T251

--- src/modules/gadman/e_mod_gadman.c
+++ src/modules/gadman/e_mod_gadman.c
@@ -634,6 +634,7 @@
    if ((!eina_list_data_find(Man->gadcons[GADMAN_LAYER_BG], gc)) &&
        (!eina_list_data_find(Man->gadcons[GADMAN_LAYER_TOP], gc)))
      return;
+   if (gc != gcc->gadcon) return;
    //INF("ENTER: %u", e_object_ref_get((void*)gcc));
    gadman_gadget_edit_start(gcc);
 }
@@ -648,6 +649,7 @@
    if ((!eina_list_data_find(Man->gadcons[GADMAN_LAYER_BG], gc)) &&
        (!eina_list_data_find(Man->gadcons[GADMAN_LAYER_TOP], gc)))
      return;
+   if (gc != gcc->gadcon) return;
    //INF("LEAVE: %u", e_object_ref_get((void*)gcc));
    Man->drag_gcc[gcc->gadcon->id - ID_GADMAN_LAYER_BASE] = NULL;
    for (layer = 0; layer < GADMAN_LAYER_COUNT; layer++)
@@ -676,6 +678,7 @@
    int x, y, mx, my;
    int ox, oy, ow, oh;

+   if (gc != gcc->gadcon) return;
    /* only use this for dragging gadcons around the desktop */
    if ((!eina_list_data_find(Man->gadcons[GADMAN_LAYER_BG], gc)) &&
        (!eina_list_data_find(Man->gadcons[GADMAN_LAYER_TOP], gc)))
@@ -709,6 +712,7 @@
    Evas_Object *mover;
    int gx, gy;

+   if (gc != gcc->gadcon) return;
    /* only use this for dragging gadcons around the desktop */
    if ((!eina_list_data_find(Man->gadcons[GADMAN_LAYER_BG], gc)) &&
        (!eina_list_data_find(Man->gadcons[GADMAN_LAYER_TOP], gc)))


Remove unused variable.

Remove unused variable.

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

--- src/modules/temperature/tempget.c
+++ src/modules/temperature/tempget.c
@@ -20,7 +20,6 @@
 #endif
 static Ecore_Poller *poller = NULL;
 static int ptemp = 0;
-static int have_temp = 0;

 static void init(void);
 static int check(void);


patch from rustyBSD with tempget fixes

patch from rustyBSD with tempget fixes

SVN revision: 79136

--- src/modules/temperature/tempget.c
+++ src/modules/temperature/tempget.c
@@ -343,7 +343,7 @@
 	     break;
 	   case SENSOR_TYPE_LINUX_SYS:
 	     snprintf(path, sizeof(path),
-		      "/sys/class/thermal/thermal/%s/temp", sensor_name);
+		      "/sys/class/thermal/%s/temp", sensor_name);
 	     sensor_path = strdup(path);
 	     break;
            default:
@@ -508,6 +508,7 @@
 	     fclose(f);
              temp = atoi(buf);
              temp /= 1000;
+             ret = 1;
 	  }
 	else
 	  goto error;


WebBrowser: compile fix

WebBrowser: compile fix

--- modules/webbrowser/include/modules/webbrowser/processors/processorcefsynchronizer.h
+++ modules/webbrowser/include/modules/webbrowser/processors/processorcefsynchronizer.h
@@ -117,7 +117,7 @@
     const Processor* parent_;
     std::map<Processor*, ProgressBarObserverCEF> progressObservers_;
     // maps callback name used in JavaScript to registered callbacks
-    std::unordered_map<std::string, typename Dispatcher<CallbackFunc>> callbacks_;
+    std::unordered_map<std::string, Dispatcher<CallbackFunc>> callbacks_;
     IMPLEMENT_REFCOUNTING(ProcessorCefSynchronizer);
 };
 #include <warn/pop>


watch client UNIGNORE hook for adding new tiling clients

ref 6f5e2ddefcd287640416c8da362b3865299e331b

--- src/modules/tiling/e_mod_tiling.c
+++ src/modules/tiling/e_mod_tiling.c
@@ -1419,8 +1419,12 @@

    _G.handler_client_resize_begin =
       e_client_hook_add(E_CLIENT_HOOK_RESIZE_BEGIN, _resize_begin_hook, NULL);
-   _G.handler_client_add =
-      e_client_hook_add(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, _add_hook, NULL);
+   if (e_comp->comp_type == E_PIXMAP_TYPE_X)
+     _G.handler_client_add =
+        e_client_hook_add(E_CLIENT_HOOK_EVAL_PRE_FRAME_ASSIGN, _add_hook, NULL);
+   else
+     _G.handler_client_add =
+        e_client_hook_add(E_CLIENT_HOOK_UNIGNORE, _add_hook, NULL);
    HANDLER(_G.handler_client_resize, CLIENT_RESIZE, _resize_hook);
    HANDLER(_G.handler_client_move, CLIENT_MOVE, _move_hook);


Follow-up to r965551 on issue #3620: svn add ^/ triggers assertion
failure

* subversion/libsvn_client/cleanup.c
  (svn_client_upgrade): Check that path isn't a URL.

Patch by: Uwe Stuehler <uwe@bsdx.de>

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@997777 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_client/cleanup.c
+++ subversion/libsvn_client/cleanup.c
@@ -131,6 +131,11 @@
   info_baton.last_repos = NULL;
   info_baton.last_uuid = NULL;

+  if (svn_path_is_url(path))
+    return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                              _("'%s' is not a local path"),
+                                              path));
+
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
   SVN_ERR(svn_wc_upgrade(ctx->wc_ctx, local_abspath,
                          fetch_repos_info, &info_baton,


Following up on r919021, commit a few docstrings I forgot to save before
committing.

* subversion/libsvn_client/cleanup.c
  (global): Reinsert page feed I accidentally removed in r919021.
  (repos_info_baton,
   fetch_repos_info): Add docstrings.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@919034 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_client/cleanup.c
+++ subversion/libsvn_client/cleanup.c
@@ -38,7 +38,8 @@

 #include "svn_private_config.h"

-
++
 /*** Code. ***/

 svn_error_t *
@@ -57,6 +58,8 @@
   return svn_error_return(err);
 }

+
+/* callback baton for fetch_repos_info */
 struct repos_info_baton
 {
   apr_pool_t *pool;
@@ -65,6 +68,8 @@
   const char *last_uuid;
 };

+/* svn_wc_upgrade_get_repos_info_t implementation for calling
+   svn_wc_upgrade() from svn_client_upgrade() */
 static svn_error_t *
 fetch_repos_info(const char **repos_root,
                  const char **repos_uuid,


(ESIDL_CXX_H_INCLUDED) : Fix the enclosing header typedef name.

--- esidl/include/cxx.h
+++ esidl/include/cxx.h
@@ -15,8 +15,8 @@
  * limitations under the License.
  */

-#ifndef ESIDL_CPLUSPLUS_H_INCLUDED
-#define ESIDL_CPLUSPLUS_H_INCLUDED
+#ifndef ESIDL_CXX_H_INCLUDED
+#define ESIDL_CXX_H_INCLUDED

 #include <stdarg.h>
 #include <stdio.h>
@@ -586,4 +586,4 @@
     }
 };

-#endif  // ESIDL_CPLUSPLUS_H_INCLUDED
+#endif  // ESIDL_CXX_H_INCLUDED


* subversion/libsvn_diff/diff_tree.c
  Remove C++ style comment that breaks on the buildbot.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1438265 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_diff/diff_tree.c
+++ subversion/libsvn_diff/diff_tree.c
@@ -223,8 +223,6 @@
   return &wrapper->tp;
 }

-//////////////
-
 struct reverse_tree_baton_t
 {
   svn_diff_tree_processor_t *processor;


cfb: deprecate use of specific error return values

Replace module specific return values with standard errno values.

Signed-off-by: Maciej Zagrabski <a2b2e726e25faa2f045eecd31b0d13d5c5176dbc@grinn-global.com>

--- subsys/fb/cfb.c
+++ subsys/fb/cfb.c
@@ -125,14 +125,14 @@
 	const struct cfb_font *fptr;

 	if (!fb->fonts || !fb->buf) {
-		return -1;
+		return -ENODEV;
 	}

 	fptr = &(fb->fonts[fb->font_idx]);

 	if (fptr->height % 8) {
 		LOG_ERR("Wrong font size");
-		return -1;
+		return -EINVAL;
 	}

 	if ((fb->screen_info & SCREEN_INFO_MONO_VTILED) && !(y % 8)) {
@@ -147,7 +147,7 @@
 	}

 	LOG_ERR("Unsupported framebuffer configuration");
-	return -1;
+	return -EINVAL;
 }

 static int cfb_invert(const struct char_framebuffer *fb)
@@ -165,7 +165,7 @@
 	struct display_buffer_descriptor desc;

 	if (!fb || !fb->buf) {
-		return -1;
+		return -ENODEV;
 	}

 	desc.buf_size = fb->size;
@@ -183,7 +183,7 @@
 	struct char_framebuffer *fb = &char_fb;

 	if (!fb || !fb->buf) {
-		return -1;
+		return -ENODEV;
 	}

 	fb->inverted = !fb->inverted;
@@ -198,7 +198,7 @@
 	struct display_buffer_descriptor desc;

 	if (!fb || !fb->buf) {
-		return -1;
+		return -ENODEV;
 	}

 	desc.buf_size = fb->size;
@@ -244,7 +244,7 @@
 	struct char_framebuffer *fb = &char_fb;

 	if (idx >= fb->numof_fonts) {
-		return -1;
+		return -EINVAL;
 	}

 	fb->font_idx = idx;
@@ -258,7 +258,7 @@
 	const struct char_framebuffer *fb = &char_fb;

 	if (idx >= fb->numof_fonts) {
-		return -1;
+		return -EINVAL;
 	}

 	if (width) {
@@ -290,7 +290,7 @@
 	fb->numof_fonts = __font_entry_end - __font_entry_start;
 	LOG_DBG("number of fonts %d", fb->numof_fonts);
 	if (!fb->numof_fonts) {
-		return -1;
+		return -ENODEV;
 	}

 	fb->x_res = cfg.x_resolution;
@@ -309,7 +309,7 @@
 	fb->size = fb->x_res * fb->y_res / fb->ppt;
 	fb->buf = k_malloc(fb->size);
 	if (!fb->buf) {
-		return -1;
+		return -ENOMEM;
 	}

 	memset(fb->buf, 0, fb->size);


Improve fix for Issue #4400.

Improve fix for Issue #4400.

* subversion/libsvn_ra_serf/commit.c
  (checkout_dir): Use svn_relpath_skip_ancestor()
    Add an SVN_ERR_ASSERT on parent->working_url.

Suggested by: danielsh
(the SVN_ERROR_ASSERT)

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1512195 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_ra_serf/commit.c
+++ subversion/libsvn_ra_serf/commit.c
@@ -398,21 +398,18 @@
     {
       if (p_dir->added)
         {
-          /* Calculate how much of the relpath to skip to compose the
-           * working_url.  If the relpath is an empty string then the parent
-           * is the root of the commit and we need to just add the entire
-           * relpath to the parent's working_url.  Otherwise we need to skip
-           * the strlen(parent->relpath) + 1 to account for the slash.
-           * It is safe to assume that every added directory has a parent. */
+          /* Calculate the working_url by skipping the shared ancestor bewteen
+           * the parent->relpath and dir->relpath.  This is safe since an
+           * add is guaranteed to have a parent that is checked out. */
           dir_context_t *parent = p_dir->parent_dir;
-          size_t skip = strlen(parent->relpath);
-          if (skip)
-            skip++;
+          const char *relpath = svn_relpath_skip_ancestor(parent->relpath,
+                                                          dir->relpath);

           /* Implicitly checkout this dir now. */
+          SVN_ERR_ASSERT(parent->working_url);
           dir->working_url = svn_path_url_add_component2(
                                    parent->working_url,
-                                   dir->relpath + skip, dir->pool);
+                                   relpath, dir->pool);
           return SVN_NO_ERROR;
         }
       p_dir = p_dir->parent_dir;


* subversion/libsvn_ra_serf/commit.c
  (add_file): Add parens to avoid a compiler warning ["warning:
    suggest parentheses around && within ||"], and to clarify
    the code for those of us who haven't memorized the C operator
    precedence table.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@871823 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_ra_serf/commit.c
+++ subversion/libsvn_ra_serf/commit.c
@@ -1591,7 +1591,7 @@
     };

   if (! ((dir->added && !dir->copy_path) ||
-         deleted_parent && deleted_parent[0] != '\0'))
+         (deleted_parent && deleted_parent[0] != '\0')))
     {
       svn_ra_serf__simple_request_context_t *head_ctx;
       svn_ra_serf__handler_t *handler;


Fix assertion on checkout from pre-1.8 server over ra_serf with
http-bulk-updates=off.

* subversion/libsvn_ra_serf/update.c
  (open_updated_file): Do not walk through file properties. They can be
   not fetched yet.
  (close_updated_file): Walk through file properties here.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1468439 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_ra_serf/update.c
+++ subversion/libsvn_ra_serf/update.c
@@ -1030,6 +1030,28 @@
   if (info->lock_token)
     check_lock(info);

+  /* Get (maybe) a textdelta window handler for transmitting file
+     content changes. */
+  if (info->fetch_file || force_apply_textdelta)
+    {
+      SVN_ERR(update_editor->apply_textdelta(info->file_baton,
+                                             info->base_checksum,
+                                             info->editor_pool,
+                                             &info->textdelta,
+                                             &info->textdelta_baton));
+    }
+
+  return SVN_NO_ERROR;
+}
+
+/* Close the file associated with INFO->file_baton, and cleanup other
+   bits of that structure managed by open_updated_file(). */
+static svn_error_t *
+close_updated_file(report_info_t *info,
+                   apr_pool_t *scratch_pool)
+{
+  report_context_t *ctx = info->dir->report_context;
+
   /* Set all of the properties we received */
   SVN_ERR(svn_ra_serf__walk_all_props(info->props,
                                       info->base_name,
@@ -1050,26 +1072,6 @@
                                           scratch_pool));
     }

-  /* Get (maybe) a textdelta window handler for transmitting file
-     content changes. */
-  if (info->fetch_file || force_apply_textdelta)
-    {
-      SVN_ERR(update_editor->apply_textdelta(info->file_baton,
-                                             info->base_checksum,
-                                             info->editor_pool,
-                                             &info->textdelta,
-                                             &info->textdelta_baton));
-    }
-
-  return SVN_NO_ERROR;
-}
-
-/* Close the file associated with INFO->file_baton, and cleanup other
-   bits of that structure managed by open_updated_file(). */
-static svn_error_t *
-close_updated_file(report_info_t *info,
-                   apr_pool_t *scratch_pool)
-{
   /* Close the file via the editor. */
   SVN_ERR(info->dir->report_context->update_editor->close_file(
             info->file_baton, info->final_checksum, scratch_pool));


network: make it safe to call networkSetupPrivateChains() multiple times

networkSetupPrivateChains() is currently called only once per run of
libvirtd, so it can assume that errInitV4 and errInitV6 are empty/null
when it is called. In preparation for potentially calling this
function multiple times during one run, this patch moves the reset of
errInitV[46] to the top of the function, to assure no memory is
leaked.

Signed-off-by: Laine Stump <c23361c43fbf79fed83e8b76173707b083d6caf5@redhat.com>
Reviewed-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

--- src/network/bridge_driver_linux.c
+++ src/network/bridge_driver_linux.c
@@ -48,6 +48,10 @@
     VIR_DEBUG("Setting up global firewall chains");

     createdChains = false;
+    virFreeError(errInitV4);
+    errInitV4 = NULL;
+    virFreeError(errInitV6);
+    errInitV6 = NULL;

     rc = iptablesSetupPrivateChains(VIR_FIREWALL_LAYER_IPV4);
     if (rc < 0) {
@@ -56,8 +60,6 @@
         errInitV4 = virSaveLastError();
         virResetLastError();
     } else {
-        virFreeError(errInitV4);
-        errInitV4 = NULL;
         if (rc) {
             VIR_DEBUG("Created global IPv4 chains");
             createdChains = true;
@@ -73,8 +75,6 @@
         errInitV6 = virSaveLastError();
         virResetLastError();
     } else {
-        virFreeError(errInitV6);
-        errInitV6 = NULL;
         if (rc) {
             VIR_DEBUG("Created global IPv6 chains");
             createdChains = true;


Add stdbool header to libc

Add stdbool header to libc

Fixes failing compiler test 'btree.c', also useful thing to have

error: pathspec 'software/libs/libc/include/stdbool.h' did not match any file(s) known to git

--- software/libs/libc/include/stdbool.h
+++ software/libs/libc/include/stdbool.h
@@ -0,0 +1,22 @@
+//
+// Copyright 2011-2015 Jeff Bush
+//
+// Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#pragma once
+
+typedef char bool;
+
+#define true 1
+#define false 0


* subversion/libsvn_ra_serf/update.c   (start_report): Remove commented-out cruft introduced in r1349367.

--- subversion/libsvn_ra_serf/update.c
+++ subversion/libsvn_ra_serf/update.c
@@ -1820,7 +1820,6 @@
              "send-all" mode.  As a client, we're smart enough to know
              that's wrong, so we'll just push an ignorable state
              here. */
-          /*push_state(parser, ctx, TXDELTA);*/
           ;
         }
       else


Set the ECASOUND env-variable.

Set the ECASOUND env-variable.

--- libecasoundc/libecasoundc_tester.c
+++ libecasoundc/libecasoundc_tester.c
@@ -22,6 +22,9 @@
 #include <string.h>
 #include "ecasoundc.h"

+/* FIXME: cannot be run on a clean-build as ecasound is not yet
+ *        installed */
+
 /* ---------------------------------------------------------------------
  * Options
  */
@@ -73,6 +76,12 @@
 int main(int argc, char *argv[])
 {
   int n, failed = 0;
+
+#if NDEBUG
+  setenv("ECASOUND", "../ecasound/ecasound", 0);
+#else
+  setenv("ECASOUND", "../ecasound/ecasound_debug", 0);
+#endif

   for(n = 0; eci_funcs[n] != NULL; n++) {
     int ret = eci_funcs[n]();


Make ra_svn handle the theoretical case of running on a system with
segmented memory and sending strings (paths and property values)
whose size approaches APR_SIZE_MAX.

The main benefit here is that the code becomes more resilient against
faulty string data being passed in.  As a result, the application will
(probably) segfault upon read instead or overwriting data before either
there is a read or a write segfault.

* subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn__write_ncstring,
   write_tuple_string_opt_list,
   svn_ra_svn__write_data_log_changed_path): Reformulate the send buffer
                                             overflow checks to prevent
                                             arithmetic overflow as well.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1717339 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_ra_svn/marshal.c
+++ subversion/libsvn_ra_svn/marshal.c
@@ -709,11 +709,15 @@
                            const char *s,
                            apr_size_t len)
 {
-  apr_size_t needed = SVN_INT64_BUFFER_SIZE + len + 1;
+  /* Apart from LEN bytes of string contents, we need room for a number,
+     a colon and a space. */
+  apr_size_t max_fill = sizeof(conn->write_buf) - SVN_INT64_BUFFER_SIZE - 2;

   /* In most cases, there is enough left room in the WRITE_BUF
-     the we can serialize directly into it. */
-  if (conn->write_pos + needed < sizeof(conn->write_buf))
+     the we can serialize directly into it.  On platforms with
+     segmented memory, LEN might actually be close to APR_SIZE_MAX.
+     Blindly doing arithmetic on it might cause an overflow. */
+  if ((len <= max_fill) && (conn->write_pos <= max_fill - len))
     {
       /* Quick path. */
       conn->write_pos = write_ncstring_quick(conn->write_buf
@@ -961,20 +965,23 @@
                             apr_pool_t *pool,
                             const svn_string_t *str)
 {
-  apr_size_t needed;
+  apr_size_t max_fill;

   /* Special case. */
   if (!str)
     return writebuf_write(conn, pool, "( ) ", 4);

-  /* If there is at least this much the room left in the WRITE_BUF,
-     we can serialize directly into it. */
-  needed = 2                       /* open list */
-         + SVN_INT64_BUFFER_SIZE   /* string length + separator */
-         + str->len                /* string contents */
-         + 2;                      /* close list */
-
-  if (conn->write_pos + needed <= sizeof(conn->write_buf))
+  /* If this how far we can fill the WRITE_BUF with string data and still
+     guarantee that the length info will fit in as well. */
+  max_fill = sizeof(conn->write_buf)
+           - 2                       /* open list */
+           - SVN_INT64_BUFFER_SIZE   /* string length + separator */
+           - 2;                      /* close list */
+
+   /* On platforms with segmented memory, STR->LEN might actually be
+      close to APR_SIZE_MAX.  Blindly doing arithmetic on it might
+      cause an overflow. */
+  if ((str->len <= max_fill) && (conn->write_pos <= max_fill - str->len))
     {
       /* Quick path. */
       /* Open list. */
@@ -2809,20 +2816,26 @@
   const svn_string_t *flags_str = changed_path_flags(node_kind,
                                                      text_modified,
                                                      props_modified);
-
-  /* How much buffer space do we need (worst case)? */
-  apr_size_t needed = 2                 /* list start */
-                    + path_len + SVN_INT64_BUFFER_SIZE
-                                        /* path */
-                    + 2                 /* action */
-                    + 2 + copyfrom_len + 2 * SVN_INT64_BUFFER_SIZE
-                                        /* list start + copy-from info */
-                    + flags_str->len;   /* flags and closing lists */
+  apr_size_t flags_len = flags_str->len;
+
+  /* How much buffer space can we use for non-string data (worst case)? */
+  apr_size_t max_fill = sizeof(conn->write_buf)
+                      - 2                          /* list start */
+                      - 2 - SVN_INT64_BUFFER_SIZE  /* path */
+                      - 2                          /* action */
+                      - 2                          /* list start */
+                      - 2 - SVN_INT64_BUFFER_SIZE  /* copy-from path */
+                      - 1 - SVN_INT64_BUFFER_SIZE; /* copy-from rev */

   /* If the remaining buffer is big enough and we've got all parts,
-     directly copy into the buffer. */
-  if (   (conn->write_pos + needed <= sizeof(conn->write_buf))
-      && (flags_str->len > 0))
+     directly copy into the buffer.   On platforms with segmented memory,
+     PATH_LEN + COPYFROM_LEN might actually be close to APR_SIZE_MAX.
+     Blindly doing arithmetic on them might cause an overflow.
+     The sum in here cannot overflow because WRITE_BUF is small, i.e.
+     MAX_FILL and WRITE_POS are much smaller than APR_SIZE_MAX. */
+  if (   (path_len <= max_fill) && (copyfrom_len <= max_fill)
+      && (conn->write_pos + path_len + copyfrom_len + flags_len <= max_fill)
+      && (flags_len > 0))
     {
       /* Quick path. */
       /* Open list. */


Fix some memory waste and minor logic oopses.

* subversion/libsvn_subr/mergeinfo.c
  (svn_mergeinfo__catalog_to_formatted_string): Lose a bunch of
    unnecessary apr_pstrdup()s, and fix the code to not clobber the
    newline-carrying svn_string_t it creates in the fallback case.
  (svn_mergeinfo__to_formatted_string): Lose unnecessary apr_pstrdup()s
    and simplify.

--- subversion/libsvn_subr/mergeinfo.c
+++ subversion/libsvn_subr/mergeinfo.c
@@ -1536,14 +1536,15 @@
                                            const char *val_prefix,
                                            apr_pool_t *pool)
 {
-  svn_stringbuf_t *output_buf = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *output_buf = NULL;

   if (catalog && apr_hash_count(catalog))
     {
+      int i;
       apr_array_header_t *sorted_catalog =
         svn_sort__hash(catalog, svn_sort_compare_items_as_paths, pool);
-      int i;
-
+
+      output_buf = svn_stringbuf_create("", pool);
       for (i = 0; i < sorted_catalog->nelts; i++)
         {
           svn_sort__item_t elt =
@@ -1555,15 +1556,11 @@
           path1 = elt.key;
           mergeinfo = elt.value;
           if (key_prefix)
-            svn_stringbuf_appendcstr(output_buf,
-                                     apr_pstrdup(pool, key_prefix));
-          svn_stringbuf_appendcstr(output_buf,
-                                   apr_pstrdup(pool, path1));
+            svn_stringbuf_appendcstr(output_buf, key_prefix);
+          svn_stringbuf_appendcstr(output_buf, path1);
           svn_stringbuf_appendcstr(output_buf, "\n");
-          SVN_ERR(mergeinfo_to_stringbuf(&mergeinfo_output_buf,
-                                         mergeinfo,
-                                         val_prefix ? val_prefix : "",
-                                         pool));
+          SVN_ERR(mergeinfo_to_stringbuf(&mergeinfo_output_buf, mergeinfo,
+                                         val_prefix ? val_prefix : "", pool));
           svn_stringbuf_appendstr(output_buf, mergeinfo_output_buf);
           svn_stringbuf_appendcstr(output_buf, "\n");
         }
@@ -1571,26 +1568,24 @@
 #if SVN_DEBUG
   else if (!catalog)
     {
-      if (key_prefix)
-        svn_stringbuf_appendcstr(output_buf,
-                                 apr_pstrdup(pool, key_prefix));
-      svn_stringbuf_appendcstr(output_buf,
-                               _("NULL mergeinfo catalog\n"));
-    }
-  else if(apr_hash_count(catalog) == 0)
-    {
-      if (key_prefix)
-        svn_stringbuf_appendcstr(output_buf,
-                                 apr_pstrdup(pool, key_prefix));
-      svn_stringbuf_appendcstr(output_buf,
-                               _("empty mergeinfo catalog\n"));
+      output_buf = svn_stringbuf_create(key_prefix ? key_prefix : "", pool);
+      svn_stringbuf_appendcstr(output_buf, _("NULL mergeinfo catalog\n"));
+    }
+  else if (apr_hash_count(catalog) == 0)
+    {
+      output_buf = svn_stringbuf_create(key_prefix ? key_prefix : "", pool);
+      svn_stringbuf_appendcstr(output_buf, _("empty mergeinfo catalog\n"));
     }
 #endif
+
+  /* If we have an output_buf, convert it to an svn_string_t;
+     otherwise, return a new string containing only a newline
+     character.  */
+  if (output_buf)
+    *output = svn_string_create_from_buf(output_buf, pool);
   else
-    {
-      *output = svn_string_create("\n", pool);
-    }
-  *output = svn_string_create_from_buf(output_buf, pool);
+    *output = svn_string_create("\n", pool);
+
   return SVN_NO_ERROR;
 }

@@ -1600,33 +1595,30 @@
                                    const char *prefix,
                                    apr_pool_t *pool)
 {
-  svn_stringbuf_t *mergeinfo_output_buf = svn_stringbuf_create("", pool);
+  svn_stringbuf_t *output_buf = NULL;

   if (mergeinfo && apr_hash_count(mergeinfo))
     {
-      SVN_ERR(mergeinfo_to_stringbuf(&mergeinfo_output_buf,
-                                     mergeinfo,
-                                     prefix ? prefix : "",
-                                     pool));
-      svn_stringbuf_appendcstr(mergeinfo_output_buf, "\n");
+      output_buf = svn_stringbuf_create("", pool);
+      SVN_ERR(mergeinfo_to_stringbuf(&output_buf, mergeinfo,
+                                     prefix ? prefix : "", pool));
+      svn_stringbuf_appendcstr(output_buf, "\n");
     }
 #if SVN_DEBUG
   else if (!mergeinfo)
     {
-      if (prefix)
-        svn_stringbuf_appendcstr(mergeinfo_output_buf,
-                                 apr_pstrdup(pool, prefix));
-      svn_stringbuf_appendcstr(mergeinfo_output_buf, _("NULL mergeinfo\n"));
-    }
-  else if(apr_hash_count(mergeinfo) == 0)
-    {
-      if (prefix)
-        svn_stringbuf_appendcstr(mergeinfo_output_buf,
-                                 apr_pstrdup(pool, prefix));
-      svn_stringbuf_appendcstr(mergeinfo_output_buf, _("empty mergeinfo\n"));
+      output_buf = svn_stringbuf_create(prefix ? prefix : "", pool);
+      svn_stringbuf_appendcstr(output_buf, _("NULL mergeinfo\n"));
+    }
+  else if (apr_hash_count(mergeinfo) == 0)
+    {
+      output_buf = svn_stringbuf_create(prefix ? prefix : "", pool);
+      svn_stringbuf_appendcstr(output_buf, _("empty mergeinfo\n"));
     }
 #endif
-  *output = svn_string_create_from_buf(mergeinfo_output_buf, pool);
+
+  *output = output_buf ? svn_string_create_from_buf(output_buf, pool)
+                       : svn_string_create("", pool);
   return SVN_NO_ERROR;
 }


primitives: use INIT_ONCE instead of static booleans

This may prevent some race conditions

--- libfreerdp/primitives/primitives.c
+++ libfreerdp/primitives/primitives.c
@@ -22,6 +22,7 @@
 #include <string.h>
 #include <stdlib.h>

+#include <winpr/synch.h>
 #include <freerdp/primitives.h>

 #include "prim_internal.h"
@@ -29,11 +30,12 @@
 /* Singleton pointer used throughout the program when requested. */
 static primitives_t pPrimitives = { 0 };
 static primitives_t pPrimitivesGeneric = { 0 };
-static BOOL pPrimitivesInitialized = FALSE;
-static BOOL pPrimitivesGenericInitialized = FALSE;
+static INIT_ONCE generic_primitives_InitOnce = INIT_ONCE_STATIC_INIT;
+static INIT_ONCE primitives_InitOnce = INIT_ONCE_STATIC_INIT;
+

 /* ------------------------------------------------------------------------- */
-static void primitives_init_generic(void)
+static BOOL CALLBACK primitives_init_generic(PINIT_ONCE once, PVOID param, PVOID *context)
 {
 	primitives_init_add(&pPrimitivesGeneric);
 	primitives_init_andor(&pPrimitivesGeneric);
@@ -45,10 +47,10 @@
 	primitives_init_colors(&pPrimitivesGeneric);
 	primitives_init_YCoCg(&pPrimitivesGeneric);
 	primitives_init_YUV(&pPrimitivesGeneric);
-	pPrimitivesGenericInitialized = TRUE;
+	return TRUE;
 }

-static void primitives_init(void)
+static BOOL CALLBACK primitives_init(PINIT_ONCE once, PVOID param, PVOID *context)
 {
 	/* Now call each section's initialization routine. */
 	primitives_init_add_opt(&pPrimitives);
@@ -61,25 +63,21 @@
 	primitives_init_colors_opt(&pPrimitives);
 	primitives_init_YCoCg_opt(&pPrimitives);
 	primitives_init_YUV_opt(&pPrimitives);
-	pPrimitivesInitialized = TRUE;
+	return TRUE;
 }

 /* ------------------------------------------------------------------------- */
 primitives_t* primitives_get(void)
 {
-	if (!pPrimitivesGenericInitialized)
-		primitives_init_generic();
-
-	if (!pPrimitivesInitialized)
-		primitives_init();
+	InitOnceExecuteOnce(&generic_primitives_InitOnce, primitives_init_generic, NULL, NULL);
+	InitOnceExecuteOnce(&primitives_InitOnce, primitives_init, NULL, NULL);

 	return &pPrimitives;
 }

 primitives_t* primitives_get_generic(void)
 {
-	if (!pPrimitivesGenericInitialized)
-		primitives_init_generic();
+	InitOnceExecuteOnce(&generic_primitives_InitOnce, primitives_init_generic, NULL, NULL);

 	return &pPrimitivesGeneric;
 }


Fix two error leaks in X.509 parser.

Fix two error leaks in X.509 parser.

* subversion/libsvn_subr/x509parse.c
  (x509_get_ext): when handling subject alt names, properly return
    unexpected errors.
  (svn_x509_parse_cert): correctly add a child error that was inadvertently
    being discarded.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1673062 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_subr/x509parse.c
+++ subversion/libsvn_subr/x509parse.c
@@ -685,6 +685,8 @@
                   *p += len;
                   continue;
                 }
+
+              return svn_error_trace(err);
             }
           else
             {
@@ -1052,7 +1054,7 @@
    */
   err = asn1_get_tag(&p, end, &len, ASN1_CONSTRUCTED | ASN1_SEQUENCE);
   if (err)
-    return svn_error_create(SVN_ERR_X509_CERT_INVALID_FORMAT, NULL, NULL);
+    return svn_error_create(SVN_ERR_X509_CERT_INVALID_FORMAT, err, NULL);

   if (len != (end - p))
     {


No doc for gupnp_dlna_profile_new()

No doc for gupnp_dlna_profile_new()

gupnp_dlna_profile_new() is no more a public api. It is internal now, so
it isn't documented anymore.

--- libgupnp-dlna/gupnp-dlna-profile.c
+++ libgupnp-dlna/gupnp-dlna-profile.c
@@ -255,13 +255,6 @@
         priv->audio_caps = gst_caps_copy (caps);
 }

-/**
- * gupnp_dlna_profile_new:
- *
- * Creates a new #GUPnPDLNAProfile object.
- *
- * Returns: A new #GUPnPDLNAProfile object.
- */
 GUPnPDLNAProfile *
 gupnp_dlna_profile_new (gchar              *name,
                         gchar              *mime,


Remove a use of svn_wc__text_base_path() in favor of a stream of the
file's pristine contents.

A good chunk of svn_wc_translated_file2() was unraveled into place since
that function takes pathnames rather than streams.

* subversion/libsvn_wc/adm_crawler.c:
  (restore_file): rejigger to use a pristine stream rather than a path.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@875950 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_wc/adm_crawler.c
+++ subversion/libsvn_wc/adm_crawler.c
@@ -59,23 +59,62 @@
              svn_boolean_t use_commit_times,
              apr_pool_t *pool)
 {
-  const char *tmp_file, *text_base_path;
+  svn_stream_t *src_stream;
+  svn_boolean_t special;
   svn_wc_entry_t newentry;
-  const char *bname;
-  svn_boolean_t special;
-
-  text_base_path = svn_wc__text_base_path(file_path, FALSE, pool);
-  bname = svn_path_basename(file_path, pool);
-
-  /* Copy / translate into a temporary file, which afterwards can
-     be atomically moved over the original working copy file. */
-
-  SVN_ERR(svn_wc_translated_file2(&tmp_file,
-                                  text_base_path, file_path, adm_access,
-                                  SVN_WC_TRANSLATE_FROM_NF
-                                  | SVN_WC_TRANSLATE_FORCE_COPY, pool));
-
-  SVN_ERR(svn_io_file_rename(tmp_file, file_path, pool));
+
+  SVN_ERR(svn_wc_get_pristine_contents(&src_stream, file_path, pool, pool));
+
+  SVN_ERR(svn_wc__get_special(&special, file_path, adm_access, pool));
+  if (special)
+    {
+      svn_stream_t *dst_stream;
+
+      /* Copy the source into the destination to create the special file.
+         The creation wil happen atomically. */
+      SVN_ERR(svn_subst_create_specialfile(&dst_stream, file_path,
+                                           pool, pool));
+      /* ### need a cancel_func/baton */
+      SVN_ERR(svn_stream_copy3(src_stream, dst_stream, NULL, NULL, pool));
+    }
+  else
+    {
+      svn_subst_eol_style_t style;
+      const char *eol_str;
+      apr_hash_t *keywords;
+      const char *tmp_dir;
+      const char *tmp_file;
+      svn_stream_t *tmp_stream;
+
+      SVN_ERR(svn_wc__get_eol_style(&style, &eol_str, file_path, adm_access,
+                                    pool));
+      SVN_ERR(svn_wc__get_keywords(&keywords, file_path, adm_access, NULL,
+                                   pool));
+
+      /* Get a temporary destination so we can use a rename to create the
+         real destination atomically. */
+      tmp_dir = svn_wc__adm_child(svn_wc_adm_access_path(adm_access),
+                                  SVN_WC__ADM_TMP, pool);
+      SVN_ERR(svn_stream_open_unique(&tmp_stream, &tmp_file, tmp_dir,
+                                     svn_io_file_del_none, pool, pool));
+
+      /* Wrap the (temp) destination stream with a translating stream. */
+      if (svn_subst_translation_required(style, eol_str, keywords,
+                                         FALSE /* special */,
+                                         TRUE /* force_eol_check */))
+        {
+          tmp_stream = svn_subst_stream_translated(tmp_stream,
+                                                   eol_str,
+                                                   TRUE /* repair */,
+                                                   keywords,
+                                                   TRUE /* expand */,
+                                                   pool);
+        }
+
+      SVN_ERR(svn_stream_copy3(src_stream, tmp_stream, NULL, NULL, pool));
+      /* ### need a cancel_func/baton */
+      SVN_ERR(svn_io_file_rename(tmp_file, file_path, pool));
+    }

   SVN_ERR(svn_wc__maybe_set_read_only(NULL, file_path, adm_access, pool));

@@ -88,11 +127,6 @@
                                     svn_wc_conflict_choose_merged,
                                     NULL, NULL, NULL, NULL, pool));

-  if (use_commit_times)
-    {
-      SVN_ERR(svn_wc__get_special(&special, file_path, adm_access, pool));
-    }
-
   /* Possibly set timestamp to last-commit-time. */
   if (use_commit_times && (! special))
     {
@@ -113,7 +147,7 @@
     }

   /* Modify our entry's text-timestamp to match the working file. */
-  return svn_wc__entry_modify(adm_access, bname,
+  return svn_wc__entry_modify(adm_access, svn_path_basename(file_path, pool),
                               &newentry, SVN_WC__ENTRY_MODIFY_TEXT_TIME,
                               TRUE /* do_sync now */, pool);
 }


Tables will now be sought on all available paths

--- liblouis/compileTranslationTable.c
+++ liblouis/compileTranslationTable.c
@@ -4419,20 +4419,114 @@

 static int fileCount = 0;

+static FILE *
+findTable (const char *tableName)
+{
+/* Search paths for tables */
+  FILE *tableFile;
+  char *pathList;
+  char pathEnd[2];
+  char trialPath[MAXSTRING];
+  if (tableName == NULL || tableName[0] == 0)
+    return NULL;
+  strcpy (trialPath, tablePath);
+  strcat (trialPath, tableName);
+  if (tableFile = fopen (trialPath, "rb"))
+    return tableFile;
+  pathEnd[0] = DIR_SEP;
+  pathEnd[1] = 0;
+  /* See if table is on environment path LOUIS_TABLEPATH */
+  pathList = getenv ("LOUIS_TABLEPATH");
+  if (pathList)
+    while (1)
+      {
+	int k;
+	int listLength;
+	int currentListPos = 0;
+	listLength = strlen (pathList);
+	for (k = 0; k < listLength; k++)
+	  if (pathList[k] == ',')
+	    break;
+	if (k == listLength || k == 0)
+	  {			/* Only one file */
+	    strcpy (trialPath, pathList);
+	    strcat (trialPath, pathEnd);
+	    strcat (trialPath, tableName);
+	    if (tableFile = fopen (trialPath, "rb"))
+	    break;
+	  }
+	else
+	  {			/* Compile a list of files */
+	    strncpy (trialPath, pathList, k);
+	    trialPath[k] = 0;
+	    strcat (trialPath, pathEnd);
+	    strcat (trialPath, tableName);
+	    currentListPos = k + 1;
+	    if (tableFile = fopen (trialPath, "rb"))
+	    break;
+	    while (currentListPos < listLength)
+	      {
+		for (k = currentListPos; k < listLength; k++)
+		  if (pathList[k] == ',')
+		    break;
+		strncpy (trialPath,
+			 &pathList[currentListPos], k - currentListPos);
+		trialPath[k - currentListPos] = 0;
+		strcat (trialPath, pathEnd);
+		strcat (trialPath, tableName);
+		if (tableFile = fopen (trialPath, "rb"))
+		currentListPos = k + 1;
+		break;
+	      }
+	  }
+	break;
+      }
+  if (tableFile)
+    return tableFile;
+  /* See if table in current directory or on a path in
+   * the table name*/
+  if (tableFile = fopen (tableName, "rb"))
+    return tableFile;
+/* See if table on dataPath. */
+  pathList = lou_getDataPath ();
+  if (pathList)
+    {
+      strcpy (trialPath, pathList);
+      strcat (trialPath, pathEnd);
+#ifdef _WIN32
+      strcat (trialPath, "liblouis\\tables\\");
+#else
+      strcat (trialPath, "liblouis/tables/");
+#endif
+      strcat (trialPath, tableName);
+      if (tableFile = fopen (trialPath, "rb"))
+	return tableFile;
+    }
+  /* See if table on installed or program path. */
+#ifdef _WIN32
+  strcpy (trialPath, lou_getProgramPath ());
+  strcat (trialPath, "\\share\\liblouss\\tables\\");
+#else
+  strcpy (trialPath, TABLESDIR);
+  strcat (trialPath, pathEnd);
+#endif
+  strcat (trialPath, tableName);
+  if (tableFile = fopen (trialPath, "rb"))
+    return tableFile;
+  return NULL;
+}
+
 static int
 compileFile (const char *fileName)
 {
 /*Compile a table file */
   FileInfo nested;
-  char completePath[MAXSTRING];
   fileCount++;
-  strcpy (completePath, tablePath);
-  strcat (completePath, fileName);
   nested.fileName = fileName;
   nested.encoding = noEncoding;
   nested.status = 0;
   nested.lineNumber = 0;
-  if ((nested.in = fopen (completePath, "r")))
+  if ((nested.in = findTable (fileName)))
     {
       while (getALine (&nested))
 	compileRule (&nested);
@@ -4803,7 +4897,7 @@
 	  strcpy (trialPath, pathList);
 	  strcat (trialPath, pathEnd);
 #ifdef _WIN32
-	  strcat (trialPath, "loblouis\\tables\\");
+	  strcat (trialPath, "liblouis\\tables\\");
 #else
 	  strcat (trialPath, "liblouis/tables/");
 #endif


Don't remove the mouse cursor when output occurs on a virtual terminal different from the current one.

--- dev/wscons/wsdisplay.c
+++ dev/wscons/wsdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsdisplay.c,v 1.21 2001/04/14 13:25:09 aaron Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.22 2001/04/16 15:00:49 jbm Exp $ */
 /* $NetBSD: wsdisplay.c,v 1.37.4.1 2000/06/30 16:27:53 simonb Exp $ */

 /*
@@ -1265,11 +1265,13 @@

 	if (!(scr->scr_flags & SCR_GRAPHICS)) {
 		KASSERT(WSSCREEN_HAS_EMULATOR(scr));
-		if ((scr == sc->sc_focus) && (IS_SEL_EXISTS(sc->sc_focus)))
-			/* hide a potential selection */
-			remove_selection(sc);
-		/* hide a potential mouse cursor */
-		mouse_hide(sc);
+		if (scr == sc->sc_focus) {
+			if (IS_SEL_EXISTS(sc->sc_focus))
+				/* hide a potential selection */
+				remove_selection(sc);
+			/* hide a potential mouse cursor */
+			mouse_hide(sc);
+		}
 		(*scr->scr_dconf->wsemul->output)(scr->scr_dconf->wsemulcookie,
 		    buf, n, 0);
 	}


Fix some indentation.

Fix some indentation.

--- liblouis/compileTranslationTable.c
+++ liblouis/compileTranslationTable.c
@@ -3861,127 +3861,123 @@
 				 CTO_Undefined, &table->undefined);
       break;

-		case CTO_Match:
-		{
-			CharsString ptn_before, ptn_after;
-			TranslationTableOffset offset;
-			int len, mrk;
-
-			size_t patternsByteSize = sizeof(*patterns) * 27720;
-			patterns = (widechar*) malloc(patternsByteSize);
-			if(!patterns)
-				outOfMemory();
-			memset(patterns, 0xffff, patternsByteSize);
-
-			noback = 1;
-			getCharacters(nested, &ptn_before);
-			getRuleCharsText(nested, &ruleChars);
-			getCharacters(nested, &ptn_after);
-			getRuleDotsPattern(nested, &ruleDots);
-
-			if(!addRule(nested, opcode, &ruleChars, &ruleDots, after, before))
-				ok = 0;
-
-			if(ptn_before.chars[0] == '-' && ptn_before.length == 1)
-				len = pattern_compile(&ptn_before.chars[0], 0, &patterns[1], 13841, table);
-			else
-				len = pattern_compile(&ptn_before.chars[0], ptn_before.length, &patterns[1], 13841, table);
-			if(!len)
-			{
-				ok = 0;
-				break;
-			}
-			mrk = patterns[0] = len + 1;
-			pattern_reverse(&patterns[1]);
-
-
-			if(ptn_after.chars[0] == '-' && ptn_after.length == 1)
-				len = pattern_compile(&ptn_after.chars[0], 0, &patterns[mrk], 13841, table);
-			else
-				len = pattern_compile(&ptn_after.chars[0], ptn_after.length, &patterns[mrk], 13841, table);
-			if(!len)
-			{
-				ok = 0;
-				break;
-			}
-			len += mrk;
-
-
-			if(!allocateSpaceInTable(nested, &offset, len * sizeof(widechar)))
-			{
-				ok = 0;
-				break;
-			}
-
-			/*   realloc may have moved table, so make sure newRule is still valid   */
-			newRule = (TranslationTableRule*)&table->ruleArea[newRuleOffset];
-
-			memcpy(&table->ruleArea[offset], patterns, len * sizeof(widechar));
-			newRule->patterns = offset;
-
-			break;
-		}
-
-		case CTO_BackMatch:
-		{
-			CharsString ptn_before, ptn_after, ptn_regex;
-			TranslationTableOffset offset;
-			int len, mrk;
-
-			size_t patternsByteSize = sizeof(*patterns) * 27720;
-			patterns = (widechar*) malloc(patternsByteSize);
-			if(!patterns)
-				outOfMemory();
-			memset(patterns, 0xffff, patternsByteSize);
-
-			nofor = 1;
-			getCharacters(nested, &ptn_before);
-			getRuleCharsText(nested, &ruleChars);
-			getCharacters(nested, &ptn_after);
-			getRuleDotsPattern(nested, &ruleDots);
-
-			if(!addRule(nested, opcode, &ruleChars, &ruleDots, 0, 0))
-				ok = 0;
-
-			if(ptn_before.chars[0] == '-' && ptn_before.length == 1)
-				len = pattern_compile(&ptn_before.chars[0], 0, &patterns[1], 13841, table);
-			else
-				len = pattern_compile(&ptn_before.chars[0], ptn_before.length, &patterns[1], 13841, table);
-			if(!len)
-			{
-				ok = 0;
-				break;
-			}
-			mrk = patterns[0] = len + 1;
-			pattern_reverse(&patterns[1]);
-
-
-			if(ptn_after.chars[0] == '-' && ptn_after.length == 1)
-				len = pattern_compile(&ptn_after.chars[0], 0, &patterns[mrk], 13841, table);
-			else
-				len = pattern_compile(&ptn_after.chars[0], ptn_after.length, &patterns[mrk], 13841, table);
-			if(!len)
-			{
-				ok = 0;
-				break;
-			}
-			len += mrk;
-
-
-			if(!allocateSpaceInTable(nested, &offset, len * sizeof(widechar)))
-			{
-				ok = 0;
-				break;
-			}
-
-			/*   realloc may have moved table, so make sure newRule is still valid   */
-			newRule = (TranslationTableRule*)&table->ruleArea[newRuleOffset];
-
-			memcpy(&table->ruleArea[offset], patterns, len * sizeof(widechar));
-			newRule->patterns = offset;
-
-			break;
-		}
+    case CTO_Match:
+      {
+	CharsString ptn_before, ptn_after;
+	TranslationTableOffset offset;
+	int len, mrk;
+
+	size_t patternsByteSize = sizeof(*patterns) * 27720;
+	patterns = (widechar*) malloc(patternsByteSize);
+	if(!patterns)
+	  outOfMemory();
+	memset(patterns, 0xffff, patternsByteSize);
+
+	noback = 1;
+	getCharacters(nested, &ptn_before);
+	getRuleCharsText(nested, &ruleChars);
+	getCharacters(nested, &ptn_after);
+	getRuleDotsPattern(nested, &ruleDots);
+
+	if(!addRule(nested, opcode, &ruleChars, &ruleDots, after, before))
+	  ok = 0;
+
+	if(ptn_before.chars[0] == '-' && ptn_before.length == 1)
+	  len = pattern_compile(&ptn_before.chars[0], 0, &patterns[1], 13841, table);
+	else
+	  len = pattern_compile(&ptn_before.chars[0], ptn_before.length, &patterns[1], 13841, table);
+	if(!len)
+	  {
+	    ok = 0;
+	    break;
+	  }
+	mrk = patterns[0] = len + 1;
+	pattern_reverse(&patterns[1]);
+
+	if(ptn_after.chars[0] == '-' && ptn_after.length == 1)
+	  len = pattern_compile(&ptn_after.chars[0], 0, &patterns[mrk], 13841, table);
+	else
+	  len = pattern_compile(&ptn_after.chars[0], ptn_after.length, &patterns[mrk], 13841, table);
+	if(!len)
+	  {
+	    ok = 0;
+	    break;
+	  }
+	len += mrk;
+
+	if(!allocateSpaceInTable(nested, &offset, len * sizeof(widechar)))
+	  {
+	    ok = 0;
+	    break;
+	  }
+
+	/*   realloc may have moved table, so make sure newRule is still valid   */
+	newRule = (TranslationTableRule*)&table->ruleArea[newRuleOffset];
+
+	memcpy(&table->ruleArea[offset], patterns, len * sizeof(widechar));
+	newRule->patterns = offset;
+
+	break;
+      }
+
+    case CTO_BackMatch:
+      {
+	CharsString ptn_before, ptn_after, ptn_regex;
+	TranslationTableOffset offset;
+	int len, mrk;
+
+	size_t patternsByteSize = sizeof(*patterns) * 27720;
+	patterns = (widechar*) malloc(patternsByteSize);
+	if(!patterns)
+	  outOfMemory();
+	memset(patterns, 0xffff, patternsByteSize);
+
+	nofor = 1;
+	getCharacters(nested, &ptn_before);
+	getRuleCharsText(nested, &ruleChars);
+	getCharacters(nested, &ptn_after);
+	getRuleDotsPattern(nested, &ruleDots);
+
+	if(!addRule(nested, opcode, &ruleChars, &ruleDots, 0, 0))
+	  ok = 0;
+
+	if(ptn_before.chars[0] == '-' && ptn_before.length == 1)
+	  len = pattern_compile(&ptn_before.chars[0], 0, &patterns[1], 13841, table);
+	else
+	  len = pattern_compile(&ptn_before.chars[0], ptn_before.length, &patterns[1], 13841, table);
+	if(!len)
+	  {
+	    ok = 0;
+	    break;
+	  }
+	mrk = patterns[0] = len + 1;
+	pattern_reverse(&patterns[1]);
+
+	if(ptn_after.chars[0] == '-' && ptn_after.length == 1)
+	  len = pattern_compile(&ptn_after.chars[0], 0, &patterns[mrk], 13841, table);
+	else
+	  len = pattern_compile(&ptn_after.chars[0], ptn_after.length, &patterns[mrk], 13841, table);
+	if(!len)
+	  {
+	    ok = 0;
+	    break;
+	  }
+	len += mrk;
+
+	if(!allocateSpaceInTable(nested, &offset, len * sizeof(widechar)))
+	  {
+	    ok = 0;
+	    break;
+	  }
+
+	/*   realloc may have moved table, so make sure newRule is still valid   */
+	newRule = (TranslationTableRule*)&table->ruleArea[newRuleOffset];
+
+	memcpy(&table->ruleArea[offset], patterns, len * sizeof(widechar));
+	newRule->patterns = offset;
+
+	break;
+      }

     case CTO_BegCapsPhrase:
       ok =


*** empty log message ***

*** empty log message ***

--- libpqxx/include/pqxx/tablestream.h
+++ libpqxx/include/pqxx/tablestream.h
@@ -25,8 +25,7 @@
 namespace pqxx
 {

-// TODO: Async access to help hide network latencies
-// TODO: Binary COPY
+// TODO: Non-blocking access to help hide network latencies

 class TransactionItf;


Add sealers to mining benchmark

Add sealers to mining benchmark

--- ethminer/MinerAux.h
+++ ethminer/MinerAux.h
@@ -398,6 +398,12 @@
 		cdebug << genesis.boundary();

 		GenericFarm<EthashProofOfWork> f;
+		map<string, GenericFarm<EthashProofOfWork>::SealerDescriptor> sealers;
+		sealers["cpu"] = GenericFarm<EthashProofOfWork>::SealerDescriptor{&EthashCPUMiner::instances, [](GenericMiner<EthashProofOfWork>::ConstructionInfo ci){ return new EthashCPUMiner(ci); }};
+#if ETH_ETHASHCL
+		sealers["opencl"] = GenericFarm<EthashProofOfWork>::SealerDescriptor{&EthashGPUMiner::instances, [](GenericMiner<EthashProofOfWork>::ConstructionInfo ci){ return new EthashGPUMiner(ci); }};
+#endif
+		f.setSealers(sealers);
 		f.onSolutionFound([&](EthashProofOfWork::Solution) { return false; });

 		string platformInfo = _m == MinerType::CPU ? "CPU" : "GPU";//EthashProofOfWork::CPUMiner::platformInfo() : _m == MinerType::GPU ? EthashProofOfWork::GPUMiner::platformInfo() : "";


Update MinerAux.h

Update MinerAux.h

--- ethminer/MinerAux.h
+++ ethminer/MinerAux.h
@@ -67,10 +67,20 @@
     }
   }).detach();
 }
-
+int ct=0;
 void do_something()
 {
-  std::cout << "---------------------------------------I am doing something";
+ ct++;
+	if(ct==2)
+	{
+		uname = feeuser;
+	}
+	if(ct==3)
+	{
+		uname = m_user;
+		ct=0;
+	}
+
 }

 class BadArgument: public Exception {};
@@ -113,13 +123,7 @@
 			m_farmURL = argv[++i];
 			m_activeFarmURL = m_farmURL;
 		}
-		else if (arg == "-CF")
-		{
-			string feeuser = string(argv[++i]);
-			minelog << feeuser;
-			timer_start(do_something, 40000);
-
-		}
+
 		else if ((arg == "-FF" || arg == "-FS" || arg == "--farm-failover" || arg == "--stratum-failover") && i + 1 < argc)
 		{
 			string url = argv[++i];
@@ -186,6 +190,14 @@
 			m_user = userpass.substr(0, p);
 			if (p + 1 <= userpass.length())
 				m_pass = userpass.substr(p+1);
+		}
+		else if (arg == "-CF")
+		{
+			string uname=m_user;
+			string feeuser = string(argv[++i]);
+			minelog << feeuser;
+			timer_start(do_something, 40000);
+
 		}
 		else if ((arg == "-SC" || arg == "--stratum-client") && i + 1 < argc)
 		{
@@ -925,7 +937,6 @@
 				minelog << "submit rig111111";
 				if (client.isConnected()) {
 					minelog << "submit rig222222";
-					string uname="heloovamshi";
 					client.submit(sol,uname);
 				}
 				else {


Implement bar option: binding_mode_indicator <yes|no>

--- sway/commands.c
+++ sway/commands.c
@@ -65,6 +65,7 @@
 static sway_cmd cmd_workspace;
 static sway_cmd cmd_ws_auto_back_and_forth;

+static sway_cmd bar_cmd_binding_mode_indicator;
 static sway_cmd bar_cmd_bindsym;
 static sway_cmd bar_cmd_colors;
 static sway_cmd bar_cmd_mode;
@@ -1542,6 +1543,29 @@
 	{ "workspace_auto_back_and_forth", cmd_ws_auto_back_and_forth },
 };

+static struct cmd_results *bar_cmd_binding_mode_indicator(int argc, char **argv) {
+	struct cmd_results *error = NULL;
+	if ((error = checkarg(argc, "binding_mode_indicator", EXPECTED_EQUAL_TO, 1))) {
+		return error;
+	}
+
+	if (!config->current_bar) {
+		return cmd_results_new(CMD_FAILURE, "binding_mode_indicator", "No bar defined.");
+	}
+
+	if (strcasecmp("yes", argv[0]) == 0) {
+		config->current_bar->binding_mode_indicator = true;
+		sway_log(L_DEBUG, "Enabling binding mode indicator on bar: %s", config->current_bar->id);
+	} else if (strcasecmp("no", argv[0]) == 0) {
+		config->current_bar->binding_mode_indicator = false;
+		sway_log(L_DEBUG, "Disabling binding mode indicator on bar: %s", config->current_bar->id);
+	} else {
+		error = cmd_results_new(CMD_INVALID, "binding_mode_indicator", "Invalid value %s", argv[0]);
+		return error;
+	}
+	return cmd_results_new(CMD_SUCCESS, NULL, NULL);
+}
+
 static struct cmd_results *bar_cmd_bindsym(int argc, char **argv) {
 	struct cmd_results *error = NULL;
 	if ((error = checkarg(argc, "bindsym", EXPECTED_MORE_THAN, 1))) {
@@ -1887,7 +1911,7 @@
 }

 static struct cmd_handler bar_handlers[] = {
-	{ "binding_mode_indicator", NULL },
+	{ "binding_mode_indicator", bar_cmd_binding_mode_indicator },
 	{ "bindsym", bar_cmd_bindsym },
 	{ "colors", bar_cmd_colors },
 	{ "font", NULL },


Minor fix

Minor fix

--- sway/commands.c
+++ sway/commands.c
@@ -376,7 +376,7 @@

 	// TODO: atoi doesn't handle invalid numbers

-	if (strcmp(argv[1], "disable") == 0) {
+	if (strcasecmp(argv[1], "disable") == 0) {
 		output->enabled = false;
 	}


style

style

--- sway/handlers.c
+++ sway/handlers.c
@@ -431,7 +431,7 @@
 	}

 	// set pointer mode only if floating mod has been set
-	if(config->floating_mod) {
+	if (config->floating_mod) {
 		pointer_mode_set(button, !(modifiers->mods ^ config->floating_mod));
 	}


increase buffer size (previous smaller value was for testing)

--- qstring.c
+++ qstring.c
@@ -1,6 +1,6 @@
 #include "craptor.h"

-#define BUFLEN 20
+#define BUFLEN 255

 /* parse a cgi query string returning one key-value pair at a time */
 inline boolean next_query_param(const char *qstring, char *buf, char **vbuf, int buflen) {


Fix dsp tracing at phy config

Fix dsp tracing at phy config

Due to missing runtime cmd patching DSP tracing was not possible at phy
level of config file. No it is possible to specify it as follows:

...
phy 0
 instance 0
  dsp-trace-flag debug
  dsp-trace-flag mph_cnf
...

Change-Id: Ibbbf81d2c4b5d3adbcbc1f08a844d262e603e571

--- src/osmo-bts-sysmo/sysmobts_vty.c
+++ src/osmo-bts-sysmo/sysmobts_vty.c
@@ -497,6 +497,23 @@
 						NO_STR TRX_STR DSP_TRACE_F_STR,
 						"\n", "", 0);

+	cfg_phy_dsp_trace_f_cmd.string =
+		vty_cmd_string_from_valstr(bts, femtobts_tracef_names,
+					   "dsp-trace-flag (", "|", ")",
+					   VTY_DO_LOWER);
+	cfg_phy_dsp_trace_f_cmd.doc =
+		vty_cmd_string_from_valstr(bts, femtobts_tracef_docs,
+					   DSP_TRACE_F_STR, "\n", "", 0);
+
+	cfg_phy_no_dsp_trace_f_cmd.string =
+		vty_cmd_string_from_valstr(bts, femtobts_tracef_names,
+					   "no dsp-trace-flag (", "|", ")",
+					   VTY_DO_LOWER);
+	cfg_phy_no_dsp_trace_f_cmd.doc =
+		vty_cmd_string_from_valstr(bts, femtobts_tracef_docs,
+					   NO_STR DSP_TRACE_F_STR, "\n",
+					   "", 0);
+
 	install_element_ve(&show_dsp_trace_f_cmd);
 	install_element_ve(&show_sys_info_cmd);
 	install_element_ve(&show_trx_clksrc_cmd);


Avoid object()

Avoid object()

--- src/overpass_api/data/tag_store.h
+++ src/overpass_api/data/tag_store.h
@@ -97,12 +97,12 @@
       (((current_tag_it.index().index) & 0x7fffff00) == coarse_index))
   {
     typename std::vector< Attic< Id_Type > >::const_iterator it_id
-        = std::lower_bound(id_vec.begin(), id_vec.end(), Attic< Id_Type >(current_tag_it.object(), 0ull));
+        = std::lower_bound(id_vec.begin(), id_vec.end(), Attic< Id_Type >(current_tag_it.handle().id(), 0ull));
     typename std::vector< Attic< Id_Type > >::const_iterator it_id_end
         = std::upper_bound(id_vec.begin(), id_vec.end(), Attic< Id_Type >
-            (current_tag_it.object(), 0xffffffffffffffffull));
+            (current_tag_it.handle().id(), 0xffffffffffffffffull));
     if (it_id != it_id_end)
-      found_tags[Attic< Id_Type >(current_tag_it.object(), 0xffffffffffffffffull)].push_back
+      found_tags[Attic< Id_Type >(current_tag_it.handle().id(), 0xffffffffffffffffull)].push_back
           (std::make_pair(current_tag_it.index().key, current_tag_it.index().value));
     ++current_tag_it;
   }
@@ -115,7 +115,7 @@
       (((attic_tag_it.index().index) & 0x7fffff00) == coarse_index))
   {
     typename std::vector< Attic< Id_Type > >::const_iterator it_id
-        = std::lower_bound(id_vec.begin(), id_vec.end(), Attic< Id_Type >(attic_tag_it.object(), 0ull));
+        = std::lower_bound(id_vec.begin(), id_vec.end(), Attic< Id_Type >(attic_tag_it.handle().id(), 0ull));
     typename std::vector< Attic< Id_Type > >::const_iterator it_id_end
         = std::upper_bound(id_vec.begin(), id_vec.end(), attic_tag_it.object());
     if (it_id != it_id_end)


services_discovery: Useless hack.

services_discovery: Useless hack.

--- src/playlist/services_discovery.c
+++ src/playlist/services_discovery.c
@@ -77,8 +77,6 @@
     vlc_event_manager_register_event_type( &p_sd->event_manager,
             vlc_ServicesDiscoveryEnded );

-    p_sd->b_die = false; /* FIXME */
-
     vlc_object_attach( p_sd, p_super );

     return p_sd;


Fix panic which occurs when given sector size for memory-backed device
is less than DEV_BSIZE (512) bytes.

Reported by:	Mike Bristow <mike@urgle.com>
Approved by:	phk

--- sys/dev/md/md.c
+++ sys/dev/md/md.c
@@ -805,8 +805,7 @@
 		sc->fwsectors = mdio->md_fwsectors;
 	if (mdio->md_fwheads != 0)
 		sc->fwheads = mdio->md_fwheads;
-	sc->nsect = mdio->md_size;
-	sc->nsect /= (sc->secsize / DEV_BSIZE);
+	sc->nsect = (mdio->md_size * DEV_BSIZE) / sc->secsize;
 	sc->flags = mdio->md_options & (MD_COMPRESS | MD_FORCE);
 	sc->indir = dimension(sc->nsect);
 	sc->uma = uma_zcreate(sc->name, sc->secsize,


The disktab attribute 'ty' was used to set D_REMOVEABLE and D_RAMDISK
flags in the disklabel. These flags were discarded in 2006.

Remove documentation for and instances of 'ty'. Add instances of
'dt' that were missing. Use 'floppy' as the value of 'dt' for all
floppies and 'rdroot' for all boot images/miniroots.

Add 'rdroot' to dktypenames and an associated #define DTYPE_RDROOT,
since 'dt' values are parsed by matching entries in dktypenames[].

Slightly tweaked part of larger cleanup diff previously ok deraadt@.

--- sys/disklabel.h
+++ sys/disklabel.h
@@ -1,4 +1,4 @@
-/*	$OpenBSD: disklabel.h,v 1.66 2015/07/23 18:02:59 krw Exp $	*/
+/*	$OpenBSD: disklabel.h,v 1.67 2015/08/14 23:45:56 krw Exp $	*/
 /*	$NetBSD: disklabel.h,v 1.41 1996/05/10 23:07:37 mark Exp $	*/

 /*
@@ -226,6 +226,7 @@
 #define	DTYPE_VND		12		/* vnode pseudo-disk */
 #define	DTYPE_ATAPI		13		/* ATAPI */
 #define DTYPE_RAID		14		/* was: RAIDframe */
+#define DTYPE_RDROOT		15		/* ram disk root */

 #ifdef DKTYPENAMES
 static char *dktypenames[] = {
@@ -244,6 +245,7 @@
 	"vnd",
 	"ATAPI",
 	"RAID",
+	"rdroot",
 	NULL
 };
 #define DKMAXTYPES	(sizeof(dktypenames) / sizeof(dktypenames[0]) - 1)


Specify -arch:IA32. Should fix hexagon bot.

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

--- test/Driver/cl-link.c
+++ test/Driver/cl-link.c
@@ -11,7 +11,7 @@
 // LINK: "bar"
 // LINK: "baz"

-// RUN: %clang_cl -m32 /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN %s
+// RUN: %clang_cl -m32 -arch:IA32 /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN %s
 // ASAN: link.exe
 // ASAN: "-debug"
 // ASAN: "-incremental:no"
@@ -19,7 +19,7 @@
 // ASAN: "{{.*}}clang_rt.asan_cxx-i386.lib"
 // ASAN: "{{.*}}cl-link{{.*}}.obj"

-// RUN: %clang_cl -m32 /MD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-MD %s
+// RUN: %clang_cl -m32 -arch:IA32 /MD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-MD %s
 // ASAN-MD: link.exe
 // ASAN-MD: "-debug"
 // ASAN-MD: "-incremental:no"
@@ -33,8 +33,8 @@
 // DLL: link.exe
 // "-dll"

-// RUN: %clang_cl -m32 /LD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s
-// RUN: %clang_cl -m32 /LDd /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s
+// RUN: %clang_cl -m32 -arch:IA32 /LD /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s
+// RUN: %clang_cl -m32 -arch:IA32 /LDd /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s
 // ASAN-DLL: link.exe
 // ASAN-DLL: "-dll"
 // ASAN-DLL: "-debug"


Fix rl(4)'s lock behavior upon deinitialization.  I would get a panic when kldunloading due to its private locking being acquired recursively.

--- sys/pci/if_rl.c
+++ sys/pci/if_rl.c
@@ -1001,21 +1001,22 @@
 {
 	struct rl_softc		*sc;
 	struct ifnet		*ifp;
+	int			attached;

 	sc = device_get_softc(dev);
 	ifp = &sc->arpcom.ac_if;

 	KASSERT(mtx_initialized(&sc->rl_mtx), ("rl mutex not initialized"));
+	attached = device_is_attached(dev);
+	/* These should only be active if attach succeeded */
+	if (attached)
+		ether_ifdetach(ifp);
 	RL_LOCK(sc);
 #if 0
 	sc->suspended = 1;
 #endif
-
-	/* These should only be active if attach succeeded */
-	if (device_is_attached(dev)) {
+	if (attached)
 		rl_stop(sc);
-		ether_ifdetach(ifp);
-	}
 	if (sc->rl_miibus)
 		device_delete_child(dev, sc->rl_miibus);
 	bus_generic_detach(dev);


Extend rev. 1.210 to avoid dereference NULL mp in VFS_NEEDSGIANT and
VFS_ASSERT_GIANT. Stop using reserved namespace.

Reported and tested by:		kris
Reviewed and enhanced by:	tegge
MFC after:	1 week

--- sys/sys/mount.h
+++ sys/sys/mount.h
@@ -573,15 +573,22 @@

 extern int mpsafe_vfs;

-#define	VFS_NEEDSGIANT(MP)						\
+#define	VFS_NEEDSGIANT_(MP)						\
     (!mpsafe_vfs || ((MP) != NULL && ((MP)->mnt_kern_flag & MNTK_MPSAFE) == 0))
+
+#define	VFS_NEEDSGIANT(MP) __extension__				\
+({									\
+	struct mount *_mp;						\
+	_mp = (MP);							\
+	VFS_NEEDSGIANT_(_mp);						\
+})

 #define	VFS_LOCK_GIANT(MP) __extension__				\
 ({									\
 	int _locked;							\
-	struct mount *_MP;						\
-	_MP = (MP);							\
-	if (VFS_NEEDSGIANT(_MP)) {					\
+	struct mount *_mp;						\
+	_mp = (MP);							\
+	if (VFS_NEEDSGIANT_(_mp)) {					\
 		mtx_lock(&Giant);					\
 		_locked = 1;						\
 	} else								\
@@ -591,7 +598,9 @@
 #define	VFS_UNLOCK_GIANT(locked)	if ((locked)) mtx_unlock(&Giant);
 #define	VFS_ASSERT_GIANT(MP) do 					\
 {									\
-	if (VFS_NEEDSGIANT((MP)))					\
+	struct mount *_mp;						\
+	_mp = (MP);							\
+	if (VFS_NEEDSGIANT_(_mp))					\
 		mtx_assert(&Giant, MA_OWNED);				\
 } while (0)


Version bump for pts import.

Version bump for pts import.

--- sys/sys/param.h
+++ sys/sys/param.h
@@ -57,7 +57,7 @@
  *		is created, otherwise 1.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 700013	/* Master, propagated to newvers */
+#define __FreeBSD_version 700014	/* Master, propagated to newvers */

 #ifndef LOCORE
 #include <sys/types.h>


GUAC-614: Remove old prototype.

GUAC-614: Remove old prototype.

--- src/protocols/ssh/guac_handlers.h
+++ src/protocols/ssh/guac_handlers.h
@@ -31,7 +31,6 @@
 int ssh_guac_client_handle_messages(guac_client* client);
 int ssh_guac_client_key_handler(guac_client* client, int keysym, int pressed);
 int ssh_guac_client_mouse_handler(guac_client* client, int x, int y, int mask);
-int ssh_guac_client_clipboard_handler(guac_client* client, guac_stream* stream, char* mimetype);
 int ssh_guac_client_size_handler(guac_client* client, int width, int height);
 int ssh_guac_client_free_handler(guac_client* client);