Mark appropriate TUnixSystem methods as override

--- core/unix/inc/TUnixSystem.h
+++ core/unix/inc/TUnixSystem.h
@@ -34,8 +34,8 @@
    void FillWithCwd(char *cwd) const;

 protected:
-   const char    *FindDynamicLibrary(TString &lib, Bool_t quiet = kFALSE);
-   const char    *GetLinkedLibraries();
+   const char    *FindDynamicLibrary(TString &lib, Bool_t quiet = kFALSE) override;
+   const char    *GetLinkedLibraries() override;

    // static functions providing semi-low level interface to raw Unix
    static int          UnixMakedir(const char *name);
@@ -74,146 +74,146 @@
    virtual ~TUnixSystem();

    //---- Misc -------------------------------------------------
-   Bool_t            Init();
-   void              SetProgname(const char *name);
-   void              SetDisplay();
-   const char       *GetError();
-   const char       *HostName();
+   Bool_t            Init() override;
+   void              SetProgname(const char *name) override;
+   void              SetDisplay() override;
+   const char       *GetError() override;
+   const char       *HostName() override;

    //---- EventLoop --------------------------------------------
-   void              DispatchOneEvent(Bool_t pendingOnly = kFALSE);
-   Int_t             Select(TList *active, Long_t timeout);
-   Int_t             Select(TFileHandler *fh, Long_t timeout);
+   void              DispatchOneEvent(Bool_t pendingOnly = kFALSE) override;
+   Int_t             Select(TList *active, Long_t timeout) override;
+   Int_t             Select(TFileHandler *fh, Long_t timeout) override;

    //---- Handling of system events ----------------------------
    void              CheckChilds();
    Bool_t            CheckSignals(Bool_t sync);
    Bool_t            CheckDescriptors();
    void              DispatchSignals(ESignals sig);
-   void              AddSignalHandler(TSignalHandler *sh);
-   TSignalHandler   *RemoveSignalHandler(TSignalHandler *sh);
-   void              ResetSignal(ESignals sig, Bool_t reset = kTRUE);
-   void              ResetSignals();
-   void              IgnoreSignal(ESignals sig, Bool_t ignore = kTRUE);
-   void              SigAlarmInterruptsSyscalls(Bool_t set);
-   void              AddFileHandler(TFileHandler *fh);
-   TFileHandler     *RemoveFileHandler(TFileHandler *fh);
+   void              AddSignalHandler(TSignalHandler *sh) override;
+   TSignalHandler   *RemoveSignalHandler(TSignalHandler *sh) override;
+   void              ResetSignal(ESignals sig, Bool_t reset = kTRUE) override;
+   void              ResetSignals() override;
+   void              IgnoreSignal(ESignals sig, Bool_t ignore = kTRUE) override;
+   void              SigAlarmInterruptsSyscalls(Bool_t set) override;
+   void              AddFileHandler(TFileHandler *fh) override;
+   TFileHandler     *RemoveFileHandler(TFileHandler *fh) override;

    //---- Floating Point Exceptions Control --------------------
-   Int_t             GetFPEMask();
-   Int_t             SetFPEMask(Int_t mask = kDefaultMask);
+   Int_t             GetFPEMask() override;
+   Int_t             SetFPEMask(Int_t mask = kDefaultMask) override;

    //---- Time & Date ------------------------------------------
-   TTime             Now();
-   void              AddTimer(TTimer *ti);
-   TTimer           *RemoveTimer(TTimer *ti);
-   void              ResetTimer(TTimer *ti);
+   TTime             Now() override;
+   void              AddTimer(TTimer *ti) override;
+   TTimer           *RemoveTimer(TTimer *ti) override;
+   void              ResetTimer(TTimer *ti) override;
    Bool_t            DispatchTimers(Bool_t mode);
-   void              Sleep(UInt_t milliSec);
+   void              Sleep(UInt_t milliSec) override;

    //---- Processes --------------------------------------------
-   Int_t             Exec(const char *shellcmd);
-   FILE             *OpenPipe(const char *shellcmd, const char *mode);
-   int               ClosePipe(FILE *pipe);
-   void              Exit(int code, Bool_t mode = kTRUE);
-   void              Abort(int code = 0);
-   int               GetPid();
-   void              StackTrace();
+   Int_t             Exec(const char *shellcmd) override;
+   FILE             *OpenPipe(const char *shellcmd, const char *mode) override;
+   int               ClosePipe(FILE *pipe) override;
+   void              Exit(int code, Bool_t mode = kTRUE) override;
+   void              Abort(int code = 0) override;
+   int               GetPid() override;
+   void              StackTrace() override;

    //---- Directories ------------------------------------------
-   int               MakeDirectory(const char *name);
-   void             *OpenDirectory(const char *name);
-   void              FreeDirectory(void *dirp);
-   const char       *GetDirEntry(void *dirp);
-   Bool_t            ChangeDirectory(const char *path);
-   const char       *WorkingDirectory();
-   std::string       GetWorkingDirectory() const;
-   const char       *HomeDirectory(const char *userName = 0);
-   std::string       GetHomeDirectory(const char *userName = 0) const;
-   const char       *TempDirectory() const;
-   FILE             *TempFileName(TString &base, const char *dir = 0);
+   int               MakeDirectory(const char *name) override;
+   void             *OpenDirectory(const char *name) override;
+   void              FreeDirectory(void *dirp) override;
+   const char       *GetDirEntry(void *dirp) override;
+   Bool_t            ChangeDirectory(const char *path) override;
+   const char       *WorkingDirectory() override;
+   std::string       GetWorkingDirectory() const override;
+   const char       *HomeDirectory(const char *userName = 0) override;
+   std::string       GetHomeDirectory(const char *userName = 0) const override;
+   const char       *TempDirectory() const override;
+   FILE             *TempFileName(TString &base, const char *dir = 0) override;

    //---- Paths & Files ----------------------------------------
-   const char       *PrependPathName(const char *dir, TString& name);
-   Bool_t            ExpandPathName(TString &patbuf);
-   char             *ExpandPathName(const char *path);
-   Bool_t            AccessPathName(const char *path, EAccessMode mode = kFileExists);
-   Bool_t            IsPathLocal(const char *path);
-   int               CopyFile(const char *from, const char *to, Bool_t overwrite = kFALSE);
-   int               Rename(const char *from, const char *to);
-   int               Link(const char *from, const char *to);
-   int               Symlink(const char *from, const char *to);
-   int               Unlink(const char *name);
-   int               GetPathInfo(const char *path, FileStat_t &buf);
+   const char       *PrependPathName(const char *dir, TString& name) override;
+   Bool_t            ExpandPathName(TString &patbuf) override;
+   char             *ExpandPathName(const char *path) override;
+   Bool_t            AccessPathName(const char *path, EAccessMode mode = kFileExists) override;
+   Bool_t            IsPathLocal(const char *path) override;
+   int               CopyFile(const char *from, const char *to, Bool_t overwrite = kFALSE) override;
+   int               Rename(const char *from, const char *to) override;
+   int               Link(const char *from, const char *to) override;
+   int               Symlink(const char *from, const char *to) override;
+   int               Unlink(const char *name) override;
+   int               GetPathInfo(const char *path, FileStat_t &buf) override;
    int               GetFsInfo(const char *path, Long_t *id, Long_t *bsize,
-                               Long_t *blocks, Long_t *bfree);
-   int               Chmod(const char *file, UInt_t mode);
-   int               Umask(Int_t mask);
-   int               Utime(const char *file, Long_t modtime, Long_t actime);
-   const char       *FindFile(const char *search, TString& file, EAccessMode mode = kFileExists);
+                               Long_t *blocks, Long_t *bfree) override;
+   int               Chmod(const char *file, UInt_t mode) override;
+   int               Umask(Int_t mask) override;
+   int               Utime(const char *file, Long_t modtime, Long_t actime) override;
+   const char       *FindFile(const char *search, TString& file, EAccessMode mode = kFileExists) override;

    //---- Users & Groups ---------------------------------------
-   Int_t             GetUid(const char *user = 0);
-   Int_t             GetGid(const char *group = 0);
-   Int_t             GetEffectiveUid();
-   Int_t             GetEffectiveGid();
-   UserGroup_t      *GetUserInfo(Int_t uid);
-   UserGroup_t      *GetUserInfo(const char *user = 0);
-   UserGroup_t      *GetGroupInfo(Int_t gid);
-   UserGroup_t      *GetGroupInfo(const char *group = 0);
+   Int_t             GetUid(const char *user = 0) override;
+   Int_t             GetGid(const char *group = 0) override;
+   Int_t             GetEffectiveUid() override;
+   Int_t             GetEffectiveGid() override;
+   UserGroup_t      *GetUserInfo(Int_t uid) override;
+   UserGroup_t      *GetUserInfo(const char *user = 0) override;
+   UserGroup_t      *GetGroupInfo(Int_t gid) override;
+   UserGroup_t      *GetGroupInfo(const char *group = 0) override;

    //---- Environment Manipulation -----------------------------
-   const char       *Getenv(const char *name);
-   void              Setenv(const char *name, const char *value);
-   void              Unsetenv(const char *name);
+   const char       *Getenv(const char *name) override;
+   void              Setenv(const char *name, const char *value) override;
+   void              Unsetenv(const char *name) override;

    //---- System Logging ---------------------------------------
-   void              Openlog(const char *name, Int_t options, ELogFacility facility);
-   void              Syslog(ELogLevel level, const char *mess);
-   void              Closelog();
+   void              Openlog(const char *name, Int_t options, ELogFacility facility) override;
+   void              Syslog(ELogLevel level, const char *mess) override;
+   void              Closelog() override;

    //---- Standard Output redirection --------------------------
    Int_t             RedirectOutput(const char *name, const char *mode = "a",
-                                    RedirectHandle_t *h = 0);
+                                    RedirectHandle_t *h = 0) override;

    //---- Dynamic Loading --------------------------------------
-   void              AddDynamicPath(const char *lib);
-   const char       *GetDynamicPath();
-   void              SetDynamicPath(const char *lib);
-   Func_t            DynFindSymbol(const char *module, const char *entry);
-   int               Load(const char *module, const char *entry = "", Bool_t system = kFALSE);
-   void              Unload(const char *module);
-   void              ListSymbols(const char *module, const char *re = "");
-   void              ListLibraries(const char *regexp = "");
+   void              AddDynamicPath(const char *lib) override;
+   const char       *GetDynamicPath() override;
+   void              SetDynamicPath(const char *lib) override;
+   Func_t            DynFindSymbol(const char *module, const char *entry) override;
+   int               Load(const char *module, const char *entry = "", Bool_t system = kFALSE) override;
+   void              Unload(const char *module) override;
+   void              ListSymbols(const char *module, const char *re = "") override;
+   void              ListLibraries(const char *regexp = "") override;

    //---- RPC --------------------------------------------------
-   TInetAddress      GetHostByName(const char *server);
-   TInetAddress      GetPeerName(int sock);
-   TInetAddress      GetSockName(int sock);
-   int               GetServiceByName(const char *service);
-   char             *GetServiceByPort(int port);
+   TInetAddress      GetHostByName(const char *server) override;
+   TInetAddress      GetPeerName(int sock) override;
+   TInetAddress      GetSockName(int sock) override;
+   int               GetServiceByName(const char *service) override;
+   char             *GetServiceByPort(int port) override;
    int               ConnectService(const char *server, int port, int tcpwindowsize, const char *protocol = "tcp");
-   int               OpenConnection(const char *server, int port, int tcpwindowsize = -1, const char *protocol = "tcp");
-   int               AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize = -1);
-   int               AnnounceUdpService(int port, int backlog);
-   int               AnnounceUnixService(int port, int backlog);
-   int               AnnounceUnixService(const char *sockpath, int backlog);
-   int               AcceptConnection(int sock);
-   void              CloseConnection(int sock, Bool_t force = kFALSE);
-   int               RecvRaw(int sock, void *buffer, int length, int flag);
-   int               SendRaw(int sock, const void *buffer, int length, int flag);
-   int               RecvBuf(int sock, void *buffer, int length);
-   int               SendBuf(int sock, const void *buffer, int length);
-   int               SetSockOpt(int sock, int option, int val);
-   int               GetSockOpt(int sock, int option, int *val);
+   int               OpenConnection(const char *server, int port, int tcpwindowsize = -1, const char *protocol = "tcp") override;
+   int               AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize = -1) override;
+   int               AnnounceUdpService(int port, int backlog) override;
+   int               AnnounceUnixService(int port, int backlog) override;
+   int               AnnounceUnixService(const char *sockpath, int backlog) override;
+   int               AcceptConnection(int sock) override;
+   void              CloseConnection(int sock, Bool_t force = kFALSE) override;
+   int               RecvRaw(int sock, void *buffer, int length, int flag) override;
+   int               SendRaw(int sock, const void *buffer, int length, int flag) override;
+   int               RecvBuf(int sock, void *buffer, int length) override;
+   int               SendBuf(int sock, const void *buffer, int length) override;
+   int               SetSockOpt(int sock, int option, int val) override;
+   int               GetSockOpt(int sock, int option, int *val) override;

    //---- System, CPU and Memory info
-   int               GetSysInfo(SysInfo_t *info) const;
-   int               GetCpuInfo(CpuInfo_t *info, Int_t sampleTime = 1000) const;
-   int               GetMemInfo(MemInfo_t *info) const;
-   int               GetProcInfo(ProcInfo_t *info) const;
-
-   ClassDef(TUnixSystem,0)  //Interface to Unix OS services
+   int               GetSysInfo(SysInfo_t *info) const override;
+   int               GetCpuInfo(CpuInfo_t *info, Int_t sampleTime = 1000) const override;
+   int               GetMemInfo(MemInfo_t *info) const override;
+   int               GetProcInfo(ProcInfo_t *info) const override;
+
+   ClassDefOverride(TUnixSystem,0)  //Interface to Unix OS services
 };

 #endif


Regenerate.

Regenerate.

2004/08/17 16:10:58+02:00 homeip.net!davidm
Rename: src/ia64/Lget_proc_info-ia64.c -> src/ia64/Lget_proc_info.c

(Logical change 1.241)

error: pathspec 'src/ia64/Lget_proc_info.c' did not match any file(s) known to git

--- src/ia64/Lget_proc_info.c
+++ src/ia64/Lget_proc_info.c
@@ -0,0 +1,5 @@
+#define UNW_LOCAL_ONLY
+#include <libunwind.h>
+#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
+#include "Gget_proc_info.c"
+#endif


Fixed warning: variable ‘L1’ set but not used [-Wunused-but-set-variable]

--- src/imgui/stb_rect_pack.h
+++ src/imgui/stb_rect_pack.h
@@ -494,17 +494,14 @@
    STBRP_ASSERT(cur->next == NULL);

    {
-      stbrp_node *L1 = NULL, *L2 = NULL;
       int count=0;
       cur = context->active_head;
       while (cur) {
-         L1 = cur;
          cur = cur->next;
          ++count;
       }
       cur = context->free_head;
       while (cur) {
-         L2 = cur;
          cur = cur->next;
          ++count;
       }


[INTERNAL] Simplifies function for inverse suffix array construction.

--- core/include/seqan/index/index_shims.h
+++ core/include/seqan/index/index_shims.h
@@ -219,34 +219,6 @@

 //____________________________________________________________________________

-    template <typename TInvSa, typename TSetLimits, typename TParallelTag>
-    struct InvSuffixArrayCreator_
-    {
-        typedef typename Size<TInvSa>::Type TSize;
-
-        TInvSa & data;
-        TSetLimits const & setLimits;
-        String<TSize> posArray;
-
-        InvSuffixArrayCreator_(TInvSa & invSa, TSetLimits const & limits) :
-            data(invSa),
-            setLimits(limits)
-        {
-            // Iinitializing.
-            Splitter<TSize> splitter(0, length(data), TParallelTag());
-            resize(posArray, length(splitter), Exact());
-            for (unsigned i = 0; i < length(splitter); ++i)
-                posArray[i] = splitter[i];
-        }
-
-        template <typename TSaIt>
-        inline void operator()(TSaIt const & itSa)
-        {
-            data[posGlobalize(*itSa, setLimits)] = value(posArray, omp_get_thread_num());
-            ++value(posArray, omp_get_thread_num());
-        }
-    };
-
 /*!
  * @fn createInvSuffixArray
  * @headerfile <seqan/index.h>
@@ -270,9 +242,23 @@
                          TSa const &sa,
                          FromSortedSa<TParallel> const &/*alg*/)
     {
-        typedef typename StringSetLimits<TSa>::Type TLimits;
-
-        iterate(sa, InvSuffixArrayCreator_<TIsa, TLimits, TParallel>(isa, stringSetLimits(sa)), Standard(), TParallel());
+        typedef typename Size<TSa>::Type                     TSize;
+        typedef typename StringSetLimits<TSa>::Type          TLimits;
+        typedef typename Iterator<TSa const, Standard>::Type TIter;
+
+        TLimits const & limits = stringSetLimits(sa);
+        Splitter<TSize> splitter(0, length(isa), TParallel());
+
+        SEQAN_OMP_PRAGMA(parallel for)
+        for (TSize job = 0; job < length(splitter); ++job)
+        {
+            TIter saIt = begin(sa, Standard()) + splitter[job];
+            TIter saItEnd = begin(sa, Standard()) + splitter[job + 1];
+            TSize pos = splitter[job];
+
+            for (; saIt != saItEnd; ++saIt)
+                isa[posGlobalize(*saIt, limits)] = pos++;
+        }
     }

 //____________________________________________________________________________


Introduce SDL_ConvertAudio to support undesired hardware format

--- src/snddrv/quasi88-SDL/sdl.c
+++ src/snddrv/quasi88-SDL/sdl.c
@@ -76,7 +76,11 @@
     int sound_r_pos;
 } sample;

+static SDL_AudioCVT audio_cvt;
+static int audio_cvt_enabled = 0;
+
 /* callback function prototype */
+static void sdl_cvt_sound(void *unused, Uint8 *stream, int len);
 static void sdl_fill_sound(void *unused, Uint8 *stream, int len);

 /* public methods prototypes */
@@ -121,6 +125,7 @@
    const struct sysdep_dsp_create_params *params = flags;
    const char *device = params->device;
    SDL_AudioSpec *audiospec;
+   SDL_AudioSpec obtained_audiospec;

    /* allocate the dsp struct */
    if (!(dsp = calloc(1, sizeof(struct sysdep_dsp_struct))))
@@ -176,7 +181,7 @@
 #endif		/* forQUASI88 */

    /* set callback funcion */
