From 4ef6f049b3d23d5ba61d4a62d097bf4128c35f5d Mon Sep 17 00:00:00 2001 From: little-brother Date: Tue, 21 Nov 2023 23:11:08 +0300 Subject: [PATCH] Up to 1.0.6 * New option: default-column-delimiter (issue #4) --- main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 0e144f2..87ef599 100644 --- a/main.c +++ b/main.c @@ -71,7 +71,7 @@ #define MAX_FILTER_LENGTH 2000 #define DELIMITERS TEXT(",;|\t:") #define APP_NAME TEXT("csvtab") -#define APP_VERSION TEXT("1.0.5") +#define APP_VERSION TEXT("1.0.6") #define CP_UTF16LE 1200 #define CP_UTF16BE 1201 @@ -920,8 +920,11 @@ LRESULT CALLBACK cbNewMain(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { return 0; } - if (!delimiter) - delimiter = detectDelimiter(data, skipComments); + if (!delimiter) { + TCHAR* str = getStoredString(TEXT("default-column-delimiter"), TEXT("")); + delimiter = _tcslen(str) ? str[0] : detectDelimiter(data, skipComments); + free(str); + } int colCount = 1; int rowNo = -1;