From f7959fe464c88c7917b39b47691c2f33278093d1 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Wed, 21 Aug 2013 21:54:14 +0200 Subject: [PATCH] Improved formatting and include comments in windows.c --- src/windows.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/windows.c b/src/windows.c index ef7a30d..9e9fd12 100644 --- a/src/windows.c +++ b/src/windows.c @@ -2,9 +2,12 @@ #include "windows.h" #include /* for uint16_t, uint32_t */ -#include /* for LOTS of stuff */ +#include /* for typedefs WINDOW, chtype, wresize(), getmaxx(), */ + /* getmaxy(), supbad(), delwin(), mvwaddch(), */ + /* mvwaddstr(), newpad(), wnoutrefres(), erase(), */ + /* werase(), pnoutrefresh(), doupdate() */ #include /* for malloc(), free() */ -#include /* for strlen(), memcpy() */ +#include /* for strlen(), strnlen(), memcpy() */ #include "yx_uint16.h" /* for yx_uint16 coordinates */ @@ -77,11 +80,11 @@ static void refit_pad(struct WinMeta * wmeta) -static void update_wins (struct WinMeta * wmeta, struct Win * w) +static void update_wins(struct WinMeta * wmeta, struct Win * w) { if (0 != w->frame.curses_win) { - destroy_win (w); + destroy_win(w); } place_win(wmeta, w); refit_pad(wmeta); @@ -90,13 +93,13 @@ static void update_wins (struct WinMeta * wmeta, struct Win * w) w->start.y, w->start.x); if (0 != w->next) { - update_wins (wmeta, w->next); + update_wins(wmeta, w->next); } } -static void place_win (struct WinMeta * wmeta, struct Win * w) +static void place_win(struct WinMeta * wmeta, struct Win * w) { /* First window goes into the upper-left corner. */ w->start.x = 0; @@ -175,7 +178,7 @@ static void draw_wins (struct Win * w) w->draw(w); if (0 != w->next) { - draw_wins (w->next); + draw_wins(w->next); } } @@ -232,7 +235,7 @@ static void draw_wins_borderlines(struct Win * w, struct Win * w_active, draw_win_borderlines(w, active, pad); if (0 != w->next) { - draw_wins_borderlines (w->next, w_active, pad); + draw_wins_borderlines(w->next, w_active, pad); } } -- 2.30.2