-   audiospec->callback = sdl_fill_sound;
+   audiospec->callback = sdl_cvt_sound;

    audiospec->userdata = NULL;

@@ -191,9 +196,27 @@
    if( ! SDL_WasInit( SDL_INIT_AUDIO ) ) SDL_InitSubSystem( SDL_INIT_AUDIO );
 #endif		/* forQUASI88 */

-   if (SDL_OpenAudio(audiospec, NULL) != 0) {
+   if (SDL_OpenAudio(audiospec, &obtained_audiospec) != 0) {
    		fprintf(stderr, "failed opening audio device\n");
    		return NULL;
+   }
+   if (audiospec->format != obtained_audiospec.format ||
+       audiospec->freq != obtained_audiospec.freq ||
+       audiospec->channels != obtained_audiospec.channels) {
+     fprintf(stderr, "obtained audiospec doesn't match to requested one\n");
+     fprintf(stderr, "convert frequency from %d to %d\n", audiospec->freq,
+	     obtained_audiospec.freq);
+     fprintf(stderr, "convert channels from %d to %d\n", audiospec->channels,
+	     obtained_audiospec.channels);
+     if (SDL_BuildAudioCVT(&audio_cvt, audiospec->format, audiospec->channels,
+			   audiospec->freq, obtained_audiospec.format,
+			   obtained_audiospec.channels,
+			   obtained_audiospec.freq) == 1) {
+       audio_cvt_enabled = 1;
+     } else {
+       audio_cvt_enabled = -1;
+       fprintf(stderr, "failed to build audio converter\n");
+     }
    }
    SDL_PauseAudio(0);

@@ -307,4 +330,17 @@

 }

+static void sdl_cvt_sound(void *unused, Uint8 *stream, int len)
+{
+  if (audio_cvt_enabled == 0)
+    sdl_fill_sound(unused, stream, len);
+  if (audio_cvt_enabled <= 0)
+    return;
+  int src_len = len / audio_cvt.len_mult;
+  sdl_fill_sound(unused, stream, src_len);
+  audio_cvt.buf = stream;
+  audio_cvt.len = src_len;
+  SDL_ConvertAudio(&audio_cvt);
+}
+
 #endif /* ifdef SYSDEP_DSP_SDL */


improved code readability

improved code readability

--- src/soe/WheelFactorization.h
+++ src/soe/WheelFactorization.h
@@ -95,7 +95,7 @@
 ///
 class WheelPrime {
 public:
-  static uint_t maxMultipleIndex() { return (1 << 23) - 1; }
+  enum { MAX_MULTIPLE_INDEX = (1 << 23) - 1 };
   uint_t getSievingPrime() const   { return sievingPrime_; }
   uint_t getMultipleIndex() const  { return indexes_ & ((1 << 23) - 1); }
   uint_t getWheelIndex() const     { return indexes_ >> 23; }
@@ -224,7 +224,7 @@
   WheelFactorization(uint64_t stop, uint_t sieveSize) :
     stop_(stop)
   {
-    const uint_t maxSieveSize = WheelPrime::maxMultipleIndex() + 1;
+    const uint_t maxSieveSize = WheelPrime::MAX_MULTIPLE_INDEX + 1;
     if (sieveSize > maxSieveSize)
       throw primesieve_error("WheelFactorization: sieveSize must be <= " + toString(maxSieveSize));
     if (stop > getMaxStop())


improved code readability

improved code readability

--- src/soe/WheelFactorization.h
+++ src/soe/WheelFactorization.h
@@ -97,7 +97,7 @@
 public:
   enum { MAX_MULTIPLE_INDEX = (1 << 23) - 1 };
   uint_t getSievingPrime() const   { return sievingPrime_; }
-  uint_t getMultipleIndex() const  { return indexes_ & ((1 << 23) - 1); }
+  uint_t getMultipleIndex() const  { return indexes_ & MAX_MULTIPLE_INDEX; }
   uint_t getWheelIndex() const     { return indexes_ >> 23; }

   void setMultipleIndex(uint_t multipleIndex)


Use float instead of double.

Use float instead of double.

SVN revision: 38292


add missing macro for prepend.

add missing macro for prepend.

SVN revision: 46522

--- src/include/eina_strbuf.h
+++ src/include/eina_strbuf.h
@@ -24,6 +24,7 @@
 EAPI Eina_Bool eina_strbuf_insert_char(Eina_Strbuf *buf, char c, size_t pos) EINA_ARG_NONNULL(1);

 #define eina_strbuf_prepend(buf, str) eina_strbuf_insert(buf, str, 0)
+#define eina_strbuf_prepend_escaped(buf, str) eina_strbuf_insert_escaped(buf, str, 0)
 #define eina_strbuf_prepend_n(buf, str, maxlen) eina_strbuf_insert_n(buf, str, maxlen, 0)
 #define eina_strbuf_prepend_length(buf, str, length) eina_strbuf_insert_length(buf, str, length, 0)
 #define eina_strbuf_prepend_char(buf, c) eina_strbuf_insert_char(buf, c, 0)


util/member: Minor changes (fix code style)

--- src/include/util/member.h
+++ src/include/util/member.h
@@ -82,13 +82,13 @@

 /** &foo --> &foo.bar;  @a struct_ptr must not be null */
 #define mcast_in(struct_ptr, member) \
-		member_cast_in(struct_ptr, member)
+	member_cast_in(struct_ptr, member)
 #define member_cast_in(struct_ptr, member) \
 	(&__member_check_notnull(struct_ptr)->member)

 /** &foo --> &foo.bar; NULL --> NULL; */
 #define mcast_in_or_null(struct_ptr, member) \
-		member_cast_in_or_null(struct_ptr, member)
+	member_cast_in_or_null(struct_ptr, member)
 #define member_cast_in_or_null(struct_ptr, member) \
 	({ \
 		typeof(struct_ptr) __member_expr__ = (struct_ptr); \
@@ -100,14 +100,14 @@

 /** &foo.bar --> &foo;  @a member_ptr must not be null */
 #define mcast_out(member_ptr, type, member) \
-		member_cast_out(member_ptr, type, member)
+	member_cast_out(member_ptr, type, member)
 #define member_cast_out(member_ptr, type, member) \
 	((type *) ((char *) __member_check_notnull(member_ptr) \
 			- offsetof(type, member)))

 /** &foo.bar --> &foo; NULL --> NULL; */
 #define mcast_out_or_null(member_ptr, type, member) \
-		member_cast_out_or_null(member_ptr, type, member)
+	member_cast_out_or_null(member_ptr, type, member)
 #define member_cast_out_or_null(member_ptr, type, member) \
 	({                                                                \
 		char *__member_expr__ = (char *) (member_ptr);            \


[GFS2] use an temp variable to reduce a spin_unlock

this is more clear.

Signed-off-by: Denis Cheng <9005d0112f8b7a9031d4722bf4b49b99662ccb21@gmail.com>
Signed-off-by: David Teigland <cf7ba74ea50525d3d47fcd7a6d69b51121a9f873@redhat.com>
Signed-off-by: Steven Whitehouse <9801c4ef11586b619a1c43ac9377eea2aee672dd@redhat.com>

--- fs/gfs2/locking/dlm/plock.c
+++ fs/gfs2/locking/dlm/plock.c
@@ -346,15 +346,16 @@

 static unsigned int dev_poll(struct file *file, poll_table *wait)
 {
+	unsigned int mask = 0;
+
 	poll_wait(file, &send_wq, wait);

 	spin_lock(&ops_lock);
-	if (!list_empty(&send_list)) {
-		spin_unlock(&ops_lock);
-		return POLLIN | POLLRDNORM;
-	}
-	spin_unlock(&ops_lock);
-	return 0;
+	if (!list_empty(&send_list))
+		mask = POLLIN | POLLRDNORM;
+	spin_unlock(&ops_lock);
+
+	return mask;
 }

 static const struct file_operations dev_fops = {


xfs: factor post-write newsize updates

xfs: factor post-write newsize updates

Signed-off-by: Dave Chinner <4d9e23a041ac966f5316a7481300d4ae12e806fe@redhat.com>
Reviewed-by: Alex Elder <f556392d917047d964350b9c68912016c96d5e94@sgi.com>
Reviewed-by: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>

--- fs/xfs/linux-2.6/xfs_file.c
+++ fs/xfs/linux-2.6/xfs_file.c
@@ -345,6 +345,25 @@
 	}
 }

+/*
+ * If this was a direct or synchronous I/O that failed (such as ENOSPC) then
+ * part of the I/O may have been written to disk before the error occured.  In
+ * this case the on-disk file size may have been adjusted beyond the in-memory
+ * file size and now needs to be truncated back.
+ */
+STATIC void
+xfs_aio_write_newsize_update(
+	struct xfs_inode	*ip)
+{
+	if (ip->i_new_size) {
+		xfs_ilock(ip, XFS_ILOCK_EXCL);
+		ip->i_new_size = 0;
+		if (ip->i_d.di_size > ip->i_size)
+			ip->i_d.di_size = ip->i_size;
+		xfs_iunlock(ip, XFS_ILOCK_EXCL);
+	}
+}
+
 STATIC ssize_t
 xfs_file_splice_write(
 	struct pipe_inode_info	*pipe,
@@ -381,14 +400,7 @@
 	ret = generic_file_splice_write(pipe, outfilp, ppos, count, flags);

 	xfs_aio_write_isize_update(inode, ppos, ret);
-
-	if (ip->i_new_size) {
-		xfs_ilock(ip, XFS_ILOCK_EXCL);
-		ip->i_new_size = 0;
-		if (ip->i_d.di_size > ip->i_size)
-			ip->i_d.di_size = ip->i_size;
-		xfs_iunlock(ip, XFS_ILOCK_EXCL);
-	}
+	xfs_aio_write_newsize_update(ip);
 	xfs_iunlock(ip, XFS_IOLOCK_EXCL);
 	return ret;
 }
@@ -781,20 +793,7 @@
 	}

  out_unlock_internal:
-	if (ip->i_new_size) {
-		xfs_ilock(ip, XFS_ILOCK_EXCL);
-		ip->i_new_size = 0;
-		/*
-		 * If this was a direct or synchronous I/O that failed (such
-		 * as ENOSPC) then part of the I/O may have been written to
-		 * disk before the error occured.  In this case the on-disk
-		 * file size may have been adjusted beyond the in-memory file
-		 * size and now needs to be truncated back.
-		 */
-		if (ip->i_d.di_size > ip->i_size)
-			ip->i_d.di_size = ip->i_size;
-		xfs_iunlock(ip, XFS_ILOCK_EXCL);
-	}
+	xfs_aio_write_newsize_update(ip);
 	xfs_iunlock(ip, iolock);
  out_unlock_mutex:
 	if (need_i_mutex)


ignore SELinuxSetFilecon error in SELinuxSetSecurityFileLabel if on nfs

If virDomainAttachDevice() was called with an image that was located
on a root-squashed NFS server, and in a directory that was unreadable
by root on the machine running libvirtd, the attach would fail due to
an attempt to change the selinux label of the image with EACCES (which
isn't covered as an ignore case in SELinuxSetFilecon())

NFS doesn't support SELinux labelling anyway, so we mimic the failure
handling of commit 93a18bbafaf11729d3ca1241e11bee133d77fa77, which
just ignores the errors if the target is on an NFS filesystem (in
SELinuxSetSecurityAllLabel() only, though.)

This can be seen as a follow-on to commit
347d266c51705f4987fa5ce2a0ecb314ed8745ce, which ignores file open
failures of files on NFS that occur directly in
virDomainDiskDefForeachPath() (also necessary), but does not ignore
failures in functions that are called from there (eg
SELinuxSetSecurityFileLabel()).

--- src/security/security_selinux.c
+++ src/security/security_selinux.c
@@ -453,20 +453,26 @@
                             void *opaque)
 {
     const virSecurityLabelDefPtr secdef = opaque;
+    int ret;

     if (depth == 0) {
         if (disk->shared) {
-            return SELinuxSetFilecon(path, default_image_context);
+            ret = SELinuxSetFilecon(path, default_image_context);
         } else if (disk->readonly) {
-            return SELinuxSetFilecon(path, default_content_context);
+            ret = SELinuxSetFilecon(path, default_content_context);
         } else if (secdef->imagelabel) {
-            return SELinuxSetFilecon(path, secdef->imagelabel);
+            ret = SELinuxSetFilecon(path, secdef->imagelabel);
         } else {
-            return 0;
+            ret = 0;
         }
     } else {
-        return SELinuxSetFilecon(path, default_content_context);
-    }
+        ret = SELinuxSetFilecon(path, default_content_context);
+    }
+    if (ret < 0 &&
+        virStorageFileIsSharedFSType(path,
+                                     VIR_STORAGE_FILE_SHFS_NFS) == 1)
+       ret = 0;
+    return ret;
 }

 static int


BC127: tweak comments

BC127: tweak comments

--- src/BLE/bc127.h
+++ src/BLE/bc127.h
@@ -78,7 +78,7 @@
 	int BLE_id_num=-1; //can be 14, 24, 34?

 	//To do a hardware reset of the module, we need to know the pin numbers from the Tympan/Teensy that go to
-	//certain pins on the BC127.  You really should provide those pins through the setPins method.  But, to avoid
+	//certain pins on the BC127.  You really should provide those pins through the setPins() method.  But, to avoid
 	//catastrophe, I also do the hack below to try to use the correct values.  This is cheating.
 	#ifdef KINETISK //this is set by the Arduino IDE when you choose Teensy 3.6...ie Tympan RevD
 		int pin_PIO0 = 56;   //set to -1 to defeat unless set manually. //RevD = 56, RevE = 5   // Pin # for connection to BC127 PIO0 pin


key prop output

key prop output

--- src/operator_optimizer/optimizer_prop_inference.c
+++ src/operator_optimizer/optimizer_prop_inference.c
@@ -199,7 +199,7 @@
     }

-    DEBUG_LOG("operator %s keys are {%s}", root->schema->name, stringListToString(keyList));
+    DEBUG_LOG("operator %s keys are {%s}", root->schema->name, beatify(nodeToString(keyList)));
 }

 void


minor cleanup

minor cleanup

Signed-off-by: Jens Nyberg <7200009990a46d4bb36e24284136c70d739d75fd@gmail.com>

--- packages/wm/wm.c
+++ packages/wm/wm.c
@@ -16,7 +16,7 @@
 static struct box menu;
 static struct box desktop;
 static struct mouse mouse;
-static struct panel field;
+static struct panel title;
 static struct window window[WINDOWS];
 static struct list windows;
 static struct view view[VIEWS];
@@ -72,7 +72,7 @@
     {

         drawdesktop(line);
-        panel_draw(&field, line);
+        panel_draw(&title, line);
         drawviews(&views, line);
         mouse_draw(&mouse, line);
         draw_flush(screen.w * line, bb->x, bb->w);
@@ -219,7 +219,7 @@
 static void unmapwindow(struct view *view)
 {

-    if (!viewactive->windowactive)
+    if (!view->windowactive)
         return;

     sendevent(view->windowactive->source, 1001);
@@ -409,8 +409,8 @@
     setupwindows();
     setupviews();
     activateview(views.head->data);
-    panel_init(&field, "0", 0);
-    box_setsize(&field.size, menu.x + VIEWS * BOXSIZE, menu.y, menu.w - VIEWS * BOXSIZE, BOXSIZE);
+    panel_init(&title, "0", 0);
+    box_setsize(&title.size, menu.x + VIEWS * BOXSIZE, menu.y, menu.w - VIEWS * BOXSIZE, BOXSIZE);
     video_setmode();
     video_setcolormap(colormap);
     draw(&screen);


gkr: Fix keyring description string

gkr: Fix keyring description string

https://bugzilla.gnome.org/show_bug.cgi?id=664407

--- gkr/seahorse-gkr-keyring.c
+++ gkr/seahorse-gkr-keyring.c
@@ -541,7 +541,9 @@
 seahorse_gkr_keyring_get_description (SeahorseGkrKeyring *self)
 {
 	g_return_val_if_fail (SEAHORSE_IS_GKR_KEYRING (self), NULL);
-	return _("To do Keyring");
+	if (g_strcmp0 (self->pv->keyring_name, "login") == 0)
+		return _("A keyring that is automatically unlocked on login");
+	return _("A keyring used to store passwords");
 }

 GnomeKeyringInfo*


ARC: remove stale TRUNCATE64_HAS_4_ARGS

ARC: remove stale TRUNCATE64_HAS_4_ARGS

Not relevant anymore since commit e8cc14e59ed3f66b84e,
"libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT"

Signed-off-by: Vineet Gupta <af669d95a4c0de051445d4cafdbb2c5c4a2838be@synopsys.com>

--- libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
+++ libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
@@ -16,9 +16,6 @@

 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
-
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__

 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__


Added fall-back support for compilers without variadic macros

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

--- libgphoto2_port/libgphoto2_port/gphoto2-port-log.h
+++ libgphoto2_port/libgphoto2_port/gphoto2-port-log.h
@@ -71,9 +71,14 @@
 #ifdef __GNUC__
 #define GP_LOG(level, msg, params...) \
         gp_log(level, GP_MODULE "/" __FILE__, msg, ##params)
-#else
+
+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 #define GP_LOG(level, ...) \
         gp_log(level, GP_MODULE "/" __FILE__, __VA_ARGS__)
+
+#else
+#warning Disabling GP_LOG because variadic macros are not allowed
+#define GP_LOG (void)
 #endif

 /**
@@ -90,9 +95,14 @@
 #ifdef __GNUC__
 #define GP_DEBUG(msg, params...) \
         gp_log(GP_LOG_DEBUG, GP_MODULE "/" __FILE__, msg, ##params)
-#else
+
+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 #define GP_DEBUG(...) \
         gp_log(GP_LOG_DEBUG, GP_MODULE "/" __FILE__, __VA_ARGS__)
+
+#else
+#warning Disabling GP_DEBUG because variadic macros are not allowed
+#define GP_DEBUG (void)
 #endif

 #else /* DISABLE_DEBUGGING */
@@ -103,12 +113,18 @@
 #define gp_log(level, domain, format, args...) /**/
 #define gp_logv(level, domain, format, args) /**/
 #define gp_log_data(domain, data, size) /**/
+
 #ifdef __GNUC__
 #define GP_LOG(level, msg, params...) /**/
 #define GP_DEBUG(msg, params...) /**/
-#else
+
+#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 #define GP_LOG(level, ...) /**/
 #define GP_DEBUG(...) /**/
+
+#else
+#define GP_LOG (void)
+#define GP_DEBUG (void)
 #endif

 #endif /* DISABLE_DEBUGGING */


shell, nib: fix nib neigh delete

shell, nib: fix nib neigh delete

--- sys/shell/commands/sc_gnrc_ipv6_nib.c
+++ sys/shell/commands/sc_gnrc_ipv6_nib.c
@@ -115,7 +115,7 @@
     else if ((argc > 3) && (strcmp(argv[2], "del") == 0)) {
         ipv6_addr_t ipv6_addr;

-        if (ipv6_addr_from_str(&ipv6_addr, argv[4]) == NULL) {
+        if (ipv6_addr_from_str(&ipv6_addr, argv[3]) == NULL) {
             _usage_nib_neigh(argv);
             return 1;
         }


Remove the unused mojito_item_finalize

Remove the unused mojito_item_finalize

--- mojito/mojito-item.c
+++ mojito/mojito-item.c
@@ -50,13 +50,6 @@
 }

 static void
-mojito_item_finalize (GObject *object)
-{
-  /* TODO */
-  G_OBJECT_CLASS (mojito_item_parent_class)->finalize (object);
-}
-
-static void
 mojito_item_class_init (MojitoItemClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -64,7 +57,6 @@
   g_type_class_add_private (klass, sizeof (MojitoItemPrivate));

   object_class->dispose = mojito_item_dispose;
-  object_class->finalize = mojito_item_finalize;
 }

 static void


Load the cache on view start

Load the cache on view start

--- mojito/mojito-view.c
+++ mojito/mojito-view.c
@@ -223,6 +223,28 @@
 }

 static void
+load_cache (MojitoView *view)
+{
+  MojitoViewPrivate *priv = view->priv;
+  GList *l;
+
+  mojito_set_empty (priv->pending_services);
+  mojito_set_empty (priv->pending_items);
+
+  for (l = priv->services; l; l = l->next) {
+    MojitoService *service = l->data;
+    mojito_set_add (priv->pending_services, g_object_ref (service));
+  }
+
+  for (l = priv->services; l; l = l->next) {
+    MojitoService *service = l->data;
+    MojitoSet *set;
+    g_debug ("Loading cache for %s", mojito_service_get_name (service));
+    service_updated (service, mojito_service_load_cache (service), g_object_ref (view));
+  }
+}
+
+static void
 view_start (MojitoViewIface *iface, DBusGMethodInvocation *context)
 {
   MojitoView *view = MOJITO_VIEW (iface);
@@ -232,6 +254,7 @@

   if (priv->timeout_id == 0) {
     priv->timeout_id = g_timeout_add_seconds (REFRESH_TIMEOUT, (GSourceFunc)start_update, iface);
+    load_cache (view);
     start_update (view);
   }
 }


r77: Correct some error messages; consistent style when refering to functions

--- mod_auth_vas.c
+++ mod_auth_vas.c
@@ -377,7 +377,7 @@
     AP_INIT_FLAG(CMD_EXPORTDELEG, ap_set_flag_slot,
 		APR_OFFSETOF(auth_vas_dir_config, export_delegated),
 		ACCESS_CONF | OR_AUTHCFG,
-		"Write exported credentials to a file, setting KRB5CCNAME"),
+		"Write delegated credentials to a file, setting KRB5CCNAME"),
     AP_INIT_TAKE1(CMD_SPN, server_set_string_slot,
 		APR_OFFSETOF(auth_vas_server_config, service_principal),
 		RSRC_CONF,
@@ -551,7 +551,7 @@
      * no available group information. */
     if (rnote->vas_authctx == NULL) {
         LOG_RERROR(log_level, 0, r,
-                   "match_group(): no available auth context for %s",
+                   "match_group: no available auth context for %s",
                    rnote->vas_pname);
         rval = HTTP_FORBIDDEN;
     }
@@ -576,7 +576,7 @@
         case VAS_ERR_NOT_FOUND: /* user not member of group */
             rval = HTTP_FORBIDDEN;
             LOG_RERROR(log_level, 0, r,
-                       "match_group(): %s not member of %s",
+                       "match_group: %s not member of %s",
                        rnote->vas_pname,
                        name);
             break;
@@ -584,14 +584,14 @@
         case VAS_ERR_EXISTS: /* configured group not found */
             rval = HTTP_FORBIDDEN;
             LOG_RERROR(log_level, 0, r,
-                       "match_group(): group %s does not exist",
+                       "match_group: group %s does not exist",
                        name);
             break;

         default: /* other type of error */
             rval = HTTP_INTERNAL_SERVER_ERROR;
             LOG_RERROR(log_level, 0, r,
-                       "match_group(): fatal vas error: %s",
+                       "match_group: fatal vas error: %s",
                        vas_err_get_string(sc->vas_ctx, 1));
             break;
     }
@@ -655,7 +655,7 @@
 		    rnote->vas_pname, 0, &vasuser)) != VAS_ERR_SUCCESS)
     {
         LOG_RERROR(log_level, 0, r,
-	       	"match_container(): fatal vas error for user_init: %d, %s",
+	       	"match_container: fatal vas error for user_init: %d, %s",
 	       	vaserr, vas_err_get_string(sc->vas_ctx, 1));
         rval = HTTP_FORBIDDEN;
         goto done;
@@ -665,7 +665,7 @@
 		    &dn )) != VAS_ERR_SUCCESS )
     {
 	LOG_RERROR(log_level, 0, r,
-	       	"match_container(): fatal vas error for user_get_dn: %d, %s",
+	       	"match_container: fatal vas error for user_get_dn: %d, %s",
 	       	vaserr, vas_err_get_string(sc->vas_ctx, 1));
         rval = HTTP_FORBIDDEN;
         goto done;
@@ -678,7 +678,7 @@
         rval = OK;
     else {
         LOG_RERROR(APLOG_DEBUG, 0, r,
-	       	"match_container(): user dn %s not in container %s",
+	       	"match_container: user dn %s not in container %s",
 	       	dn, container);
         rval = HTTP_FORBIDDEN;
     }
@@ -1341,7 +1341,7 @@
     vaserr = vas_ctx_alloc(&sc->vas_ctx);
     if (vaserr != VAS_ERR_SUCCESS) {
         LOG_ERROR(APLOG_ERR, vaserr, s,
-		"vas_ctx_alloc() failed, err = %d",
+		"vas_ctx_alloc failed, err = %d",
 	       	vaserr);
 	return;
     }
@@ -1369,7 +1369,7 @@
                           &sc->vas_serverid);
     if (vaserr != VAS_ERR_SUCCESS) {
 	LOG_ERROR(APLOG_ERR, 0, s,
-                  "vas_id_alloc() failed on %s, err = %s",
+                  "vas_id_alloc failed on %s, err = %s",
                   sc->service_principal,
                   vas_err_get_string(sc->vas_ctx, 1));
     }
