diff --git a/commands.c b/commands.c index a8374b8..82ba01e 100644 --- a/commands.c +++ b/commands.c @@ -112,12 +112,12 @@ cmd_print(girara_session_t* session, girara_list_t* UNUSED(argument_list)) g_return_val_if_fail(session->global.data != NULL, false); zathura_t* zathura = session->global.data; - if (zathura->document == NULL) { + if (zathura->document == NULL) { girara_notify(session, GIRARA_ERROR, "No open document."); - return false; - } + return false; + } - print((zathura_t*) session->global.data); + print((zathura_t*) session->global.data); return true; } @@ -129,10 +129,10 @@ cmd_save(girara_session_t* session, girara_list_t* argument_list) g_return_val_if_fail(session->global.data != NULL, false); zathura_t* zathura = session->global.data; - if (zathura->document == NULL) { - girara_notify(session, GIRARA_ERROR, "No open document."); - return false; - } + if (zathura->document == NULL) { + girara_notify(session, GIRARA_ERROR, "No open document."); + return false; + } if (girara_list_size(argument_list) == 1) { document_save(zathura, girara_list_nth(argument_list, 0), false); @@ -152,10 +152,10 @@ cmd_savef(girara_session_t* session, girara_list_t* argument_list) g_return_val_if_fail(session->global.data != NULL, false); zathura_t* zathura = session->global.data; - if (zathura->document == NULL) { - girara_notify(session, GIRARA_ERROR, "No open document."); + if (zathura->document == NULL) { + girara_notify(session, GIRARA_ERROR, "No open document."); return false; - } + } if (girara_list_size(argument_list) == 1) { document_save(zathura, girara_list_nth(argument_list, 0), true); diff --git a/database-sqlite.c b/database-sqlite.c index 33b41e1..0c71893 100644 --- a/database-sqlite.c +++ b/database-sqlite.c @@ -6,12 +6,14 @@ #include "database.h" -struct zathura_database_s { +struct zathura_database_s +{ sqlite3* session; }; zathura_database_t* -zathura_db_init(const char* path) { +zathura_db_init(const char* path) +{ zathura_database_t* db = g_malloc0(sizeof(zathura_database_t)); /* create bookmarks database */ @@ -51,7 +53,8 @@ zathura_db_init(const char* path) { } void -zathura_db_free(zathura_database_t* db) { +zathura_db_free(zathura_database_t* db) +{ if (db == NULL) { return; } diff --git a/zathura.h b/zathura.h index d3583ec..7035542 100644 --- a/zathura.h +++ b/zathura.h @@ -89,13 +89,13 @@ typedef struct zathura_s bool recolor; /**> Recoloring mode switch */ } global; - struct - { - girara_mode_t normal; /**> Normal mode */ - girara_mode_t fullscreen; /**> Fullscreen mode */ - girara_mode_t index; /**> Index mode */ - girara_mode_t insert; /**> Insert mode */ - } modes; + struct + { + girara_mode_t normal; /**> Normal mode */ + girara_mode_t fullscreen; /**> Fullscreen mode */ + girara_mode_t index; /**> Index mode */ + girara_mode_t insert; /**> Insert mode */ + } modes; struct {