diff options
Diffstat (limited to 'plugins/doat')
-rw-r--r-- | plugins/doat/Makefile.am | 6 | ||||
-rw-r--r-- | plugins/doat/doat.c | 18 | ||||
-rw-r--r-- | plugins/doat/doat.vcxproj | 68 |
3 files changed, 23 insertions, 69 deletions
diff --git a/plugins/doat/Makefile.am b/plugins/doat/Makefile.am index abfca29e..a04d2863 100644 --- a/plugins/doat/Makefile.am +++ b/plugins/doat/Makefile.am @@ -2,7 +2,7 @@ libdir = $(hexchatlibdir) lib_LTLIBRARIES = doat.la doat_la_SOURCES = doat.c -doat_la_LDFLAGS = -avoid-version -module -doat_la_LIBADD = -AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(srcdir)/../../src/common +doat_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module +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 194be1a3..1d1bfcdf 100644 --- a/plugins/doat/doat.c +++ b/plugins/doat/doat.c @@ -5,9 +5,12 @@ * http://sam.zoy.org/wtfpl/COPYING or http://lwsitu.com/xchat/COPYING * for more details. */ +#include "config.h" + #include <stdlib.h> #include <string.h> #include <stdio.h> +#include <glib.h> #include "hexchat-plugin.h" static hexchat_plugin *ph; @@ -31,7 +34,7 @@ parse_command( char *word[], char *word_eol[], void *userdata ) { break; } - channel = strdup( token ); + channel = g_strdup( token ); delimiter = strchr( channel, '/' ); @@ -40,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; } @@ -58,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..ae44d7f8 100644 --- a/plugins/doat/doat.vcxproj +++ b/plugins/doat/doat.vcxproj @@ -2,6 +2,7 @@ <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup Label="Configuration"> <PlatformToolset>v120</PlatformToolset> + <ConfigurationType>DynamicLibrary</ConfigurationType> </PropertyGroup> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Release|Win32"> @@ -19,75 +20,32 @@ <RootNamespace>doat</RootNamespace> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <WholeProgramOptimization>true</WholeProgramOptimization> - <CharacterSet>MultiByte</CharacterSet> - </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\win32\hexchat.props" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - <Import Project="..\..\win32\hexchat.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <LinkIncremental>false</LinkIncremental> - <TargetName>hcdoat</TargetName> - <OutDir>$(HexChatBin)</OutDir> - <IntDir>$(HexChatObj)$(ProjectName)\</IntDir> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> - <LinkIncremental>false</LinkIncremental> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="..\..\win32\hexchat.props" /> + <PropertyGroup> <TargetName>hcdoat</TargetName> - <OutDir>$(HexChatBin)</OutDir> - <IntDir>$(HexChatObj)$(ProjectName)\</IntDir> + <OutDir>$(HexChatRel)plugins\</OutDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <MultiProcessorCompilation>true</MultiProcessorCompilation> + <AdditionalIncludeDirectories>..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> + <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies> <ModuleDefinitionFile>doat.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> - <PrecompiledHeader> - </PrecompiledHeader> - <FunctionLevelLinking>true</FunctionLevelLinking> - <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <AdditionalIncludeDirectories>..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <MultiProcessorCompilation>true</MultiProcessorCompilation> + <AdditionalIncludeDirectories>..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ClCompile> <Link> - <SubSystem>Windows</SubSystem> - <GenerateDebugInformation>true</GenerateDebugInformation> - <EnableCOMDATFolding>true</EnableCOMDATFolding> - <OptimizeReferences>true</OptimizeReferences> + <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies> <ModuleDefinitionFile>doat.def</ModuleDefinitionFile> </Link> </ItemDefinitionGroup> @@ -98,6 +56,4 @@ <None Include="doat.def" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project> \ No newline at end of file +</Project> |