From 322d1c62fde79b6a5121f48d50724baf064b6ad9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 11 Aug 2014 22:59:22 -0700 Subject: Skeleton of editline support. --- .editorconfig | 9 +++++++++ Balau | 2 +- Dalos-cli.sln | 48 ++++++++++------------------------------------- Dalos-cli.vcxproj | 12 ++++++++---- Dalos-cli.vcxproj.filters | 24 ++++++++++++++++++++++++ Dalos-modules | 2 +- Makefile | 2 ++ src/Dalos-cli.cc | 7 +------ 8 files changed, 56 insertions(+), 50 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..2330a45 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true +[**] +end_of_line = LF +indent_style = space +indent_size = 4 +insert_final_newline = true + +[**.js] +indent_size = 2 diff --git a/Balau b/Balau index 99992fd..b384e35 160000 --- a/Balau +++ b/Balau @@ -1 +1 @@ -Subproject commit 99992fdf4c09b6ee582874b6b563a2c242498640 +Subproject commit b384e35959a17fc5b85655184534b96add5904b5 diff --git a/Dalos-cli.sln b/Dalos-cli.sln index fc7c8c3..c976352 100644 --- a/Dalos-cli.sln +++ b/Dalos-cli.sln @@ -1,29 +1,27 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21126.0 +VisualStudioVersion = 12.0.30501.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "Dalos-cli", "Dalos-cli.vcxproj", "{579CA850-21B1-11E4-8C21-0800200C9A66}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Dalos-cli", "Dalos-cli.vcxproj", "{579CA850-21B1-11E4-8C21-0800200C9A66}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "Balau", "Balau\win32\project\Balau.vcxproj", "{6E74C651-E02E-4BEC-ADDB-7E2A79E0F6F7}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Balau", "Balau\win32\project\Balau.vcxproj", "{6E74C651-E02E-4BEC-ADDB-7E2A79E0F6F7}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "c-ares", "Balau\win32\project\c-ares.vcxproj", "{4D6AFE58-8573-4F3F-9CB7-EFF38BDC9662}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Third Party", "Third Party", "{41A44AFD-7691-46CC-BCF3-EE8AB4A1F829}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "c-ares", "Balau\win32\project\c-ares.vcxproj", "{4D6AFE58-8573-4F3F-9CB7-EFF38BDC9662}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Third Party - Balau", "Third Party - Balau", "{1F771FD4-C1C7-4220-89F8-1E0D5069E205}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "zlib", "Balau\win32\project\zlib.vcxproj", "{C98A6524-5AA7-4FFD-8DDA-679A1016D185}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "Balau\win32\project\zlib.vcxproj", "{C98A6524-5AA7-4FFD-8DDA-679A1016D185}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "iconv", "Balau\win32\project\iconv.vcxproj", "{AA262ABD-09DF-4573-BF62-81DEA60E196C}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iconv", "Balau\win32\project\iconv.vcxproj", "{AA262ABD-09DF-4573-BF62-81DEA60E196C}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "pthreads", "Balau\win32\project\pthreads.vcxproj", "{E5B79C22-07B5-4830-8E28-224457C0FDB8}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthreads", "Balau\win32\project\pthreads.vcxproj", "{E5B79C22-07B5-4830-8E28-224457C0FDB8}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "tommath", "Balau\win32\project\tommath.vcxproj", "{0C334D26-6F19-4959-BB14-B4FB81099E99}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tommath", "Balau\win32\project\tommath.vcxproj", "{0C334D26-6F19-4959-BB14-B4FB81099E99}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "tomcrypt", "Balau\win32\project\tomcrypt.vcxproj", "{A3AA0747-B12F-45BA-A1F5-0E0E6B45F3C3}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tomcrypt", "Balau\win32\project\tomcrypt.vcxproj", "{A3AA0747-B12F-45BA-A1F5-0E0E6B45F3C3}" EndProject -Project("{36E20E70-21B1-11E4-8C21-0800200C9A66}") = "libcurl", "Balau\win32\project\libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcurl", "Balau\win32\project\libcurl.vcxproj", "{DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -47,18 +45,6 @@ Global {579CA850-21B1-11E4-8C21-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 {579CA850-21B1-11E4-8C21-0800200C9A66}.Release|x64.ActiveCfg = Release|x64 {579CA850-21B1-11E4-8C21-0800200C9A66}.Release|x64.Build.0 = Release|x64 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|Win32.Build.0 = Debug|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|x64.ActiveCfg = Debug|x64 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Debug|x64.Build.0 = Debug|x64 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Release|Mixed Platforms.Build.0 = Release|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Release|Win32.ActiveCfg = Release|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Release|Win32.Build.0 = Release|Win32 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Release|x64.ActiveCfg = Release|x64 - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30}.Release|x64.Build.0 = Release|x64 {6E74C651-E02E-4BEC-ADDB-7E2A79E0F6F7}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {6E74C651-E02E-4BEC-ADDB-7E2A79E0F6F7}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {6E74C651-E02E-4BEC-ADDB-7E2A79E0F6F7}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -143,18 +129,6 @@ Global {A3AA0747-B12F-45BA-A1F5-0E0E6B45F3C3}.Release|Win32.Build.0 = Release|Win32 {A3AA0747-B12F-45BA-A1F5-0E0E6B45F3C3}.Release|x64.ActiveCfg = Release|x64 {A3AA0747-B12F-45BA-A1F5-0E0E6B45F3C3}.Release|x64.Build.0 = Release|x64 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Debug|Mixed Platforms.Build.0 = Debug|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Debug|Win32.ActiveCfg = Debug|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Debug|Win32.Build.0 = Debug|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Debug|x64.ActiveCfg = Debug|x64 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Debug|x64.Build.0 = Debug|x64 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Release|Mixed Platforms.Build.0 = Release|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Release|Win32.ActiveCfg = Release|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Release|Win32.Build.0 = Release|Win32 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Release|x64.ActiveCfg = Release|x64 - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC}.Release|x64.Build.0 = Release|x64 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {DA6F56B4-06A4-441D-AD70-AC5A7D51FADB}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -172,8 +146,6 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {3E283F37-A4ED-41B7-A3E6-A2D89D131A30} = {41A44AFD-7691-46CC-BCF3-EE8AB4A1F829} - {70EB01D2-EE71-4F7E-9D87-A91249F5E4AC} = {41A44AFD-7691-46CC-BCF3-EE8AB4A1F829} {4D6AFE58-8573-4F3F-9CB7-EFF38BDC9662} = {1F771FD4-C1C7-4220-89F8-1E0D5069E205} {C98A6524-5AA7-4FFD-8DDA-679A1016D185} = {1F771FD4-C1C7-4220-89F8-1E0D5069E205} {AA262ABD-09DF-4573-BF62-81DEA60E196C} = {1F771FD4-C1C7-4220-89F8-1E0D5069E205} diff --git a/Dalos-cli.vcxproj b/Dalos-cli.vcxproj index a186041..42d92b2 100644 --- a/Dalos-cli.vcxproj +++ b/Dalos-cli.vcxproj @@ -93,7 +93,7 @@ NotUsing Level3 Disabled - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;_DEBUG;DEBUGBUILD;_CONSOLE;_LIB;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;HAVE_MALLOC_H;HAVE_STDLIB_H;HAVE_STRING_H;HAVE_SIGNAL_H;HAVE_STRDUP;CONFIG_SIGSTOP;CONFIG_ANSI_ARROWS;SYSTEM_IS_WIN32;USE_EDITLINE;_DEBUG;DEBUGBUILD;_CONSOLE;_LIB;%(PreprocessorDefinitions) .;src;Dalos-modules\includes;Balau\includes;Balau\includes\msc;Balau\libev;Balau\win32;Balau\win32\pthreads-win32;Balau\win32\iconv;Balau\win32\zlib;Balau\win32\getopt;Balau\win32\regex;Balau\win32\c-ares;Balau\win32\curl\include;Balau\win32\project\curl;Balau\LuaJIT\src;Balau\src\jsoncpp\include;Balau\libtommath;Balau\libtomcrypt\src\headers;%(AdditionalIncludeDirectories) 4290;4800;%(DisableSpecificWarnings) $(SolutionDir)\Balau\msvc-config.h;%(ForcedIncludeFiles) @@ -112,7 +112,7 @@ NotUsing Level3 Disabled - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;_DEBUG;DEBUGBUILD;_CONSOLE;_LIB;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;HAVE_MALLOC_H;HAVE_STDLIB_H;HAVE_STRING_H;HAVE_SIGNAL_H;HAVE_STRDUP;CONFIG_SIGSTOP;CONFIG_ANSI_ARROWS;SYSTEM_IS_WIN32;USE_EDITLINE;_DEBUG;DEBUGBUILD;_CONSOLE;_LIB;%(PreprocessorDefinitions) .;src;Dalos-modules\includes;Balau\includes;Balau\includes\msc;Balau\libev;Balau\win32;Balau\win32\pthreads-win32;Balau\win32\iconv;Balau\win32\zlib;Balau\win32\getopt;Balau\win32\regex;Balau\win32\c-ares;Balau\win32\curl\include;Balau\win32\project\curl;Balau\LuaJIT\src;Balau\src\jsoncpp\include;Balau\libtommath;Balau\libtomcrypt\src\headers;%(AdditionalIncludeDirectories) 4290;4800;%(DisableSpecificWarnings) $(SolutionDir)\Balau\msvc-config.h;%(ForcedIncludeFiles) @@ -132,7 +132,7 @@ MaxSpeed true true - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;HAVE_MALLOC_H;HAVE_STDLIB_H;HAVE_STRING_H;HAVE_SIGNAL_H;HAVE_STRDUP;CONFIG_SIGSTOP;CONFIG_ANSI_ARROWS;SYSTEM_IS_WIN32;USE_EDITLINE;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) .;src;Dalos-modules\includes;Balau\includes;Balau\includes\msc;Balau\libev;Balau\win32;Balau\win32\pthreads-win32;Balau\win32\iconv;Balau\win32\zlib;Balau\win32\getopt;Balau\win32\regex;Balau\win32\c-ares;Balau\win32\curl\include;Balau\win32\project\curl;Balau\LuaJIT\src;Balau\src\jsoncpp\include;Balau\libtommath;Balau\libtomcrypt\src\headers;%(AdditionalIncludeDirectories) 4290;4800;%(DisableSpecificWarnings) $(SolutionDir)\Balau\msvc-config.h;%(ForcedIncludeFiles) @@ -154,7 +154,7 @@ MaxSpeed true true - PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + PTW32_STATIC_LIB;LTC_SOURCE;LTM_DESC;USE_LTM;LTC_NO_PROTOTYPES;__STDC_FORMAT_MACROS;_SCL_SECURE_NO_WARNINGS;CARES_STATICLIB;USE_ARES;HAVE_MALLOC_H;HAVE_STDLIB_H;HAVE_STRING_H;HAVE_SIGNAL_H;HAVE_STRDUP;CONFIG_SIGSTOP;CONFIG_ANSI_ARROWS;SYSTEM_IS_WIN32;USE_EDITLINE;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) .;src;Dalos-modules\includes;Balau\includes;Balau\includes\msc;Balau\libev;Balau\win32;Balau\win32\pthreads-win32;Balau\win32\iconv;Balau\win32\zlib;Balau\win32\getopt;Balau\win32\regex;Balau\win32\c-ares;Balau\win32\curl\include;Balau\win32\project\curl;Balau\LuaJIT\src;Balau\src\jsoncpp\include;Balau\libtommath;Balau\libtomcrypt\src\headers;%(AdditionalIncludeDirectories) 4290;4800;%(DisableSpecificWarnings) $(SolutionDir)\Balau\msvc-config.h;%(ForcedIncludeFiles) @@ -196,11 +196,15 @@ + + + + diff --git a/Dalos-cli.vcxproj.filters b/Dalos-cli.vcxproj.filters index 5d2f512..71b3aba 100644 --- a/Dalos-cli.vcxproj.filters +++ b/Dalos-cli.vcxproj.filters @@ -7,6 +7,18 @@ {51cc51bb-e800-452c-b8d9-4dba017fe7e3} + + {e7efc113-5dc1-4da7-bbde-248d77ae4575} + + + {dde49012-3348-4bf7-a596-7ba474e5b636} + + + {bbe337bf-92ed-4499-9356-b0d3bbedc503} + + + {cc453958-fd7c-423b-8e3c-46a0e6a54bbe} + @@ -18,6 +30,12 @@ Source + + Third Party\editline\Source + + + Third Party\editline\Source + @@ -26,5 +44,11 @@ Headers + + Third Party\editline\Source + + + Third Party\editline\Headers + \ No newline at end of file diff --git a/Dalos-modules b/Dalos-modules index 3fb3462..1d30e5c 160000 --- a/Dalos-modules +++ b/Dalos-modules @@ -1 +1 @@ -Subproject commit 3fb346277f8fa4f0336e13689a4d9b1d9a7b4eaa +Subproject commit 1d30e5cc67dbf36c638cf6a089a2307cd7ac1e21 diff --git a/Makefile b/Makefile index 121cc1b..1cf2c25 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ include Balau/common.mk +CPPFLAGS += -DUSE_HISTEDIT + ifeq ($(DEBUG),) CPPFLAGS += -g3 -gdwarf-2 -O3 -DNDEBUG LDFLAGS += -g3 -gdwarf-2 diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc index f01a8de..0fafb08 100644 --- a/src/Dalos-cli.cc +++ b/src/Dalos-cli.cc @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include "BReadline.h" @@ -103,11 +102,7 @@ void MainTask::Do() { return; String line_read; -#ifdef _WIN32 - Readline rl("Dalos-cli", new Buffer()); -#else - Readline rl("Dalos-cli", new StdIN()); -#endif + Readline rl("Dalos-cli"); for (;;) { line_read = rl.gets(); -- cgit v1.2.3