Commit 24081171 authored by Pavel Borzenkov's avatar Pavel Borzenkov Committed by Sebastian Ramacher

Coding style fixes

No functional changes.
Signed-off-by: default avatarPavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: default avatarSebastian Ramacher <s.ramacher@gmx.at>
parent 9474332d
......@@ -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);
......
......@@ -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;
}
......
......@@ -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
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment