From d60e8c56dc744ad2d963a667961620dca88ea5b4 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 28 Nov 2010 13:02:29 +0100 Subject: [PATCH] little style fixes, add vim modeline --- include/xcursor.h | 3 +++ src/xcursor.c | 15 +++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/xcursor.h b/include/xcursor.h index 4b5326d5..1872fa0e 100644 --- a/include/xcursor.h +++ b/include/xcursor.h @@ -1,3 +1,6 @@ +/* + * vim:ts=4:sw=4:expandtab + */ #ifndef _XCURSOR_CURSOR_H #define _XCURSOR_CURSOR_H diff --git a/src/xcursor.c b/src/xcursor.c index 2e21aab1..cd80aa68 100644 --- a/src/xcursor.c +++ b/src/xcursor.c @@ -1,3 +1,6 @@ +/* + * vim:ts=4:sw=4:expandtab + */ #include #include #include @@ -14,29 +17,25 @@ static const int xcb_cursors[XCURSOR_CURSOR_MAX] = { XCB_CURSOR_SB_V_DOUBLE_ARROW }; -static Cursor load_cursor(const char *name, int font) -{ +static Cursor load_cursor(const char *name, int font) { Cursor c = XcursorLibraryLoadCursor(xlibdpy, name); if (c == None) c = XCreateFontCursor(xlibdpy, font); return c; } -void xcursor_load_cursors() -{ +void xcursor_load_cursors() { cursors[XCURSOR_CURSOR_POINTER] = load_cursor("left_ptr", XC_left_ptr); cursors[XCURSOR_CURSOR_RESIZE_HORIZONTAL] = load_cursor("sb_h_double_arrow", XC_sb_h_double_arrow); cursors[XCURSOR_CURSOR_RESIZE_VERTICAL] = load_cursor("sb_v_double_arrow", XC_sb_v_double_arrow); } -Cursor xcursor_get_cursor(enum xcursor_cursor_t c) -{ +Cursor xcursor_get_cursor(enum xcursor_cursor_t c) { assert(c >= 0 && c < XCURSOR_CURSOR_MAX); return cursors[c]; } -int xcursor_get_xcb_cursor(enum xcursor_cursor_t c) -{ +int xcursor_get_xcb_cursor(enum xcursor_cursor_t c) { assert(c >= 0 && c < XCURSOR_CURSOR_MAX); return xcb_cursors[c]; } -- 2.39.5