mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 08:45:59 +01:00
Coding style fixes
No functional changes. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Sebastian Ramacher <s.ramacher@gmx.at>
This commit is contained in:
parent
9474332d09
commit
24081171db
3 changed files with 24 additions and 21 deletions
22
commands.c
22
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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
14
zathura.h
14
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue