[-]
[+]
|
Changed |
_service:tar_git:libglibutil.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil.spec
^
|
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/libglibutil.dsp
^
|
@@ -1,174 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libglibutil" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=libglibutil - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libglibutil.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libglibutil.mak" CFG="libglibutil - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libglibutil - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "libglibutil - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "libglibutil - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/Release"
-# PROP BASE Intermediate_Dir "build/Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/Release"
-# PROP Intermediate_Dir "build/Release"
-# PROP Target_Dir ""
-F90=df.exe
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "include" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "libglibutil - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/Debug"
-# PROP BASE Intermediate_Dir "build/Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/Debug"
-# PROP Intermediate_Dir "build/Debug"
-# PROP Target_Dir ""
-F90=df.exe
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "include" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF
-
-# Begin Target
-
-# Name "libglibutil - Win32 Release"
-# Name "libglibutil - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\src\gutil_history.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_idlepool.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_idlequeue.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_intarray.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_ints.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_log.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_misc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_ring.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\src\gutil_strv.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\include\gutil_history.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_idlepool.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_idlequeue.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_intarray.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_ints.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_log.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_macros.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_misc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_ring.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_strv.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\gutil_types.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/libglibutil_test.dsw
^
|
@@ -1,164 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "libglibutil"=..\libglibutil.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "test_history"=.\test_history\test_history.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_idlepool"=.\test_idlepool\test_idlepool.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_idlequeue"=.\test_idlequeue\test_idlequeue.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_intarray"=.\test_intarray\test_intarray.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_ints"=.\test_ints\test_ints.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_log"=.\test_log\test_log.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_misc"=.\test_misc\test_misc.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_ring"=.\test_ring\test_ring.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "test_strv"=.\test_strv\test_strv.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libglibutil
- End Project Dependency
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_history/test_history.dsp
^
|
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_history" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_history - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_history.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_history.mak" CFG="test_history - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_history - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_history - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_history - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_history - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_history - Win32 Release"
-# Name "test_history - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_history.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_idlepool/test_idlepool.dsp
^
|
@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_idlepool" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_idlepool - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_idlepool.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_idlepool.mak" CFG="test_idlepool - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_idlepool - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_idlepool - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_idlepool - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_idlepool - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_idlepool - Win32 Release"
-# Name "test_idlepool - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\test_idlepool.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\test_object.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_idlequeue/test_idlequeue.dsp
^
|
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_idlequeue" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_idlequeue - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_idlequeue.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_idlequeue.mak" CFG="test_idlequeue - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_idlequeue - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_idlequeue - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_idlequeue - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winsqueue.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winsqueue.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_idlequeue - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winsqueue.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winsqueue.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_idlequeue - Win32 Release"
-# Name "test_idlequeue - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_idlequeue.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_intarray/test_intarray.dsp
^
|
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_intarray" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_intarray - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_intarray.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_intarray.mak" CFG="test_intarray - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_intarray - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_intarray - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_intarray - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_intarray - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_intarray - Win32 Release"
-# Name "test_intarray - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_intarray.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_ints/test_ints.dsp
^
|
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_ints" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_ints - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_ints.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_ints.mak" CFG="test_ints - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_ints - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_ints - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_ints - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_ints - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_ints - Win32 Release"
-# Name "test_ints - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_ints.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_log/test_log.dsp
^
|
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_log" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_log - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_log.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_log.mak" CFG="test_log - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_log - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_log - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_log - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_log - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_log - Win32 Release"
-# Name "test_log - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\test_log.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_misc/test_misc.dsp
^
|
@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_misc" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_misc - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_misc.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_misc.mak" CFG="test_misc - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_misc - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_misc - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_misc - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_misc - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_misc - Win32 Release"
-# Name "test_misc - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_misc.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\common\test_object.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_ring/test_ring.dsp
^
|
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_ring" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_ring - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_ring.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_ring.mak" CFG="test_ring - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_ring - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_ring - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_ring - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_ring - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_ring - Win32 Release"
-# Name "test_ring - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_ring.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Deleted |
_service:tar_git:libglibutil-1.0.68.tar.bz2/test/test_strv/test_strv.dsp
^
|
@@ -1,106 +0,0 @@
-# Microsoft Developer Studio Project File - Name="test_strv" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=test_strv - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "test_strv.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_strv.mak" CFG="test_strv - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_strv - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_strv - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "test_strv - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "build/release"
-# PROP BASE Intermediate_Dir "build/release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "build/release"
-# PROP Intermediate_Dir "build/release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /machine:I386 /libpath:"$(GTK_ROOT)/lib"
-
-!ELSEIF "$(CFG)" == "test_strv - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "build/debug"
-# PROP BASE Intermediate_Dir "build/debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "build/debug"
-# PROP Intermediate_Dir "build/debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /I "../common" /I "$(GTK_ROOT)/include/glib-2.0" /I "$(GTK_ROOT)/lib/glib-2.0/include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /FR /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 glib-2.0.lib gobject-2.0.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept /libpath:"$(GTK_ROOT)/lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "test_strv - Win32 Release"
-# Name "test_strv - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\common\test_main.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\test_strv.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\common\test_common.h
-# End Source File
-# End Group
-# End Target
-# End Project
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/Makefile
^
|
@@ -15,15 +15,29 @@
all: debug release pkgconfig
#
+# Directories
+#
+
+SRC_DIR = src
+INCLUDE_DIR = include
+BUILD_DIR = build
+DEBUG_BUILD_DIR = $(BUILD_DIR)/debug
+RELEASE_BUILD_DIR = $(BUILD_DIR)/release
+COVERAGE_BUILD_DIR = $(BUILD_DIR)/coverage
+
+#
# Library version
#
-VERSION_MAJOR = 1
-VERSION_MINOR = 0
-VERSION_RELEASE = 68
+VERSION_FILE = $(INCLUDE_DIR)/gutil_version.h
+get_version = $(shell grep -E '^ *\#define +GUTIL_VERSION_$1 +[0-9]+$$' $(VERSION_FILE) | sed 's/ */ /g' | cut -d ' ' -f 3)
+
+VERSION_MAJOR := $(call get_version,MAJOR)
+VERSION_MINOR := $(call get_version,MINOR)
+VERSION_MICRO := $(call get_version,MICRO)
# Version for pkg-config
-PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
+PCVERSION := $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_MICRO)
#
# Library name
@@ -35,7 +49,7 @@
LIB_SYMLINK1 = $(LIB_DEV_SYMLINK).$(VERSION_MAJOR)
LIB_SYMLINK2 = $(LIB_SYMLINK1).$(VERSION_MINOR)
LIB_SONAME = $(LIB_SYMLINK1)
-LIB = $(LIB_SONAME).$(VERSION_MINOR).$(VERSION_RELEASE)
+LIB = $(LIB_SONAME).$(VERSION_MINOR).$(VERSION_MICRO)
STATIC_LIB = $(LIB_NAME).a
#
@@ -43,6 +57,7 @@
#
SRC = \
+ gutil_datapack.c \
gutil_history.c \
gutil_idlepool.c \
gutil_idlequeue.c \
@@ -54,20 +69,11 @@
gutil_ring.c \
gutil_strv.c \
gutil_timenotify.c \
+ gutil_objv.c \
+ gutil_version.c \
gutil_weakref.c
#
-# Directories
-#
-
-SRC_DIR = src
-INCLUDE_DIR = include
-BUILD_DIR = build
-DEBUG_BUILD_DIR = $(BUILD_DIR)/debug
-RELEASE_BUILD_DIR = $(BUILD_DIR)/release
-COVERAGE_BUILD_DIR = $(BUILD_DIR)/coverage
-
-#
# Tools and flags
#
@@ -78,6 +84,8 @@
INCLUDES = -I$(INCLUDE_DIR)
BASE_FLAGS = -fPIC
FULL_CFLAGS = $(BASE_FLAGS) $(CFLAGS) $(DEFINES) $(WARNINGS) $(INCLUDES) \
+ -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 \
+ -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_MAX_ALLOWED \
-MMD -MP $(shell pkg-config --cflags $(PKGS))
FULL_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LIB_SONAME) \
$(shell pkg-config --libs $(PKGS))
@@ -153,7 +161,7 @@
@echo $(COVERAGE_STATIC_LIB)
clean:
- make -C test clean
+ $(MAKE) -C test clean
rm -fr test/coverage/results test/coverage/*.gcov
rm -f *~ $(SRC_DIR)/*~ $(INCLUDE_DIR)/*~
rm -fr $(BUILD_DIR) RPMS installroot
@@ -163,7 +171,7 @@
rm -fr debian/*.install
test:
- make -C test test
+ $(MAKE) -C test test
$(BUILD_DIR):
mkdir -p $@
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/debian/changelog
^
|
@@ -1,10 +1,58 @@
+libglibutil (1.0.74) unstable; urgency=low
+
+ * Added Added gutil_data_copy_as_variant()
+
+ -- Slava Monich <slava@monich.com> Sun, 10 Sep 2023 04:11:17 +0300
+
+libglibutil (1.0.73) unstable; urgency=low
+
+ * Define and use MAKE var instead of explicitly calling make
+ * Added gutil_log_set_timestamp_format()
+
+ -- Slava Monich <slava@monich.com> Tue, 05 Sep 2023 15:53:55 +0300
+
+libglibutil (1.0.72) unstable; urgency=low
+
+ * Don't export gutil_time_notify_get_type()
+ * Added gutil_data_new()
+ * Added gutil_data_copy()
+ * Added gutil_objv_new()
+
+ -- Slava Monich <slava@monich.com> Sun, 20 Aug 2023 02:05:13 +0300
+
+libglibutil (1.0.71) unstable; urgency=low
+
+ * Added gutil_object_ref()
+ * Added gutil_object_unref()
+ * Added gutil_objv_append()
+ * Added gutil_objv_insert()
+ * Added gutil_ptrv_is_empty()
+ * Added gutil_bin2hex()
+ * Added gutil_data2hex()
+
+ -- Slava Monich <slava@monich.com> Sun, 18 Jun 2023 14:24:13 +0300
+
+libglibutil (1.0.70) unstable; urgency=low
+
+ * Added gutil_objv module
+
+ -- Slava Monich <slava@monich.com> Mon, 29 May 2023 01:35:08 +0300
+
+libglibutil (1.0.69) unstable; urgency=low
+
+ * Runtime and compile time version detection
+ * Added gutil_datapack module
+ * Require glib 2.32
+
+ -- Slava Monich <slava@monich.com> Thu, 06 Apr 2023 02:13:48 +0300
+
libglibutil (1.0.68) unstable; urgency=low
* Added gutil_weakref module
* Fixed a few compilation warnings
* Packaging tweaks
- -- Slava Monich <slava.monich@jolla.com> Sat, 04 Feb 2023 04:26:45 +0200
+ -- Slava Monich <slava@monich.com> Sat, 04 Feb 2023 04:26:45 +0200
libglibutil (1.0.67) unstable; urgency=low
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/debian/control
^
|
@@ -2,7 +2,7 @@
Section: libs
Priority: optional
Maintainer: Slava Monich <slava.monich@jolla.com>
-Build-Depends: debhelper (>= 8.1.3), libglib2.0-dev (>= 2.0)
+Build-Depends: debhelper (>= 8.1.3), libglib2.0-dev (>= 2.32)
Standards-Version: 3.8.4
Package: libglibutil
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/include/gutil_datapack.h
^
|
@@ -0,0 +1,190 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GUTIL_DATAPACK_H
+#define GUTIL_DATAPACK_H
+
+#include "gutil_types.h"
+
+/*
+ * Utilities for packing and unpacking simple data types and structures.
+ *
+ * Since 1.0.69
+ */
+
+G_BEGIN_DECLS
+
+/*
+ * Compact 7 bits per byte representation of a signed integer with
+ * redundant sign bits removed. Most significant bit is the continuation
+ * flag. Bit 0x40 in the first (most significant) byte is the sign bit.
+ * Unused bits in the most significant chunk must be filled with the
+ * sign bit.
+ *
+ * For positive numbers it's slightly less efficient than encoding unsigned
+ * numbers because of one extra sign bit (e.g. unsigned number 65 can be
+ * squeezed into a single byte but the signed one takes 2 bytes).
+ *
+ * Examples:
+ *
+ * 33 (0x0000000000000021) => 00100001 (0x21)
+ * -33 (0xffffffffffffffdf) => 01011111 (0x5f)
+ * 65 (0x0000000000000041) => 10000000 01000001 (0x80 0x41)
+ * -65 (0xffffffffffffff3f) => 11111111 00111111 (0xff 0x3f)
+ * 129 (0x0000000000000081) => 10000001 00000001 (0x81 0x01)
+ * -129 (0xffffffffffffff7f) => 11111110 01111110 (0xfe 0x7f)
+ */
+
+guint
+gutil_signed_mbn_size(
+ gint64 value);
+
+guint
+gutil_signed_mbn_encode(
+ gpointer buf,
+ gint64 value);
+
+guint
+gutil_signed_mbn_encode2(
+ gpointer buf,
+ gint64 value,
+ guint value_size);
+
+gboolean
+gutil_signed_mbn_decode(
+ GUtilRange* in,
+ gint64* out);
+
+gboolean
+gutil_signed_mbn_decode2(
+ const GUtilData* in,
+ gint64* out);
+
+/*
+ * Compact 7 bits per byte representation of an unsigned integer with
+ * redundant zero bits removed. Most significant bit is the continuation
+ * flag. Unused bits in the first byte (most significant chunk) must be
+ * filled with zeros.
+ *
+ * Examples:
+ *
+ * 33 (0x0000000000000021) => 00100001 (0x21)
+ * 65 (0x0000000000000041) => 01000001 (0x41)
+ * 129 (0x0000000000000081) => 10000001 00000001 (0x81 0x01)
+ */
+
+guint
+gutil_unsigned_mbn_size(
+ guint64 value);
+
+guint
+gutil_unsigned_mbn_encode(
+ gpointer buf,
+ guint64 value);
+
+guint
+gutil_unsigned_mbn_encode2(
+ gpointer buf,
+ guint64 value,
+ guint value_size);
+
+gboolean
+gutil_unsigned_mbn_decode(
+ GUtilRange* in,
+ guint64* out);
+
+gboolean
+gutil_unsigned_mbn_decode2(
+ const GUtilData* in,
+ guint64* out);
+
+/*
+ * TLV is a convenient and extendible way to pack various kinds of data
+ * into a single memory block. Each entry gets encoded as follows:
+ *
+ * +---
+ * | T (unsigned MBN) : tag (non-zero)
+ * +---
+ * | L (unsigned MBN) : length (zero if there's no data)
+ * +---
+ * | V (L bytes) : tag specific data (optional)
+ * +---
+ *
+ * To make API even more convenient, these utilities restrict the tag
+ * value to INT_MAX which should be enough in most real life situations.
+ * Also, these utilities assume that tags are non-zero. gutil_tlv_decode()
+ * returns zero ifno TLV can be pulled out of the input data, and the
+ * tags array passed to gutil_tlvs_decode() is zero terminated.
+ */
+
+typedef enum gutil_tlvs_decode_flags {
+ GUTIL_TLVS_DECODE_NO_FLAGS = 0,
+ GUTIL_TLVS_DECODE_FLAG_SKIP_UNKNOWN_TAGS = 0x1
+} GUTIL_TLVS_DECODE_FLAGS;
+
+guint
+gutil_tlv_size(
+ guint tag,
+ gsize len);
+
+gsize
+gutil_tlv_encode(
+ gpointer buf,
+ guint tag,
+ const GUtilData* val);
+
+guint
+gutil_tlv_decode(
+ GUtilRange* in,
+ GUtilData* val);
+
+#define GUTIL_TLVS_DECODE_ERROR (-1)
+#define GUTIL_TLVS_DECODE_DUPLICATE_TAG (-2)
+#define GUTIL_TLVS_DECODE_UNKNOWN_TAG (-3)
+
+int
+gutil_tlvs_decode(
+ const GUtilData* in,
+ const guint* tags,
+ GUtilData* vals,
+ GUTIL_TLVS_DECODE_FLAGS flags);
+
+G_END_DECLS
+
+#endif /* GUTIL_DATAPACK_H */
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/include/gutil_log.h
^
|
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2014-2023 Slava Monich <slava@monich.com>
* Copyright (C) 2014-2022 Jolla Ltd.
- * Copyright (C) 2014-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -139,6 +139,12 @@
const char* format,
va_list va);
+/* Check if logging is enabled for the specified log level */
+gboolean
+gutil_log_enabled(
+ const GLogModule* module,
+ int level);
+
void
gutil_log_dump(
const GLogModule* module,
@@ -154,11 +160,9 @@
const char* prefix,
GBytes* bytes); /* Since 1.0.67 */
-/* Check if logging is enabled for the specified log level */
-gboolean
-gutil_log_enabled(
- const GLogModule* module,
- int level);
+void
+gutil_log_set_timestamp_format(
+ const char* f /* see strftime(3) */ ); /* Since 1.0.73 */
/* Known log types */
extern const char GLOG_TYPE_STDOUT[];
@@ -217,7 +221,7 @@
# define GLOG_VA_FN(x) _gutil_log_##x
# define GLOG_VA_NONE(x) G_INLINE_FUNC \
void GLOG_VA_FN(x)(const char* f, ...) {}
-# define GLOG_VA(x) GLOG_VA_(GLOG_VA_FN(x),x)
+# define GLOG_VA(x) GLOG_VA_(GLOG_VA_FN(x),x)
# define GLOG_VA_(fn,x) G_INLINE_FUNC \
void fn(const char* f, ...) { \
if (f && f[0]) { \
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/include/gutil_misc.h
^
|
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
* Copyright (C) 2016-2022 Jolla Ltd.
- * Copyright (C) 2016-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -44,11 +44,32 @@
int count);
void*
+gutil_object_ref(
+ void* object); /* Since 1.0.71 */
+
+void
+gutil_object_unref(
+ void* object); /* Since 1.0.71 */
+
+void*
gutil_hex2bin(
const char* str,
gssize len,
void* data);
+char*
+gutil_bin2hex(
+ const void* data,
+ gsize len,
+ gboolean upper_case) /* Since 1.0.71 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
+char*
+gutil_data2hex(
+ const GUtilData* data,
+ gboolean upper_case) /* Since 1.0.71 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
GBytes*
gutil_hex2bytes(
const char* str,
@@ -112,6 +133,22 @@
GUtilData* data,
GBytes* bytes); /* Since 1.0.31 */
+GUtilData*
+gutil_data_new(
+ const void* bytes,
+ guint len) /* Since 1.0.72 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GUtilData*
+gutil_data_copy(
+ const GUtilData* data) /* Since 1.0.72 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GVariant*
+gutil_data_copy_as_variant(
+ const GUtilData* data) /* Since 1.0.74 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
GBytes*
gutil_bytes_concat(
GBytes* bytes,
@@ -151,6 +188,10 @@
gutil_ptrv_length(
const void* ptrv); /* Since 1.0.50 */
+gboolean
+gutil_ptrv_is_empty(
+ const void* ptrv); /* Since 1.0.71 */
+
void
gutil_ptrv_free(
void** ptrv); /* Since 1.0.51 */
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/include/gutil_objv.h
^
|
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GUTIL_OBJV_H
+#define GUTIL_OBJV_H
+
+#include "gutil_types.h"
+
+#include <glib-object.h>
+
+/*
+ * Operations on NULL-terminated array of references to GObjects.
+ *
+ * Since 1.0.70
+ */
+
+G_BEGIN_DECLS
+
+GObject**
+gutil_objv_new(
+ GObject* obj,
+ ...) /* Since 1.0.72 */
+ G_GNUC_WARN_UNUSED_RESULT
+ G_GNUC_NULL_TERMINATED;
+
+void
+gutil_objv_free(
+ GObject** objv);
+
+GObject**
+gutil_objv_copy(
+ GObject* const* objv)
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GObject**
+gutil_objv_add(
+ GObject** objv,
+ GObject* obj)
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GObject**
+gutil_objv_insert(
+ GObject** objv,
+ GObject* obj,
+ gsize pos) /* Since 1.0.71 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GObject**
+gutil_objv_append(
+ GObject** objv,
+ GObject* const* objs) /* Since 1.0.71 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GObject**
+gutil_objv_remove(
+ GObject** objv,
+ GObject* obj,
+ gboolean all)
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GObject**
+gutil_objv_remove_at(
+ GObject** objv,
+ gsize pos)
+ G_GNUC_WARN_UNUSED_RESULT;
+
+GObject*
+gutil_objv_at(
+ GObject* const* objv,
+ gsize pos);
+
+gboolean
+gutil_objv_equal(
+ GObject* const* objv1,
+ GObject* const* objv2);
+
+GObject*
+gutil_objv_first(
+ GObject* const* objv);
+
+GObject*
+gutil_objv_last(
+ GObject* const* objv);
+
+gssize
+gutil_objv_find(
+ GObject* const* objv,
+ GObject* obj);
+
+gssize
+gutil_objv_find_last(
+ GObject* const* objv,
+ GObject* obj);
+
+gboolean
+gutil_objv_contains(
+ GObject* const* objv,
+ GObject* obj);
+
+G_END_DECLS
+
+#endif /* GUTIL_OBJV_H */
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/include/gutil_version.h
^
|
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GUTIL_VERSION_H
+#define GUTIL_VERSION_H
+
+#include "gutil_types.h"
+
+/*
+ * GUTIL_VERSION_X_Y_Z macros will be added with each release. The fact that
+ * such macro is defined means that you're compiling against libgutil version
+ * X.Y.Z or greater.
+ *
+ * Since 1.0.69
+ */
+
+G_BEGIN_DECLS
+
+#define GUTIL_VERSION_MAJOR 1
+#define GUTIL_VERSION_MINOR 0
+#define GUTIL_VERSION_MICRO 74
+#define GUTIL_VERSION_STRING "1.0.74"
+
+extern const guint gutil_version_major; /* GUTIL_VERSION_MAJOR */
+extern const guint gutil_version_minor; /* GUTIL_VERSION_MINOR */
+extern const guint gutil_version_micro; /* GUTIL_VERSION_MICRO */
+
+/* Version as a single word */
+#define GUTIL_VERSION_(v1,v2,v3) \
+ ((((v1) & 0x7f) << 24) | \
+ (((v2) & 0xfff) << 12) | \
+ ((v3) & 0xfff))
+
+#define GUTIL_VERSION_MAJOR_(v) (((v) >> 24) & 0x7f)
+#define GUTIL_VERSION_MINOR_(v) (((v) >> 12) & 0xfff)
+#define GUTIL_VERSION_MICRO_(v) (((v) & 0xfff))
+
+/* Current compile time version as a single word */
+#define GUTIL_VERSION GUTIL_VERSION_ \
+ (GUTIL_VERSION_MAJOR, GUTIL_VERSION_MINOR, GUTIL_VERSION_MICRO)
+
+/* Runtime version as a single word */
+#define gutil_version() GUTIL_VERSION_ \
+ (gutil_version_major, gutil_version_minor, gutil_version_micro)
+
+/* Specific versions */
+#define GUTIL_VERSION_1_0_69 GUTIL_VERSION_(1,0,69)
+#define GUTIL_VERSION_1_0_70 GUTIL_VERSION_(1,0,70)
+#define GUTIL_VERSION_1_0_71 GUTIL_VERSION_(1,0,71)
+#define GUTIL_VERSION_1_0_72 GUTIL_VERSION_(1,0,72)
+#define GUTIL_VERSION_1_0_73 GUTIL_VERSION_(1,0,73)
+#define GUTIL_VERSION_1_0_74 GUTIL_VERSION_(1,0,74)
+
+G_END_DECLS
+
+#endif /* GUTIL_VERSION_H */
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/src/gutil_datapack.c
^
|
@@ -0,0 +1,478 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "gutil_datapack.h"
+
+/*
+ * Compact 7 bits per byte representation of a signed integer with
+ * redundant sign bits removed. Most significant bit is the continuation
+ * flag. Bit 0x40 in the first (most significant) byte is the sign bit.
+ * Unused bits in the most significant chunk must be filled with the
+ * sign bit.
+ *
+ * For positive numbers it's slightly less efficient than encoding unsigned
+ * numbers because of one extra sign bit (e.g. unsigned number 65 can be
+ * squeezed into a single byte but the signed one takes 2 bytes).
+ *
+ * Examples:
+ *
+ * 33 (0x0000000000000021) => 00100001 (0x21)
+ * -33 (0xffffffffffffffdf) => 01011111 (0x5f)
+ * 65 (0x0000000000000041) => 10000000 01000001 (0x80 0x41)
+ * -65 (0xffffffffffffff3f) => 11111111 00111111 (0xff 0x3f)
+ * 129 (0x0000000000000081) => 10000001 00000001 (0x81 0x01)
+ * -129 (0xffffffffffffff7f) => 11111110 01111110 (0xfe 0x7f)
+ */
+
+guint
+gutil_signed_mbn_size(
+ gint64 value)
+{
+ guint n = 1, msc = (value & 0x7f); /* Most Significant Chunk */
+
+ value >>= 7;
+ if (value < 0) {
+ while (value != -1) {
+ msc = (value & 0x7f);
+ value >>= 7;
+ n++;
+ }
+ if (!(msc & 0x40)) {
+ n++; /* Sign bit didn't fit */
+ }
+ } else {
+ while (value) {
+ msc = (value & 0x7f);
+ value >>= 7;
+ n++;
+ }
+ if (msc & 0x40) {
+ n++; /* Sign bit didn't fit */
+ }
+ }
+ return n;
+}
+
+guint
+gutil_signed_mbn_encode(
+ gpointer buf,
+ gint64 value)
+{
+ return gutil_signed_mbn_encode2(buf, value,
+ gutil_signed_mbn_size(value));
+}
+
+guint
+gutil_signed_mbn_encode2(
+ gpointer buf,
+ gint64 value,
+ guint size)
+{
+ guchar* ptr = buf;
+
+ /* Zero or too large size must be a programming error. */
+ if (size > 0) {
+ guint n = size;
+
+ ptr[--n] = (guchar)(value & 0x7f);
+ value >>= 7;
+ while (n) {
+ ptr[--n] = (guchar)(value | 0x80);
+ value >>= 7;
+ }
+
+ if (value < 0) {
+ const guint maxbits = sizeof(value) * 8;
+
+ /* Special treatment of negative numbers */
+ if (size * 7 > maxbits) {
+ /* Extend the sign bit */
+ ptr[0] |= ~((1 << (maxbits - (size - 1) * 7)) - 1);
+ }
+ }
+ }
+ return size;
+}
+
+gboolean
+gutil_signed_mbn_decode(
+ GUtilRange* in,
+ gint64* out)
+{
+ if (in->ptr < in->end) {
+ guchar last = in->ptr[0];
+
+ if (last & 0x80) {
+ const int maxbits = sizeof(*out) * 8;
+ const guchar msc = last; /* Most Significant Chunk */
+ int nbits = 7;
+ guint off = 1;
+ guint64 value = (last & 0x7f);
+
+ while ((in->ptr + off) < in->end &&
+ ((last = in->ptr[off++]) & 0x80)) {
+ value = (value << 7) | (last & 0x7f);
+ if ((nbits + 7) <= maxbits) {
+ nbits += 7;
+ } else {
+ /* Too many bytes */
+ return FALSE;
+ }
+ }
+
+ if (!(last & 0x80)) {
+ value = (value << 7) | last;
+ if (msc & 0x40) {
+ /* Negative number */
+ if ((nbits + 7) < maxbits) {
+ /* Extend the sign bit */
+ if (out) {
+ *out = value | ~((G_GINT64_CONSTANT(1) <<
+ (nbits + 7)) - 1);
+ }
+ in->ptr += off;
+ return TRUE;
+ } else {
+ /* Unused bits must be set to 1 */
+ if ((msc | ((1 << (maxbits - nbits)) - 1)) == 0xff) {
+ if (out) {
+ *out = value;
+ }
+ in->ptr += off;
+ return TRUE;
+ }
+ }
+ } else {
+ /* Positive number, unused bits (if any) must be zeroed */
+ /* Unused bits must be zeroed */
+ if ((nbits + 7) < maxbits ||
+ (msc & ~((1 << (maxbits - nbits)) - 1)) == 0x80) {
+ if (out) {
+ *out = value;
+ }
+ in->ptr += off;
+ return TRUE;
+ }
+ }
+ }
+ /* Broken sequence */
+ } else {
+ /* Single byte, very common case */
+ if (out) {
+ if ((*out = *in->ptr++) & 0x40) {
+ /* Small negative number */
+ *out |= (G_GINT64_CONSTANT(-1) ^ 0x7f);
+ }
+ } else {
+ in->ptr++;
+ }
+ return TRUE;
+ }
+ }
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/src/gutil_log.c
^
|
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2014-2023 Slava Monich <slava@monich.com>
* Copyright (C) 2014-2022 Jolla Ltd.
- * Copyright (C) 2014-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -58,6 +58,9 @@
/* Allows timestamps in stdout log */
gboolean gutil_log_timestamp = FALSE;
+static const char gutil_log_ftime_default[] = "%Y-%m-%d %H:%M:%S ";
+static const char* gutil_log_ftime = gutil_log_ftime_default;
+static char* gutil_log_ftime_custom = NULL;
/* Adds thread id prefix */
gboolean gutil_log_tid = FALSE; /* Since 1.0.51 */
@@ -165,7 +168,8 @@
const char* prefix = "";
char* msg;
- if (gutil_log_timestamp) {
+ /* gutil_log_ftime is never NULL but can be empty */
+ if (gutil_log_timestamp && gutil_log_ftime[0]) {
time_t now;
#ifndef _WIN32
struct tm tm_;
@@ -173,7 +177,7 @@
#endif
time(&now);
- strftime(t, sizeof(t), "%Y-%m-%d %H:%M:%S ", localtime(&now));
+ strftime(t, sizeof(t), gutil_log_ftime, localtime(&now));
#undef localtime
} else {
t[0] = 0;
@@ -540,6 +544,34 @@
}
}
+/*
+ * Timestamp format only affects the output if gutil_log_timestamp is set
+ * to TRUE (by default it's FALSE). Ans it only affects stdio logging.
+ *
+ * The default timestamp format is "%Y-%m-%d %H:%M:%S ", see strftime(3)
+ * for details. Note that it includes a separator between the timestamp
+ * and the rest of the message. Passing in an empty string effectively
+ * disables timestamping, NULL restores the default format.
+ */
+void
+gutil_log_set_timestamp_format(
+ const char* f) /* Since 1.0.73 */
+{
+ if (f) {
+ if (g_strcmp0(f, gutil_log_ftime_custom)) {
+ char* old = gutil_log_ftime_custom;
+
+ /* Not sure if the format string should be validated */
+ gutil_log_ftime = gutil_log_ftime_custom = g_strdup(f);
+ g_free(old);
+ }
+ } else if (gutil_log_ftime_custom) {
+ g_free(gutil_log_ftime_custom);
+ gutil_log_ftime_custom = NULL;
+ gutil_log_ftime = gutil_log_ftime_default;
+ }
+}
+
/* gutil_log_parse_option helper */
static
int
@@ -693,7 +725,7 @@
}
/* Initialize defaults from the environment */
-#ifndef _WIN32
+#ifdef __GNUC__
__attribute__((constructor))
static
void
@@ -717,7 +749,15 @@
GDEBUG("Thread id prefix %s", (val > 0) ? "enabled" : "disabled");
}
}
-#endif
+
+__attribute__((destructor))
+static
+void
+gutil_log_deinit()
+{
+ gutil_log_set_timestamp_format(NULL);
+}
+#endif /* __GNUC__ */
/*
* Local Variables:
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/src/gutil_misc.c
^
|
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
* Copyright (C) 2016-2022 Jolla Ltd.
- * Copyright (C) 2016-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -57,6 +57,27 @@
}
void*
+gutil_object_ref(
+ void* object) /* Since 1.0.71 */
+{
+ /* Just a NULL-tolerant version of g_object_ref() */
+ if (object) {
+ g_object_ref(object);
+ }
+ return object;
+}
+
+void
+gutil_object_unref(
+ void* object) /* Since 1.0.71 */
+{
+ /* Just a NULL-tolerant version of g_object_unref */
+ if (object) {
+ g_object_unref(object);
+ }
+}
+
+void*
gutil_hex2bin(
const char* str,
gssize len,
@@ -90,6 +111,39 @@
return NULL;
}
+char*
+gutil_bin2hex(
+ const void* data,
+ gsize len,
+ gboolean upper_case) /* Since 1.0.71 */
+{
+ static const char hex[] = "0123456789abcdef";
+ static const char HEX[] = "0123456789ABCDEF";
+ const char* map = upper_case ? HEX : hex;
+ const guchar* ptr = data;
+ const guchar* end = ptr + len;
+ char* out = g_malloc(2 * len + 1);
+ char* dest = out;
+
+ while (ptr < end) {
+ const guchar b = *ptr++;
+
+ *dest++ = map[(b >> 4) & 0xf];
+ *dest++ = map[b & 0xf];
+ }
+
+ *dest = 0;
+ return out;
+}
+
+char*
+gutil_data2hex(
+ const GUtilData* data,
+ gboolean upper_case) /* Since 1.0.71 */
+{
+ return data ? gutil_bin2hex(data->bytes, data->size, upper_case) : NULL;
+}
+
GBytes*
gutil_hex2bytes(
const char* str,
@@ -294,7 +348,7 @@
const GUtilData*
gutil_data_from_string(
GUtilData* data,
- const char* str)
+ const char* str) /* Since 1.0.31 */
{
if (data) {
if (str) {
@@ -311,7 +365,7 @@
const GUtilData*
gutil_data_from_bytes(
GUtilData* data,
- GBytes* bytes)
+ GBytes* bytes) /* Since 1.0.31 */
{
if (data) {
if (bytes) {
@@ -324,6 +378,56 @@
return data;
}
+GUtilData*
+gutil_data_new(
+ const void* bytes,
+ guint len) /* Since 1.0.72 */
+{
+ /*
+ * The whole thing is allocated from a single memory block and
+ * has to be freed with a single g_free()
+ */
+ const gsize total = len + sizeof(GUtilData);
+ GUtilData* data = g_malloc(total);
+
+ if (bytes) {
+ void* contents = (void*)(data + 1);
+
+ data->bytes = contents;
+ data->size = len;
+ memcpy(contents, bytes, len);
+ } else {
+ memset(data, 0, sizeof(*data));
+ }
+ return data;
+}
+
+GUtilData*
+gutil_data_copy(
+ const GUtilData* data) /* Since 1.0.72 */
+{
+ /*
+ * The whole thing is allocated from a single memory block and
+ * has to be freed with a single g_free()
+ */
+ return data ? gutil_data_new(data->bytes, data->size) : NULL;
+}
+
+GVariant*
+gutil_data_copy_as_variant(
+ const GUtilData* data) /* Since 1.0.74 */
+{
+ /*
+ * Return a floating reference to a new array GVariant instance
+ * or NULL if the input is NULL.
+ */
+ return !data ? NULL : data->size ?
+ g_variant_new_fixed_array(G_VARIANT_TYPE_BYTE,
+ data->bytes, data->size, 1) :
+ g_variant_new_from_data(G_VARIANT_TYPE_BYTESTRING,
+ NULL, 0, TRUE, NULL, NULL);
+}
+
gboolean
gutil_data_has_prefix(
const GUtilData* data,
@@ -562,7 +666,7 @@
gutil_ptrv_length(
const void* ptrv) /* Since 1.0.50 */
{
- if (G_LIKELY(ptrv)) {
+ if (ptrv) {
gsize len = 0;
const gconstpointer* ptr = ptrv;
@@ -573,6 +677,13 @@
}
}
+gboolean
+gutil_ptrv_is_empty(
+ const void* ptrv) /* Since 1.0.71 */
+{
+ return !ptrv || !((gconstpointer*)ptrv)[0];
+}
+
/* Frees NULL-terminated array of pointers and whatever they're pointing to. */
void
gutil_ptrv_free(
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/src/gutil_objv.c
^
|
@@ -0,0 +1,343 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "gutil_objv.h"
+#include "gutil_misc.h"
+
+GObject**
+gutil_objv_new(
+ GObject* obj1,
+ ...) /* Since 1.0.72 */
+{
+ gsize len = 0;
+ GObject** objv;
+ GObject** ptr;
+
+ if (obj1) {
+ GObject* obj;
+ va_list args;
+
+ len++;
+ va_start(args, obj1);
+ while ((obj = va_arg(args, GObject*)) != NULL) {
+ len++;
+ }
+ va_end(args);
+ }
+
+ ptr = objv = g_new(GObject*, len + 1);
+ if (obj1) {
+ GObject* obj;
+ va_list args;
+
+ g_object_ref(*ptr++ = obj1);
+ va_start(args, obj1);
+ while ((obj = va_arg(args, GObject*)) != NULL) {
+ g_object_ref(*ptr++ = obj);
+ }
+ va_end(args);
+ }
+ *ptr = NULL;
+ return objv;
+}
+
+void
+gutil_objv_free(
+ GObject** objv)
+{
+ if (objv) {
+ GObject** ptr = objv;
+
+ while (*ptr) g_object_unref(*ptr++);
+ g_free(objv);
+ }
+}
+
+GObject**
+gutil_objv_copy(
+ GObject* const* objv)
+{
+ if (objv) {
+ GObject* const* ptr = objv;
+ gsize n = 0;
+
+ /* Count the objects and bump references at the same time */
+ while (*ptr) {
+ g_object_ref(*ptr++);
+ n++;
+ }
+ return gutil_memdup(objv, sizeof(GObject*) * (n + 1));
+ }
+ return NULL;
+
+}
+
+GObject**
+gutil_objv_add(
+ GObject** objv,
+ GObject* obj)
+{
+ if (obj) {
+ gsize len = gutil_ptrv_length(objv);
+
+ objv = g_renew(GObject*, objv, len + 2);
+ g_object_ref(objv[len++] = obj);
+ objv[len] = NULL;
+ }
+ return objv;
+}
+
+GObject**
+gutil_objv_insert(
+ GObject** objv,
+ GObject* obj,
+ gsize pos) /* Since 1.0.71 */
+{
+ if (obj) {
+ gsize len = gutil_ptrv_length(objv);
+
+ objv = g_renew(GObject*, objv, len + 2);
+ if (pos >= len) {
+ /* Insert as the last element */
+ g_object_ref(objv[len++] = obj);
+ objv[len] = NULL;
+ } else {
+ /* Insert somewhere in the middle (or at the very beginning) */
+ memmove(objv + (pos + 1), objv + pos, sizeof(GObject*) *
+ (len - pos + 1)); /* Move NULL too */
+ g_object_ref(objv[pos] = obj);
+ }
+ }
+ return objv;
+}
+
+GObject**
+gutil_objv_append(
+ GObject** objv,
+ GObject* const* objs) /* Since 1.0.71 */
+{
+ const gsize len2 = gutil_ptrv_length(objs);
+
+ if (len2 > 0) {
+ const gsize len1 = gutil_ptrv_length(objv);
+ GObject* const* src;
+ GObject** dest;
+
+ objv = g_renew(GObject*, objv, len1 + len2 + 1);
+ dest = objv + len1;
+ src = objs;
+ while (*src) {
+ *dest++ = g_object_ref(*src++);
+ }
+ *dest = NULL;
+ }
+ return objv;
+}
+
+static
+gssize
+gutil_objv_find_last_impl(
+ GObject* const* objv,
+ GObject* obj,
+ gsize i /* exclisive */)
+{
+ while (i > 0) {
+ if (objv[--i] == obj) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+static
+GObject**
+gutil_objv_remove_impl(
+ GObject** objv,
+ gsize pos,
+ gsize len)
+{
+ g_object_unref(objv[pos]);
+ memmove(objv + pos, objv + (pos + 1), sizeof(GObject*) * (len - pos));
+ return g_realloc(objv, sizeof(GObject*) * len);
+}
+
+GObject**
+gutil_objv_remove(
+ GObject** objv,
+ GObject* obj,
+ gboolean all)
+{
+ if (objv && obj) {
+ const gssize pos = gutil_objv_find(objv, obj);
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/src/gutil_timenotify.c
^
|
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2016-2023 Slava Monich <slava@monich.com>
* Copyright (C) 2016-2019 Jolla Ltd.
- * Copyright (C) 2016-2019 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -61,21 +61,24 @@
static guint gutil_time_notify_signals[SIGNAL_COUNT] = { 0 };
+#define PARENT_CLASS gutil_time_notify_parent_class
+#define THIS_TYPE gutil_time_notify_get_type()
+#define THIS(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, THIS_TYPE, GUtilTimeNotify)
+
+GType THIS_TYPE G_GNUC_INTERNAL;
typedef GObjectClass GUtilTimeNotifyClass;
G_DEFINE_TYPE(GUtilTimeNotify, gutil_time_notify, G_TYPE_OBJECT)
-#define GUTIL_TIME_NOTIFY_TYPE (gutil_time_notify_get_type())
-#define GUTIL_TIME_NOTIFY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),\
- GUTIL_TIME_NOTIFY_TYPE, GUtilTimeNotify))
GUtilTimeNotify*
gutil_time_notify_new()
{
/* There's no need to have more than one instance. */
static GUtilTimeNotify* gutil_time_notify_instance = NULL;
+
if (gutil_time_notify_instance) {
gutil_time_notify_ref(gutil_time_notify_instance);
} else {
- gutil_time_notify_instance = g_object_new(GUTIL_TIME_NOTIFY_TYPE, 0);
+ gutil_time_notify_instance = g_object_new(THIS_TYPE, 0);
g_object_add_weak_pointer(G_OBJECT(gutil_time_notify_instance),
(gpointer*)(&gutil_time_notify_instance));
}
@@ -87,7 +90,7 @@
GUtilTimeNotify* self)
{
if (G_LIKELY(self)) {
- g_object_ref(GUTIL_TIME_NOTIFY(self));
+ g_object_ref(THIS(self));
}
return self;
}
@@ -97,7 +100,7 @@
GUtilTimeNotify* self)
{
if (G_LIKELY(self)) {
- g_object_unref(GUTIL_TIME_NOTIFY(self));
+ g_object_unref(THIS(self));
}
}
@@ -128,7 +131,8 @@
GIOCondition condition,
gpointer user_data)
{
- GUtilTimeNotify* self = GUTIL_TIME_NOTIFY(user_data);
+ GUtilTimeNotify* self = THIS(user_data);
+
if (condition & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) {
self->io_watch_id = 0;
return G_SOURCE_REMOVE;
@@ -136,6 +140,7 @@
gsize bytes_read = 0;
GError* error = NULL;
guint64 exp;
+
gutil_time_notify_ref(self);
g_io_channel_read_chars(self->io_channel, (void*)&exp, sizeof(exp),
&bytes_read, &error);
@@ -156,8 +161,10 @@
GUtilTimeNotify* self)
{
const int fd = timerfd_create(CLOCK_REALTIME, 0);
+
if (fd >= 0) {
struct itimerspec timer;
+
self->io_channel = g_io_channel_unix_new(fd);
g_io_channel_set_close_on_unref(self->io_channel, TRUE);
g_io_channel_set_encoding(self->io_channel, NULL, NULL);
@@ -184,7 +191,8 @@
gutil_time_notify_finalize(
GObject* object)
{
- GUtilTimeNotify* self = GUTIL_TIME_NOTIFY(object);
+ GUtilTimeNotify* self = THIS(object);
+
if (self->io_channel) {
if (self->io_watch_id) {
g_source_remove(self->io_watch_id);
@@ -192,7 +200,7 @@
g_io_channel_shutdown(self->io_channel, FALSE, NULL);
g_io_channel_unref(self->io_channel);
}
- G_OBJECT_CLASS(gutil_time_notify_parent_class)->finalize(object);
+ G_OBJECT_CLASS(PARENT_CLASS)->finalize(object);
}
static
@@ -200,8 +208,7 @@
gutil_time_notify_class_init(
GUtilTimeNotifyClass* klass)
{
- GObjectClass* object_class = G_OBJECT_CLASS(klass);
- object_class->finalize = gutil_time_notify_finalize;
+ G_OBJECT_CLASS(klass)->finalize = gutil_time_notify_finalize;
gutil_time_notify_signals[SIGNAL_TIME_CHANGED] =
g_signal_new(SIGNAL_TIME_CHANGED_NAME, G_OBJECT_CLASS_TYPE(klass),
G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/src/gutil_version.c
^
|
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "gutil_version.h"
+
+const guint gutil_version_major = GUTIL_VERSION_MAJOR;
+const guint gutil_version_minor = GUTIL_VERSION_MINOR;
+const guint gutil_version_micro = GUTIL_VERSION_MICRO;
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/Makefile
^
|
@@ -2,6 +2,7 @@
all:
%:
+ @$(MAKE) -C test_datapack $*
@$(MAKE) -C test_history $*
@$(MAKE) -C test_idlepool $*
@$(MAKE) -C test_idlequeue $*
@@ -10,6 +11,7 @@
@$(MAKE) -C test_ints $*
@$(MAKE) -C test_log $*
@$(MAKE) -C test_misc $*
+ @$(MAKE) -C test_objv $*
@$(MAKE) -C test_ring $*
@$(MAKE) -C test_strv $*
@$(MAKE) -C test_weakref $*
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/common/Makefile
^
|
@@ -49,6 +49,8 @@
BASE_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS)
BASE_CFLAGS = $(BASE_FLAGS) $(CFLAGS)
FULL_CFLAGS = $(BASE_CFLAGS) $(DEFINES) $(WARNINGS) $(INCLUDES) -MMD -MP \
+ -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 \
+ -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_MAX_ALLOWED \
$(shell pkg-config --cflags $(PKGS))
FULL_LDFLAGS = $(BASE_LDFLAGS)
LIBS = $(shell pkg-config --libs $(PKGS))
@@ -57,10 +59,7 @@
RELEASE_FLAGS =
COVERAGE_FLAGS = -g
-ifndef KEEP_SYMBOLS
-KEEP_SYMBOLS = 0
-endif
-
+KEEP_SYMBOLS ?= 0
ifneq ($(KEEP_SYMBOLS),0)
RELEASE_FLAGS += -g
SUBMAKE_OPTS += KEEP_SYMBOLS=1
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/coverage/run
^
|
@@ -4,6 +4,7 @@
#
TESTS="\
+test_datapack \
test_history \
test_idlepool \
test_idlequeue \
@@ -12,6 +13,7 @@
test_ints \
test_log \
test_misc \
+test_objv \
test_ring \
test_strv \
test_weakref"
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/test_datapack/Makefile
^
|
@@ -0,0 +1,5 @@
+# -*- Mode: makefile-gmake -*-
+
+EXE = test_datapack
+
+include ../common/Makefile
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/test_datapack/test_datapack.c
^
|
@@ -0,0 +1,873 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "test_common.h"
+
+#include "gutil_datapack.h"
+
+static TestOpt test_opt;
+
+#define TEST_(name) "/datapack/" name
+
+static const guint8 test_unsigned_mbn_data_0[] = { 0x00 };
+static const guint8 test_unsigned_mbn_data_64[] = { 0x40 };
+static const guint8 test_unsigned_mbn_data_127[] = { 0x7f };
+static const guint8 test_unsigned_mbn_data_128[] = { 0x81, 0x00 };
+static const guint8 test_unsigned_mbn_data_257[] = { 0x82, 0x01 };
+static const guint8 test_unsigned_mbn_data_383[] = { 0x82, 0x7f };
+static const guint8 test_unsigned_mbn_data_16383[] = { 0xff, 0x7f };
+static const guint8 test_unsigned_mbn_data_max64[] =
+ { 0x81, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f };
+
+static const guint8 test_signed_mbn_data_0[] = { 0x00 };
+static const guint8 test_signed_mbn_data_33[] = { 0x21 };
+static const guint8 test_signed_mbn_data_m33[] = { 0x5f };
+static const guint8 test_signed_mbn_data_65[] = { 0x80, 0x41 };
+static const guint8 test_signed_mbn_data_m65[] = { 0xff, 0x3f };
+static const guint8 test_signed_mbn_data_127[] = { 0x80, 0x7f };
+static const guint8 test_signed_mbn_data_128[] = { 0x81, 0x00 };
+static const guint8 test_signed_mbn_data_129[] = { 0x81, 0x01 };
+static const guint8 test_signed_mbn_data_m129[] = { 0xfe, 0x7f };
+static const guint8 test_signed_mbn_data_257[] = { 0x82, 0x01 };
+static const guint8 test_signed_mbn_data_383[] = { 0x82, 0x7f };
+static const guint8 test_signed_mbn_data_16383[] = { 0x80, 0xff, 0x7f };
+static const guint8 test_signed_mbn_data_m16383[] = { 0xff, 0x80, 0x01 };
+static const guint8 test_signed_mbn_data_min64[] = {
+ 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
+ 0x80, 0x00
+};
+static const guint8 test_signed_mbn_data_max64[] = {
+ 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0x7f
+};
+
+typedef struct {
+ const char* name;
+ GUtilData input;
+} TestDecodeFail;
+
+static const guint8 test_mbn_decode_fail_data_short[] = { 0x80 };
+static const guint8 test_mbn_decode_fail_data_too_long[] = {
+ 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
+ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f
+};
+
+/*==========================================================================*
+ * mbn/corner_cases
+ *==========================================================================*/
+
+static
+void
+test_mbn_corner_cases()
+{
+ guint8 buf[1];
+
+ g_assert_cmpuint(gutil_signed_mbn_encode2(buf, 0, 0), == ,0);
+ g_assert_cmpuint(gutil_unsigned_mbn_encode2(buf, 0, 0), == ,0);
+}
+
+/*==========================================================================*
+ * signed_mbn/size
+ *==========================================================================*/
+
+typedef struct {
+ const char* name;
+ gint64 input;
+ guint output;
+} TestSignedMbnSizeData;
+
+/* Use test_mbn_write test data as input */
+static const TestSignedMbnSizeData test_signed_mbn_size_data[] = {
+#define TEST_CASE(x) TEST_("signed_mbn/size/") x
+#define TEST_DATA(x) TEST_CASE(#x), x, sizeof(test_signed_mbn_data_##x)
+#define TEST_DATA_(x) TEST_CASE("-" #x), -x, sizeof(test_signed_mbn_data_m##x)
+ { TEST_DATA(0) },
+ { TEST_DATA(33) },
+ { TEST_DATA_(33) },
+ { TEST_DATA(65) },
+ { TEST_DATA_(65) },
+ { TEST_DATA(127) },
+ { TEST_DATA(128) },
+ { TEST_DATA(129) },
+ { TEST_DATA_(129) },
+ { TEST_DATA(257) },
+ { TEST_DATA(383) },
+ { TEST_DATA(16383) },
+ { TEST_DATA_(16383) },
+ { TEST_CASE("min64"), G_MININT64, sizeof(test_signed_mbn_data_min64) },
+ { TEST_CASE("max64"), G_MAXINT64, sizeof(test_signed_mbn_data_max64) }
+#undef TEST_CASE
+#undef TEST_DATA
+#undef TEST_DATA_
+};
+
+static
+void
+test_signed_mbn_size(
+ gconstpointer data)
+{
+ const TestSignedMbnSizeData* test = data;
+
+ g_assert_cmpuint(gutil_signed_mbn_size(test->input), == ,test->output);
+}
+
+/*==========================================================================*
+ * signed_mbn/encode
+ *==========================================================================*/
+
+typedef struct {
+ const char* name;
+ gint64 input;
+ GUtilData output;
+} TestSignedMbnEncode;
+
+static const TestSignedMbnEncode test_signed_mbn_encode_data[] = {
+#define TEST_CASE(x) TEST_("signed_mbn/encode/") x
+#define TEST_DATA(x) TEST_CASE(#x), x, \
+ { TEST_ARRAY_AND_SIZE(test_signed_mbn_data_##x) }
+#define TEST_DATA_(x) TEST_CASE("-" #x), -x, \
+ { TEST_ARRAY_AND_SIZE(test_signed_mbn_data_m##x) }
+ { TEST_DATA(0) },
+ { TEST_DATA(33) },
+ { TEST_DATA_(33) },
+ { TEST_DATA(65) },
+ { TEST_DATA_(65) },
+ { TEST_DATA(127) },
+ { TEST_DATA(128) },
+ { TEST_DATA(129) },
+ { TEST_DATA_(129) },
+ { TEST_DATA(257) },
+ { TEST_DATA(383) },
+ { TEST_DATA(16383) },
+ { TEST_DATA_(16383) },
+ { TEST_CASE("min64"), G_MININT64,
+ { TEST_ARRAY_AND_SIZE(test_signed_mbn_data_min64) } },
+ { TEST_CASE("max64"), G_MAXINT64,
+ { TEST_ARRAY_AND_SIZE(test_signed_mbn_data_max64) } }
+#undef TEST_CASE
+#undef TEST_DATA
+#undef TEST_DATA_
+};
+
+static
+void
+test_signed_mbn_encode(
+ gconstpointer data)
+{
+ const TestSignedMbnEncode* test = data;
+ guint8* buf = g_malloc(test->output.size);
+
+ memset(buf, 0xaa, test->output.size);
+ g_assert_cmpuint(gutil_signed_mbn_encode(buf, test->input), == ,
+ test->output.size);
+ g_assert(!memcmp(buf, test->output.bytes, test->output.size));
+
+ g_free(buf);
+}
+
+/*==========================================================================*
+ * signed_mbn/decode/ok
+ *==========================================================================*/
+
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/test_log/test_log.c
^
|
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2017-2023 Slava Monich <slava@monich.com>
* Copyright (C) 2017-2022 Jolla Ltd.
- * Copyright (C) 2017-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -157,6 +157,7 @@
FILE* out = fopencookie(buf, "w", funcs);
FILE* default_stdout = stdout;
const int level = gutil_log_default.level;
+ gboolean use_timestamp;
GLogProc2 log_proc;
g_assert(out);
@@ -213,6 +214,41 @@
g_assert_cmpstr(buf->str, == ,"Test\n");
g_string_set_size(buf, 0);
+ /* Timestamp prefix */
+ use_timestamp = gutil_log_timestamp;
+ gutil_log_timestamp = TRUE;
+ stdout = out;
+ gutil_log_set_timestamp_format("timestamp1 ");
+ gutil_log_set_timestamp_format("timestamp1 ");
+ gutil_log(NULL, GLOG_LEVEL_ALWAYS, "test1");
+ stdout = default_stdout;
+ g_assert(fflush(out) == 0);
+ GDEBUG("%s", buf->str);
+ g_assert_cmpstr(buf->str, == ,"timestamp1 test1\n");
+ g_string_set_size(buf, 0);
+
+ stdout = out;
+ gutil_log_set_timestamp_format("timestamp2 ");
+ gutil_log(NULL, GLOG_LEVEL_ALWAYS, "test2");
+ stdout = default_stdout;
+ g_assert(fflush(out) == 0);
+ GDEBUG("%s", buf->str);
+ g_assert_cmpstr(buf->str, == ,"timestamp2 test2\n");
+ g_string_set_size(buf, 0);
+
+ stdout = out;
+ gutil_log_set_timestamp_format("");
+ gutil_log(NULL, GLOG_LEVEL_ALWAYS, "test");
+ stdout = default_stdout;
+ g_assert(fflush(out) == 0);
+ GDEBUG("%s", buf->str);
+ g_assert_cmpstr(buf->str, == ,"test\n");
+ g_string_set_size(buf, 0);
+
+ gutil_log_set_timestamp_format(NULL);
+ gutil_log_set_timestamp_format(NULL);
+ gutil_log_timestamp = use_timestamp;
+
/* Forward output to test_log_drop */
log_proc = gutil_log_default.log_proc;
gutil_log_default.log_proc = test_log_drop;
|
[-]
[+]
|
Changed |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/test_misc/test_misc.c
^
|
@@ -1,6 +1,6 @@
/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
* Copyright (C) 2016-2022 Jolla Ltd.
- * Copyright (C) 2016-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -35,10 +35,23 @@
#include "gutil_misc.h"
#include "gutil_idlepool.h"
#include "gutil_log.h"
+#include "gutil_version.h"
static TestOpt test_opt;
/*==========================================================================*
+ * version
+ *==========================================================================*/
+
+static
+void
+test_version(
+ void)
+{
+ g_assert_cmpuint(gutil_version(), == ,GUTIL_VERSION);
+}
+
+/*==========================================================================*
* disconnect
*==========================================================================*/
@@ -81,6 +94,36 @@
}
/*==========================================================================*
+ * ref
+ *==========================================================================*/
+
+static
+void
+test_ref(
+ void)
+{
+ GObject* obj = g_object_new(TEST_OBJECT_TYPE, NULL);
+
+ g_assert(!gutil_object_ref(NULL));
+ g_assert(gutil_object_ref(obj) == obj);
+ g_object_unref(obj);
+ g_object_unref(obj);
+}
+
+/*==========================================================================*
+ * unref
+ *==========================================================================*/
+
+static
+void
+test_unref(
+ void)
+{
+ gutil_object_unref(NULL);
+ gutil_object_unref(g_object_new(TEST_OBJECT_TYPE, NULL));
+}
+
+/*==========================================================================*
* hex2bin
*==========================================================================*/
@@ -127,6 +170,46 @@
}
/*==========================================================================*
+ * bin2hex
+ *==========================================================================*/
+
+static
+void
+test_bin2hex(
+ void)
+{
+ static const guchar bin[] = { 0x89, 0xab, 0xcd, 0xef };
+ static const GUtilData data = { TEST_ARRAY_AND_SIZE(bin) };
+ char* str;
+
+ /* gutil_data2hex return NULL if data is NULL */
+ g_assert(!gutil_data2hex(NULL, FALSE));
+
+ /* Data isn't touched if len is zero */
+ str = gutil_bin2hex(NULL, 0, FALSE);
+ g_assert_cmpstr(str, == ,"");
+ g_free(str);
+
+ /* Lower case */
+ str = gutil_bin2hex(bin, sizeof(bin), FALSE);
+ g_assert_cmpstr(str, == ,"89abcdef");
+ g_free(str);
+
+ str = gutil_data2hex(&data, FALSE);
+ g_assert_cmpstr(str, == ,"89abcdef");
+ g_free(str);
+
+ /* Upper case */
+ str = gutil_bin2hex(bin, sizeof(bin), TRUE);
+ g_assert_cmpstr(str, == ,"89ABCDEF");
+ g_free(str);
+
+ str = gutil_data2hex(&data, TRUE);
+ g_assert_cmpstr(str, == ,"89ABCDEF");
+ g_free(str);
+}
+
+/*==========================================================================*
* hexdump
*==========================================================================*/
@@ -466,6 +549,66 @@
}
/*==========================================================================*
+ * data_copy
+ *==========================================================================*/
+
+static
+void
+test_data_copy(
+ void)
+{
+ static const guint8 src_data[] = { '1', '2', '3' };
+ GUtilData* data;
+ GUtilData src;
+
+ TEST_INIT_DATA(src, src_data);
+
+ g_assert(!gutil_data_copy(NULL));
+ data = gutil_data_copy(&src);
+ g_assert(gutil_data_equal(data, &src));
+ g_free(data);
+
+ /* This is wrong but when pointer is NULL, the length is ignored */
+ data = gutil_data_new(NULL, 1000);
+ g_assert(!data->bytes);
+ g_assert(!data->size);
+ g_free(data);
+
+ data = gutil_data_new(TEST_ARRAY_AND_SIZE(src_data));
+ g_assert(gutil_data_equal(data, &src));
+ g_free(data);
+}
+
+/*==========================================================================*
+ * data_copy_as_variant
+ *==========================================================================*/
+
+static
+void
+test_data_copy_as_variant(
+ void)
+{
+ static const guint8 bytes[] = { '1', '2', '3' };
+ GVariant* var;
+ GUtilData data;
+
+ g_assert(!gutil_data_copy_as_variant(NULL));
+
+ memset(&data, 0, sizeof(data));
+ var = gutil_data_copy_as_variant(&data);
+ g_assert(var);
+ g_assert_cmpuint(g_variant_get_size(var), == ,0);
+ g_variant_unref(g_variant_ref_sink(var));
+
+ TEST_INIT_DATA(data, bytes);
+ var = gutil_data_copy_as_variant(&data);
+ g_assert(var);
+ g_assert_cmpuint(data.size, == ,g_variant_get_size(var));
+ g_assert(!memcmp(data.bytes, g_variant_get_data(var), data.size));
+ g_variant_unref(g_variant_ref_sink(var));
+}
+
+/*==========================================================================*
* bytes_concat
*==========================================================================*/
@@ -640,6 +783,23 @@
}
/*==========================================================================*
+ * ptrv_is_empty
+ *==========================================================================*/
+
+static
+void
+test_ptrv_is_empty(
+ void)
+{
+ static const gconstpointer ptrv0[] = { NULL };
+ static const gconstpointer ptrv1[] = { ptrv0, NULL };
+
+ g_assert(gutil_ptrv_is_empty(NULL));
+ g_assert(gutil_ptrv_is_empty(ptrv0));
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/test_objv/Makefile
^
|
@@ -0,0 +1,5 @@
+# -*- Mode: makefile-gmake -*-
+
+EXE = test_objv
+
+include ../common/Makefile
|
[-]
[+]
|
Added |
_service:tar_git:libglibutil-1.0.74.tar.bz2/test/test_objv/test_objv.c
^
|
@@ -0,0 +1,408 @@
+/*
+ * Copyright (C) 2023 Slava Monich <slava@monich.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "test_common.h"
+
+#include "gutil_objv.h"
+#include "gutil_misc.h"
+
+static TestOpt test_opt;
+
+/*==========================================================================*
+ * null
+ *==========================================================================*/
+
+static
+void
+test_null(
+ void)
+{
+ g_assert(!gutil_objv_copy(NULL));
+ g_assert(!gutil_objv_add(NULL, NULL));
+ g_assert(!gutil_objv_append(NULL, NULL));
+ g_assert(!gutil_objv_insert(NULL, NULL, 0));
+ g_assert(!gutil_objv_remove(NULL, NULL, FALSE));
+ g_assert(!gutil_objv_remove_at(NULL, 0));
+ g_assert(!gutil_objv_at(NULL, 0));
+ g_assert(!gutil_objv_first(NULL));
+ g_assert(!gutil_objv_last(NULL));
+ g_assert(!gutil_objv_contains(NULL, NULL));
+ g_assert_cmpint(gutil_objv_find(NULL, NULL), < ,0);
+ g_assert_cmpint(gutil_objv_find_last(NULL, NULL), < ,0);
+ g_assert(gutil_objv_equal(NULL, NULL));
+ gutil_objv_free(NULL);
+}
+
+/*==========================================================================*
+ * basic
+ *==========================================================================*/
+
+static
+void
+test_basic(
+ void)
+{
+ GObject* o1 = g_object_new(TEST_OBJECT_TYPE, NULL);
+ GObject* o2 = g_object_new(TEST_OBJECT_TYPE, NULL);
+ GObject** v = gutil_objv_add(NULL, o1);
+ GWeakRef r1, r2;
+
+ g_weak_ref_init(&r1, o1);
+ g_weak_ref_init(&r2, o2);
+
+ /* v keeps references to both objects */
+ g_object_unref(o1);
+ g_assert(g_weak_ref_get(&r1) == o1);
+ g_object_unref(o1);
+
+ g_assert(gutil_objv_contains(v, o1));
+ g_assert(!gutil_objv_contains(v, o2));
+
+ g_assert_cmpuint(gutil_ptrv_length(v), == ,1);
+ v = gutil_objv_add(v, o2);
+ g_assert_cmpuint(gutil_ptrv_length(v), == ,2);
+ g_assert(gutil_objv_contains(v, o2));
+
+ g_assert(gutil_objv_at(v, 0) == o1);
+ g_assert(gutil_objv_at(v, 1) == o2);
+ g_assert(!gutil_objv_at(v, 2));
+ g_assert(!gutil_objv_at(v, 3));
+
+ g_assert(gutil_objv_first(v) == o1);
+ g_assert(gutil_objv_last(v) == o2);
+ g_assert_cmpint(gutil_objv_find(v, o1), == ,0);
+ g_assert_cmpint(gutil_objv_find_last(v, o1), == ,0);
+
+ v = gutil_objv_remove(v, o1, FALSE);
+ g_assert_cmpuint(gutil_ptrv_length(v), == ,1);
+ g_assert(!gutil_objv_at(v, 1));
+ g_assert(gutil_objv_remove(v, o1, FALSE) == v);
+ g_assert(gutil_objv_remove(v, NULL, FALSE) == v);
+ g_assert_cmpuint(gutil_ptrv_length(v), == ,1);
+ g_assert(!g_weak_ref_get(&r1));
+
+ g_object_unref(o2);
+ gutil_objv_free(v);
+ g_assert(!g_weak_ref_get(&r2));
+}
+
+/*==========================================================================*
+ * new
+ *==========================================================================*/
+
+static
+void
+test_new(
+ void)
+{
+ GObject* o1 = g_object_new(TEST_OBJECT_TYPE, NULL);
+ GObject* o2 = g_object_new(TEST_OBJECT_TYPE, NULL);
+ GObject** v;
+ GWeakRef r1, r2;
+
+ g_weak_ref_init(&r1, o1);
+ g_weak_ref_init(&r2, o2);
+
+ v = gutil_objv_new(NULL, NULL);
+ g_assert(v);
+ g_assert(!gutil_ptrv_length(v));
+ gutil_objv_free(v);
+
+ /* v keeps references to both objects */
+ v = gutil_objv_new(o1, o2, NULL);
+ g_assert(v[0] == o1);
+ g_assert(v[1] == o2);
+ g_assert(!v[2]);
+
+ g_object_unref(o1);
+ g_assert(g_weak_ref_get(&r1) == o1);
+ g_object_unref(o1);
+
+ g_object_unref(o2);
+ g_assert(g_weak_ref_get(&r2) == o2);
+ g_object_unref(o2);
+
+ gutil_objv_free(v);
+ g_assert(!g_weak_ref_get(&r1));
+ g_assert(!g_weak_ref_get(&r2));
+}
+
+/*==========================================================================*
+ * insert
+ *==========================================================================*/
+
+static
+void
+test_insert(
+ void)
+{
+ GObject* o1 = g_object_new(TEST_OBJECT_TYPE, NULL);
+ GObject* o2 = g_object_new(TEST_OBJECT_TYPE, NULL);
+ GObject* o3 = g_object_new(TEST_OBJECT_TYPE, NULL);
+ GObject** v;
+ GWeakRef r1, r2, r3;
+
+ g_weak_ref_init(&r1, o1);
+ g_weak_ref_init(&r2, o2);
+ g_weak_ref_init(&r3, o3);
+
+ v = gutil_objv_add(gutil_objv_add(NULL, o1), o2);
+
+ /* Insert at the end (with index beyond the valid range) */
+ v = gutil_objv_insert(v, o3, 100);
+
+ g_assert_cmpuint(gutil_ptrv_length(v), == ,3);
+ g_assert(gutil_objv_at(v, 0) == o1);
+ g_assert(gutil_objv_at(v, 1) == o2);
+ g_assert(gutil_objv_at(v, 2) == o3);
+
+ /* Again at the end (with the right index) */
+ v = gutil_objv_remove_at(v, 2);
+
+ g_assert_cmpuint(gutil_ptrv_length(v), == ,2);
+ g_assert(gutil_objv_at(v, 0) == o1);
+ g_assert(gutil_objv_at(v, 1) == o2);
+
+ v = gutil_objv_insert(v, o3, 2);
+
+ g_assert_cmpuint(gutil_ptrv_length(v), == ,3);
+ g_assert(gutil_objv_at(v, 0) == o1);
+ g_assert(gutil_objv_at(v, 1) == o2);
+ g_assert(gutil_objv_at(v, 2) == o3);
|