Re-arrange blocks

This commit is contained in:
Sebastian Ramacher 2018-03-04 15:43:49 +01:00
parent 0cb36b572e
commit 67ef89b627

View file

@ -504,9 +504,10 @@ sqlite_save_jumplist(zathura_database_t* db, const char* file, girara_list_t* ju
{ {
g_return_val_if_fail(db != NULL && file != NULL && jumplist != NULL, false); g_return_val_if_fail(db != NULL && file != NULL && jumplist != NULL, false);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_INSERT_JUMP[] = "INSERT INTO jumplist (file, page, hadj_ratio, vadj_ratio) VALUES (?, ?, ?, ?);"; static const char SQL_INSERT_JUMP[] = "INSERT INTO jumplist (file, page, hadj_ratio, vadj_ratio) VALUES (?, ?, ?, ?);";
static const char SQL_REMOVE_JUMPLIST[] = "DELETE FROM jumplist WHERE file = ?;"; static const char SQL_REMOVE_JUMPLIST[] = "DELETE FROM jumplist WHERE file = ?;";
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
sqlite3_stmt* stmt = NULL; sqlite3_stmt* stmt = NULL;
int res = 0; int res = 0;
@ -582,8 +583,9 @@ sqlite_load_jumplist(zathura_database_t* db, const char* file)
{ {
g_return_val_if_fail(db != NULL && file != NULL, NULL); g_return_val_if_fail(db != NULL && file != NULL, NULL);
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
static const char SQL_GET_JUMPLIST[] = "SELECT page, hadj_ratio, vadj_ratio FROM jumplist WHERE file = ? ORDER BY id ASC;"; static const char SQL_GET_JUMPLIST[] = "SELECT page, hadj_ratio, vadj_ratio FROM jumplist WHERE file = ? ORDER BY id ASC;";
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_GET_JUMPLIST); sqlite3_stmt* stmt = prepare_statement(priv->session, SQL_GET_JUMPLIST);
if (stmt == NULL) { if (stmt == NULL) {