@@ -1382,7 +1382,7 @@
                                           NULL);
     if (vaserr != VAS_ERR_SUCCESS) {
 	LOG_ERROR(APLOG_ERR, 0, s,
-                  "vas_id_establish_cred_keytab() failed, err = %s",
+                  "vas_id_establish_cred_keytab failed, err = %s",
                   vas_err_get_string(sc->vas_ctx, 1));
     } else {
         TRACE_S(s, "successfully authenticated as %s", sc->service_principal);
@@ -1677,13 +1677,13 @@
     /* Pull the credential cache filename out */
     if ((vaserr = vas_krb5_get_context(sc->vas_ctx, &krb5ctx))) {
             LOG_RERROR(APLOG_ERR, 0, r,
-                       "vas_krb5_get_context(): %s",
+                       "vas_krb5_get_context: %s",
                        vas_err_get_string(sc->vas_ctx, 1));
 	    goto finish;
     }

     if ((krb5err = krb5_cc_new_unique(krb5ctx, "FILE", NULL, &ccache))) {
-            LOG_RERROR(APLOG_ERR, 0, r, "krb5_cc_gen_new: %.100s",
+            LOG_RERROR(APLOG_ERR, 0, r, "krb5_cc_new_unique: %.100s",
 		    krb5_get_err_text(krb5ctx, krb5err));
 	    goto finish;
     }
@@ -1737,7 +1737,7 @@
     auth_vas_dir_config *dc;

     dc = (auth_vas_dir_config *)apr_pcalloc(p, sizeof *dc);
-    TRACE_P(p, "auth_vas_create_dir_config()");
+    TRACE_P(p, "auth_vas_create_dir_config");
     if (dc != NULL) {
 	dc->auth_basic = FLAG_UNSET;
 	dc->auth_negotiate = FLAG_UNSET;
@@ -1764,7 +1764,7 @@
     auth_vas_dir_config *merged_dc;

     merged_dc = (auth_vas_dir_config *)apr_pcalloc(p, sizeof *merged_dc);
-    TRACE_P(p, "auth_vas_merge_dir_config()");
+    TRACE_P(p, "auth_vas_merge_dir_config");
     if (merged_dc != NULL) {
 	merged_dc->auth_basic = FLAG_MERGE(base_dc->auth_basic,
 		new_dc->auth_basic);
@@ -1825,7 +1825,7 @@
     apr_pool_cleanup_register(p, sc, auth_vas_server_config_destroy,
 	    apr_pool_cleanup_null);

-    TRACE_S(s, "auth_vas_create_server_config()");
+    TRACE_S(s, "auth_vas_create_server_config");
     return (void *)sc;
 }

@@ -1849,7 +1849,7 @@
     ap_add_version_component(p, "mod_auth_vas/" MODAUTHVAS_VERSION);
 #endif

-    TRACE_P(plog, "auth_vas_post_config() %s %s", MODAUTHVAS_VERSION,
+    TRACE_P(plog, "auth_vas_post_config %s %s", MODAUTHVAS_VERSION,
 	    module_info);

     /* Create a VAS context for each virtual host */


initial commit

initial commit

error: pathspec 'mod_log_slow.c' did not match any file(s) known to git

--- mod_log_slow.c
+++ mod_log_slow.c
@@ -0,0 +1,218 @@
+/*
+ * mod_log_slow.c - Logging Slow Request Module for Apache2.X
+ *
+ * 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.
+ *
+ * Copyright 2008 Yoichi Kawasaki <yokawasa@gmail.com>
+ */
+
+#include "httpd.h"
+#include "http_config.h"
+#include "http_protocol.h"
+#include "http_log.h"      // ap_log_rerror
+#include "ap_config.h"
+#include <sys/time.h>
+#include <sys/resource.h>
+
+#define MAX_LOG_SLOW_REQUEST 1000*30  //30sec
+#define MIN_LOG_SLOW_REQUEST 0
+
+module AP_MODULE_DECLARE_DATA log_slow_module;
+
+typedef struct st_log_slow_usage {
+    struct timeval tv;
+    struct rusage ru;
+} log_slow_usage_t;
+
+typedef struct st_log_slow_conf {
+    int enabled;            /* engine is set to be on(1) or off(0) */
+    long long_request_time;  /* log resource consumption only on slow request in msec */
+} log_slow_conf_t;
+
+
+static log_slow_usage_t usage_start;
+
+static const char *set_enabled(cmd_parms *parms, void *mconfig, int arg)
+{
+    log_slow_conf_t *conf =
+            ap_get_module_config(parms->server->module_config, &log_slow_module);
+    if (conf == NULL){
+        return "LogSlowModule: Failed to retrieve configuration for mod_log_slow";
+    }
+    conf->enabled = arg;
+    return NULL;
+}
+
+static const char *set_log_slow_long_request_time(cmd_parms *parms,
+                                    void *mconfig, const char *arg)
+{
+    long val;
+    val = atol(arg);
+
+    if (val < MIN_LOG_SLOW_REQUEST ) {
+        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+                "LogSlowLongRequestTime of %ld must be greater than %ld",
+                val, MIN_LOG_SLOW_REQUEST);
+        return "LogSlowModule: Wrong param: LogSlowLongRequestTime";
+    }
+    if (val > MAX_LOG_SLOW_REQUEST ) {
+        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+                "LogSlowLongRequestTime of %ld must not exceed %ld",
+                val, MAX_LOG_SLOW_REQUEST);
+        return "LogSlowModule: Wrong param: LogSlowLongRequestTime";
+    }
+
+    log_slow_conf_t *conf =
+            ap_get_module_config(parms->server->module_config, &log_slow_module);
+    if (conf == NULL){
+        return "LogSlowModule: Failed to retrieve configuration for mod_log_slow";
+    }
+    conf->long_request_time = val;
+    return NULL;
+}
+
+void mod_log_slow_set_default(log_slow_conf_t *conf) {
+    if (conf) {
+        conf->enabled = 1;
+        conf->long_request_time = 0;
+    }
+}
+
+static void* log_slow_create_server_config(apr_pool_t* p, server_rec* s)
+{
+    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "log_slow_create_server_config");
+    log_slow_conf_t* conf = apr_pcalloc(p, sizeof(log_slow_conf_t));
+    mod_log_slow_set_default(conf);
+    return conf;
+}
+
+static double log_slow_time_elapsed( struct timeval *before, struct timeval *after )
+{
+    double a,b;
+
+    if ( !before || !after || !timerisset(before) || !timerisset(after) ) {
+        fprintf(stderr, "[%d] NULL time handed to log_slow_time_elapsed",
+            (int)getpid());
+        return 0;
+    }
+    b = before->tv_sec + (double)before->tv_usec*1e-6;
+    a = after->tv_sec + (double)after->tv_usec*1e-6;
+    return (a-b);
+}
+
+static void log_slow_snapshot( log_slow_usage_t *u )
+{
+    if (!u) {
+        fprintf(stderr, "[%d] NULL log_slow_usage_t handed to log_slow_snapshot",
+            (int)getpid());
+        return;
+    }
+    getrusage(RUSAGE_SELF, &(u->ru));
+    gettimeofday(&(u->tv), NULL);
+}
+
+static void log_slow_show_snapshot(request_rec *r,
+                            log_slow_usage_t *u, const char* name )
+{
+    char* n;
+    if (!r ||!u ) {
+        fprintf(stderr,"[%d] NULL request_rec or log_slow_usage_t handed to log_slow_show_snapshot",
+            (int)getpid());
+        return;
+    }
+    if ( name != 0 && *name != 0 ) {
+        n = (char*)name;
+    } else {
+        n  = "SNAPSHOT";
+    }
+    ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r,
+        "%s[%d] - time: %ld.%06ld  utime: %ld.%06ld stime: %ld.%06ld ",
+        n, (int)getpid(),
+        u->tv.tv_sec, u->tv.tv_usec,
+        u->ru.ru_utime.tv_sec, u->ru.ru_utime.tv_usec,
+        u->ru.ru_stime.tv_sec, u->ru.ru_stime.tv_usec);
+}
+
+static int log_slow_post_read_request(request_rec *r)
+{
+    log_slow_conf_t *conf =
+          (log_slow_conf_t *) ap_get_module_config(r->server->module_config, &log_slow_module);
+    if (conf && conf->enabled ) {
+        log_slow_snapshot(&usage_start);
+#ifdef LOGRC_DEBUG
+        log_slow_show_snapshot(r,&usage_start,"START");
+#endif
+    }
+    return OK;
+}
+
+static int log_slow_log_transaction(request_rec *r)
+{
+    log_slow_conf_t *conf;
+    double time_elapsed,utime_elapsed,stime_elapsed;
+    conf = (log_slow_conf_t *) ap_get_module_config(r->server->module_config, &log_slow_module);
+
+    if (conf && conf->enabled ) {
+        log_slow_usage_t usage_end;
+        log_slow_snapshot(&usage_end);
+#ifdef LOGRC_DEBUG
+        log_slow_show_snapshot(r, &usage_end, "END");
+#endif
+        time_elapsed =
+            log_slow_time_elapsed(&(usage_start.tv), &(usage_end.tv));
+
+        if ( conf->long_request_time > (long)(time_elapsed*1000.000) ) {
+            return OK;
+        }
+        utime_elapsed =
+            log_slow_time_elapsed(&(usage_start.ru.ru_utime),&(usage_end.ru.ru_utime)),
+        stime_elapsed =
+            log_slow_time_elapsed(&(usage_start.ru.ru_stime),&(usage_end.ru.ru_stime)),
+
+        ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r,
+            "SLOWLOG[%d] - elapsed: %.6lf "
+            "CPU: %.6lf(usr)/%.6lf(sys) "
+            "- hostname: %s uri: %s",
+            (int)getpid(), time_elapsed, utime_elapsed, stime_elapsed,
+            r->hostname, r->uri
+           );
+    }
+    return OK;
+}
+
+static void log_slow_register_hooks(apr_pool_t *p)
+{
+    ap_hook_post_read_request(log_slow_post_read_request,NULL,NULL,APR_HOOK_MIDDLE);
+    ap_hook_log_transaction(log_slow_log_transaction, NULL, NULL, APR_HOOK_MIDDLE);
+}
+
+static const command_rec log_slow_cmds[] =
+{
+    AP_INIT_FLAG("LogSlowEnabled", set_enabled, NULL, RSRC_CONF,
+            "set \"On\" to enable log_slow, \"Off\" to disable"),
+    AP_INIT_TAKE1("LogSlowLongRequestTime", set_log_slow_long_request_time, NULL, RSRC_CONF,
+            "set the limit of request handling time in millisecond. Default \"0\""),
+    {NULL}
+};
+
+/* Dispatch list for API hooks */
+module AP_MODULE_DECLARE_DATA log_slow_module = {
+    STANDARD20_MODULE_STUFF,
+    NULL,                           /* create per-dir    config structures */
+    NULL,                           /* merge  per-dir    config structures */
+    log_slow_create_server_config,  /* create per-server config structures */
+    NULL,                           /* merge  per-server config structures */
+    log_slow_cmds,                  /* table of config file commands       */
+    log_slow_register_hooks         /* register hooks                      */
+};
+


