diff --git a/Makefile b/Makefile index 5f1da19..b0a885e 100644 --- a/Makefile +++ b/Makefile @@ -5,30 +5,34 @@ TEST_DIR = tests SRC_DIR = src OBJ_DIR = obj X_STRING_DIR = $(SRC_DIR)/xlibc/x_string +X_CTYPES_DIR = $(SRC_DIR)/xlibc/x_ctypes SQLITE_DIR = $(SRC_DIR)/sqlite3 # Sources SRC = $(wildcard $(SRC_DIR)/*.c) X_STRING_SRC = $(wildcard $(X_STRING_DIR)/src/*.c) +X_CTYPES_SRC = $(wildcard $(X_CTYPES_DIR)/src/*.c) SQLITE_SRC = $(wildcard $(SQLITE_DIR)/src/*.c) TEST_SRC = $(wildcard $(TEST_DIR)/*.c) # Headers HEADERS = $(wildcard $(SRC_DIR)/*.h) X_STRING_HEADERS = $(wildcard $(X_STRING_DIR)/src/*.h) +X_CTYPES_HEADERS = $(wildcard $(X_CTYPES_DIR)/src/*.h) SQLITE_HEADERS = $(wildcard $(SQLITE_DIR)/src/*.h) TEST_HEADERS = $(wildcard $(TEST_DIR)/*.h) # Objects OBJ = $(patsubst $(SRC_DIR)/%.c, $(OBJ_DIR)/%.o, $(SRC)) X_STRING_OBJ = $(patsubst $(X_STRING_DIR)/src/%.c, $(OBJ_DIR)/%.o, $(X_STRING_SRC)) +X_CTYPES_OBJ = $(patsubst $(X_CTYPES_DIR)/src/%.c, $(OBJ_DIR)/%.o, $(X_CTYPES_SRC)) SQLITE_OBJ = $(patsubst $(SQLITE_DIR)/src/%.c, $(OBJ_DIR)/%.o, $(SQLITE_SRC)) ALL_OBJS = $(wildcard $(OBJ_DIR)/*.o) TEST_OBJ = $(patsubst $(TEST_DIR)/%.c, $(OBJ_DIR)/%.o, $(TEST_SRC)) SQLITE_DB_SCHEMA = $(SRC_DIR)/dodo.schema -INC_DIRS=-I./$(X_STRING_DIR)/src/ -I./$(SQLITE_DIR)/src/ -I./src +INC_DIRS=-I./$(X_STRING_DIR)/src/ -I./$(X_CTYPES_DIR)/src/ -I./$(SQLITE_DIR)/src/ -I./src CFLAGS = -ggdb @@ -40,22 +44,25 @@ DFLAGS = -DDB_PATH=\"$(DB_FILE)\" all: dodo -$(OBJ): $(SRC) $(X_STRING_OBJ) $(SQLITE_OBJ) $(HEADERS) +$(OBJ): $(SRC) $(X_STRING_OBJ) $(X_CTYPES_OBJ) $(SQLITE_OBJ) $(HEADERS) $(CC) -c -o $(OBJ_DIR)/$(@F) $(INC_DIRS) $(CFLAGS) $(DFLAGS) $(SRC_DIR)/$(@F:.o=.c) $(X_STRING_OBJ): $(X_STRING_SRC) $(X_STRING_HEADERS) $(CC) -c -o $(OBJ_DIR)/$(@F) $(CFLAGS) $(X_STRING_SRC) +$(X_CTYPES_OBJ): $(X_CTYPES_SRC) $(X_CTYPES_HEADERS) + $(CC) -c -o $(OBJ_DIR)/$(@F) $(CFLAGS) $(X_CTYPES_SRC) + $(SQLITE_OBJ): $(SQLITE_SRC) $(SQLITE_HEADERS) $(CC) -c -o $(OBJ_DIR)/$(@F) $(CFLAGS) $(SQLITE_SRC) -dodo: test $(OBJ) $(X_STRING_OBJ) $(SQLITE_OBJ) - $(CC) -o $@ $(CFLAGS) $(OBJ) $(X_STRING_OBJ) $(SQLITE_OBJ) +dodo: test $(OBJ) $(X_STRING_OBJ) $(X_CTYPES_OBJ) $(SQLITE_OBJ) + $(CC) -o $@ $(CFLAGS) $(OBJ) $(X_STRING_OBJ) $(X_CTYPES_OBJ) $(SQLITE_OBJ) ./test - rm ./test + rm test -test: $(OBJ) $(TEST_SRC) $(X_STRING_OBJ) $(SQLITE_OBJ) - $(CC) -o $@ $(TEST_SRC) $(INC_DIRS) $(DFLAGS) $(CFLAGS) obj/dodo.o $(X_STRING_OBJ) $(SQLITE_OBJ) +test: $(OBJ) $(TEST_SRC) $(X_STRING_OBJ) $(X_CTYPES_OBJ) $(SQLITE_OBJ) + $(CC) -o $@ $(TEST_SRC) $(INC_DIRS) $(DFLAGS) $(CFLAGS) obj/dodo.o $(X_STRING_OBJ) $(X_CTYPES_OBJ) $(SQLITE_OBJ) install: @@ -69,6 +76,6 @@ clean_all: rm -f dodo test $(ALL_OBJS) clean: - rm -f dodo test $(OBJ) $(X_STRING_OBJ) + rm -f dodo test $(OBJ) $(X_STRING_OBJ) $(X_CTYPES_OBJ) .PHONY: all clean_all clean install uninstall diff --git a/src/dodo.c b/src/dodo.c index 30e6dbf..97bf94b 100644 --- a/src/dodo.c +++ b/src/dodo.c @@ -3,6 +3,7 @@ #include "sqlite3.h" #include "x_string.h" #include "x_curses.h" +#include "x_ctypes.h" #include "dodo.h" //TODO: check that only one row is modified with sqlite3_change() @@ -39,33 +40,6 @@ void init_filtered_tasks(filtered_tasks* task){ task->due_date = NULL; } -// TODO: this really needs to only be one function with update_stmt() -int gen_sql_update_stmt_v2(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task){ - char sql_query[SQLQUERY_MAX]; - int rc = 0; - - if (task->new_title != NULL && task->due_date != NULL){ - snprintf(sql_query, SQLQUERY_MAX, "UPDATE tasks SET title='%s', due_date='%s' WHERE title='%s' OR active_id='%d'", task->new_title, task->due_date, task->title, task->active_id); - } - else if (task->new_title != NULL){ - snprintf(sql_query, SQLQUERY_MAX, "UPDATE tasks SET title='%s' WHERE title='%s' OR active_id='%d'", - task->new_title, task->title, task->active_id); - } - else{ - return -1; - } - - rc = sqlite3_prepare_v2(db, sql_query, -1, out_stmt, NULL); - - // TODO: Error checking is still pretty subpar - if (checksqlerr(rc, "prepare broken in gen_sql_insert_stmt")){ - return -1; - } - - return 0; - -} - char* concat_with_mem_cleanup(char* str1, char* str2){ char *temp; @@ -85,6 +59,7 @@ int prepare_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks char *sql_query; int rc = 0; int num_params = 0; + char test[SQLQUERY_MAX]; sql_query = malloc(SQLQUERY_MAX * sizeof(char)); @@ -113,24 +88,85 @@ int prepare_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks if ( !(x_strcmp(task->status, "complete")) ){ sql_query = concat_with_mem_cleanup(sql_query, ","); sql_query = concat_with_mem_cleanup(sql_query, "active_id='NULL'"); - num_params++; } } + sql_query = concat_with_mem_cleanup(sql_query, " WHERE "); + if ( task->title ){ + sql_query = concat_with_mem_cleanup(sql_query, "title=?"); + num_params++; + } + else if ( task->active_id != -1 ){ + sql_query = concat_with_mem_cleanup(sql_query, "active_id=?"); + num_params++; + } + else { + free(sql_query); + return -1; - //if (task->status != NULL){ - // snprintf(sql_query, SQLQUERY_MAX, "UPDATE tasks SET status='%s' WHERE title='%s' OR active_id='%d'", - // task->status, task->title, task->active_id); - //} - //else{ - // snprintf(sql_query, SQLQUERY_MAX, "UPDATE tasks SET active_id='NULL',status='complete' WHERE title='%s' OR active_id='%d'", task->title, task->active_id); - //} + } - //rc = sqlite3_prepare_v2(db, sql_query, -1, out_stmt, NULL); - //if (checksqlerr(rc, "prepare broken in gen_sql_insert_stmt")){ - // return -1; - //} + rc = sqlite3_prepare_v2(db, sql_query, -1, out_stmt, NULL); + free(sql_query); + + if (checksqlerr(rc, "prepare broken in gen_sql_insert_stmt")){ + return -1; + } + + return num_params; +} + +int bind_sql_update_stmt(filtered_tasks* task, int num_params, sqlite3_stmt* out_stmt){ + int max_param = 0; + int param_pos = 0; + int rc = 0; + + max_param = num_params; + + if ( task->new_title ){ + param_pos = max_param - num_params + 1; + rc = sqlite3_bind_text(out_stmt, param_pos, task->new_title, -1, SQLITE_STATIC); + num_params--; + } + + if (checksqlerr(rc, "prepare broken in bind_sql_update_stmt")){ + return -1; + } + + if ( task->due_date ){ + param_pos = max_param - num_params + 1; + rc = sqlite3_bind_text(out_stmt, param_pos, task->due_date, -1, SQLITE_STATIC); + num_params--; + } + + if (checksqlerr(rc, "prepare broken in bind_sql_update_stmt")){ + return -1; + } + + if ( task->status ){ + param_pos = max_param - num_params + 1; + rc = sqlite3_bind_text(out_stmt, param_pos, task->status, -1, SQLITE_STATIC); + num_params--; + } + + if ( task->title ){ + param_pos = max_param - num_params + 1; + rc = sqlite3_bind_text(out_stmt, param_pos, task->title, -1, SQLITE_STATIC); + num_params--; + } + else if ( task->active_id != -1 ){ + param_pos = max_param - num_params + 1; + rc = sqlite3_bind_int(out_stmt, param_pos, task->active_id); + num_params--; + } + else{ + return -1; + } + + if (checksqlerr(rc, "prepare broken in bind_sql_update_stmt")){ + return -1; + } return 0; } @@ -269,8 +305,12 @@ int parse_args(int argc, char** argv, filtered_tasks* task){ if ( argc > 2 ){ // TODO: We should do something about this ugly thing where we are setting // active ID to any string passed - task->title = argv[2]; - task->active_id = atoi(argv[2]); + if ( x_isnumber(argv[2]) ){ + task->active_id = atoi(argv[2]); + } + else { + task->title = argv[2]; + } } if ( argc > 3 ){ @@ -487,11 +527,12 @@ int update_task_status(sqlite3 *db, int argc, char** argv){ parse_args(argc, argv, task); task->status = argv[1]; - if ( prepare_sql_update_stmt(db, &out_stmt, task) ){ + if ( ( rc = prepare_sql_update_stmt(db, &out_stmt, task) ) ){ free(task); return -1; } + if ( ( rc = sqlite3_step(out_stmt) ) == SQLITE_DONE){ free(task); return 0; @@ -532,20 +573,23 @@ int complete_task(sqlite3 *db, int argc, char** argv){ int update_task(sqlite3 *db, int argc, char** argv){ int rc = 0; + int num_params = 0; sqlite3_stmt* out_stmt; filtered_tasks* task = malloc(sizeof(filtered_tasks)); init_filtered_tasks(task); - //parse_args(argc, argv, task); + parse_args(argc, argv, task); // TODO this can definitely be made into one func with all the other updates // no v2s allowed - task->new_title = "cool_beans"; - task->due_date = "0303-03-03"; - task->status = "complete"; - if ( prepare_sql_update_stmt(db, &out_stmt, task) ){ + if ( ( num_params = prepare_sql_update_stmt(db, &out_stmt, task) ) == -1 ){ + free(task); + return -1; + } + + if ( ( rc = bind_sql_update_stmt(task, num_params, out_stmt) ) ){ free(task); return -1; } diff --git a/src/xlibc b/src/xlibc index 4fb48e6..8ca828e 160000 --- a/src/xlibc +++ b/src/xlibc @@ -1 +1 @@ -Subproject commit 4fb48e69126058c09a93a102970d182db3be31b9 +Subproject commit 8ca828ebf6e39fb20abd5c4a8f847393a05f8ddd diff --git a/tags b/tags index 758c714..859f9b4 100644 --- a/tags +++ b/tags @@ -76,9 +76,9 @@ !_TAG_ROLE_DESCRIPTION!Make!makefile optional /optionally included/ $(OBJ) Makefile /^$(OBJ): $(SRC) $(X_STRING_OBJ) $(SQLITE_OBJ) $(HEADERS) $/;" t $(OBJ) src/xlibc/x_string/src/Makefile /^$(OBJ):$/;" t -$(SQLITE_OBJ) Makefile /^$(SQLITE_OBJ): $(SQLITE_HEADERS)$/;" t +$(SQLITE_OBJ) Makefile /^$(SQLITE_OBJ): $(SQLITE_SRC) $(SQLITE_HEADERS)$/;" t $(TEST_OBJ) src/xlibc/x_string/src/Makefile /^$(TEST_OBJ): $(TEST_SRC)$/;" t -$(X_STRING_OBJ) Makefile /^$(X_STRING_OBJ): $(X_STRING_HEADERS)$/;" t +$(X_STRING_OBJ) Makefile /^$(X_STRING_OBJ): $(X_STRING_SRC) $(X_STRING_HEADERS)$/;" t A src/sqlite3/src/sqlite3.c /^ int Y, M, D, A, B, X1, X2;$/;" l function:computeJD typeref:typename:int file: A src/sqlite3/src/sqlite3.c /^ int Z, A, B, C, D, E, X1;$/;" l function:computeYMD typeref:typename:int file: ADDR src/sqlite3/src/sqlite3.c /^#define ADDR(/;" d file: @@ -2873,6 +2873,7 @@ argvIndex src/sqlite3/src/sqlite3.c /^ int argvIndex; \/* if >0, co argvIndex src/sqlite3/src/sqlite3.h /^ int argvIndex; \/* if >0, constraint is part of argv to xFilter *\/$/;" m struct:sqlite3_index_info::sqlite3_index_constraint_usage typeref:typename:int argv_1 tests/tests.c /^ char *argv_1[3] = {".\/dodo", "new", "jello"};$/;" l function:test_add_new_task_with_date_and_delete typeref:typename:char * [3] file: argv_1 tests/tests.c /^ char *argv_1[3] = {".\/dodo", "new", "jello"};$/;" l function:test_add_then_update_task_status_then_delete typeref:typename:char * [3] file: +argv_1 tests/tests.c /^ char *argv_1[3] = {".\/dodo", "new", "jello"};$/;" l function:test_update_task typeref:typename:char * [3] file: argv_2 tests/tests.c /^ char *argv_2[3] = {".\/dodo", "del", "jello"};$/;" l function:test_add_new_task_with_date_and_delete typeref:typename:char * [3] file: argv_2 tests/tests.c /^ char *argv_2[3] = {".\/dodo", "today", "jello"};$/;" l function:test_add_then_update_task_status_then_delete typeref:typename:char * [3] file: argv_3 tests/tests.c /^ char *argv_3[3] = {".\/dodo", "del", "jello"};$/;" l function:test_add_then_update_task_status_then_delete typeref:typename:char * [3] file: @@ -2942,6 +2943,7 @@ backtrace_symbols_fd src/sqlite3/src/sqlite3.c /^# define backtrace_symbols_fd(/ base src/sqlite3/src/sqlite3.c /^ u8 base = infop->base;$/;" l function:sqlite3_str_vappendf typeref:typename:u8 file: base src/sqlite3/src/sqlite3.c /^ etByte base; \/* The base for radix conversion *\/$/;" m struct:et_info typeref:typename:etByte file: bft src/sqlite3/src/sqlite3.c /^typedef unsigned bft; \/* Bit Field Type *\/$/;" t typeref:typename:unsigned file: +bind_sql_update_stmt src/dodo.c /^int bind_sql_update_stmt(filtered_tasks* task, int num_params, sqlite3_stmt* out_stmt){$/;" f typeref:typename:int bom src/sqlite3/src/sqlite3.c /^ u8 bom = 0;$/;" l function:sqlite3VdbeMemHandleBom typeref:typename:u8 file: btreeMask src/sqlite3/src/sqlite3.c /^ yDbMask btreeMask; \/* Bitmask of db->aDb[] entries referenced *\/$/;" m struct:Vdbe typeref:typename:yDbMask file: buf src/sqlite3/src/sqlite3.c /^ char buf[etBUFSIZE]; \/* Conversion buffer *\/$/;" l function:sqlite3_str_vappendf typeref:typename:char[] file: @@ -3021,12 +3023,8 @@ colNotIdxed src/sqlite3/src/sqlite3.c /^ Bitmask colNotIdxed; \/* Unindexed colUsed src/sqlite3/src/sqlite3.c /^ Bitmask colUsed; \/* Bit N set if column N used. Details above for N>62 *\/$/;" m struct:SrcItem typeref:typename:Bitmask file: colUsed src/sqlite3/src/sqlite3.c /^ sqlite3_uint64 colUsed; \/* Input: Mask of columns used by statement *\/$/;" m struct:sqlite3_index_info typeref:typename:sqlite3_uint64 file: colUsed src/sqlite3/src/sqlite3.h /^ sqlite3_uint64 colUsed; \/* Input: Mask of columns used by statement *\/$/;" m struct:sqlite3_index_info typeref:typename:sqlite3_uint64 -col_name src/dodo.c /^ char *col_name = "COUNT(*)";$/;" l function:get_num_rows typeref:typename:char * file: col_name src/dodo.c /^ const unsigned char* col_name;$/;" l function:display_task_list typeref:typename:const unsigned char * file: col_val src/dodo.c /^ const unsigned char* col_val;$/;" l function:display_task_list typeref:typename:const unsigned char * file: -colnames src/dodo.c /^ char* colnames = "(title, due_date)";$/;" l function:add_new_task typeref:typename:char * file: -colnames src/dodo.c /^ char* colnames = "active_id,title,due_date";$/;" l function:display_heading typeref:typename:char * file: -colnames src/dodo.c /^ char* colnames = "active_id,title,due_date";$/;" l function:view_tasks typeref:typename:char * file: commands README.md /^## commands$/;" s chapter:dodo compare2pow63 src/sqlite3/src/sqlite3.c /^static int compare2pow63(const char *zNum, int incr){$/;" f typeref:typename:int file: complete_task src/dodo.c /^int complete_task(sqlite3 *db, int argc, char** argv){$/;" f typeref:typename:int @@ -3036,6 +3034,7 @@ computeHMS src/sqlite3/src/sqlite3.c /^static void computeHMS(DateTime *p){$/;" computeJD src/sqlite3/src/sqlite3.c /^static void computeJD(DateTime *p){$/;" f typeref:typename:void file: computeYMD src/sqlite3/src/sqlite3.c /^static void computeYMD(DateTime *p){$/;" f typeref:typename:void file: computeYMD_HMS src/sqlite3/src/sqlite3.c /^static void computeYMD_HMS(DateTime *p){$/;" f typeref:typename:void file: +concat_with_mem_cleanup src/dodo.c /^char* concat_with_mem_cleanup(char* str1, char* str2){$/;" f typeref:typename:char * constraintName src/sqlite3/src/sqlite3.c /^ Token constraintName;\/* Name of the constraint currently being parsed *\/$/;" m struct:Parse typeref:typename:Token file: cookieMask src/sqlite3/src/sqlite3.c /^ yDbMask cookieMask; \/* Bitmask of schema verified databases *\/$/;" m struct:Parse typeref:typename:yDbMask file: costMult src/sqlite3/src/sqlite3.c /^ LogEst costMult; \/* Cost multiplier for using this table *\/$/;" m struct:Table typeref:typename:LogEst file: @@ -3043,7 +3042,6 @@ count src/sqlite3/src/sqlite3.c /^ unsigned int count; \/* Number of e count src/sqlite3/src/sqlite3.c /^ unsigned int count; \/* Number of entries in this table *\/$/;" m struct:Hash typeref:typename:unsigned int file: countLookasideSlots src/sqlite3/src/sqlite3.c /^static u32 countLookasideSlots(LookasideSlot *p){$/;" f typeref:typename:u32 file: cpuCount src/sqlite3/src/sqlite3.c /^ int cpuCount;$/;" l function:sqlite3MemInit typeref:typename:int file: -creation_date src/dodo.h /^ date creation_date;$/;" m struct:__anon569311380208 typeref:typename:date cset src/sqlite3/src/sqlite3.c /^ const char *cset = &aDigits[infop->charset];$/;" l function:sqlite3_str_vappendf typeref:typename:const char * file: csrApp src/sqlite3/src/sqlite3.c /^ int csrApp; \/* Function cursor (used by min\/max) *\/$/;" m struct:Window typeref:typename:int file: ctimeFunc src/sqlite3/src/sqlite3.c /^static void ctimeFunc($/;" f typeref:typename:void file: @@ -3120,8 +3118,8 @@ display_column_heading src/dodo.c /^void display_column_heading(const char* str) display_column_headings_for_all_task_lists src/dodo.c /^void display_column_headings_for_all_task_lists(){$/;" f typeref:typename:void display_heading src/dodo.c /^void display_heading(){$/;" f typeref:typename:void display_heading src/dodo.h /^void display_heading();$/;" p typeref:typename:void -display_task_list src/dodo.c /^int display_task_list(int start_col, sqlite3 *db, char* colnames, char* table, char* status){$/;" f typeref:typename:int -display_task_list src/dodo.h /^int display_task_list(int start_col, sqlite3 *db, char* colnames, char* table, char* status);$/;" p typeref:typename:int +display_task_list src/dodo.c /^int display_task_list(int start_col, sqlite3 *db, filtered_tasks* task){$/;" f typeref:typename:int +display_task_list src/dodo.h /^int display_task_list(int start_col, sqlite3 *db, filtered_tasks*);$/;" p typeref:typename:int display_task_list_heading src/dodo.c /^void display_task_list_heading(char* heading){$/;" f typeref:typename:void do_atof_calc src/sqlite3/src/sqlite3.c /^do_atof_calc:$/;" L function:sqlite3AtoF file: dodo Makefile /^dodo: test $(OBJ) $(X_STRING_OBJ) $(SQLITE_OBJ)$/;" t @@ -3131,8 +3129,7 @@ done src/sqlite3/src/sqlite3.c /^ etByte done; \/* Loop terminati done src/sqlite3/src/sqlite3.c /^ int done; \/* Set to true when thread finishes *\/$/;" m struct:SQLiteThread typeref:typename:int file: double src/sqlite3/src/sqlite3.c /^# define double /;" d file: double src/sqlite3/src/sqlite3.h /^# define double /;" d -due_date src/dodo.c /^ char* due_date = NULL;$/;" l function:add_new_task typeref:typename:char * file: -due_date src/dodo.h /^ date due_date;$/;" m struct:__anon569311380208 typeref:typename:date +due_date src/dodo.h /^ char *due_date;$/;" m struct:__anon569311380208 typeref:typename:char * e src/sqlite3/src/sqlite3.c /^ LogEst e;$/;" l function:sqlite3LogEstFromDouble typeref:typename:LogEst file: e src/sqlite3/src/sqlite3.c /^ int e = 0; \/* exponent *\/$/;" l function:sqlite3AtoF typeref:typename:int file: e src/sqlite3/src/sqlite3.c /^ int e, exp = 0;$/;" l function:sqlite3FpDecode typeref:typename:int file: @@ -3231,6 +3228,7 @@ fg src/sqlite3/src/sqlite3.c /^ } fg;$/;" m struct:SrcItem typeref:struct:SrcIt file_format src/sqlite3/src/sqlite3.c /^ u8 file_format; \/* Schema format version for this file *\/$/;" m struct:Schema typeref:typename:u8 file: filename src/main.c /^ char* filename = x_strconcat(home_dir, DB_PATH);$/;" l function:main typeref:typename:char * file: filename tests/tests.c /^ char* filename = x_strconcat(home_dir, DB_PATH);$/;" l function:set_up_db typeref:typename:char * file: +filtered_tasks src/dodo.h /^}filtered_tasks;$/;" t typeref:struct:__anon569311380208 first src/sqlite3/src/sqlite3.c /^ HashElem *first; \/* The first element of the array *\/$/;" m struct:Hash typeref:typename:HashElem * file: fixed_width src/dodo.c /^ int fixed_width = 0;$/;" l function:display_task_list typeref:typename:int file: fkeyHash src/sqlite3/src/sqlite3.c /^ Hash fkeyHash; \/* All foreign keys by referenced table name *\/$/;" m struct:Schema typeref:typename:Hash file: @@ -3265,15 +3263,15 @@ fts5_tokenizer src/sqlite3/src/sqlite3.h /^typedef struct fts5_tokenizer fts5_to funcFlags src/sqlite3/src/sqlite3.c /^ u32 funcFlags; \/* Some combination of SQLITE_FUNC_* *\/$/;" m struct:FuncDef typeref:typename:u32 file: g_elapsed src/sqlite3/src/sqlite3.c /^static sqlite_uint64 g_elapsed;$/;" v typeref:typename:sqlite_uint64 file: g_start src/sqlite3/src/sqlite3.c /^static sqlite_uint64 g_start;$/;" v typeref:typename:sqlite_uint64 file: -gen_sql_delete_stmt src/dodo.c /^int gen_sql_delete_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* table, char* title_or_active/;" f typeref:typename:int -gen_sql_delete_stmt src/dodo.h /^int gen_sql_delete_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* table, char* title);$/;" p typeref:typename:int -gen_sql_insert_stmt src/dodo.c /^int gen_sql_insert_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* table, char* colnames, char*/;" f typeref:typename:int -gen_sql_insert_stmt src/dodo.h /^int gen_sql_insert_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* table, char* colnames, char*/;" p typeref:typename:int -gen_sql_select_stmt src/dodo.c /^int gen_sql_select_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* colnames, char* table, char*/;" f typeref:typename:int -gen_sql_select_stmt src/dodo.h /^int gen_sql_select_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* colnames, char* table, char*/;" p typeref:typename:int -gen_sql_update_stmt src/dodo.c /^int gen_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* table, char* status, char* t/;" f typeref:typename:int -gen_sql_update_stmt src/dodo.h /^int gen_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, char* table, char* status, char* t/;" p typeref:typename:int -gen_sql_update_stmt_v2 src/dodo.c /^int gen_sql_update_stmt_v2(sqlite3 *db, sqlite3_stmt** out_stmt, char* table, char* status, char/;" f typeref:typename:int +gen_sql_delete_stmt src/dodo.c /^int gen_sql_delete_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task){$/;" f typeref:typename:int +gen_sql_delete_stmt src/dodo.h /^int gen_sql_delete_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);$/;" p typeref:typename:int +gen_sql_insert_stmt src/dodo.c /^int gen_sql_insert_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task, char* values/;" f typeref:typename:int +gen_sql_insert_stmt src/dodo.h /^int gen_sql_insert_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task, char* values/;" p typeref:typename:int +gen_sql_select_stmt src/dodo.c /^int gen_sql_select_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task){$/;" f typeref:typename:int +gen_sql_select_stmt src/dodo.h /^int gen_sql_select_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);$/;" p typeref:typename:int +gen_sql_update_stmt src/dodo.h /^int gen_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);$/;" p typeref:typename:int +gen_sql_update_stmt_v2 src/dodo.c /^int gen_sql_update_stmt_v2(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task){$/;" f typeref:typename:int +gen_sql_update_stmt_v2 src/dodo.h /^int gen_sql_update_stmt_v2(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);$/;" p typeref:typename:int getDigits src/sqlite3/src/sqlite3.c /^static int getDigits(const char *zDate, const char *zFormat, ...){$/;" f typeref:typename:int file: getDoubleArg src/sqlite3/src/sqlite3.c /^static double getDoubleArg(PrintfArguments *p){$/;" f typeref:typename:double file: getIntArg src/sqlite3/src/sqlite3.c /^static sqlite3_int64 getIntArg(PrintfArguments *p){$/;" f typeref:typename:sqlite3_int64 file: @@ -3503,6 +3501,8 @@ incr src/sqlite3/src/sqlite3.c /^ int incr;$/;" l function:sqlite3AtoF typeref: incr src/sqlite3/src/sqlite3.c /^ int incr;$/;" l function:sqlite3Atoi64 typeref:typename:int file: infop src/sqlite3/src/sqlite3.c /^ const et_info *infop; \/* Pointer to the appropriate info structure *\/$/;" l function:sqlite3_str_vappendf typeref:typename:const et_info * file: init src/sqlite3/src/sqlite3.c /^ } init;$/;" m struct:sqlite3 typeref:struct:sqlite3::sqlite3InitInfo file: +init_filtered_tasks src/dodo.c /^void init_filtered_tasks(filtered_tasks* task){$/;" f typeref:typename:void +init_filtered_tasks src/dodo.h /^void init_filtered_tasks(filtered_tasks* task);$/;" p typeref:typename:void install Makefile /^install:$/;" t isCorrelated src/sqlite3/src/sqlite3.c /^ unsigned isCorrelated :1; \/* True if sub-query is correlated *\/$/;" m struct:SrcItem::__anon176c6ffd3208 typeref:typename:unsigned:1 file: isCovering src/sqlite3/src/sqlite3.c /^ unsigned isCovering:1; \/* True if this is a covering index *\/$/;" m struct:Index typeref:typename:unsigned:1 file: @@ -3597,6 +3597,7 @@ max src/sqlite3/src/sqlite3.c /^ u16 max;$/;" l function:getDigits typeref:ty maxCount src/sqlite3/src/sqlite3.c /^ u32 maxCount; \/* Maximum instantaneous currentCount *\/$/;" m struct:Mem5Global typeref:typename:u32 file: maxOut src/sqlite3/src/sqlite3.c /^ u32 maxOut; \/* Maximum instantaneous currentOut *\/$/;" m struct:Mem5Global typeref:typename:u32 file: maxRequest src/sqlite3/src/sqlite3.c /^ u32 maxRequest; \/* Largest allocation (exclusive of internal frag) *\/$/;" m struct:Mem5Global typeref:typename:u32 file: +max_param src/dodo.c /^ int max_param = 0;$/;" l function:bind_sql_update_stmt typeref:typename:int file: max_rows src/dodo.c /^ static int max_rows = -1;$/;" l function:display_task_list typeref:typename:int file: mayAbort src/sqlite3/src/sqlite3.c /^ u8 mayAbort; \/* True if statement may throw an ABORT exception *\/$/;" m struct:Parse typeref:typename:u8 file: measureAllocationSize src/sqlite3/src/sqlite3.c /^static SQLITE_NOINLINE void measureAllocationSize(sqlite3 *db, void *p){$/;" f typeref:typename:SQLITE_NOINLINE void file: @@ -3648,7 +3649,6 @@ min src/sqlite3/src/sqlite3.c /^ char min = zFormat[1] - '0';$/;" l function: minWriteFileFormat src/sqlite3/src/sqlite3.c /^ u8 minWriteFileFormat; \/* Minimum file format for writable database files *\/$/;" m struct:Vdbe typeref:typename:u8 file: mnKeyBlk src/sqlite3/src/sqlite3.c /^ u32 mnKeyBlk;$/;" m struct:Mem3Global typeref:typename:u32 file: mnReq src/sqlite3/src/sqlite3.c /^ int mnReq, mxReq; \/* Min and max heap requests sizes *\/$/;" m struct:Sqlite3Config typeref:typename:int file: -modify_task src/dodo.h /^int modify_task(sqlite3 *db, int argc, char** argv);$/;" p typeref:typename:int month src/dodo.h /^ int month;$/;" m struct:__anon569311380108 typeref:typename:int moreToFollow src/sqlite3/src/sqlite3.c /^ int moreToFollow = inExpr - 1;$/;" l function:sqlite3TreeViewBareExprList typeref:typename:int file: moreToFollow src/sqlite3/src/sqlite3.c /^ int moreToFollow = inId - 1;$/;" l function:sqlite3TreeViewBareIdList typeref:typename:int file: @@ -3911,11 +3911,9 @@ new src/sqlite3/src/sqlite3.c /^ DateTime new;$/;" l function:parseMo newSize src/sqlite3/src/sqlite3.c /^ int newSize;$/;" l function:memsys5MallocUnsafe typeref:typename:int file: newTnum src/sqlite3/src/sqlite3.c /^ Pgno newTnum; \/* Rootpage of table being initialized *\/$/;" m struct:sqlite3::sqlite3InitInfo typeref:typename:Pgno file: newValue src/sqlite3/src/sqlite3.c /^ sqlite3StatValueType newValue;$/;" l function:sqlite3StatusHighwater typeref:typename:sqlite3StatValueType file: -new_due_date src/dodo.c /^ char* new_due_date;$/;" l function:update_task typeref:typename:char * file: -new_length src/xlibc/x_string/src/x_string.c /^ int new_length = len1 + len2;$/;" l function:x_strconcat typeref:typename:int file: -new_project_tag src/dodo.c /^ char* new_project_tag;$/;" l function:update_task typeref:typename:char * file: +new_length src/xlibc/x_string/src/x_string.c /^ int new_length = len1 + len2 + 1;$/;" l function:x_strconcat typeref:typename:int file: new_string src/xlibc/x_string/src/x_string.c /^ char* new_string;$/;" l function:x_strconcat typeref:typename:char * file: -new_title src/dodo.c /^ char* new_title;$/;" l function:update_task typeref:typename:char * file: +new_title src/dodo.h /^ char *new_title;$/;" m struct:__anon569311380208 typeref:typename:char * newi src/sqlite3/src/sqlite3.c /^ u32 newi, x;$/;" l function:memsys3FromKeyBlk typeref:typename:u32 file: newmask src/sqlite3/src/sqlite3.c /^ u32 newmask; \/* Mask of new.* columns referenced *\/$/;" m struct:Parse typeref:typename:u32 file: next src/sqlite3/src/sqlite3.c /^ u32 next; \/* Index in mem3.aPool[] of next free chunk *\/$/;" m struct:Mem3Block::__anon176c6ffd3e0a::__anon176c6ffd4008 typeref:typename:u32 file: @@ -3945,6 +3943,7 @@ notUsed1 src/sqlite3/src/sqlite3.c /^ double notUsed1; \/* Spacer nowValue src/sqlite3/src/sqlite3.c /^ sqlite3StatValueType nowValue[10]; \/* Current value *\/$/;" m struct:sqlite3StatType typeref:typename:sqlite3StatValueType[10] file: nullRow src/sqlite3/src/sqlite3.c /^ u8 nullRow; \/* True if pointing to a row with no data *\/$/;" m struct:VdbeCursor typeref:typename:u8 file: num_cols src/dodo.c /^ int num_cols = 0;$/;" l function:display_task_list typeref:typename:int file: +num_params src/dodo.c /^ int num_params = 0;$/;" l function:prepare_sql_update_stmt typeref:typename:int file: num_rows src/dodo.c /^ int num_rows = -1;$/;" l function:display_task_list typeref:typename:int file: offsetof src/sqlite3/src/sqlite3.c /^#define offsetof(/;" d file: okConstFactor src/sqlite3/src/sqlite3.c /^ u8 okConstFactor; \/* OK to factor out constants *\/$/;" m struct:Parse typeref:typename:u8 file: @@ -4406,13 +4405,14 @@ pX src/sqlite3/src/sqlite3.c /^ struct tm *pX;$/;" l function:osLocaltime typer pY src/sqlite3/src/sqlite3.c /^ const Expr *pX, *pY, *pZ;$/;" l function:sqlite3TreeViewExpr typeref:typename:const Expr * file: pZ src/sqlite3/src/sqlite3.c /^ const Expr *pX, *pY, *pZ;$/;" l function:sqlite3TreeViewExpr typeref:typename:const Expr * file: pageHash src/sqlite3/src/sqlite3.c /^ u32 pageHash; \/* Hash of page content *\/$/;" m struct:PgHdr typeref:typename:u32 file: +param_pos src/dodo.c /^ int param_pos = 0;$/;" l function:bind_sql_update_stmt typeref:typename:int file: parseDateOrTime src/sqlite3/src/sqlite3.c /^static int parseDateOrTime($/;" f typeref:typename:int file: parseHhMmSs src/sqlite3/src/sqlite3.c /^static int parseHhMmSs(const char *zDate, DateTime *p){$/;" f typeref:typename:int file: parseModifier src/sqlite3/src/sqlite3.c /^static int parseModifier($/;" f typeref:typename:int file: parseTimezone src/sqlite3/src/sqlite3.c /^static int parseTimezone(const char *zDate, DateTime *p){$/;" f typeref:typename:int file: parseYyyyMmDd src/sqlite3/src/sqlite3.c /^static int parseYyyyMmDd(const char *zDate, DateTime *p){$/;" f typeref:typename:int file: -parse_args src/dodo.c /^int parse_args(int argc, char** argv, char** title, char** due_date){$/;" f typeref:typename:int -parse_args src/dodo.h /^int parse_args(int argc, char** argv, char** title, char** due_date);$/;" p typeref:typename:int +parse_args src/dodo.c /^int parse_args(int argc, char** argv, filtered_tasks* task){$/;" f typeref:typename:int +parse_args src/dodo.h /^int parse_args(int argc, char** argv, filtered_tasks* task);$/;" p typeref:typename:int payloadSize src/sqlite3/src/sqlite3.c /^ u32 payloadSize; \/* Total number of bytes in the record *\/$/;" m struct:VdbeCursor typeref:typename:u32 file: pc src/sqlite3/src/sqlite3.c /^ int pc; \/* Program Counter in parent (calling) frame *\/$/;" m struct:VdbeFrame typeref:typename:int file: pc src/sqlite3/src/sqlite3.c /^ int pc; \/* The program counter *\/$/;" m struct:Vdbe typeref:typename:int file: @@ -4429,6 +4429,7 @@ prefix src/sqlite3/src/sqlite3.c /^ char prefix; \/* Prefix chara prefix src/sqlite3/src/sqlite3.c /^ etByte prefix; \/* Offset into aPrefix[] of the prefix string *\/$/;" m struct:et_info typeref:typename:etByte file: prepFlags src/sqlite3/src/sqlite3.c /^ u8 prepFlags; \/* SQLITE_PREPARE_* flags *\/$/;" m struct:Vdbe typeref:typename:u8 file: prepFlags src/sqlite3/src/sqlite3.c /^ u8 prepFlags; \/* SQLITE_PREPARE_* flags *\/$/;" m struct:Parse typeref:typename:u8 file: +prepare_sql_update_stmt src/dodo.c /^int prepare_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task){$/;" f typeref:typename:int prev src/sqlite3/src/sqlite3.c /^ u32 prev; \/* Index in mem3.aPool[] of previous free chunk *\/$/;" m struct:Mem3Block::__anon176c6ffd3e0a::__anon176c6ffd4008 typeref:typename:u32 file: prev src/sqlite3/src/sqlite3.c /^ HashElem *next, *prev; \/* Next and previous elements in the table *\/$/;" m struct:HashElem typeref:typename:HashElem * file: prev src/sqlite3/src/sqlite3.c /^ int next, prev;$/;" l function:memsys5Unlink typeref:typename:int file: @@ -4442,6 +4443,7 @@ printfFlags src/sqlite3/src/sqlite3.c /^ u8 printfFlags; \/* SQLITE_PRINTF printfTempBuf src/sqlite3/src/sqlite3.c /^static char *printfTempBuf(sqlite3_str *pAccum, sqlite3_int64 n){$/;" f typeref:typename:char * file: priorLimit src/sqlite3/src/sqlite3.c /^ sqlite3_int64 priorLimit;$/;" l function:sqlite3_hard_heap_limit64 typeref:typename:sqlite3_int64 file: priorLimit src/sqlite3/src/sqlite3.c /^ sqlite3_int64 priorLimit;$/;" l function:sqlite3_soft_heap_limit64 typeref:typename:sqlite3_int64 file: +project_tag src/dodo.h /^ char *project_tag;$/;" m struct:__anon569311380208 typeref:typename:char * pthreadMutexAlloc src/sqlite3/src/sqlite3.c /^static sqlite3_mutex *pthreadMutexAlloc(int iType){$/;" f typeref:typename:sqlite3_mutex * file: pthreadMutexEnd src/sqlite3/src/sqlite3.c /^static int pthreadMutexEnd(void){ return SQLITE_OK; }$/;" f typeref:typename:int file: pthreadMutexEnter src/sqlite3/src/sqlite3.c /^static void pthreadMutexEnter(sqlite3_mutex *p){$/;" f typeref:typename:void file: @@ -4483,15 +4485,17 @@ rXform src/sqlite3/src/sqlite3.c /^ float rXform; \/* Constant used for t randomFill src/sqlite3/src/sqlite3.c /^static void randomFill(char *pBuf, int nByte){$/;" f typeref:typename:void file: rawS src/sqlite3/src/sqlite3.c /^ unsigned rawS : 1; \/* Raw numeric value stored in s *\/$/;" m struct:DateTime typeref:typename:unsigned:1 file: rc src/dodo.c /^ int rc = 0;$/;" l function:add_new_task typeref:typename:int file: +rc src/dodo.c /^ int rc = 0;$/;" l function:bind_sql_update_stmt typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:complete_task typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:del_task typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:display_task_list typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:gen_sql_delete_stmt typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:gen_sql_insert_stmt typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:gen_sql_select_stmt typeref:typename:int file: -rc src/dodo.c /^ int rc = 0;$/;" l function:gen_sql_update_stmt typeref:typename:int file: +rc src/dodo.c /^ int rc = 0;$/;" l function:gen_sql_update_stmt_v2 typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:get_num_rows typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:opendb typeref:typename:int file: +rc src/dodo.c /^ int rc = 0;$/;" l function:prepare_sql_update_stmt typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:update_task typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:update_task_status typeref:typename:int file: rc src/dodo.c /^ int rc = 0;$/;" l function:view_all typeref:typename:int file: @@ -4593,6 +4597,7 @@ seekResult src/sqlite3/src/sqlite3.c /^ int seekResult; \/* Result of p selFlags src/sqlite3/src/sqlite3.c /^ u32 selFlags; \/* Various SF_* values *\/$/;" m struct:Select typeref:typename:u32 file: selId src/sqlite3/src/sqlite3.c /^ u32 selId; \/* Select to which this AggInfo belongs *\/$/;" m struct:AggInfo typeref:typename:u32 file: selId src/sqlite3/src/sqlite3.c /^ u32 selId; \/* Unique identifier number for this SELECT *\/$/;" m struct:Select typeref:typename:u32 file: +selected_columns src/dodo.h /^ char *selected_columns;$/;" m struct:__anon569311380208 typeref:typename:char * self src/sqlite3/src/sqlite3.c /^ pthread_t self = pthread_self();$/;" l function:pthreadMutexEnter typeref:typename:pthread_t file: self src/sqlite3/src/sqlite3.c /^ pthread_t self = pthread_self();$/;" l function:pthreadMutexTry typeref:typename:pthread_t file: seqCount src/sqlite3/src/sqlite3.c /^ i64 seqCount; \/* Sequence counter *\/$/;" m struct:VdbeCursor typeref:typename:i64 file: @@ -4615,10 +4620,11 @@ skipFlag src/sqlite3/src/sqlite3.c /^ u8 skipFlag; \/* Skip accumula sortFlags src/sqlite3/src/sqlite3.c /^ u8 sortFlags; \/* Mask of KEYINFO_ORDER_* flags *\/$/;" m struct:ExprList::ExprList_item::__anon176c6ffd2e08 typeref:typename:u8 file: sortingIdx src/sqlite3/src/sqlite3.c /^ int sortingIdx; \/* Cursor number of the sorting index *\/$/;" m struct:AggInfo typeref:typename:int file: sortingIdxPTab src/sqlite3/src/sqlite3.c /^ int sortingIdxPTab; \/* Cursor number of pseudo-table *\/$/;" m struct:AggInfo typeref:typename:int file: +sql_query src/dodo.c /^ char *sql_query;$/;" l function:prepare_sql_update_stmt typeref:typename:char * file: sql_query src/dodo.c /^ char sql_query[SQLQUERY_MAX];$/;" l function:gen_sql_delete_stmt typeref:typename:char[] file: sql_query src/dodo.c /^ char sql_query[SQLQUERY_MAX];$/;" l function:gen_sql_insert_stmt typeref:typename:char[] file: sql_query src/dodo.c /^ char sql_query[SQLQUERY_MAX];$/;" l function:gen_sql_select_stmt typeref:typename:char[] file: -sql_query src/dodo.c /^ char sql_query[SQLQUERY_MAX];$/;" l function:gen_sql_update_stmt typeref:typename:char[] file: +sql_query src/dodo.c /^ char sql_query[SQLQUERY_MAX];$/;" l function:gen_sql_update_stmt_v2 typeref:typename:char[] file: sqlite2BtreeKeyCompare src/sqlite3/src/sqlite3.c /^int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);$/;" p typeref:typename:int file: sqlite3 src/sqlite3/src/sqlite3.c /^struct sqlite3 {$/;" s file: sqlite3 src/sqlite3/src/sqlite3.c /^typedef struct sqlite3 sqlite3;$/;" t typeref:struct:sqlite3 file: @@ -7027,8 +7033,7 @@ startTime src/sqlite3/src/sqlite3.c /^ i64 startTime; \/* Time when qu statMutex src/sqlite3/src/sqlite3.c /^static const char statMutex[] = {$/;" v typeref:typename:const char[] file: staticMutexes src/sqlite3/src/sqlite3.c /^ static CheckMutex staticMutexes[] = {$/;" l function:checkMutexAlloc typeref:typename:CheckMutex[] file: staticMutexes src/sqlite3/src/sqlite3.c /^ static sqlite3_mutex staticMutexes[] = {$/;" l function:pthreadMutexAlloc typeref:typename:sqlite3_mutex[] file: -status src/dodo.c /^ char* status = "today";$/;" l function:view_tasks typeref:typename:char * file: -status src/dodo.h /^ char* status;$/;" m struct:__anon569311380208 typeref:typename:char * +status src/dodo.h /^ char *status;$/;" m struct:__anon569311380208 typeref:typename:char * stdout_org tests/tests.c /^ FILE *stdout_org;$/;" l function:test_display_task typeref:typename:FILE * file: step_list src/sqlite3/src/sqlite3.c /^ TriggerStep *step_list; \/* Link list of trigger program steps *\/$/;" m struct:Trigger typeref:typename:TriggerStep * file: str src/dodo.c /^ char * str;$/;" l function:display_heading typeref:typename:char * file: @@ -7071,19 +7076,21 @@ t src/sqlite3/src/sqlite3.c /^ unsigned int i, t;$/;" l function:sqlite3UtfSelf tRowcnt src/sqlite3/src/sqlite3.c /^typedef u64 tRowcnt;$/;" t typeref:typename:u64 file: tab src/sqlite3/src/sqlite3.c /^ } tab;$/;" m union:Table::__anon176c6ffd240a typeref:struct:Table::__anon176c6ffd240a::__anon176c6ffd2508 file: tabFlags src/sqlite3/src/sqlite3.c /^ u32 tabFlags; \/* Mask of TF_* values *\/$/;" m struct:Table typeref:typename:u32 file: -table src/dodo.c /^ char* table = "tasks";$/;" l function:add_new_task typeref:typename:char * file: -table src/dodo.c /^ char* table = "tasks";$/;" l function:complete_task typeref:typename:char * file: -table src/dodo.c /^ char* table = "tasks";$/;" l function:del_task typeref:typename:char * file: -table src/dodo.c /^ char* table = "tasks";$/;" l function:update_task typeref:typename:char * file: -table src/dodo.c /^ char* table = "tasks";$/;" l function:update_task_status typeref:typename:char * file: -table src/dodo.c /^ char* table = "tasks";$/;" l function:view_tasks typeref:typename:char * file: +table src/dodo.c /^ char* table = "tasks";$/;" l function:display_task_list typeref:typename:char * file: table src/sqlite3/src/sqlite3.c /^ char *table; \/* The table or view to which the trigger applies *\/$/;" m struct:Trigger typeref:typename:char * file: -task_entry src/dodo.h /^}task_entry;$/;" t typeref:struct:__anon569311380208 -task_id src/dodo.h /^ int task_id;$/;" m struct:__anon569311380208 typeref:typename:int +task src/dodo.c /^ filtered_tasks* task = malloc(sizeof(filtered_tasks));$/;" l function:add_new_task typeref:typename:filtered_tasks * file: +task src/dodo.c /^ filtered_tasks* task = malloc(sizeof(filtered_tasks));$/;" l function:complete_task typeref:typename:filtered_tasks * file: +task src/dodo.c /^ filtered_tasks* task = malloc(sizeof(filtered_tasks));$/;" l function:del_task typeref:typename:filtered_tasks * file: +task src/dodo.c /^ filtered_tasks* task = malloc(sizeof(filtered_tasks));$/;" l function:get_num_rows typeref:typename:filtered_tasks * file: +task src/dodo.c /^ filtered_tasks* task = malloc(sizeof(filtered_tasks));$/;" l function:update_task typeref:typename:filtered_tasks * file: +task src/dodo.c /^ filtered_tasks* task = malloc(sizeof(filtered_tasks));$/;" l function:update_task_status typeref:typename:filtered_tasks * file: +tasks src/dodo.c /^ filtered_tasks* tasks = malloc(sizeof(filtered_tasks));$/;" l function:view_tasks typeref:typename:filtered_tasks * file: tblHash src/sqlite3/src/sqlite3.c /^ Hash tblHash; \/* All tables indexed by name *\/$/;" m struct:Schema typeref:typename:Hash file: +temp src/dodo.c /^ char *temp;$/;" l function:concat_with_mem_cleanup typeref:typename:char * file: temp src/sqlite3/src/sqlite3.c /^ u8 temp;$/;" l function:sqlite3VdbeMemTranslate typeref:typename:u8 file: temp_store src/sqlite3/src/sqlite3.c /^ u8 temp_store; \/* 1: file 2: memory 0: default *\/$/;" m struct:sqlite3 typeref:typename:u8 file: test Makefile /^test: $(OBJ) $(TEST_SRC) $(X_STRING_OBJ) $(SQLITE_OBJ)$/;" t +test src/dodo.c /^ char test[SQLQUERY_MAX];$/;" l function:prepare_sql_update_stmt typeref:typename:char[] file: test_add_new_task_no_date tests/tests.c /^int test_add_new_task_no_date(){$/;" f typeref:typename:int test_add_new_task_with_date_and_delete tests/tests.c /^int test_add_new_task_with_date_and_delete(){$/;" f typeref:typename:int test_add_then_update_task_status_then_delete tests/tests.c /^int test_add_then_update_task_status_then_delete(){$/;" f typeref:typename:int @@ -7103,12 +7110,7 @@ tid src/sqlite3/src/sqlite3.c /^ pthread_t tid; \/* Thread ID * tid src/sqlite3/src/sqlite3.c /^ void *tid; \/* The thread handle *\/$/;" m struct:SQLiteThread typeref:typename:void * file: timeFunc src/sqlite3/src/sqlite3.c /^static void timeFunc($/;" f typeref:typename:void file: timediffFunc src/sqlite3/src/sqlite3.c /^static void timediffFunc($/;" f typeref:typename:void file: -title src/dodo.c /^ char* title = NULL;$/;" l function:add_new_task typeref:typename:char * file: -title src/dodo.c /^ char* title;$/;" l function:complete_task typeref:typename:char * file: -title src/dodo.c /^ char* title;$/;" l function:del_task typeref:typename:char * file: -title src/dodo.c /^ char* title;$/;" l function:update_task typeref:typename:char * file: -title src/dodo.h /^ char* title;$/;" m struct:__anon569311380208 typeref:typename:char * -title_or_active_id src/dodo.c /^ char* title_or_active_id;$/;" l function:update_task_status typeref:typename:char * file: +title src/dodo.h /^ char *title;$/;" m struct:__anon569311380208 typeref:typename:char * tmp src/sqlite3/src/sqlite3.c /^ Expr tmp;$/;" l function:sqlite3TreeViewExpr typeref:typename:Expr file: tnum src/sqlite3/src/sqlite3.c /^ Pgno tnum; \/* DB Page containing root of this index *\/$/;" m struct:Index typeref:typename:Pgno file: tnum src/sqlite3/src/sqlite3.c /^ Pgno tnum; \/* Root BTree page for this table *\/$/;" m struct:Table typeref:typename:Pgno file: @@ -7161,6 +7163,7 @@ uniqNotNull src/sqlite3/src/sqlite3.c /^ unsigned uniqNotNull:1; \/* True if U unixepochFunc src/sqlite3/src/sqlite3.c /^static void unixepochFunc($/;" f typeref:typename:void file: unlikely src/sqlite3/src/sqlite3.c /^#define unlikely(/;" d file: update_task src/dodo.c /^int update_task(sqlite3 *db, int argc, char** argv){$/;" f typeref:typename:int +update_task src/dodo.h /^int update_task(sqlite3 *db, int argc, char** argv);$/;" p typeref:typename:int update_task_status src/dodo.c /^int update_task_status(sqlite3 *db, int argc, char** argv){$/;" f typeref:typename:int update_task_status src/dodo.h /^int update_task_status(sqlite3 *db, int argc, char** argv);$/;" p typeref:typename:int uptr src/sqlite3/src/sqlite3.c /^ typedef u32 uptr;$/;" t typeref:typename:u32 file: @@ -7184,7 +7187,7 @@ validHMS src/sqlite3/src/sqlite3.c /^ char validHMS; \/* True (1) if h,m,s validJD src/sqlite3/src/sqlite3.c /^ char validJD; \/* True (1) if iJD is valid *\/$/;" m struct:DateTime typeref:typename:char file: validJulianDay src/sqlite3/src/sqlite3.c /^static int validJulianDay(sqlite3_int64 iJD){$/;" f typeref:typename:int file: validYMD src/sqlite3/src/sqlite3.c /^ char validYMD; \/* True (1) if Y,M,D are valid *\/$/;" m struct:DateTime typeref:typename:char file: -values src/dodo.c /^ char values[100];$/;" l function:add_new_task typeref:typename:char[100] file: +values src/dodo.c /^ char values[ARG_MAX];$/;" l function:add_new_task typeref:typename:char[] file: vfsList src/sqlite3/src/sqlite3.c /^#define vfsList GLOBAL(sqlite3_vfs *, vfsList)/;" d file: vfsList src/sqlite3/src/sqlite3.c /^static sqlite3_vfs * SQLITE_WSD vfsList = 0;$/;" v typeref:typename:sqlite3_vfs * SQLITE_WSD file: vfsUnlink src/sqlite3/src/sqlite3.c /^static void vfsUnlink(sqlite3_vfs *pVfs){$/;" f typeref:typename:void file: @@ -7202,7 +7205,6 @@ w src/sqlite3/src/sqlite3.c /^ } w;$/;" m struct:Expr typeref:union:Expr::__ano walkerDepth src/sqlite3/src/sqlite3.c /^ int walkerDepth; \/* Number of subqueries *\/$/;" m struct:Walker typeref:typename:int file: width src/dodo.c /^ int width = (FIXED_ID_WIDTH + FIXED_TITLE_WIDTH + FIXED_DATE_WIDTH + x_strlen(heading) );$/;" l function:display_task_list_heading typeref:typename:int file: width src/dodo.c /^ int width = 0;$/;" l function:display_column_heading typeref:typename:int file: -width src/dodo.c /^ int width = 0;$/;" l function:display_heading typeref:typename:int file: width src/sqlite3/src/sqlite3.c /^ int width; \/* Width of the current field *\/$/;" l function:sqlite3_str_vappendf typeref:typename:int file: width_div_2 src/dodo.c /^ int width_div_2 = width \/ 2;$/;" l function:display_task_list_heading typeref:typename:int file: winMutexAlloc src/sqlite3/src/sqlite3.c /^static sqlite3_mutex *winMutexAlloc(int iType){$/;" f typeref:typename:sqlite3_mutex * file: @@ -7554,8 +7556,8 @@ x_strcmp src/xlibc/x_string/src/x_string.c /^int x_strcmp (const char* str1, con x_strcmp src/xlibc/x_string/src/x_string.h /^int x_strcmp(const char*, const char*);$/;" p typeref:typename:int x_strconcat src/xlibc/x_string/src/x_string.c /^char* x_strconcat(char* str1, char* str2){$/;" f typeref:typename:char * x_strconcat src/xlibc/x_string/src/x_string.h /^char* x_strconcat(char*, char*);$/;" p typeref:typename:char * -x_strcpy src/xlibc/x_string/src/x_string.c /^void x_strcpy(char* dest, char* src, const int size_dest){$/;" f typeref:typename:void -x_strcpy src/xlibc/x_string/src/x_string.h /^void x_strcpy(char*, char*, const int);$/;" p typeref:typename:void +x_strcpy src/xlibc/x_string/src/x_string.c /^int x_strcpy(char* dest, char* src, const int size_dest){$/;" f typeref:typename:int +x_strcpy src/xlibc/x_string/src/x_string.h /^int x_strcpy(char*, char*, const int);$/;" p typeref:typename:int x_strlen src/xlibc/x_string/src/x_string.c /^int x_strlen(char* str){$/;" f typeref:typename:int x_strlen src/xlibc/x_string/src/x_string.h /^int x_strlen(char*);$/;" p typeref:typename:int xlibc src/xlibc/README.md /^# xlibc$/;" c diff --git a/tests/tests.c b/tests/tests.c index ce009b7..624ea0c 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -133,15 +133,13 @@ int test_update_task(){ printf("%s... ", __func__); int rc = 0; sqlite3 *db; - char *argv_1[3] = {"./dodo", "new", "jello"}; + char *argv_1[4] = {"./dodo", "update", "jello", "hello"}; if ( (rc = set_up_db(&db)) ){ return rc; } - update_task(db, 3, argv_1); - - return 1; + return update_task(db, 4, argv_1); }