diff options
Diffstat (limited to 'plugins/doat')
-rw-r--r-- | plugins/doat/Makefile.am | 4 | ||||
-rw-r--r-- | plugins/doat/doat.c | 16 | ||||
-rw-r--r-- | plugins/doat/doat.vcxproj | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/plugins/doat/Makefile.am b/plugins/doat/Makefile.am index 10b38cc6..a04d2863 100644 --- a/plugins/doat/Makefile.am +++ b/plugins/doat/Makefile.am @@ -3,6 +3,6 @@ libdir = $(hexchatlibdir) lib_LTLIBRARIES = doat.la doat_la_SOURCES = doat.c doat_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module -doat_la_LIBADD = -doat_la_CFLAGS = -I$(top_srcdir)/src/common +doat_la_LIBADD = $(GLIB_LIBS) +doat_la_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)/src/common diff --git a/plugins/doat/doat.c b/plugins/doat/doat.c index 5e0aa4eb..1d1bfcdf 100644 --- a/plugins/doat/doat.c +++ b/plugins/doat/doat.c @@ -10,6 +10,7 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> +#include <glib.h> #include "hexchat-plugin.h" static hexchat_plugin *ph; @@ -33,7 +34,7 @@ parse_command( char *word[], char *word_eol[], void *userdata ) { break; } - channel = strdup( token ); + channel = g_strdup( token ); delimiter = strchr( channel, '/' ); @@ -42,13 +43,13 @@ parse_command( char *word[], char *word_eol[], void *userdata ) { *delimiter = '\0'; if( strlen( delimiter + 1 ) > 0 ) { - server = strdup( delimiter + 1 ); + server = g_strdup( delimiter + 1 ); } } /* /Network form */ if( strlen( channel ) == 0 ) { - free( channel ); + g_free( channel ); channel = NULL; } @@ -60,13 +61,8 @@ parse_command( char *word[], char *word_eol[], void *userdata ) { } } - if( channel != NULL ) { - free( channel ); - } - - if( server != NULL ) { - free( server ); - } + g_free( channel ); + g_free( server ); } } return HEXCHAT_EAT_HEXCHAT; diff --git a/plugins/doat/doat.vcxproj b/plugins/doat/doat.vcxproj index 171e2b0d..86c80f09 100644 --- a/plugins/doat/doat.vcxproj +++ b/plugins/doat/doat.vcxproj @@ -62,7 +62,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Link> @@ -70,6 +70,8 @@ <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> + <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies> <ModuleDefinitionFile>doat.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> @@ -80,7 +82,7 @@ <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <AdditionalIncludeDirectories>..\..\src\common;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Link> @@ -88,6 +90,8 @@ <GenerateDebugInformation>true</GenerateDebugInformation> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> + <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies> <ModuleDefinitionFile>doat.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> |