Compare commits

..

No commits in common. "22b90691b59ff1f6eabf22ce4a3145339b413d61" and "5ba5f050194905c33cecacbb28836208447df093" have entirely different histories.

3 changed files with 6 additions and 16 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
takl.sqlite3
takl
takl-daemon
takl.sock
out
.vscode

View File

@ -59,7 +59,7 @@ sqlite3* get_db() {
"CREATE TABLE tasks ( \
id INTEGER PRIMARY KEY,\
text TEXT NOT NULL,\
category TEXT DEFAULT NULL, \
category TEXT DEFAULT '', \
done INTEGER, \
due_to INTEGER \
);",
@ -202,12 +202,8 @@ void get_task(int id, task_t* t) {
strcpy(t->text, text);
char* category = (char*)sqlite3_column_text(stmt, 4);
if (category) {
t->category = malloc(sizeof(char)*(strlen(category)+1));
strcpy(t->category, category);
} else {
t->category = NULL;
}
}
sqlCheck( sqlite3_finalize(stmt) );
@ -242,13 +238,8 @@ task_list_t* get_task_list(char* input_category, bool include_completed) {
strcpy(t.text, text);
char* category = (char*)sqlite3_column_text(stmt, 4);
if (category) {
t.category = malloc(sizeof(char)*(strlen(category)+1));
strcpy(t.category, category);
} else {
t.category = NULL;
}
task_list_t* cur = malloc(sizeof(task_list_t)); // Add the parsed task to the beginning of the list
cur->task = t;

View File

@ -1,7 +1,7 @@
#ifndef DEF_CONFIG_H
#define DEF_CONFIG_H
#define VERSION "1.3.0"
#define VERSION "1.2.1"
// By default, $HOME/.config/takl.sqlite3 is used. You can change this behaviour here
//#define DB_FILE "takl.sqlite3"