mirror of
https://github.com/labwc/labwc.git
synced 2026-02-05 04:06:33 -05:00
includes: identifier consistency in include guards
Made all header files to have LABWC_ prefix in include guard identifers. Converted from __LABWC_ in 35 include/ files. Converted from __LAB_ in 5 include/ files. Added LABWC prefix to 3 include/ files. Added include guards to 3 include/ files. The double underscores were removed since according to C standard those "are always reserved for any use".
This commit is contained in:
parent
dbad5fc483
commit
7ad5200f2e
46 changed files with 141 additions and 129 deletions
|
|
@ -5,8 +5,8 @@
|
|||
* Copyright Johan Malm 2020
|
||||
*/
|
||||
|
||||
#ifndef __LABWC_BUF_H
|
||||
#define __LABWC_BUF_H
|
||||
#ifndef LABWC_BUF_H
|
||||
#define LABWC_BUF_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -39,4 +39,4 @@ void buf_init(struct buf *s);
|
|||
*/
|
||||
void buf_add(struct buf *s, const char *data);
|
||||
|
||||
#endif /* __LABWC_BUF_H */
|
||||
#endif /* LABWC_BUF_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_DIR_H
|
||||
#define __LABWC_DIR_H
|
||||
#ifndef LABWC_DIR_H
|
||||
#define LABWC_DIR_H
|
||||
|
||||
char *config_dir(void);
|
||||
|
||||
|
|
@ -10,4 +10,4 @@ char *config_dir(void);
|
|||
*/
|
||||
char *theme_dir(const char *theme_name);
|
||||
|
||||
#endif /* __LABWC_DIR_H */
|
||||
#endif /* LABWC_DIR_H */
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_FD_UTIL_H
|
||||
#define __LABWC_FD_UTIL_H
|
||||
#ifndef LABWC_FD_UTIL_H
|
||||
#define LABWC_FD_UTIL_H
|
||||
|
||||
void increase_nofile_limit(void);
|
||||
void restore_nofile_limit(void);
|
||||
|
||||
#endif /* __LABWC_FD_UTIL_H */
|
||||
#endif /* LABWC_FD_UTIL_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_FONT_H
|
||||
#define __LABWC_FONT_H
|
||||
#ifndef LABWC_FONT_H
|
||||
#define LABWC_FONT_H
|
||||
|
||||
struct lab_data_buffer;
|
||||
|
||||
|
|
@ -54,4 +54,4 @@ void font_buffer_create(struct lab_data_buffer **buffer, int max_width,
|
|||
*/
|
||||
void font_finish(void);
|
||||
|
||||
#endif /* __LABWC_FONT_H */
|
||||
#endif /* LABWC_FONT_H */
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
* Copyright Johan Malm 2020
|
||||
*/
|
||||
|
||||
#ifndef __LABWC_GRAB_FILE_H
|
||||
#define __LABWC_GRAB_FILE_H
|
||||
#ifndef LABWC_GRAB_FILE_H
|
||||
#define LABWC_GRAB_FILE_H
|
||||
|
||||
/**
|
||||
* grab_file - read file into memory buffer
|
||||
|
|
@ -15,4 +15,4 @@
|
|||
*/
|
||||
char *grab_file(const char *filename);
|
||||
|
||||
#endif /* __LABWC_GRAB_FILE_H */
|
||||
#endif /* LABWC_GRAB_FILE_H */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_GRAPHIC_HELPERS_H
|
||||
#define LABWC_GRAPHIC_HELPERS_H
|
||||
|
||||
#include <cairo.h>
|
||||
#include <wayland-server-core.h>
|
||||
|
|
@ -44,3 +46,5 @@ void set_cairo_color(cairo_t *cairo, float *color);
|
|||
/* Draws a border with a specified line width */
|
||||
void draw_cairo_border(cairo_t *cairo, double width, double height,
|
||||
double line_width);
|
||||
|
||||
#endif /* LABWC_GRAPHIC_HELPERS_H */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_LIST_H
|
||||
#define LABWC_LIST_H
|
||||
#include <wayland-server-core.h>
|
||||
|
||||
/**
|
||||
|
|
@ -17,3 +19,5 @@ wl_list_append(struct wl_list *list, struct wl_list *elm)
|
|||
{
|
||||
wl_list_insert(list->prev, elm);
|
||||
}
|
||||
|
||||
#endif /* LABWC_LIST_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_MATCH_H
|
||||
#define __LABWC_MATCH_H
|
||||
#ifndef LABWC_MATCH_H
|
||||
#define LABWC_MATCH_H
|
||||
#include <glib.h>
|
||||
|
||||
/**
|
||||
|
|
@ -11,4 +11,4 @@
|
|||
*/
|
||||
bool match_glob(const gchar *pattern, const gchar *string);
|
||||
|
||||
#endif /* __LABWC_MATCH_H */
|
||||
#endif /* LABWC_MATCH_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_MEM_H
|
||||
#define __LABWC_MEM_H
|
||||
#ifndef LABWC_MEM_H
|
||||
#define LABWC_MEM_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
@ -52,4 +52,4 @@ char *xstrdup(const char *str);
|
|||
free(ptr); (ptr) = NULL; \
|
||||
} while (0)
|
||||
|
||||
#endif /* __LABWC_MEM_H */
|
||||
#endif /* LABWC_MEM_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_NODENAME_H
|
||||
#define __LABWC_NODENAME_H
|
||||
#ifndef LABWC_NODENAME_H
|
||||
#define LABWC_NODENAME_H
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/tree.h>
|
||||
|
|
@ -17,4 +17,4 @@
|
|||
*/
|
||||
char *nodename(xmlNode * node, char *buf, int len);
|
||||
|
||||
#endif /* __LABWC_NODENAME_H */
|
||||
#endif /* LABWC_NODENAME_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_PARSE_BOOL_H
|
||||
#define __LABWC_PARSE_BOOL_H
|
||||
#ifndef LABWC_PARSE_BOOL_H
|
||||
#define LABWC_PARSE_BOOL_H
|
||||
#include <stdbool.h>
|
||||
|
||||
/**
|
||||
|
|
@ -21,4 +21,4 @@ int parse_bool(const char *str, int default_value);
|
|||
void set_bool(const char *str, bool *variable);
|
||||
void set_bool_as_int(const char *str, int *variable);
|
||||
|
||||
#endif /* __LABWC_PARSE_BOOL_H */
|
||||
#endif /* LABWC_PARSE_BOOL_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LAB_COMMON_SCALED_FONT_BUFFER_H
|
||||
#define __LAB_COMMON_SCALED_FONT_BUFFER_H
|
||||
#ifndef LABWC_SCALED_FONT_BUFFER_H
|
||||
#define LABWC_SCALED_FONT_BUFFER_H
|
||||
|
||||
#include "common/font.h"
|
||||
|
||||
|
|
@ -56,4 +56,4 @@ void scaled_font_buffer_update(struct scaled_font_buffer *self, const char *text
|
|||
*/
|
||||
void scaled_font_buffer_set_max_width(struct scaled_font_buffer *self, int max_width);
|
||||
|
||||
#endif /* __LAB_COMMON_SCALED_FONT_BUFFER_H */
|
||||
#endif /* LABWC_SCALED_FONT_BUFFER_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LAB_COMMON_SCALED_SCENE_BUFFER_H
|
||||
#define __LAB_COMMON_SCALED_SCENE_BUFFER_H
|
||||
#ifndef LABWC_SCALED_SCENE_BUFFER_H
|
||||
#define LABWC_SCALED_SCENE_BUFFER_H
|
||||
|
||||
#define LAB_SCALED_BUFFER_MAX_CACHE 2
|
||||
|
||||
|
|
@ -66,4 +66,4 @@ struct scaled_scene_buffer_cache_entry {
|
|||
double scale;
|
||||
};
|
||||
|
||||
#endif /* __LAB_COMMON_SCALED_SCENE_BUFFER_H */
|
||||
#endif /* LABWC_SCALED_SCENE_BUFFER_H */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef LABWC_SCENE_HELPERS_H
|
||||
#define LABWC_SCENE_HELPERS_H
|
||||
|
||||
struct wlr_scene_node;
|
||||
struct wlr_scene_rect;
|
||||
|
|
@ -15,3 +17,5 @@ struct wlr_surface *lab_wlr_surface_from_node(struct wlr_scene_node *node);
|
|||
* Return NULL if previous link is list-head which means node is bottom-most
|
||||
*/
|
||||
struct wlr_scene_node *lab_wlr_scene_get_prev_node(struct wlr_scene_node *node);
|
||||
|
||||
#endif /* LABWC_SCENE_HELPERS_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_SPAWN_H
|
||||
#define __LABWC_SPAWN_H
|
||||
#ifndef LABWC_SPAWN_H
|
||||
#define LABWC_SPAWN_H
|
||||
|
||||
/**
|
||||
* spawn_async_no_shell - execute asyncronously
|
||||
|
|
@ -8,4 +8,4 @@
|
|||
*/
|
||||
void spawn_async_no_shell(char const *command);
|
||||
|
||||
#endif /* __LABWC_SPAWN_H */
|
||||
#endif /* LABWC_SPAWN_H */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef __LABWC_STRING_HELPERS_H
|
||||
#define __LABWC_STRING_HELPERS_H
|
||||
#ifndef LABWC_STRING_HELPERS_H
|
||||
#define LABWC_STRING_HELPERS_H
|
||||
|
||||
/**
|
||||
* string_strip - strip white space left and right
|
||||
|
|
@ -16,4 +16,4 @@ char *string_strip(char *s);
|
|||
*/
|
||||
void string_truncate_at_pattern(char *buf, const char *pattern);
|
||||
|
||||
#endif /* __LABWC_STRING_HELPERS_H */
|
||||
#endif /* LABWC_STRING_HELPERS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue