Use #pragma once

#pragma once is safer and simpler. According to Wikipedia it's supported by all major compilers.
This commit is contained in:
Alexander Kedrik
2013-12-29 06:11:50 +04:00
committed by Michael Stapelberg
parent 67b213665b
commit e2ebe3e2ae
64 changed files with 64 additions and 254 deletions

View File

@ -7,8 +7,7 @@
* child.c: Getting Input for the statusline
*
*/
#ifndef CHILD_H_
#define CHILD_H_
#pragma once
#include <stdbool.h>
@ -79,5 +78,3 @@ void cont_child(void);
*
*/
void send_block_clicked(int button, const char *name, const char *instance, int x, int y);
#endif

View File

@ -5,8 +5,7 @@
* © 2010-2011 Axel Wagner and contributors (see also: LICENSE)
*
*/
#ifndef COMMON_H_
#define COMMON_H_
#pragma once
#include <stdbool.h>
#include <xcb/xcb.h>
@ -74,5 +73,3 @@ TAILQ_HEAD(statusline_head, status_block) statusline_head;
#include "config.h"
#include "libi3.h"
#include "parse_json_header.h"
#endif

View File

@ -7,8 +7,7 @@
* config.c: Parses the configuration (received from i3).
*
*/
#ifndef CONFIG_H_
#define CONFIG_H_
#pragma once
#include "common.h"
@ -52,5 +51,3 @@ void parse_config_json(char *json);
*
*/
void free_colors(struct xcb_color_strings_t *colors);
#endif

View File

@ -7,8 +7,7 @@
* ipc.c: Communicating with i3
*
*/
#ifndef IPC_H_
#define IPC_H_
#pragma once
#include <stdint.h>
@ -37,5 +36,3 @@ int i3_send_msg(uint32_t type, const char* payload);
*
*/
void subscribe_events(void);
#endif

View File

@ -7,8 +7,7 @@
* mode.c: Handle mode-event and show current binding mode in the bar
*
*/
#ifndef MODE_H_
#define MODE_H_
#pragma once
#include <xcb/xproto.h>
@ -27,5 +26,3 @@ typedef struct mode mode;
*
*/
void parse_mode_json(char *json);
#endif

View File

@ -7,8 +7,7 @@
* outputs.c: Maintaining the output-list
*
*/
#ifndef OUTPUTS_H_
#define OUTPUTS_H_
#pragma once
#include <xcb/xcb.h>
@ -53,5 +52,3 @@ struct i3_output {
SLIST_ENTRY(i3_output) slist; /* Pointer for the SLIST-Macro */
};
#endif

View File

@ -8,8 +8,7 @@
* protocol version and features.
*
*/
#ifndef PARSE_JSON_HEADER_H_
#define PARSE_JSON_HEADER_H_
#pragma once
#include <stdint.h>
@ -22,5 +21,3 @@
*
*/
void parse_json_header(i3bar_child *child, const unsigned char *buffer, int length, unsigned int *consumed);
#endif

View File

@ -5,8 +5,7 @@
* © 2010-2011 Axel Wagner and contributors (see also: LICENSE)
*
*/
#ifndef TRAYCLIENT_H_
#define TRAYCLIENT_H_
#pragma once
#include "common.h"
@ -21,5 +20,3 @@ struct trayclient {
TAILQ_ENTRY(trayclient) tailq; /* Pointer for the TAILQ-Macro */
};
#endif

View File

@ -5,8 +5,7 @@
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
*
*/
#ifndef UTIL_H_
#define UTIL_H_
#pragma once
#include "queue.h"
@ -36,8 +35,6 @@
} \
} while (0)
#endif
/* Securely fee tail-queues */
#define FREE_TAILQ(l, type) do { \
type *walk = TAILQ_FIRST(l); \

View File

@ -7,8 +7,7 @@
* workspaces.c: Maintaining the workspace-lists
*
*/
#ifndef WORKSPACES_H_
#define WORKSPACES_H_
#pragma once
#include <xcb/xproto.h>
@ -42,5 +41,3 @@ struct i3_ws {
TAILQ_ENTRY(i3_ws) tailq; /* Pointer for the TAILQ-Macro */
};
#endif

View File

@ -7,8 +7,7 @@
* xcb.c: Communicating with X
*
*/
#ifndef XCB_H_
#define XCB_H_
#pragma once
#include <stdint.h>
//#include "outputs.h"
@ -133,5 +132,3 @@ void redraw_bars(void);
*
*/
void set_current_mode(struct mode *mode);
#endif