Add lsmash_bs_is_error().

Add lsmash_bs_is_error().

Signed-off-by: Derek Buitenhuis <aff7d637ede26ea82e5226e01b697996cc52e526@gmail.com>

--- common/bytes.h
+++ common/bytes.h
@@ -155,6 +155,12 @@
     return bs->eof && (offset >= lsmash_bs_get_remaining_buffer_size( bs ));
 }

+/* Check if an error has occurred. */
+static inline int lsmash_bs_is_error( lsmash_bs_t *bs )
+{
+    return bs->error;
+}
+
 /*---- basic I/O ----*/
 int lsmash_fread_wrapper( void *opaque, uint8_t *buf, int size );
 int lsmash_fwrite_wrapper( void *opaque, uint8_t *buf, int size );


sres_config.h: added Open C platform support

darcs-hash:20070430114817-1b897-1c38e774211419832f5da02e39d2b7423f0889a5.gz

--- libsofia-sip-ua/sresolv/sofia-resolv/sres_config.h
+++ libsofia-sip-ua/sresolv/sofia-resolv/sres_config.h
@@ -50,13 +50,24 @@
   #else
     #define SRESPUBFUN __declspec(dllimport)
   #endif
+#elif defined(SYMBIAN) && !defined(LIBSRES_STATIC)
+  /* Open C platform */
+  #undef SRESPUBFUN
+  #if defined(IN_LIBSOFIA_SRES)
+    #define SRESPUBFUN __declspec(dllexport)
+  #else
+    #define SRESPUBFUN __declspec(dllimport)
+  #endif
 #endif

 /* ---------------------------------------------------------------------- */

 /* Types required by Win32/64 */

-#if defined(_WIN32)
+#if defined (SYMBIAN)
+/** Socket descriptor. @since New in @VERSION_1_12_2. */
+typedef int sres_socket_t;
+#elif defined(_WIN32)
 typedef SOCKET sres_socket_t;
 #else
 /** Socket descriptor. @since New in @VERSION_1_12_2. */


Fix compilation error

Fix compilation error

--- libyaul/scu/bus/b/vdp2/vdp2_tvmd_display_res_set.c
+++ libyaul/scu/bus/b/vdp2/vdp2_tvmd_display_res_set.c
@@ -132,7 +132,7 @@
         /* If clock frequency is not set, change to the correct
          * frequency */
         if (sys_clock != clock_freq) {
-                bios_clock_speed_change(clock_freq);
+                bios_clock_speed_chg(clock_freq);
         }

         /* Update state */


atan2の調整

--- compass_accl.c
+++ compass_accl.c
@@ -40,8 +40,8 @@
       psi_radian = atan2(-acclx_knd, accly_knd*sin(phi_radian) + acclz_knd*cos(phi_radian));
       phi_degree = phi_radian*180.0/PI;
       psi_degree = psi_radian*180.0/PI;
-      printf("theta = %lf\n", phi_degree);
-      printf("phi = %lf\n", psi_degree);
+      printf("phi = %lf\n", phi_degree);
+      printf("psi = %lf\n", psi_degree);
       theta_degree = atan2(acclz_knd*sin(phi_radian) - accly_knd*cos(phi_radian), acclx_knd*cos(psi_radian) + accly_knd*sin(psi_radian)*sin(phi_radian) + acclz_knd*sin(psi_radian)*cos(phi_radian)) * (180/PI)+ 180;
       printf("theta = %lf\n", theta_degree);
         delay(1000);


binutils: support call relaxations for SBI calls

Calls to the range [-2048,-2] can now be relaxed to JALR w.r.t. x0.

--- binutils/bfd/elfnn-riscv.c
+++ binutils/bfd/elfnn-riscv.c
@@ -2664,12 +2664,12 @@
 {
   bfd_byte *contents = elf_section_data (sec)->this_hdr.contents;
   bfd_signed_vma foff = symval - (sec_addr (sec) + rel->r_offset);
-  bfd_boolean near_zero = !link_info->shared && symval < RISCV_IMM_REACH/2;
+  bfd_boolean near_zero = (symval + RISCV_IMM_REACH/2) < RISCV_IMM_REACH;
   bfd_vma auipc, jalr;
   int r_type;

   /* See if this function call can be shortened.  */
-  if (!VALID_UJTYPE_IMM (foff) && !near_zero)
+  if (!VALID_UJTYPE_IMM (foff) && !(!link_info->shared && near_zero))
     return TRUE;

   /* Shorten the function call.  */


BDW: refine the gen8_surface_state_t.

BDW: refine the gen8_surface_state_t.

Signed-off-by: Junyan He <8f73a735c668918c9613b750d3a88ebf2489599f@linux.intel.com>
Reviewed-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@linux.intel.com>
Reviewed-by: Yang Rong <78759e37dc7114caed18f74e7515c5cb519dbf6d@intel.com>

--- src/intel/intel_structs.h
+++ src/intel/intel_structs.h
@@ -275,38 +275,38 @@
   } ss0;

   struct {
+    uint32_t surface_qpitch:15;
+    uint32_t pad0:3;
+    uint32_t pad1:1;
+    uint32_t base_mip_level:5;
+    uint32_t mem_obj_ctrl_state:7;
     uint32_t pad2:1;
-    uint32_t mem_obj_ctrl_state:7;
-    uint32_t base_mip_level:5;
-    uint32_t pad1:1;
-    uint32_t pad0:3;
-    uint32_t surface_qpitch:15;
   } ss1;

   struct {
+    uint32_t width:14;
     uint32_t pad1:2;
     uint32_t height:14;
     uint32_t pad0:2;
-    uint32_t width:14;
   } ss2;

   struct {
+    uint32_t surface_pitch:18;
+    uint32_t pad1:2;
+    uint32_t pad0:1;
     uint32_t depth:11;
-    uint32_t pad1:1;
-    uint32_t pad0:2;
-    uint32_t surface_pitch:18;
   } ss3;

   struct {
     union {
       struct {
+        uint32_t multisample_pos_palette_idx:3;
+        uint32_t multisample_num:3;
+        uint32_t multisample_format:1;
+        uint32_t render_target_view_ext:11;
+        uint32_t min_array_elt:11;
+        uint32_t render_target_and_sample_rotation:2;
         uint32_t pad1:1;
-        uint32_t render_target_and_sample_rotation:2;
-        uint32_t min_array_elt:11;
-        uint32_t render_target_view_ext:11;
-        uint32_t multisample_format:1;
-        uint32_t multisample_num:3;
-        uint32_t multisample_pos_palette_idx:3;
       };

       uint32_t pad0;
@@ -314,59 +314,59 @@
   } ss4;

   struct {
-    uint32_t x_offset:7;
-    uint32_t pad5:1;
-    uint32_t y_offset:3;
+    uint32_t mip_count:4;
+    uint32_t surface_min_lod:4;
+    uint32_t pad5:4;
+    uint32_t pad4:2;
+    uint32_t conherency_type:1;
+    uint32_t pad3:3;
+    uint32_t pad2:2;
     union {
-      uint32_t pad4:1;
+      uint32_t pad1:1;
       uint32_t cube_ewa:1;
     };
-    uint32_t pad3:2;
-    uint32_t pad2:3;
-    uint32_t conherency_type:1;
-    uint32_t pad1:2;
-    uint32_t pad0:4;
-    uint32_t surface_min_lod:4;
-    uint32_t mip_count:4;
+    uint32_t y_offset:3;
+    uint32_t pad0:1;
+    uint32_t x_offset:7;
   } ss5;

   struct {
     union {
+      union {
+        struct {
+          uint32_t aux_surface_mode:3;
+          uint32_t aux_surface_pitch:9;
+          uint32_t pad3:4;
+        };
+        struct {
+          uint32_t uv_plane_y_offset:14;
+          uint32_t pad2:2;
+        };
+      };
+
       struct {
+        uint32_t uv_plane_x_offset:14;
+        uint32_t pad1:1;
         uint32_t seperate_uv_plane_enable:1;
-        uint32_t pad3:1;
-        uint32_t uv_plane_x_offset:14;
       };
       struct {
-        uint32_t pad2:1;
         uint32_t aux_sruface_qpitch:15;
-      };
-    };
-
-    union {
-      struct {
-        uint32_t pad1:2;
-        uint32_t uv_plane_y_offset:14;
-      };
-      struct {
-        uint32_t pad0:4;
-        uint32_t aux_surface_pitch:9;
-        uint32_t aux_surface_mode:3;
+        uint32_t pad0:1;
       };
     };
   } ss6;

   struct {
+    uint32_t resource_min_lod:12;
+    uint32_t pad0:4;
+    uint32_t shader_channel_select_alpha:3;
+    uint32_t shader_channel_select_blue:3;
+    uint32_t shader_channel_select_green:3;
+    uint32_t shader_channel_select_red:3;
+    uint32_t alpha_clear_color:1;
+    uint32_t blue_clear_color:1;
+    uint32_t green_clear_color:1;
     uint32_t red_clear_color:1;
-    uint32_t green_clear_color:1;
-    uint32_t blue_clear_color:1;
-    uint32_t alpha_clear_color:1;
-    uint32_t shader_channel_select_red:3;
-    uint32_t shader_channel_select_green:3;
-    uint32_t shader_channel_select_blue:3;
-    uint32_t shader_channel_select_alpha:3;
-    uint32_t pad0:4;
-    uint32_t resource_min_lod:12;
   } ss7;

   struct {
@@ -375,20 +375,20 @@
   } ss8_9;

   struct {
+    uint32_t pad5:10;
+    uint32_t pad4:1;
+    uint32_t pad3:1;
+
     union {
+      uint64_t aux_surface_base_addr:52;
       struct {
-        uint32_t pad5:2;
+        uint32_t pad2:20;
+        uint32_t v_plane_y_offset:14;
+        uint32_t pad1:2;
         uint32_t v_plane_x_offset:14;
-        uint32_t pad4:2;
-        uint32_t v_plane_y_offset:14;
-        uint32_t pad3:20;
+        uint32_t pad0:2;
       };
-      uint64_t aux_surface_base_addr:52;
     };
-
-    uint32_t pad2:1;
-    uint32_t pad1:1;
-    uint32_t pad0:10;
   } ss10_11;

   struct {


fix lang processing in MP4Box

fix lang processing in MP4Box

--- src/isomedia/isom_write.c
+++ src/isomedia/isom_write.c
@@ -25,6 +25,9 @@

 #include <gpac/internal/isomedia_dev.h>

+#include <gpac/iso639.h>
+
+
 #if !defined(GPAC_DISABLE_ISOM) && !defined(GPAC_DISABLE_ISOM_WRITE)

 GF_Err CanAccessMovie(GF_ISOFile *movie, u32 Mode)
@@ -242,13 +245,34 @@
 {
 	GF_Err e;
 	GF_TrackBox *trak;
+
 	trak = gf_isom_get_track_from_file(movie, trackNumber);
 	if (!trak) return GF_BAD_PARAM;
 	e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE);
 	if (e) return e;
+
+	// Old language-storage processing
+	// if the new code is on 3 chars, we use it
+	// otherwise, we find the associated 3 chars code and use it
 	if (strlen(code) == 3) {
 		memcpy(trak->Media->mediaHeader->packedLanguage, code, sizeof(char)*3);
 	} else {
+		s32 lang_idx;
+		const char *code_3cc;
+		lang_idx = gf_lang_find(code);
+		if (lang_idx == -1) {
+			GF_LOG(GF_LOG_WARNING, GF_LOG_CONTAINER, ("The given code is not a valid one: %s, using 'und' as 3-letter code\n", code));
+			code_3cc = "und";
+		} else {
+			code_3cc = gf_lang_get_3cc(lang_idx);
+		}
+		memcpy(trak->Media->mediaHeader->packedLanguage, code_3cc, sizeof(char)*3);
+	}
+
+	// New language-storage processing
+	// change the code in the extended language box (if any)
+	// otherwise add an extended language box only if the given code is not 3 chars
+	{
 		u32 i, count;
 		GF_ExtendedLanguageBox *elng;
 		elng = NULL;
@@ -260,17 +284,19 @@
 				break;
 			}
 		}
-		if (!elng) {
+		if (!elng && (strlen(code) != 3)) {
 			elng = (GF_ExtendedLanguageBox *)elng_New();
 			if (!count) {
 				trak->Media->other_boxes = gf_list_new();
 			}
 			gf_list_add(trak->Media->other_boxes, elng);
 		}
-		if (elng->extended_language) {
-			gf_free(elng->extended_language);
-		}
-		elng->extended_language = gf_strdup(code);
+		if (elng) {
+			if (elng->extended_language) {
+				gf_free(elng->extended_language);
+			}
+			elng->extended_language = gf_strdup(code);
+		}
 	}
 	if (!movie->keep_utc)
 		trak->Media->mediaHeader->modificationTime = gf_isom_get_mp4time();


Replaced R_CONNECT() to replace orignal connect()

For stack friendly

--- src/RTimer.h
+++ src/RTimer.h
@@ -33,7 +33,7 @@
 {
   auto timer = new RTimer();
   timer->timeout.connect(slot);
-  timer->timeout.connect(timer, &RTimer::deleteLater);
+  R_CONNECT(timer, timeout, timer, deleteLater);
   timer->setSingleShot(true);
   timer->setInterval(msec);
   timer->start();


Fixed crash in CTTS unpacking

Fixed crash in CTTS unpacking

--- src/isomedia/stbl_write.c
+++ src/isomedia/stbl_write.c
@@ -301,7 +301,7 @@
 	u32 i, j, remain, count;
 	GF_CompositionOffsetBox *ctts;
 	ctts = stbl->CompositionOffset;
-	if (ctts->unpack_mode) return GF_OK;
+	if (!ctts || ctts->unpack_mode) return GF_OK;
 	ctts->unpack_mode = 1;

 	packed = ctts->entries;


Better implementation of R_SIZE_OF_ARRAY()

Use template to detect array size during compilation, so we got error if passed a raw pointer to it.

--- src/RTypes.h
+++ src/RTypes.h
@@ -88,6 +88,15 @@
   typedef signed long long   Signed;
   typedef unsigned long long Unsigned;
 };
+
+template <typename T>
+struct RArraySize;
+
+template <typename T, size_t N>
+struct RArraySize<T(&)[N]>
+{
+  enum { Value = N };
+};
 }

 typedef Rt::RTypeSignTraits<size_t>::Signed    rsize;
