This commit is contained in:
2025-03-28 06:55:22 +01:00
parent 6834081960
commit 1e62665d43
7 changed files with 18 additions and 14 deletions
+3 -2
View File
@@ -1,17 +1,18 @@
#ifndef DB_UTILS_H
#define DB_UTILS_H
#include "r.h"
#include <sqlite3.h>
#include <json-c/json.h>
#include "utils.h"
const char * db_file = "~/.r.db";
json_object* db_execute(const char *query);
char * db_file_expanded(){
char * expanded = expand_home_directory(db_file);
char * expanded = expand_home_directory(DB_FILE);
static char result[4096];
result[0] = 0;
strcpy(result, expanded);