From: Christian Heller Date: Wed, 21 Aug 2013 19:54:14 +0000 (+0200) Subject: Improved formatting and include comments in windows.c X-Git-Tag: tce~1070 X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/feed.xml?a=commitdiff_plain;h=f7959fe464c88c7917b39b47691c2f33278093d1;p=plomrogue Improved formatting and include comments in windows.c --- 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); } }