Skip to content

Commit

Permalink
Up to 1.0.6
Browse files Browse the repository at this point in the history
* New option: default-column-delimiter  (issue #4)
  • Loading branch information
little-brother committed Nov 21, 2023
1 parent f68a694 commit 4ef6f04
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4ef6f04

Please sign in to comment.