mudgangster

Log | Files | Refs

commit b09af99d67088a1036836ad25ecfa5cab79f3fc8
parent 9b1dfb15505796d9b041b9c15bdd4d9b27b57955
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Mon,  3 Sep 2018 19:00:25 +0300

Style

Diffstat:
src/textbox.cc | 1-
src/ui.cc | 20++++++++++----------
2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/textbox.cc b/src/textbox.cc @@ -5,7 +5,6 @@ #include <X11/Xlib.h> #include "common.h" -#include <stdio.h> static uint8_t pack_style( Colour fg, Colour bg, bool bold ) { STATIC_ASSERT( NUM_COLOURS * NUM_COLOURS * 2 < UINT8_MAX ); diff --git a/src/ui.cc b/src/ui.cc @@ -77,17 +77,17 @@ void ui_draw() { XFillRectangle( UI.display, UI.window, UI.gc, 0, spacerY, UI.width, 1 ); } -void eventButtonPress( XEvent * event ) { } +static void eventButtonPress( XEvent * event ) { } -void eventButtonRelease( XEvent * event ) { } +static void eventButtonRelease( XEvent * event ) { } -void eventMessage( XEvent * event ) { +static void eventMessage( XEvent * event ) { if( ( Atom ) event->xclient.data.l[ 0 ] == wmDeleteWindow ) { script_handleClose(); } } -void eventResize( XEvent * event ) { +static void eventResize( XEvent * event ) { int newWidth = event->xconfigure.width; int newHeight = event->xconfigure.height; @@ -110,11 +110,11 @@ void eventResize( XEvent * event ) { ); } -void eventExpose( XEvent * event ) { +static void eventExpose( XEvent * event ) { ui_draw(); } -void eventKeyPress( XEvent * event ) { +static void eventKeyPress( XEvent * event ) { #define ADD_MACRO( key, name ) \ case key: \ script_doMacro( name, sizeof( name ) - 1, shift, ctrl, alt ); \ @@ -237,11 +237,11 @@ void eventKeyPress( XEvent * event ) { #undef ADD_MACRO } -void eventFocusOut( XEvent * event ) { +static void eventFocusOut( XEvent * event ) { UI.hasFocus = 0; } -void eventFocusIn( XEvent * event ) { +static void eventFocusIn( XEvent * event ) { UI.hasFocus = 1; XWMHints * hints = XGetWMHints( UI.display, UI.window ); @@ -270,7 +270,7 @@ void ui_handleXEvents() { } } -MudFont loadFont( const char * fontStr ) { +static MudFont loadFont( const char * fontStr ) { MudFont font; font.font = XLoadQueryFont( UI.display, fontStr ); @@ -292,7 +292,7 @@ MudFont loadFont( const char * fontStr ) { return font; } -void initStyle() { +static void initStyle() { #define SETCOLOR( x, c ) \ do { \ XColor color; \