Commit fe7e9194 authored by Moritz Lipp's avatar Moritz Lipp

Merge branch 'release/0.2.7'

parents 6dc6fec2 8779f2eb
Copyright (c) 2010-2015 pwmt.org
Copyright (c) 2010-2017 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
......
......@@ -7,7 +7,7 @@ include common.mk
PROJECTNV = girara
PROJECT = girara-gtk3
SOURCE = $(wildcard ${PROJECTNV}/*.c)
SOURCE = $(sort $(wildcard ${PROJECTNV}/*.c))
CSOURCE = $(filter-out ${PROJECTNV}/css-definitions.c, ${SOURCE})
OBJECTS = $(addprefix ${BUILDDIR_RELEASE}/,${CSOURCE:.c=.o}) \
......@@ -17,7 +17,7 @@ OBJECTS_DEBUG = $(addprefix ${BUILDDIR_DEBUG}/,${CSOURCE:.c=.o}) \
OBJECTS_GCOV = $(addprefix ${BUILDDIR_GCOV}/,${CSOURCE:.c=.o}) \
${BUILDDIR_GCOV}/${PROJECTNV}/css-definitions.o
HEADERS = $(filter-out ${PROJECTNV}/internal.h, $(wildcard ${PROJECTNV}/*.h))
HEADERS = $(filter-out ${PROJECTNV}/internal.h, $(sort $(wildcard ${PROJECTNV}/*.h)))
ifneq (${WITH_LIBNOTIFY},0)
CPPFLAGS += -DWITH_LIBNOTIFY
......
......@@ -9,10 +9,11 @@ enhance the user interface that is used by zathura and jumanji.
Requirements
------------
glib (>= 2.28)
glib (>= 2.36)
gtk3 (>= 3.4)
intltool
libnotify (optional, for notification support)
jscon-c (optional, for configuration dumping support)
Please note that you need to have a working pkg-config installation
and that the Makefile is only compatible with GNU make.
......
......@@ -2,7 +2,7 @@
GIRARA_VERSION_MAJOR = 0
GIRARA_VERSION_MINOR = 2
GIRARA_VERSION_REV = 6
GIRARA_VERSION_REV = 7
VERSION = ${GIRARA_VERSION_MAJOR}.${GIRARA_VERSION_MINOR}.${GIRARA_VERSION_REV}
# Rules for the SOMAJOR and SOMINOR.
......@@ -50,7 +50,7 @@ GTK_MIN_VERSION = 3.4
GTK_PKG_CONFIG_NAME = gtk+-3.0
# glib
GLIB_VERSION_CHECK ?= 1
GLIB_MIN_VERSION = 2.28
GLIB_MIN_VERSION = 2.36
GLIB_PKG_CONFIG_NAME = glib-2.0
# libs
......
#@session@ * {
color: @default-fg@;
background-color: @default-bg@;
background-image: none;
font-family: @font-family@;
font-size: @font-size@;
font-weight: @font-weight@;
}
/* Scrollbar */
#@session@ scrolledwindow scrollbar {
background-color: @scrollbar-bg@;
}
#@session@ scrolledwindow scrollbar > slider {
background-color: @scrollbar-fg@;
}
#@session@ * {
color: @default-fg@;
background-color: @default-bg@;
background-image: none;
font: @font@;
}
/* Inputbar */
#@session@ entry.inputbar {
......@@ -111,4 +116,5 @@
#@session@ scrolledwindow overshoot.right,
#@session@ scrolledwindow overshoot.right:backdrop {
background-color: transparent;
background-image: none;
}
......@@ -5,11 +5,12 @@
#include "session.h"
#include "shortcuts.h"
#include "input-history.h"
#include "internal.h"
#include "utils.h"
#include <string.h>
#include <glib/gi18n-lib.h>
#include "internal.h"
static const guint ALL_ACCELS_MASK = GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK;
static const guint MOUSE_MASK = GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK |
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK | GDK_BUTTON4_MASK | GDK_BUTTON5_MASK;
......@@ -72,7 +73,7 @@ clean_mask(guint hardware_keycode, GdkModifierType state, gint group, guint* cle
}
/* callback implementation */
bool
gboolean
girara_callback_view_key_press_event(GtkWidget* UNUSED(widget),
GdkEventKey* event, girara_session_t* session)
{
......@@ -201,7 +202,7 @@ girara_callback_view_key_press_event(GtkWidget* UNUSED(widget),
return FALSE;
}
bool
gboolean
girara_callback_view_button_press_event(GtkWidget* UNUSED(widget),
GdkEventButton* button, girara_session_t* session)
{
......@@ -248,7 +249,7 @@ girara_callback_view_button_press_event(GtkWidget* UNUSED(widget),
return false;
}
bool
gboolean
girara_callback_view_button_release_event(GtkWidget* UNUSED(widget), GdkEventButton* button, girara_session_t* session)
{
g_return_val_if_fail(session != NULL, false);
......@@ -279,7 +280,7 @@ girara_callback_view_button_release_event(GtkWidget* UNUSED(widget), GdkEventBut
return false;
}
bool
gboolean
girara_callback_view_button_motion_notify_event(GtkWidget* UNUSED(widget), GdkEventMotion* button, girara_session_t* session)
{
g_return_val_if_fail(session != NULL, false);
......@@ -310,7 +311,7 @@ girara_callback_view_button_motion_notify_event(GtkWidget* UNUSED(widget), GdkEv
return false;
}
bool
gboolean
girara_callback_view_scroll_event(GtkWidget* UNUSED(widget), GdkEventScroll* scroll, girara_session_t* session)
{
g_return_val_if_fail(session != NULL, false);
......@@ -362,7 +363,7 @@ girara_callback_view_scroll_event(GtkWidget* UNUSED(widget), GdkEventScroll* scr
return false;
}
bool
gboolean
girara_callback_inputbar_activate(GtkEntry* entry, girara_session_t* session)
{
g_return_val_if_fail(session != NULL, FALSE);
......@@ -505,13 +506,13 @@ girara_callback_inputbar_activate(GtkEntry* entry, girara_session_t* session)
return false;
}
bool
gboolean
girara_callback_inputbar_key_press_event(GtkWidget* entry, GdkEventKey* event, girara_session_t* session)
{
g_return_val_if_fail(session != NULL, false);
/* a custom handler has been installed (e.g. by girara_dialog) */
bool custom_ret = false;
gboolean custom_ret = false;
if (session->signals.inputbar_custom_key_press_event != NULL) {
custom_ret = session->signals.inputbar_custom_key_press_event(entry, event, session->signals.inputbar_custom_data);
if (custom_ret == true) {
......@@ -526,16 +527,18 @@ girara_callback_inputbar_key_press_event(GtkWidget* entry, GdkEventKey* event, g
guint keyval = 0;
guint clean = 0;
if (clean_mask(event->hardware_keycode, event->state, event->group, &clean, &keyval) == false) {
girara_debug("clean_mask returned false.");
return false;
}
girara_debug("Proccessing key %u with mask %x.", keyval, clean);
if (custom_ret == false) {
GIRARA_LIST_FOREACH(session->bindings.inputbar_shortcuts, girara_inputbar_shortcut_t*, iter, inputbar_shortcut)
if (inputbar_shortcut->key == keyval
&& inputbar_shortcut->mask == clean)
{
girara_debug("found shortcut for key %u and mask %x", keyval, clean);
if (inputbar_shortcut->function != NULL) {
inputbar_shortcut->function(session, &(inputbar_shortcut->argument), NULL, 0);
}
......@@ -556,7 +559,7 @@ girara_callback_inputbar_key_press_event(GtkWidget* entry, GdkEventKey* event, g
return custom_ret;
}
bool
gboolean
girara_callback_inputbar_changed_event(GtkEditable* entry, girara_session_t* session)
{
g_return_val_if_fail(session != NULL, false);
......
......@@ -14,7 +14,7 @@
* @param data Custom data
* @return true if no error occurred
*/
typedef bool (*girara_callback_inputbar_key_press_event_t)(GtkWidget* widget,
typedef gboolean (*girara_callback_inputbar_key_press_event_t)(GtkWidget* widget,
GdkEventKey* event, void* data);
/**
......@@ -24,7 +24,7 @@ typedef bool (*girara_callback_inputbar_key_press_event_t)(GtkWidget* widget,
* @param data Custom data
* @return true if no error occurred
*/
typedef bool (*girara_callback_inputbar_activate_t)(GtkEntry* entry,
typedef gboolean (*girara_callback_inputbar_activate_t)(GtkEntry* entry,
void* data);
/**
......@@ -36,7 +36,7 @@ typedef bool (*girara_callback_inputbar_activate_t)(GtkEntry* entry,
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_callback_view_key_press_event(GtkWidget* widget, GdkEventKey* event,
gboolean girara_callback_view_key_press_event(GtkWidget* widget, GdkEventKey* event,
girara_session_t* session);
/**
......@@ -48,7 +48,7 @@ bool girara_callback_view_key_press_event(GtkWidget* widget, GdkEventKey* event,
* @return true to stop other handlers from being invoked for the event.
* @return false to propagate the event further.
*/
bool girara_callback_view_button_press_event(GtkWidget* widget,
gboolean girara_callback_view_button_press_event(GtkWidget* widget,
GdkEventButton* button, girara_session_t* session);
/**
......@@ -60,7 +60,7 @@ bool girara_callback_view_button_press_event(GtkWidget* widget,
* @return true to stop other handlers from being invoked for the event.
* @return false to propagate the event further.
*/
bool girara_callback_view_button_release_event(GtkWidget* widget,
gboolean girara_callback_view_button_release_event(GtkWidget* widget,
GdkEventButton* button, girara_session_t* session);
/**
......@@ -72,7 +72,7 @@ bool girara_callback_view_button_release_event(GtkWidget* widget,
* @return true to stop other handlers from being invoked for the event.
* @return false to propagate the event further.
*/
bool girara_callback_view_button_motion_notify_event(GtkWidget* widget,
gboolean girara_callback_view_button_motion_notify_event(GtkWidget* widget,
GdkEventMotion* button, girara_session_t* session);
/**
......@@ -84,7 +84,7 @@ bool girara_callback_view_button_motion_notify_event(GtkWidget* widget,
* @return true to stop other handlers from being invoked for the event.
* @return false to propagate the event further.
*/
bool girara_callback_view_scroll_event(GtkWidget* widget, GdkEventScroll* event,
gboolean girara_callback_view_scroll_event(GtkWidget* widget, GdkEventScroll* event,
girara_session_t* session);
/**
......@@ -95,7 +95,7 @@ bool girara_callback_view_scroll_event(GtkWidget* widget, GdkEventScroll* event,
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_callback_inputbar_activate(GtkEntry* entry,
gboolean girara_callback_inputbar_activate(GtkEntry* entry,
girara_session_t* session);
/**
......@@ -107,7 +107,7 @@ bool girara_callback_inputbar_activate(GtkEntry* entry,
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_callback_inputbar_key_press_event(GtkWidget* widget,
gboolean girara_callback_inputbar_key_press_event(GtkWidget* widget,
GdkEventKey* event, girara_session_t* session);
/**
......@@ -118,7 +118,7 @@ bool girara_callback_inputbar_key_press_event(GtkWidget* widget,
* @return TRUE No error occurred
* @return FALSE An error occurred
*/
bool girara_callback_inputbar_changed_event(GtkEditable* widget,
gboolean girara_callback_inputbar_changed_event(GtkEditable* widget,
girara_session_t* session);
#endif
......@@ -349,6 +349,11 @@ girara_isc_completion(girara_session_t* session, girara_argument_t* argument, gi
}
GIRARA_LIST_FOREACH(result->groups, girara_completion_group_t*, iter, group)
if (group->elements == NULL || girara_list_size(group->elements) == 0) {
girara_list_iterator_next(iter);
continue;
}
/* create group entry */
if (group->value != NULL) {
girara_internal_completion_entry_t* entry = g_slice_new(girara_internal_completion_entry_t);
......
......@@ -50,8 +50,7 @@ cb_font(girara_session_t* session, const char* UNUSED(name),
{
g_return_if_fail(session != NULL && value != NULL);
girara_template_set_variable_value(session->private_data->csstemplate, "font",
value);
css_template_fill_font(session->private_data->csstemplate, value);
}
static void
......
/* See LICENSE file for license and copyright information */
#include "utils.h"
#include <stdarg.h>
#include <stdio.h>
static girara_debug_level_t debug_level = GIRARA_DEBUG;
void
_girara_debug(const char* function, int line, girara_debug_level_t level, const char* format, ...)
{
if (level < debug_level) {
return;
}
switch (level)
{
case GIRARA_WARNING:
fprintf(stderr, "warning: ");
break;
case GIRARA_ERROR:
fprintf(stderr, "error: ");
break;
case GIRARA_INFO:
fprintf(stderr, "info: ");
break;
case GIRARA_DEBUG:
fprintf(stderr, "debug: (%s:%d) ", function, line);
break;
default:
return;
}
va_list ap;
va_start(ap, format);
vfprintf(stderr, format, ap);
va_end(ap);
fprintf(stderr, "\n");
}
girara_debug_level_t
girara_get_debug_level()
{
return debug_level;
}
void
girara_set_debug_level(girara_debug_level_t level)
{
debug_level = level;
}
......@@ -148,6 +148,8 @@ HIDDEN bool girara_cmd_dump_config(girara_session_t* session,
HIDDEN bool girara_sc_feedkeys(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
HIDDEN void css_template_fill_font(GiraraTemplate* csstemplate, const char* font);
/**
* Structure of a command
*/
......
/* See LICENSE file for license and copyright information */
#include "log.h"
#include <stdarg.h>
#include <stdio.h>
static girara_log_level_t log_level = GIRARA_DEBUG;
static const char* NAMES[] = {
[GIRARA_DEBUG] = "debug",
[GIRARA_INFO] = "info",
[GIRARA_WARNING] = "warning",
[GIRARA_ERROR] = "error"
};
void
girara_vlog(const char* location, const char* function, girara_log_level_t level, const char* format, va_list ap)
{
if (level < log_level || level < GIRARA_DEBUG || level > GIRARA_ERROR ) {
return;
}
fprintf(stderr, "%s: ", NAMES[level]);
if (level == GIRARA_DEBUG) {
if (location != NULL) {
fprintf(stderr, "%s: ", location);
}
if (function != NULL) {
fprintf(stderr, "%s(): ", function);
}
}
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
}
void
girara_log(const char* location, const char* function, girara_log_level_t level, const char* format, ...)
{
va_list ap;
va_start(ap, format);
girara_vlog(location, function, level, format, ap);
va_end(ap);
}
girara_log_level_t
girara_get_log_level(void)
{
return log_level;
}
void
girara_set_log_level(girara_log_level_t level)
{
log_level = level;
}
/* old compat function, remove once we bump the SONAME */
void
_girara_debug(const char* function, int line, girara_log_level_t level, const char* format, ...)
{
char buffer[G_ASCII_DTOSTR_BUF_SIZE] = { '\0' };
g_ascii_dtostr(buffer, G_ASCII_DTOSTR_BUF_SIZE, line);
va_list ap;
va_start(ap, format);
girara_vlog(function, buffer, level, format, ap);
va_end(ap);
}
girara_log_level_t
girara_get_debug_level()
{
return girara_get_log_level();
}
void
girara_set_debug_level(girara_log_level_t level)
{
girara_set_log_level(level);
}
/* See LICENSE file for license and copyright information */
#ifndef GIRARA_LOG_H
#define GIRARA_LOG_H
#include <glib.h>
#include <stdarg.h>
#include "types.h"
#include "macros.h"
#define GIRARA_INDIRECT(x) x
/**
* Prints a debug message. The arguments are passed to @ref _girara_log as
* last argument.
*/
#define girara_debug(...) girara_log(G_STRLOC, __func__, GIRARA_DEBUG, __VA_ARGS__)
/**
* Prints an info message. The arguments are passed to @ref _girara_log as
* last argument.
*/
#define girara_info(...) girara_log(G_STRLOC, __func__, GIRARA_INFO, __VA_ARGS__)
/**
* Prints a warning message. The arguments are passed to @ref _girara_log as
* last argument.
*/
#define girara_warning(...) girara_log(G_STRLOC, __func__, GIRARA_WARNING, __VA_ARGS__)
/**
* Prints an error message. The arguments are passed to @ref _girara_log as
* last argument.
*/
#define girara_error(...) girara_log(G_STRLOC, __func__, GIRARA_ERROR, __VA_ARGS__)
/**
* Print a message.
*
* @param location location of the call
* @param function calling function
* @param level The log level of the message.
* @param format printf like format string
*/
void girara_log(const char* location, const char* function, girara_log_level_t level,
const char* format, ...) GIRARA_PRINTF(4, 5);
/**
* Print a message.
*
* @param location location of the call
* @param function calling function
* @param level The log level of the message.
* @param format printf like format string
* @param ap varag list
*/
void girara_vlog(const char* location, const char* function, girara_log_level_t level,
const char* format, va_list ap);
/**
* Get the log level.
* @returns The log level.
*/
girara_log_level_t girara_get_log_level(void);
/**
* Set the log level. Any message with a level lower than the log level will
* be discarded.
* @param level The new log level.
*/
void girara_set_log_level(girara_log_level_t level);
#endif
......@@ -44,7 +44,6 @@ init_template_engine(GiraraTemplate* csstemplate)
{
static const char* variable_names[] = {
"session",
"font",
"default-fg",
"default-bg",
"inputbar-fg",
......@@ -78,6 +77,88 @@ init_template_engine(GiraraTemplate* csstemplate)
for (size_t idx = 0; idx < LENGTH(variable_names); ++idx) {
girara_template_add_variable(csstemplate, variable_names[idx]);
}
if (gtk_check_version(3, 20, 0) == NULL) {
girara_template_add_variable(csstemplate, "font-family");
girara_template_add_variable(csstemplate, "font-size");
girara_template_add_variable(csstemplate, "font-weight");
} else {
girara_template_add_variable(csstemplate, "font");
}
}
void
css_template_fill_font(GiraraTemplate* csstemplate, const char* font)
{
if (gtk_check_version(3, 20, 0) != NULL) {
girara_template_set_variable_value(csstemplate, "font", font);
return;
}
PangoFontDescription* descr = pango_font_description_from_string(font);
if (descr == NULL) {
return;
}
girara_template_set_variable_value(csstemplate, "font-family",
pango_font_description_get_family(descr));
char* size = g_strdup_printf("%d%s", pango_font_description_get_size(descr) / PANGO_SCALE,
pango_font_description_get_size_is_absolute(descr) == FALSE ? "pt" : "");
girara_template_set_variable_value(csstemplate, "font-size", size);
g_free(size);
switch (pango_font_description_get_weight(descr)) {
case PANGO_WEIGHT_THIN:
girara_template_set_variable_value(csstemplate, "font-weight", "thin");
break;
case PANGO_WEIGHT_ULTRALIGHT:
girara_template_set_variable_value(csstemplate, "font-weight", "ultralight");
break;
case PANGO_WEIGHT_SEMILIGHT:
girara_template_set_variable_value(csstemplate, "font-weight", "light");
break;
case PANGO_WEIGHT_LIGHT:
girara_template_set_variable_value(csstemplate, "font-weight", "light");
break;
case PANGO_WEIGHT_BOOK:
girara_template_set_variable_value(csstemplate, "font-weight", "book");
break;
case PANGO_WEIGHT_MEDIUM:
girara_template_set_variable_value(csstemplate, "font-weight", "medium");
break;
case PANGO_WEIGHT_SEMIBOLD:
girara_template_set_variable_value(csstemplate, "font-weight", "semibold");
break;
case PANGO_WEIGHT_BOLD:
girara_template_set_variable_value(csstemplate, "font-weight", "bold");
break;
case PANGO_WEIGHT_ULTRABOLD:
girara_template_set_variable_value(csstemplate, "font-weight", "ultrabold");
break;
case PANGO_WEIGHT_HEAVY:
girara_template_set_variable_value(csstemplate, "font-weight", "heavy");
break;
case PANGO_WEIGHT_ULTRAHEAVY:
girara_template_set_variable_value(csstemplate, "font-weight", "ultraheavy");
break;
default:
girara_template_set_variable_value(csstemplate, "font-weight", "normal");
break;
}
pango_font_description_free(descr);
}
static void
......@@ -91,10 +172,16 @@ fill_template_with_values(girara_session_t* session)
char* font = NULL;
girara_setting_get(session, "font", &font);
if (font != NULL) {
girara_template_set_variable_value(csstemplate, "font", font);
css_template_fill_font(csstemplate, font);
g_free(font);
} else {
if (gtk_check_version(3, 20, 0) == NULL) {
girara_template_set_variable_value(csstemplate, "font-family", "monospace");
girara_template_set_variable_value(csstemplate, "font-size", "9pt");
girara_template_set_variable_value(csstemplate, "font-weight", "normal");
} else {
girara_template_set_variable_value(csstemplate, "font", "monospace normal 9");
}
};
/* parse color values */
......@@ -125,7 +212,7 @@ fill_template_with_values(girara_session_t* session)
"tabbar-focus-bg",
};
for (size_t i = 0; i < LENGTH(color_settings); i++) {
for (size_t i = 0; i < LENGTH(color_settings); ++i) {
char* tmp_value = NULL;
girara_setting_get(session, color_settings[i], &tmp_value);
......@@ -362,8 +449,7 @@ girara_session_init(girara_session_t* session, const char* sessionname)
}
#endif
gtk_widget_set_name(GTK_WIDGET(session->gtk.window),
session->private_data->session_name);
gtk_widget_set_name(session->gtk.window, session->private_data->session_name);
/* apply CSS style */
css_template_changed(session->private_data->csstemplate, session);
......
......@@ -53,15 +53,15 @@ enum
};
/**
* Debug levels
* Log levels
*/
typedef enum girara_debug_level_e
typedef enum girara_log_level_e
{
GIRARA_DEBUG, /**> Debug messages */
GIRARA_INFO, /**> Information debug output */
GIRARA_WARNING, /**> Warning level */
GIRARA_ERROR /**> Error */
} girara_debug_level_t;
} girara_log_level_t;
/**
* Mode identifier
......
......@@ -55,8 +55,12 @@ girara_fix_path(const char* path)
rpath = g_build_filename(home_path, path + idx, NULL);
g_free(home_path);
} else {
} else if (g_path_is_absolute(path) == TRUE) {
rpath = g_strdup(path);
} else {
char* curdir = g_get_current_dir();
rpath = g_build_filename(curdir, path, NULL);
g_free(curdir);
}
return rpath;
......@@ -90,12 +94,7 @@ char*
girara_get_home_directory(const char* user)
{
if (user == NULL || g_strcmp0(user, g_get_user_name()) == 0) {
#if GLIB_CHECK_VERSION(2, 35, 3)
return g_strdup(g_get_home_dir());
#else
const char* homedir = g_getenv("HOME");
return g_strdup(homedir ? homedir : g_get_home_dir());
#endif
}
// XXX: The following code is very unportable.
......@@ -130,19 +129,13 @@ char*
girara_get_xdg_path(girara_xdg_path_t path)
{
static const char* VARS[] = {
"XDG_CONFIG_HOME",
"XDG_DATA_HOME",
"XDG_CONFIG_DIRS",
"XDG_DATA_DIRS",
"XDG_CACHE_HOME",
[XDG_CONFIG_DIRS] = "XDG_CONFIG_DIRS",
[XDG_DATA_DIRS] = "XDG_DATA_DIRS"
};
static const char* DEFAULTS[] = {
"NOTUSED",
"NOTUSED",
"/etc/xdg",
"/usr/local/share/:/usr/share",
"NOTUSED"
[XDG_CONFIG_DIRS] = "/etc/xdg",
[XDG_DATA_DIRS] = "/usr/local/share/:/usr/share"
};
switch (path) {
......@@ -186,9 +179,12 @@ girara_split_path_array(const char* patharray)
FILE*
girara_file_open(const char* path, const char* mode)
{
char* fixed_path = girara_fix_path(path);
if (path == NULL || mode == NULL) {
return NULL;
}
if (fixed_path == NULL || mode == NULL) {
char* fixed_path = girara_fix_path(path);
if (fixed_path == NULL) {
return NULL;
}
......
......@@ -4,8 +4,10 @@
#define GIRARA_UTILS_H
#include <stdio.h>
#include "types.h"
#include "macros.h"
#include "log.h"
/**
* Enum for directories specified in the XDG specification.
......@@ -113,51 +115,6 @@ void girara_clean_line(char* line);