forked from speedie/spmenu
Add header guards, fixing issue #30
This commit is contained in:
parent
7b3db0bf31
commit
43232dea24
|
@ -1,3 +1,5 @@
|
|||
#ifndef ARG_H
|
||||
#define ARG_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
typedef union {
|
||||
int i; // integer
|
||||
|
@ -84,3 +86,4 @@ static void toggleimgtype(Arg *arg);
|
|||
static void selecthover(Arg *arg);
|
||||
static void outputhover(Arg *arg);
|
||||
static void markhover(Arg *arg);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#if CONFIG
|
||||
#if X11
|
||||
|
@ -709,3 +711,4 @@ static void conf_init(void);
|
|||
static void theme_load(void);
|
||||
static int bind_init(void);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef DRAW_H
|
||||
#define DRAW_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
// declare functions
|
||||
|
@ -10,3 +12,4 @@ static int drawmode(int x, int y, int w);
|
|||
static int drawcaps(int x, int y, int w);
|
||||
static int drawlarrow(int x, int y, int w);
|
||||
static int drawrarrow(int x, int y, int w);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef LIBDRAW
|
||||
#define LIBDRAW
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#include <cairo/cairo.h>
|
||||
|
@ -71,3 +73,4 @@ void draw_save_screen(Draw_t *draw, const char *file);
|
|||
/* Misc */
|
||||
void draw_die(const char *fmt, ...);
|
||||
void *draw_calloc(size_t nmemb, size_t size);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef OPTIONS_H
|
||||
#define OPTIONS_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/* spmenu options */
|
||||
|
@ -284,3 +286,4 @@ static int incremental = 0; /* Print text every time a key is pr
|
|||
static int coloritems = 1; /* Color items (0/1) */
|
||||
static int sgr = 1; /* Support SGR sequences (0/1) */
|
||||
static char *worddelimiters = " /?\"&[]"; /* Word delimiters used for keybinds that change words, Space is default. */
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef REGEX_H
|
||||
#define REGEX_H
|
||||
/*
|
||||
*
|
||||
* Mini regex-module inspired by Rob Pike's regex code described in:
|
||||
|
@ -63,3 +65,4 @@ int re_match(const char* pattern, const char* text, int* matchlength);
|
|||
#endif
|
||||
|
||||
#endif /* ifndef _TINY_REGEX_C */
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef SCHEMES_H
|
||||
#define SCHEMES_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
static char *textcolors[] = {
|
||||
|
@ -260,3 +262,4 @@ static char *textcolors[] = {
|
|||
|
||||
static char *txtcols[256];
|
||||
static void init_appearance(void);
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef WL_INC_H
|
||||
#define WL_INC_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#if WAYLAND
|
||||
#include "wayland.h"
|
||||
#include "init.h"
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef WL_INIT_H
|
||||
#define WL_INIT_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
static void handle_wl(void);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef WAYLAND_H
|
||||
#define WAYLAND_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -221,3 +223,4 @@ struct wl_seat_listener seat_listener = {
|
|||
static const struct wl_buffer_listener buffer_listener = {
|
||||
.release = zero,
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef CLIENT_H
|
||||
#define CLIENT_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
static void hexconv(const char *hex, unsigned short *r, unsigned short *g, unsigned short *b);
|
||||
|
@ -6,3 +8,4 @@ static void set_window_x11(void);
|
|||
static void set_prop_x11(void);
|
||||
static void resizeclient_x11(void);
|
||||
static void xinitvisual(void);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#ifndef CLIPBOARD_H
|
||||
#define CLIPBOARD_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
static void pastesel_x11(void);
|
||||
static int paste_x11(int sel);
|
||||
#endif
|
||||
|
|
|
@ -1,2 +1,5 @@
|
|||
#ifndef EVENT_H
|
||||
#define EVENT_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
static void eventloop_x11(void);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef FOCUS_H
|
||||
#define FOCUS_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
static void grabfocus_x11(void);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef X_INC_H
|
||||
#define X_INC_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#if X11
|
||||
#include "lib.h"
|
||||
|
@ -11,3 +13,4 @@
|
|||
#include "focus.h"
|
||||
#include "clipboard.h"
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef X_INIT_H
|
||||
#define X_INIT_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#define CLEANMASK(mask) (mask & ~(x11.numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
|
||||
|
@ -13,3 +15,4 @@ static void handle_x11(void);
|
|||
static void cleanup_x11(Display *disp);
|
||||
static void prepare_window_size_x11(void);
|
||||
static Display * opendisplay_x11(char *disp);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef KEY_H
|
||||
#define KEY_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
typedef struct {
|
||||
|
@ -23,3 +25,4 @@ static void getcapsstate(void);
|
|||
|
||||
static Key ckeys[256];
|
||||
static Key hkeys[1] = { { -1, Ctrl|Alt, XK_Delete, quit, {0} } };
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef LIB_H
|
||||
#define LIB_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
// include libraries
|
||||
|
@ -18,3 +20,4 @@
|
|||
#if XRESOURCES
|
||||
#include <X11/Xresource.h>
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef MOUSE_H
|
||||
#define MOUSE_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
typedef struct {
|
||||
|
@ -9,3 +11,4 @@ typedef struct {
|
|||
|
||||
static Mouse cbuttons[256];
|
||||
static void buttonpress_x11(XEvent *e);
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#ifndef XIM_H
|
||||
#define XIM_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
static XIC xic;
|
||||
|
||||
static void open_xim(void);
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef XRDB_H
|
||||
#define XRDB_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
#if XRESOURCES
|
||||
|
@ -17,3 +19,4 @@ typedef struct {
|
|||
static void load_xresources(void);
|
||||
static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef XRESOURCES_H
|
||||
#define XRESOURCES_H
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
// This .Xresources array is read and compared to the xrdb. Simply add to the array if you need to.
|
||||
|
@ -58,3 +60,4 @@ ResourcePref cols[] = {
|
|||
{ "color15", STRING, &col_sgr15 },
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue