Use include guards consistently
* Don't mix pragma guards and include guards, prefer classic include guards since apparently pragma guards are not a standard yet. * Use the DUNST_FILE_H naming convention for all include guards.
This commit is contained in:
parent
f34b846041
commit
964688699e
@ -1,7 +1,7 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
|
|
||||||
#ifndef _DUNST_DBUS_H
|
#ifndef DUNST_DBUS_H
|
||||||
#define _DUNST_DBUS_H
|
#define DUNST_DBUS_H
|
||||||
|
|
||||||
#include <dbus/dbus.h>
|
#include <dbus/dbus.h>
|
||||||
|
|
||||||
@ -14,5 +14,4 @@ void notification_closed(notification * n, int reason);
|
|||||||
void action_invoked(notification * n, const char *identifier);
|
void action_invoked(notification * n, const char *identifier);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
|
|
||||||
#pragma once
|
#ifndef DUNST_DUNST_H
|
||||||
|
#define DUNST_DUNST_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -47,4 +48,6 @@ char *extract_urls(const char *str);
|
|||||||
void context_menu(void);
|
void context_menu(void);
|
||||||
void wake_up(void);
|
void wake_up(void);
|
||||||
void pause_signal_handler(int sig);
|
void pause_signal_handler(int sig);
|
||||||
|
|
||||||
|
#endif
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
|
#ifndef DUNST_MENU_H
|
||||||
|
#define DUNST_MENU_H
|
||||||
|
|
||||||
#include "dunst.h"
|
#include "dunst.h"
|
||||||
#include <regex.h>
|
#include <regex.h>
|
||||||
|
|
||||||
@ -7,4 +10,5 @@ void open_browser(const char *url);
|
|||||||
void invoke_action(const char *action);
|
void invoke_action(const char *action);
|
||||||
void regex_teardown(void);
|
void regex_teardown(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
#pragma once
|
#ifndef DUNST_NOTIFICATION_H
|
||||||
|
#define DUNST_NOTIFICATION_H
|
||||||
|
|
||||||
#include "x.h"
|
#include "x.h"
|
||||||
|
|
||||||
@ -70,4 +71,5 @@ void notification_update_text_to_render(notification *n);
|
|||||||
int notification_get_ttl(notification *n);
|
int notification_get_ttl(notification *n);
|
||||||
int notification_get_age(notification *n);
|
int notification_get_age(notification *n);
|
||||||
|
|
||||||
|
#endif
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
#pragma once
|
#ifndef DUNST_OPTION_PARSER_H
|
||||||
|
#define DUNST_OPTION_PARSER_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@ -33,4 +34,5 @@ int option_get_bool(char *ini_section, char *ini_key, char *cmdline_key,
|
|||||||
*/
|
*/
|
||||||
char *next_section(char *section);
|
char *next_section(char *section);
|
||||||
|
|
||||||
|
#endif
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
#pragma once
|
#ifndef DUNST_RULES_H
|
||||||
|
#define DUNST_RULES_H
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@ -35,4 +36,5 @@ void rule_apply(rule_t * r, notification * n);
|
|||||||
void rule_apply_all(notification * n);
|
void rule_apply_all(notification * n);
|
||||||
bool rule_matches_notification(rule_t * r, notification * n);
|
bool rule_matches_notification(rule_t * r, notification * n);
|
||||||
|
|
||||||
|
#endif
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
#pragma once
|
#ifndef DUNST_SETTINGS_H
|
||||||
|
#define DUNST_SETTINGS_H
|
||||||
|
|
||||||
typedef struct _settings {
|
typedef struct _settings {
|
||||||
bool print_notifications;
|
bool print_notifications;
|
||||||
@ -67,4 +68,5 @@ extern settings_t settings;
|
|||||||
|
|
||||||
void load_settings(char *cmdline_config_path);
|
void load_settings(char *cmdline_config_path);
|
||||||
|
|
||||||
|
#endif
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
#ifndef UTIL_H
|
#ifndef DUNST_UTILS_H
|
||||||
#define UTIL_H
|
#define DUNST_UTILS_H
|
||||||
|
|
||||||
/* replace all occurences of the character needle with the character replacement in haystack */
|
/* replace all occurences of the character needle with the character replacement in haystack */
|
||||||
char *string_replace_char(char needle, char replacement, char *haystack);
|
char *string_replace_char(char needle, char replacement, char *haystack);
|
||||||
@ -22,6 +22,6 @@ void string_strip_delimited(char *str, char a, char b);
|
|||||||
|
|
||||||
/* exit with an error message */
|
/* exit with an error message */
|
||||||
void die(char *msg, int exit_value);
|
void die(char *msg, int exit_value);
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#endif
|
||||||
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
/* vim: set tabstop=8 shiftwidth=8 expandtab textwidth=0: */
|
||||||
|
4
src/x.h
4
src/x.h
@ -1,6 +1,6 @@
|
|||||||
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
/* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */
|
||||||
#ifndef DRAW_H
|
#ifndef DUNST_X_H
|
||||||
#define DRAW_H
|
#define DUNST_X_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user