Commit 07e88ec5 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Merge branch 'release/0.3.2'

parents e1d94030 a7891a45
Pipeline #166 failed with stages
Copyright (c) 2010-2017 pwmt.org
Copyright (c) 2010-2018 pwmt.org
This software is provided 'as-is', without any express or implied warranty. In
no event will the authors be held liable for any damages arising from the use of
......
......@@ -11,7 +11,7 @@ enhance the user interface that is used by zathura.
Requirements
------------
meson (>= 0.43)
meson (>= 0.47)
glib (>= 2.50)
gtk3 (>= 3.20)
intltool
......@@ -19,7 +19,7 @@ libnotify (optional, for notification support)
json-c (optional, for configuration dumping support)
To disable the optional support for libnotify and json-c, configure the build
system with -Denable-notify=false or -Denable-json=false.
system with -Dnotify=disabled or -Djson=disabled.
Installation
------------
......@@ -38,5 +38,4 @@ refer to the meson documentation for platform specific dependencies.
Bugs
----
Please report bugs at http://bugs.pwmt.org or contact us on our mailing list at
girara@lists.pwmt.org.
Please report bugs at https://git.pwmt.org/pwmt/girara.
# See LICENSE file for license and copyright information
# SPDX-License-Identifier: Zlib
# General information
PROJECT_NAME = girara
......
doxygen = find_program('doxygen', required: false)
if get_option('enable-docs') and doxygen.found()
doxygen = find_program('doxygen', required: get_option('docs'))
if doxygen.found()
conf_data = configuration_data()
conf_data.set('DOXYGEN_INPUT', meson.source_root())
conf_data.set('DOXYGEN_OUTPUT', meson.current_build_dir())
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "callbacks.h"
......@@ -162,7 +162,7 @@ girara_callback_view_key_press_event(GtkWidget* widget,
/* buffer could match a command */
if (!strncmp(session_private->buffer.command->str, shortcut->buffered_command, session_private->buffer.command->len)) {
/* command matches buffer exactly */
if (!strcmp(session_private->buffer.command->str, shortcut->buffered_command)
if (!g_strcmp0(session_private->buffer.command->str, shortcut->buffered_command)
&& (session->modes.current_mode == shortcut->mode || shortcut->mode == 0)) {
g_string_free(session_private->buffer.command, TRUE);
g_string_free(session->global.buffer, TRUE);
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_CALLBACKS_H
#define GIRARA_CALLBACKS_H
#include "macros.h"
#include "types.h"
#include <gtk/gtk.h>
......@@ -37,7 +38,7 @@ typedef gboolean (*girara_callback_inputbar_activate_t)(GtkEntry* entry,
* @return FALSE An error occurred
*/
gboolean girara_callback_view_key_press_event(GtkWidget* widget, GdkEventKey* event,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback when a button (typically a mouse button) has been pressed
......@@ -49,7 +50,7 @@ gboolean girara_callback_view_key_press_event(GtkWidget* widget, GdkEventKey* ev
* @return false to propagate the event further.
*/
gboolean girara_callback_view_button_press_event(GtkWidget* widget,
GdkEventButton* button, girara_session_t* session);
GdkEventButton* button, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback when a button (typically a mouse button) has been released
......@@ -61,7 +62,7 @@ gboolean girara_callback_view_button_press_event(GtkWidget* widget,
* @return false to propagate the event further.
*/
gboolean girara_callback_view_button_release_event(GtkWidget* widget,
GdkEventButton* button, girara_session_t* session);
GdkEventButton* button, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback when the pointer moves over the widget
......@@ -73,7 +74,7 @@ gboolean girara_callback_view_button_release_event(GtkWidget* widget,
* @return false to propagate the event further.
*/
gboolean girara_callback_view_button_motion_notify_event(GtkWidget* widget,
GdkEventMotion* button, girara_session_t* session);
GdkEventMotion* button, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback then a scroll event is triggered by the view
......@@ -85,7 +86,7 @@ gboolean girara_callback_view_button_motion_notify_event(GtkWidget* widget,
* @return false to propagate the event further.
*/
gboolean girara_callback_view_scroll_event(GtkWidget* widget, GdkEventScroll* event,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback if the inputbar gets activated
......@@ -96,7 +97,7 @@ gboolean girara_callback_view_scroll_event(GtkWidget* widget, GdkEventScroll* ev
* @return FALSE An error occurred
*/
gboolean girara_callback_inputbar_activate(GtkEntry* entry,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback if an key in the input bar gets pressed
......@@ -108,7 +109,7 @@ gboolean girara_callback_inputbar_activate(GtkEntry* entry,
* @return FALSE An error occurred
*/
gboolean girara_callback_inputbar_key_press_event(GtkWidget* widget,
GdkEventKey* event, girara_session_t* session);
GdkEventKey* event, girara_session_t* session) GIRARA_VISIBLE;
/**
* Default callback if the text of the input bar has changed
......@@ -119,6 +120,6 @@ gboolean girara_callback_inputbar_key_press_event(GtkWidget* widget,
* @return FALSE An error occurred
*/
gboolean girara_callback_inputbar_changed_event(GtkEditable* widget,
girara_session_t* session);
girara_session_t* session) GIRARA_VISIBLE;
#endif
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "commands.h"
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_COMMANDS_H
#define GIRARA_COMMANDS_H
#include "macros.h"
#include "types.h"
/**
......@@ -20,7 +21,7 @@
bool girara_inputbar_command_add(girara_session_t* session,
const char* command, const char* abbreviation,
girara_command_function_t function, girara_completion_function_t completion,
const char* description);
const char* description) GIRARA_VISIBLE;
/**
* Adds a special command
......@@ -37,6 +38,6 @@ bool girara_inputbar_command_add(girara_session_t* session,
*/
bool girara_special_command_add(girara_session_t* session, char identifier,
girara_inputbar_special_function_t function, bool always, int argument_n,
void* argument_data);
void* argument_data) GIRARA_VISIBLE;
#endif
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <math.h>
#include <string.h>
......@@ -199,8 +199,8 @@ girara_isc_completion(girara_session_t* session, girara_argument_t* argument, gi
* there is only one completion entry
*/
if ( (argument->n == GIRARA_HIDE) ||
(current_parameter && previous_parameter && strcmp(current_parameter, previous_parameter)) ||
(current_command && previous_command && strcmp(current_command, previous_command)) ||
(current_parameter && previous_parameter && g_strcmp0(current_parameter, previous_parameter)) ||
(current_command && previous_command && g_strcmp0(current_command, previous_command)) ||
(input_length != previous_length) ||
is_single_entry
)
......@@ -434,8 +434,8 @@ girara_isc_completion(girara_session_t* session, girara_argument_t* argument, gi
/* hide other items */
unsigned int n_completion_items = 15;
girara_setting_get(session, "n-completion-items", &n_completion_items);
unsigned int uh = ceil( n_completion_items / 2);
unsigned int lh = floor(n_completion_items / 2);
unsigned int uh = ceil(n_completion_items / 2.0);
unsigned int lh = floor(n_completion_items / 2.0);
unsigned int current_item = g_list_position(entries, entries_current);
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_COMPLETION_H
#define GIRARA_COMPLETION_H
#include "macros.h"
#include "types.h"
/**
......@@ -11,7 +12,7 @@
* @return Completion object
* @return NULL An error occurred
*/
girara_completion_t* girara_completion_init(void);
girara_completion_t* girara_completion_init(void) GIRARA_VISIBLE;
/**
* Creates an girara completion group
......@@ -20,14 +21,14 @@ girara_completion_t* girara_completion_init(void);
* @return NULL An error occurred
*/
girara_completion_group_t* girara_completion_group_create(
girara_session_t* session, const char* name);
girara_session_t* session, const char* name) GIRARA_VISIBLE;
/**
* Frees a completion group
*
* @param group The group
*/
void girara_completion_group_free(girara_completion_group_t* group);
void girara_completion_group_free(girara_completion_group_t* group) GIRARA_VISIBLE;
/**
* Adds an group to a completion object
......@@ -36,14 +37,14 @@ void girara_completion_group_free(girara_completion_group_t* group);
* @param group The completion group
*/
void girara_completion_add_group(girara_completion_t* completion,
girara_completion_group_t* group);
girara_completion_group_t* group) GIRARA_VISIBLE;
/**
* Frees an completion and all of its groups and elements
*
* @param completion The completion
*/
void girara_completion_free(girara_completion_t* completion);
void girara_completion_free(girara_completion_t* completion) GIRARA_VISIBLE;
/**
* Adds an element to a completion group
......@@ -53,6 +54,6 @@ void girara_completion_free(girara_completion_t* completion);
* @param description Description of the entry
*/
void girara_completion_group_add_element(girara_completion_group_t* group,
const char* value, const char* description);
const char* value, const char* description) GIRARA_VISIBLE;
#endif
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include "config.h"
......@@ -126,11 +126,11 @@ cb_scrollbars(girara_session_t* session, const char* name,
bool show_hscrollbar = strchr(guioptions, 'h') != NULL;
bool show_vscrollbar = strchr(guioptions, 'v') != NULL;
if (strcmp(name, "show-scrollbars") == 0) {
if (g_strcmp0(name, "show-scrollbars") == 0) {
show_hscrollbar = show_vscrollbar = val;
} else if (strcmp(name, "show-h-scrollbar") == 0) {
} else if (g_strcmp0(name, "show-h-scrollbar") == 0) {
show_hscrollbar = val;
} else if (strcmp(name, "show-v-scrollbar") == 0) {
} else if (g_strcmp0(name, "show-v-scrollbar") == 0) {
show_vscrollbar = val;
}
......@@ -209,8 +209,8 @@ girara_config_load_default(girara_session_t* session)
girara_setting_add(session, "word-separator", " /.-=&#?", STRING, TRUE, NULL, NULL, NULL);
girara_setting_add(session, "window-width", &window_width, INT, TRUE, _("Initial window width"), NULL, NULL);
girara_setting_add(session, "window-height", &window_height, INT, TRUE, _("Initial window height"), NULL, NULL);
girara_setting_add(session, "statusbar-h-padding", &statusbar_h_padding, INT, TRUE, _("Horizontal padding for the status input and notification bars"), NULL, NULL);
girara_setting_add(session, "statusbar-v-padding", &statusbar_v_padding, INT, TRUE, _("Vertical padding for the status input and notification bars"), NULL, NULL);
girara_setting_add(session, "statusbar-h-padding", &statusbar_h_padding, INT, TRUE, _("Horizontal padding for the status, input, and notification bars"), NULL, NULL);
girara_setting_add(session, "statusbar-v-padding", &statusbar_v_padding, INT, TRUE, _("Vertical padding for the status, input, and notification bars"), NULL, NULL);
girara_setting_add(session, "n-completion-items", &n_completion_items, INT, TRUE, _("Number of completion items"), NULL, NULL);
girara_setting_add(session, "show-scrollbars", &show_scrollbars, BOOLEAN, FALSE, _("Show both the horizontal and vertical scrollbars"), cb_scrollbars, NULL);
girara_setting_add(session, "show-h-scrollbar", &show_scrollbars, BOOLEAN, FALSE, _("Show the horizontal scrollbar"), cb_scrollbars, NULL);
......@@ -289,7 +289,7 @@ girara_config_handle_add(girara_session_t* session, const char* identifier, gira
/* search for existing config handle */
GIRARA_LIST_FOREACH_BODY(session_private->config.handles, girara_config_handle_t*, data,
if (strcmp(data->identifier, identifier) == 0) {
if (g_strcmp0(data->identifier, identifier) == 0) {
data->handle = handle;
found = true;
break;
......@@ -364,7 +364,7 @@ config_parse(girara_session_t* session, const char* path)
}
/* include gets a special treatment */
if (strcmp(argv[0], "include") == 0) {
if (g_strcmp0(argv[0], "include") == 0) {
if (argc != 2) {
girara_warning("Could not process line %d in '%s': usage: include path.", line_number, path);
} else {
......@@ -379,7 +379,7 @@ config_parse(girara_session_t* session, const char* path)
g_free(basename);
}
if (strcmp(newpath, path) == 0) {
if (g_strcmp0(newpath, path) == 0) {
girara_warning("Could not process line %d in '%s': trying to include itself.", line_number, path);
} else {
girara_debug("Loading config file '%s'.", newpath);
......@@ -395,7 +395,7 @@ config_parse(girara_session_t* session, const char* path)
girara_config_handle_t* handle = NULL;
GIRARA_LIST_FOREACH_BODY(session_private->config.handles, girara_config_handle_t*, tmp,
handle = tmp;
if (strcmp(handle->identifier, argv[0]) == 0) {
if (g_strcmp0(handle->identifier, argv[0]) == 0) {
handle->handle(session, argument_list);
break;
} else {
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_CONFIG_H
#define GIRARA_CONFIG_H
#include "macros.h"
#include "types.h"
/**
......@@ -11,7 +12,7 @@
* @param session The used girara session
* @param path Path to the configuration file
*/
void girara_config_parse(girara_session_t* session, const char* path);
void girara_config_parse(girara_session_t* session, const char* path) GIRARA_VISIBLE;
/**
* Adds an additional config handler
......@@ -22,6 +23,6 @@ void girara_config_parse(girara_session_t* session, const char* path);
* @return true if no error occurred, otherwise false
*/
bool girara_config_handle_add(girara_session_t* session, const char* identifier,
girara_command_function_t handle);
girara_command_function_t handle) GIRARA_VISIBLE;
#endif
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#include <stdlib.h>
#include <glib.h>
......@@ -40,7 +40,7 @@ girara_list_new(void)
girara_list_t*
girara_list_new2(girara_free_function_t gfree)
{
girara_list_t* list = g_try_malloc0(sizeof(girara_list_t));
girara_list_t* list = g_slice_new0(girara_list_t);
if (list == NULL) {
return NULL;
}
......@@ -103,7 +103,7 @@ girara_list_free(girara_list_t* list)
}
girara_list_clear(list);
g_free(list);
g_slice_free(girara_list_t, list);
}
void
......@@ -203,7 +203,7 @@ girara_list_iterator(girara_list_t* list)
return NULL;
}
girara_list_iterator_t* iter = g_try_malloc0(sizeof(girara_list_iterator_t));
girara_list_iterator_t* iter = g_slice_new0(girara_list_iterator_t);
if (iter == NULL) {
return NULL;
}
......@@ -219,14 +219,7 @@ girara_list_iterator_copy(girara_list_iterator_t* iter)
{
g_return_val_if_fail(iter != NULL, NULL);
girara_list_iterator_t* iter2 = g_try_malloc0(sizeof(girara_list_iterator_t));
if (iter2 == NULL) {
return NULL;
}
iter2->list = iter->list;
iter2->element = iter->element;
return iter2;
return g_slice_copy(sizeof(girara_list_iterator_t), iter);
}
girara_list_iterator_t*
......@@ -328,7 +321,7 @@ girara_list_iterator_free(girara_list_iterator_t* iter)
return;
}
g_free(iter);
g_slice_free(girara_list_iterator_t, iter);
}
size_t
......
/* See LICENSE file for license and copyright information */
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_DATASTRUCTURES_H
#define GIRARA_DATASTRUCTURES_H
......@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdbool.h>
#include <sys/types.h>
#include "macros.h"
#include "types.h"
/**
......@@ -13,7 +14,7 @@
*
* @return The girara list object or NULL if an error occurred
*/
girara_list_t* girara_list_new(void);
girara_list_t* girara_list_new(void) GIRARA_VISIBLE;
/**
* Create a new list.
......@@ -21,7 +22,7 @@ girara_list_t* girara_list_new(void);
* @param gfree Pointer to the free function
* @return The girara list object or NULL if an error occurred.
*/
girara_list_t* girara_list_new2(girara_free_function_t gfree);
girara_list_t* girara_list_new2(girara_free_function_t gfree) GIRARA_VISIBLE;
/**
* Create a new (sorted) list.
......@@ -29,7 +30,7 @@ girara_list_t* girara_list_new2(girara_free_function_t gfree);
* @param cmp Pointer to the compare function.
* @return The girara list object or NULL if an error occurred.
*/
girara_list_t* girara_sorted_list_new(girara_compare_function_t cmp);
girara_list_t* girara_sorted_list_new(girara_compare_function_t cmp) GIRARA_VISIBLE;
/**
* Create a new (sorted) list.
......@@ -40,7 +41,7 @@ girara_list_t* girara_sorted_list_new(girara_compare_function_t cmp);
*/
girara_list_t* girara_sorted_list_new2(girara_compare_function_t cmp,
girara_free_function_t gfree);
girara_free_function_t gfree) GIRARA_VISIBLE;
/**
* Set the function which should be called if the stored data should be freed.
......@@ -49,21 +50,21 @@ girara_list_t* girara_sorted_list_new2(girara_compare_function_t cmp,
* @param gfree Pointer to the free function
*/
void girara_list_set_free_function(girara_list_t* list,
girara_free_function_t gfree);
girara_free_function_t gfree) GIRARA_VISIBLE;
/**
* Remove all elements from a list.
*
* @param list The girara list object
*/
void girara_list_clear(girara_list_t* list);
void girara_list_clear(girara_list_t* list) GIRARA_VISIBLE;
/**
* Destroy list.
*
* @param list The girara list object
*/
void girara_list_free(girara_list_t* list);
void girara_list_free(girara_list_t* list) GIRARA_VISIBLE;
/**
* Append an element to the list.
......@@ -71,7 +72,7 @@ void girara_list_free(girara_list_t* list);
* @param list The girara list object
* @param data The element
*/
void girara_list_append(girara_list_t* list, void* data);
void girara_list_append(girara_list_t* list, void* data) GIRARA_VISIBLE;
/**
* Prepend an element to the list.
......@@ -79,7 +80,7 @@ void girara_list_append(girara_list_t* list, void* data);
* @param list The girara list object
* @param data The element
*/
void girara_list_prepend(girara_list_t* list, void* data);
void girara_list_prepend(girara_list_t* list, void* data) GIRARA_VISIBLE;
/**
* Remove an element of the list
......@@ -87,7 +88,7 @@ void girara_list_prepend(girara_list_t* list, void* data);
* @param list The girara list object
* @param data The element
*/
void girara_list_remove(girara_list_t* list, void* data);
void girara_list_remove(girara_list_t* list, void* data) GIRARA_VISIBLE;
/**
* Returns nth entry
......@@ -96,7 +97,7 @@ void girara_list_remove(girara_list_t* list, void* data);
* @param n Index of the entry
* @return The nth element or NULL if an error occurred
*/
void* girara_list_nth(girara_list_t* list, size_t n);
void* girara_list_nth(girara_list_t* list, size_t n) GIRARA_VISIBLE;
/**
* Checks if the list contains the given element
......@@ -105,7 +106,7 @@ void* girara_list_nth(girara_list_t* list, size_t n);
* @param data The element
* @return true if the list contains the element
*/
bool girara_list_contains(girara_list_t* list, void* data);
bool girara_list_contains(girara_list_t* list, void* data) GIRARA_VISIBLE;
/**
* Get size of the list.
......@@ -113,7 +114,7 @@ bool girara_list_contains(girara_list_t* list, void* data);
* @param list The girara list object
* @return The size of the list
*/
size_t girara_list_size(girara_list_t* list);
size_t girara_list_size(girara_list_t* list) GIRARA_VISIBLE;
/**
* Returns the position of the element in the list
......@@ -122,7 +123,7 @@ size_t girara_list_size(girara_list_t* list);
* @param data The element
* @return The position or -1 if the data is not found
*/
ssize_t girara_list_position(girara_list_t* list, void* data);
ssize_t girara_list_position(girara_list_t* list, void* data) GIRARA_VISIBLE;
/**
* Sort a list
......@@ -130,7 +131,7 @@ ssize_t girara_list_position(girara_list_t* list, void* data);
* @param list The list to sort
* @param compare compare function
*/
void girara_list_sort(girara_list_t* list, girara_compare_function_t compare);
void girara_list_sort(girara_list_t* list, girara_compare_function_t compare) GIRARA_VISIBLE;
/**
* Find an element
......@@ -141,7 +142,7 @@ void girara_list_sort(girara_list_t* list, girara_compare_function_t compare);
* @return the element if found or NULL
*/
void* girara_list_find(girara_list_t* list, girara_compare_function_t compare,
const void* data);
const void* data) GIRARA_VISIBLE;
/**
* Create an iterator pointing at the start of list.
......@@ -149,7 +150,7 @@ void* girara_list_find(girara_list_t* list, girara_compare_function_t compare,
* @param list The girara list object
* @return The list iterator or NULL if an error occurred
*/
girara_list_iterator_t* girara_list_iterator(girara_list_t* list);
girara_list_iterator_t* girara_list_iterator(girara_list_t* list) GIRARA_VISIBLE;
/**
* Create an iterator pointing to the same element as iter.
......@@ -157,7 +158,7 @@ girara_list_iterator_t* girara_list_iterator(girara_list_t* list);
* @param iter The girara list iterator to be copied
* @return The list iterator or NULL if an error occurred
*/
girara_list_iterator_t* girara_list_iterator_copy(girara_list_iterator_t* iter);
girara_list_iterator_t* girara_list_iterator_copy(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Move iterator to next element.
......@@ -165,7 +166,7 @@ girara_list_iterator_t* girara_list_iterator_copy(girara_list_iterator_t* iter);
* @param iter The list iterator
* @return The moved iterator or NULL if an error occurred
*/
girara_list_iterator_t* girara_list_iterator_next(girara_list_iterator_t* iter);
girara_list_iterator_t* girara_list_iterator_next(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Check if iterator has next element.
......@@ -173,7 +174,7 @@ girara_list_iterator_t* girara_list_iterator_next(girara_list_iterator_t* iter);
* @param iter The list iterator
* @return true if iterator has a next element, false otherwise
*/
bool girara_list_iterator_has_next(girara_list_iterator_t* iter);
bool girara_list_iterator_has_next(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Move iterator to previous element.
......@@ -181,7 +182,7 @@ bool girara_list_iterator_has_next(girara_list_iterator_t* iter);
* @param iter The list iterator
* @return The moved iterator or NULL if an error occurred
*/
girara_list_iterator_t* girara_list_iterator_previous(girara_list_iterator_t* iter);
girara_list_iterator_t* girara_list_iterator_previous(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Check if iterator has previous element.
......@@ -189,7 +190,7 @@ girara_list_iterator_t* girara_list_iterator_previous(girara_list_iterator_t* it
* @param iter The list iterator
* @return true if iterator has a previous element, false otherwise
*/
bool girara_list_iterator_has_previous(girara_list_iterator_t* iter);
bool girara_list_iterator_has_previous(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Remove element pointed by the iterator, and updates the iterator
......@@ -197,8 +198,7 @@ bool girara_list_iterator_has_previous(girara_list_iterator_t* iter);
*
* @param iter The list iterator
*/
void girara_list_iterator_remove(girara_list_iterator_t* iter);
void girara_list_iterator_remove(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Check if iterator is valid
......@@ -206,7 +206,7 @@ void girara_list_iterator_remove(girara_list_iterator_t* iter);
* @param iter The list iterator
* @return true if iterator is valid, false otherwise
*/
bool girara_list_iterator_is_valid(girara_list_iterator_t* iter);
bool girara_list_iterator_is_valid(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Get data from the element pointed to by the iterator.
......@@ -214,7 +214,7 @@ bool girara_list_iterator_is_valid(girara_list_iterator_t* iter);
* @param iter The list iterator
* @return The data of the current element
*/
void* girara_list_iterator_data(girara_list_iterator_t* iter);
void* girara_list_iterator_data(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Set data from the element pointed to by the iterator.
......@@ -222,14 +222,14 @@ void* girara_list_iterator_data(girara_list_iterator_t* iter);
* @param iter The list iterator
* @param data Sets the list iterator to a specific element
*/
void girara_list_iterator_set(girara_list_iterator_t* iter, void *data);
void girara_list_iterator_set(girara_list_iterator_t* iter, void *data) GIRARA_VISIBLE;
/**
* Destroy the iterator.
*
* @param iter The list iterator
*/
void girara_list_iterator_free(girara_list_iterator_t* iter);
void girara_list_iterator_free(girara_list_iterator_t* iter) GIRARA_VISIBLE;
/**
* Call function for each element in the list.
......@@ -239,7 +239,7 @@ void girara_list_iterator_free(girara_list_iterator_t* iter);
* @param data Passed to the callback as second argument.
*/
void girara_list_foreach(girara_list_t* list, girara_list_callback_t callback,
void* data);
void* data) GIRARA_VISIBLE;
#define GIRARA_LIST_FOREACH(list, type, iter, data) \
do { \
......@@ -271,7 +271,7 @@ void girara_list_foreach(girara_list_t* list, girara_list_callback_t callback,
* @param other the source list
* @returns list with the elements from other.
*/
girara_list_t* girara_list_merge(girara_list_t* list, girara_list_t* other);
girara_list_t* girara_list_merge(girara_list_t* list, girara_list_t* other) GIRARA_VISIBLE;
/**
* Create a new node.
......@@ -279,7 +279,7 @@ girara_list_t* girara_list_merge(girara_list_t* list, girara_list_t* other);
* @param data Data of the new node
* @return A girara node object or NULL if an error occurred
*/
girara_tree_node_t* girara_node_new(void* data);
girara_tree_node_t* girara_node_new(void* data) GIRARA_VISIBLE;
/**
* Set the function which should be called if the stored data should be freed.
......@@ -288,7 +288,7 @@ girara_tree_node_t* girara_node_new(void* data);
* @param gfree Pointer to the free function
*/
void girara_node_set_free_function(girara_tree_node_t* node,
girara_free_function_t gfree);
girara_free_function_t gfree) GIRARA_VISIBLE;
/**
* Free a node. This will remove the node from its' parent and will destroy all
......@@ -296,7 +296,7 @@ void girara_node_set_free_function(girara_tree_node_t* node,
*
* @param node The girara node object
*/
void girara_node_free(girara_tree_node_t* node);
void girara_node_free(girara_tree_node_t* node) GIRARA_VISIBLE;
/**
* Append a node to another node.
......@@ -304,7 +304,7 @@ void girara_node_free(girara_tree_node_t* node);
* @param parent The parent node
* @param child The child node
*/
void girara_node_append(girara_tree_node_t* parent, girara_tree_node_t* child);
void girara_node_append(girara_tree_node_t* parent, girara_tree_node_t* child) GIRARA_VISIBLE;
/**
* Append data as new node to another node.
......@@ -314,7 +314,7 @@ void girara_node_append(girara_tree_node_t* parent, girara_tree_node_t* child);
* @return The node object or NULL if an error occurred
*/
girara_tree_node_t* girara_node_append_data(girara_tree_node_t* parent,
void* data);
void* data) GIRARA_VISIBLE;
/**
* Get parent node.
......@@ -322,7 +322,7 @@ girara_tree_node_t* girara_node_append_data(girara_tree_node_t* parent,
* @param node The girara node object
* @return The parent node or NULL if an error occurred or no parent exists
*/
girara_tree_node_t* girara_node_get_parent(girara_tree_node_t* node);
girara_tree_node_t* girara_node_get_parent(girara_tree_node_t* node) GIRARA_VISIBLE;
/**
* Get root node.
......@@ -330,7 +330,7 @@ girara_tree_node_t* girara_node_get_parent(girara_tree_node_t* node);
* @param node The girara node object
* @return The root node or NULL if an error occurred
*/
girara_tree_node_t* girara_node_get_root(girara_tree_node_t* node);
girara_tree_node_t* girara_node_get_root(girara_tree_node_t* node) GIRARA_VISIBLE;
/**
* Get list of children.
......@@ -338,7 +338,7 @@ girara_tree_node_t* girara_node_get_root(girara_tree_node_t* node);
* @param node The girara node object
* @return List object containing all child nodes or NULL if an error occurred
*/
girara_list_t* girara_node_get_children(girara_tree_node_t* node);
girara_list_t* girara_node_get_children(girara_tree_node_t* node) GIRARA_VISIBLE;
/**
* Get number of children.
......@@ -346,7 +346,7 @@ girara_list_t* girara_node_get_children(girara_tree_node_t* node);
* @param node The girara node object
* @return The number of child nodes