From 0e2a5c63c661695ba48d31c6bceecd59b407797f Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sat, 2 Feb 2019 22:08:32 +0100 Subject: [PATCH] Convert some tabs to spaces --- glfw/backend_utils.c | 8 ++++---- glfw/egl_context.h | 16 ++++++++-------- glfw/glx_context.h | 6 +++--- glfw/internal.h | 6 +++--- glfw/memfd.h | 4 ++-- glfw/nsgl_context.h | 2 +- glfw/win32_platform.h | 2 +- kitty/child.c | 4 ++-- kitty/data-types.c | 10 +++++----- kitty/mouse.c | 10 +++++----- kitty/shaders.c | 6 +++--- kitty/state.c | 4 ++-- 12 files changed, 39 insertions(+), 39 deletions(-) diff --git a/glfw/backend_utils.c b/glfw/backend_utils.c index 3451fafb9..4c34c62fb 100644 --- a/glfw/backend_utils.c +++ b/glfw/backend_utils.c @@ -24,13 +24,13 @@ static inline double monotonic() { struct timespec ts = {0}; #ifdef CLOCK_HIGHRES - clock_gettime(CLOCK_HIGHRES, &ts); + clock_gettime(CLOCK_HIGHRES, &ts); #elif CLOCK_MONOTONIC_RAW - clock_gettime(CLOCK_MONOTONIC_RAW, &ts); + clock_gettime(CLOCK_MONOTONIC_RAW, &ts); #else - clock_gettime(CLOCK_MONOTONIC, &ts); + clock_gettime(CLOCK_MONOTONIC, &ts); #endif - return (((double)ts.tv_nsec) / 1e9) + (double)ts.tv_sec; + return (((double)ts.tv_nsec) / 1e9) + (double)ts.tv_sec; } void diff --git a/glfw/egl_context.h b/glfw/egl_context.h index daaa2ad94..633d98485 100644 --- a/glfw/egl_context.h +++ b/glfw/egl_context.h @@ -47,26 +47,26 @@ typedef struct wl_egl_window* EGLNativeWindowType; #error "No supported EGL platform selected" #endif -#define EGL_SUCCESS 0x3000 -#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_SUCCESS 0x3000 +#define EGL_NOT_INITIALIZED 0x3001 #define EGL_BAD_ACCESS 0x3002 #define EGL_BAD_ALLOC 0x3003 #define EGL_BAD_ATTRIBUTE 0x3004 #define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 #define EGL_BAD_MATCH 0x3009 #define EGL_BAD_NATIVE_PIXMAP 0x300a #define EGL_BAD_NATIVE_WINDOW 0x300b #define EGL_BAD_PARAMETER 0x300c -#define EGL_BAD_SURFACE 0x300d +#define EGL_BAD_SURFACE 0x300d #define EGL_CONTEXT_LOST 0x300e #define EGL_COLOR_BUFFER_TYPE 0x303f #define EGL_RGB_BUFFER 0x308e #define EGL_SURFACE_TYPE 0x3033 #define EGL_WINDOW_BIT 0x0004 -#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_RENDERABLE_TYPE 0x3040 #define EGL_OPENGL_ES_BIT 0x0001 #define EGL_OPENGL_ES2_BIT 0x0004 #define EGL_OPENGL_BIT 0x0008 @@ -76,7 +76,7 @@ typedef struct wl_egl_window* EGLNativeWindowType; #define EGL_RED_SIZE 0x3024 #define EGL_DEPTH_SIZE 0x3025 #define EGL_STENCIL_SIZE 0x3026 -#define EGL_SAMPLES 0x3031 +#define EGL_SAMPLES 0x3031 #define EGL_OPENGL_ES_API 0x30a0 #define EGL_OPENGL_API 0x30a2 #define EGL_NONE 0x3038 diff --git a/glfw/glx_context.h b/glfw/glx_context.h index f767cb141..9f573900f 100644 --- a/glfw/glx_context.h +++ b/glfw/glx_context.h @@ -29,11 +29,11 @@ #define GLX_RGBA_BIT 0x00000001 #define GLX_WINDOW_BIT 0x00000001 #define GLX_DRAWABLE_TYPE 0x8010 -#define GLX_RENDER_TYPE 0x8011 +#define GLX_RENDER_TYPE 0x8011 #define GLX_RGBA_TYPE 0x8014 #define GLX_DOUBLEBUFFER 5 #define GLX_STEREO 6 -#define GLX_AUX_BUFFERS 7 +#define GLX_AUX_BUFFERS 7 #define GLX_RED_SIZE 8 #define GLX_GREEN_SIZE 9 #define GLX_BLUE_SIZE 10 @@ -42,7 +42,7 @@ #define GLX_STENCIL_SIZE 13 #define GLX_ACCUM_RED_SIZE 14 #define GLX_ACCUM_GREEN_SIZE 15 -#define GLX_ACCUM_BLUE_SIZE 16 +#define GLX_ACCUM_BLUE_SIZE 16 #define GLX_ACCUM_ALPHA_SIZE 17 #define GLX_SAMPLES 0x186a1 #define GLX_VISUAL_ID 0x800b diff --git a/glfw/internal.h b/glfw/internal.h index 8b59015b6..f5fe8d021 100644 --- a/glfw/internal.h +++ b/glfw/internal.h @@ -87,8 +87,8 @@ typedef GLFWglproc (* _GLFWgetprocaddressfun)(const char*); typedef void (* _GLFWdestroycontextfun)(_GLFWwindow*); #define GL_VERSION 0x1f02 -#define GL_NONE 0 -#define GL_COLOR_BUFFER_BIT 0x00004000 +#define GL_NONE 0 +#define GL_COLOR_BUFFER_BIT 0x00004000 #define GL_UNSIGNED_BYTE 0x1401 #define GL_EXTENSIONS 0x1f03 #define GL_NUM_EXTENSIONS 0x821d @@ -105,7 +105,7 @@ typedef void (* _GLFWdestroycontextfun)(_GLFWwindow*); #define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82fc #define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 -typedef int GLint; +typedef int GLint; typedef unsigned int GLuint; typedef unsigned int GLenum; typedef unsigned int GLbitfield; diff --git a/glfw/memfd.h b/glfw/memfd.h index ef24c64cc..7c1797865 100644 --- a/glfw/memfd.h +++ b/glfw/memfd.h @@ -29,8 +29,8 @@ static inline int memfd_create(const char *name, unsigned int flags) { #endif #ifndef MFD_CLOEXEC -#define MFD_CLOEXEC 0x0001U -#define MFD_ALLOW_SEALING 0x0002U +#define MFD_CLOEXEC 0x0001U +#define MFD_ALLOW_SEALING 0x0002U #endif #else diff --git a/glfw/nsgl_context.h b/glfw/nsgl_context.h index 18042dee6..585ae72fc 100644 --- a/glfw/nsgl_context.h +++ b/glfw/nsgl_context.h @@ -33,7 +33,7 @@ typedef struct _GLFWcontextNSGL { id pixelFormat; - id object; + id object; } _GLFWcontextNSGL; diff --git a/glfw/win32_platform.h b/glfw/win32_platform.h index 979e40817..aa26ca765 100644 --- a/glfw/win32_platform.h +++ b/glfw/win32_platform.h @@ -204,7 +204,7 @@ DECLARE_HANDLE(DPI_AWARENESS_CONTEXT); // HACK: Define macros that some dinput.h variants don't #ifndef DIDFT_OPTIONAL - #define DIDFT_OPTIONAL 0x80000000 + #define DIDFT_OPTIONAL 0x80000000 #endif // winmm.dll function pointer typedefs diff --git a/kitty/child.c b/kitty/child.c index 530e73493..a6643d4bc 100644 --- a/kitty/child.c +++ b/kitty/child.c @@ -32,8 +32,8 @@ serialize_string_tuple(PyObject *src) { static inline void free_string_tuple(char** data) { size_t i = 0; - while(data[i]) free(data[i++]); - free(data); + while(data[i]) free(data[i++]); + free(data); } extern char **environ; diff --git a/kitty/data-types.c b/kitty/data-types.c index 2428a1511..b49477bfc 100644 --- a/kitty/data-types.c +++ b/kitty/data-types.c @@ -45,7 +45,7 @@ static mach_timebase_info_data_t timebase = {0}; static inline double monotonic_() { - return ((double)(mach_absolute_time() * timebase.numer) / timebase.denom)/SEC_TO_NS; + return ((double)(mach_absolute_time() * timebase.numer) / timebase.denom)/SEC_TO_NS; } static PyObject* @@ -79,13 +79,13 @@ process_group_map() { static inline double monotonic_() { struct timespec ts = {0}; #ifdef CLOCK_HIGHRES - clock_gettime(CLOCK_HIGHRES, &ts); + clock_gettime(CLOCK_HIGHRES, &ts); #elif CLOCK_MONOTONIC_RAW - clock_gettime(CLOCK_MONOTONIC_RAW, &ts); + clock_gettime(CLOCK_MONOTONIC_RAW, &ts); #else - clock_gettime(CLOCK_MONOTONIC, &ts); + clock_gettime(CLOCK_MONOTONIC, &ts); #endif - return (((double)ts.tv_nsec) / SEC_TO_NS) + (double)ts.tv_sec; + return (((double)ts.tv_nsec) / SEC_TO_NS) + (double)ts.tv_sec; } #endif diff --git a/kitty/mouse.c b/kitty/mouse.c index de26c2dfb..40581451a 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -439,9 +439,9 @@ handle_tab_bar_mouse(int button, int UNUSED modifiers) { static inline bool mouse_in_region(Region *r) { if (r->left == r->right) return false; - if (global_state.callback_os_window->mouse_y < r->top || global_state.callback_os_window->mouse_y > r->bottom) return false; - if (global_state.callback_os_window->mouse_x < r->left || global_state.callback_os_window->mouse_x > r->right) return false; - return true; + if (global_state.callback_os_window->mouse_y < r->top || global_state.callback_os_window->mouse_y > r->bottom) return false; + if (global_state.callback_os_window->mouse_x < r->left || global_state.callback_os_window->mouse_x > r->right) return false; + return true; } static inline Window* @@ -457,8 +457,8 @@ window_for_id(id_type window_id) { static inline Window* window_for_event(unsigned int *window_idx, bool *in_tab_bar) { Region central, tab_bar; - os_window_regions(global_state.callback_os_window, ¢ral, &tab_bar); - *in_tab_bar = mouse_in_region(&tab_bar); + os_window_regions(global_state.callback_os_window, ¢ral, &tab_bar); + *in_tab_bar = mouse_in_region(&tab_bar); if (!*in_tab_bar && global_state.callback_os_window->num_tabs > 0) { Tab *t = global_state.callback_os_window->tabs + global_state.callback_os_window->active_tab; for (unsigned int i = 0; i < t->num_windows; i++) { diff --git a/kitty/shaders.c b/kitty/shaders.c index 0944e6fe4..90d199553 100644 --- a/kitty/shaders.c +++ b/kitty/shaders.c @@ -526,9 +526,9 @@ draw_borders(ssize_t vao_idx, unsigned int num_border_rects, BorderRect *rect_bu bind_program(BORDERS_PROGRAM); #define CV3(x) (((float)((x >> 16) & 0xff))/255.f), (((float)((x >> 8) & 0xff))/255.f), (((float)(x & 0xff))/255.f) glUniform1f(border_uniform_locations[BORDER_background_opacity], w->is_semi_transparent ? w->background_opacity : 1.0f); - glUniform3f(border_uniform_locations[BORDER_active_border_color], CV3(OPT(active_border_color))); - glUniform3f(border_uniform_locations[BORDER_inactive_border_color], CV3(OPT(inactive_border_color))); - glUniform3f(border_uniform_locations[BORDER_bell_border_color], CV3(OPT(bell_border_color))); + glUniform3f(border_uniform_locations[BORDER_active_border_color], CV3(OPT(active_border_color))); + glUniform3f(border_uniform_locations[BORDER_inactive_border_color], CV3(OPT(inactive_border_color))); + glUniform3f(border_uniform_locations[BORDER_bell_border_color], CV3(OPT(bell_border_color))); glUniform2ui(border_uniform_locations[BORDER_viewport], viewport_width, viewport_height); color_type default_bg = num_visible_windows > 1 ? OPT(background) : active_window_bg; glUniform3f(border_uniform_locations[BORDER_default_bg], CV3(default_bg)); diff --git a/kitty/state.c b/kitty/state.c index ad6fd7868..0118b62f5 100644 --- a/kitty/state.c +++ b/kitty/state.c @@ -683,8 +683,8 @@ PYWRAP1(patch_global_colors) { #define P(name) { \ PyObject *val = PyDict_GetItemString(spec, #name); \ if (val) { \ - global_state.opts.name = PyLong_AsLong(val); \ - } \ + global_state.opts.name = PyLong_AsLong(val); \ + } \ } P(active_border_color); P(inactive_border_color); P(bell_border_color); if (configured) {