@@ -152,7 +161,7 @@
  *
  * @param array Target array variant to calculate
  */
-#define R_SIZE_OF_ARRAY(array) (sizeof((array)) / sizeof((array)[0]))
+#define R_SIZE_OF_ARRAY(array) (Rt::RArraySize<decltype((array))>::Value)

 /**
  * Disable copy constructor and assign operations.


fixed crash due to heap corruption (cf #375)

--- src/isomedia/stbl_write.c
+++ src/isomedia/stbl_write.c
@@ -1390,7 +1390,7 @@
 	if (!stbl->SampleSize->sizes || (stbl->SampleSize->sampleCount==stbl->SampleSize->alloc_size)) {
 		Bool init_table = (stbl->SampleSize->sizes==NULL) ? 1 : 0;
 		ALLOC_INC(stbl->SampleSize->alloc_size);
-		if (stbl->SampleSize->sampleCount>stbl->SampleSize->alloc_size)
+		if (stbl->SampleSize->sampleCount >= stbl->SampleSize->alloc_size)
 			stbl->SampleSize->alloc_size = stbl->SampleSize->sampleCount+1;

 		stbl->SampleSize->sizes = (u32 *)gf_realloc(stbl->SampleSize->sizes, sizeof(u32)*stbl->SampleSize->alloc_size);


Added a cast to convertIntegerToString() to avoid warning messages.

--- log4cplus/include/log4cplus/helpers/stringhelper.h
+++ log4cplus/include/log4cplus/helpers/stringhelper.h
@@ -91,7 +91,7 @@
             while(value != 0) {
                 intType mod = value % 10;
                 value = value / 10;
-                buffer[bufferPos++] = '0' + mod;
+                buffer[bufferPos++] = '0' + static_cast<char>(mod);
             }

             // now reverse the string to get it in proper order


[jamendo] Changed to use xmlReadMemory instead of xmlRecoverDoc

Now the function to skip the text nodes is useless and it was also
removed.

--- src/jamendo/grl-jamendo.c
+++ src/jamendo/grl-jamendo.c
@@ -289,7 +289,8 @@
   xmlNodePtr node;
   gint child_nodes = 0;

-  doc = xmlRecoverDoc ((xmlChar *) str);
+  doc = xmlReadMemory (str, strlen (str), NULL, NULL,
+                       XML_PARSE_RECOVER | XML_PARSE_NOBLANKS);
   if (!doc) {
     *error = g_error_new (GRL_ERROR,
 			  GRL_ERROR_BROWSE_FAILED,


Read XDG_CURRENT_DESKTOP

Read XDG_CURRENT_DESKTOP

We were reading XDG_SESSION_DESKTOP (a systemd invention) and
splitting it as if it were XDG_CURRENT_DESKTOP (a more recent
freedesktop invention). Change the code to use XDG_CURRENT_DESKTOP
which is the same variable used by GIO to resolve OnlyShowIn/NotShowIn.

Have I mentioned that I really dislike the environment variable
business ?

--- src/xdg-desktop-portal.c
+++ src/xdg-desktop-portal.c
@@ -84,6 +84,7 @@
   char *dbus_name;
   char **interfaces;
   char **use_in;
+  int priority;
 } PortalImplementation;

 static void
@@ -202,7 +203,7 @@
 static PortalImplementation *
 find_portal_implementation (const char *interface)
 {
-  const char *desktops_str = g_getenv ("XDG_SESSION_DESKTOP");
+  const char *desktops_str = g_getenv ("XDG_CURRENT_DESKTOP");
   g_auto(GStrv) desktops = NULL;
   int i;
   GList *l;


Expose ctkColorPickerButton::ColorDialogOptions to meta sys

--- Libs/Widgets/ctkColorPickerButton.h
+++ Libs/Widgets/ctkColorPickerButton.h
@@ -38,6 +38,7 @@
 {
   Q_OBJECT
   Q_ENUMS(ColorDialogOption)
+  Q_FLAGS(ColorDialogOption ColorDialogOptions)
   Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged USER true)
   Q_PROPERTY(bool displayColorName READ displayColorName WRITE setDisplayColorName DESIGNABLE true)
   Q_PROPERTY(ColorDialogOptions dialogOptions READ dialogOptions WRITE setDialogOptions DESIGNABLE true)


Update api docs.

Update api docs.

--- Source/Definition/Initializer/TyphoonInitializer.h
+++ Source/Definition/Initializer/TyphoonInitializer.h
@@ -86,7 +86,7 @@

 /**
 * Injects with an object instance.
-* If object is NSNumber of NSValue and argument type is scalar, pointer or NSValue-supported struct, then value will be automatically unwrapped
+* If object is NSNumber or NSValue and argument type is scalar, pointer or NSValue-supported struct, then value will be automatically unwrapped
  * (Like KeyValueCoding does).
 @code
  [initializer injectWithObjectInstance:@(YES)];
@@ -94,6 +94,13 @@
  [initializer injectWithObjectInstance:[NSValue valueWithCGRect:defaultFrame]];
  [initializer injectWithObjectInstance:[NSValue valueWithPointer:@selector(selectorValue)]];
 @endcode
+
+To inject a class object:
+
+@code
+[initializer injectWithObjectInstance:[SomeObject class]];
+@endcode
+
 */
 - (void)injectWithObjectInstance:(id)value;