Ensure all *.[ch] files include config.h
Including config.h is necessary to get e.g. the _GNU_SOURCE define and any other definitions that autoconf declares. Hence, config.h needs to be included as the first header in each file. This is done either via: 1. Including "common.h" (i3bar) 2. Including "libi3.h" 3. Including "all.h" (i3) 4. Including <config.h> directly Also remove now-unused I3__FILE__, add copyright/license statement where missing and switch include/all.h to #pragma once.
This commit is contained in:
@ -10,8 +10,9 @@
|
||||
* compile-time.
|
||||
*
|
||||
*/
|
||||
#ifndef I3_ALL_H
|
||||
#define I3_ALL_H
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
@ -81,5 +82,3 @@
|
||||
#include "display_version.h"
|
||||
#include "restore_layout.h"
|
||||
#include "main.h"
|
||||
|
||||
#endif
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Checks the list of assignments for the given window and runs all matching
|
||||
* ones (unless they have already been run for this specific window).
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
extern pid_t command_error_nagbar_pid;
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* The button press X callback. This function determines whether the floating
|
||||
* modifier is pressed and where the user clicked (decoration, border, inside
|
||||
|
@ -9,4 +9,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
char *parse_cmd(const char *new);
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "commands_parser.h"
|
||||
|
||||
/** The beginning of the prototype for every cmd_ function. */
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
|
||||
/*
|
||||
|
@ -11,6 +11,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Create a new container (and attach it to the given parent, if not NULL).
|
||||
* This function only initializes the data structures.
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "config_parser.h"
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
|
||||
SLIST_HEAD(variables_head, Variable);
|
||||
|
@ -12,10 +12,11 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "libi3.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "queue.h"
|
||||
#include "i3.h"
|
||||
#include "libi3.h"
|
||||
|
||||
typedef struct Config Config;
|
||||
typedef struct Barconfig Barconfig;
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "libi3.h"
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launcher.h>
|
||||
|
||||
@ -17,7 +19,6 @@
|
||||
#include <pcre.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include "libi3.h"
|
||||
#include "queue.h"
|
||||
|
||||
/*
|
||||
|
@ -10,4 +10,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
int handle_event(void *ignored, xcb_connection_t *c, xcb_generic_event_t *e);
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Connects to i3 to find out the currently running version. Useful since it
|
||||
* might be different from the version compiled into this binary (maybe the
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Updates _NET_CURRENT_DESKTOP with the current desktop number.
|
||||
*
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Creates outputs according to the given specification.
|
||||
* The specification must be in the format wxh+x+y, for example 1024x768+0+0,
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "tree.h"
|
||||
|
||||
/** Callback for dragging */
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <xcb/randr.h>
|
||||
|
||||
extern int randr_base;
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <ev.h>
|
||||
#include <stdbool.h>
|
||||
#include <yajl/yajl_gen.h>
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* There was a key press. We compare this key code with our bindings table and pass
|
||||
* the bound action to parse_command().
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
typedef enum {
|
||||
// We could not determine the content of the JSON file. This typically
|
||||
// means it’s unreadable or contains garbage.
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Enable or disable the main X11 event handling function.
|
||||
* This is used by drag_pointer() which has its own, modal event handler, which
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "data.h"
|
||||
|
||||
/**
|
||||
|
@ -13,6 +13,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/*
|
||||
* Initializes the Match data structure. This function is necessary because the
|
||||
* members representing boolean values (like dock) need to be initialized with
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Moves the given container in the given direction (TOK_LEFT, TOK_RIGHT,
|
||||
* TOK_UP, TOK_DOWN from cmdparse.l)
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Returns the output container below the given output container.
|
||||
*
|
||||
|
@ -11,6 +11,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "data.h"
|
||||
#include <xcb/randr.h>
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Creates a new 'regex' struct containing the given pattern and a PCRE
|
||||
* compiled regular expression. Also, calls pcre_study because this regex will
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* This is used to keep a state to pass around when rendering a con in render_con(). */
|
||||
typedef struct render_params {
|
||||
/* A copy of the coordinates of the container which is being rendered. */
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction);
|
||||
|
||||
int resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event);
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Opens a separate connection to X11 for placeholder windows when restoring
|
||||
* layouts. This is done as a safety measure (users can xkill a placeholder
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Moves the specified window to the __i3_scratch workspace, making it floating
|
||||
* and setting the appropriate scratchpad_state.
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#if !defined(__OpenBSD__)
|
||||
#include <pthread.h>
|
||||
|
@ -11,6 +11,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Setup signal handlers to safely handle SIGSEGV and SIGFPE
|
||||
*
|
||||
|
@ -12,6 +12,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-monitor.h>
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
extern Con *croot;
|
||||
/* TODO: i am not sure yet how much access to the focused container should
|
||||
* be permitted to source files */
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <err.h>
|
||||
|
||||
#include "data.h"
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* Frees an i3Window and all its members.
|
||||
*
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "data.h"
|
||||
#include "tree.h"
|
||||
#include "randr.h"
|
||||
|
@ -10,6 +10,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/** Stores the X11 window ID of the currently focused window */
|
||||
extern xcb_window_t focused_id;
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "data.h"
|
||||
#include "xcursor.h"
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <xcb/xcb_cursor.h>
|
||||
|
||||
enum xcursor_cursor_t {
|
||||
|
@ -11,6 +11,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "data.h"
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
|
Reference in New Issue
Block a user