xruler

a screen ruler for X11
Log | Files | Refs | LICENSE

commit cf16f3859d490ceb17724aea244f06586989d1e7
parent 5bee511bdc41bb290500059d6488ee4492b5f51b
Author: Matthias Balk <mbalk@mbalk.de>
Date:   Wed,  6 Nov 2019 20:07:15 +0100

coding conventions

Diffstat:
Mxruler.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/xruler.c b/xruler.c @@ -142,7 +142,7 @@ static void draw_text( } -int main (int argc, char** argv) +int main(int argc, char** argv) { /* Open the connection to the X server */ xcb_connection_t* connection = xcb_connect(NULL, NULL); @@ -150,12 +150,12 @@ int main (int argc, char** argv) /* Get the first screen */ xcb_screen_t* screen = - xcb_setup_roots_iterator(xcb_get_setup (connection)).data; + xcb_setup_roots_iterator(xcb_get_setup(connection)).data; /* Create black (foreground) graphic context */ xcb_drawable_t window = screen->root; - xcb_gcontext_t foreground = xcb_generate_id (connection); + xcb_gcontext_t foreground = xcb_generate_id(connection); uint32_t mask = XCB_GC_FOREGROUND | XCB_GC_GRAPHICS_EXPOSURES; uint32_t values[2] = {screen->black_pixel, 0}; @@ -184,8 +184,8 @@ int main (int argc, char** argv) /* Map the window on the screen and flush*/ - xcb_map_window (connection, window); - xcb_flush (connection); + xcb_map_window(connection, window); + xcb_flush(connection); set_crosshair_cursor(connection, screen, window); @@ -203,13 +203,13 @@ int main (int argc, char** argv) else if (i % 5 == 0) y = 25; xcb_point_t polyline[] = { {5*i, 0}, {0, y} }; - xcb_poly_line ( + xcb_poly_line( connection, XCB_COORD_MODE_PREVIOUS, window, foreground, 2, polyline); } /* flush the request */ - xcb_flush (connection); + xcb_flush(connection); break; } @@ -240,6 +240,6 @@ int main (int argc, char** argv) break; } - free (event); + free(event); } }