Mega change to the LCDd's header files:

1. Use <stdbool.h> if it is available but keep a compatibility shim in
   shared/defines.h in case it is not.
2. Unbreak the circular header dependencies (mostly):
   2a. client.c and client.h may NOT depend on 'struct Menu'. Use a void pointer
       and casts instead.
   2b. Separate the data type definitions in client.h and screen.h from
       function prototypes which may require other data structures. This makes
       header dependencies much more easy to maintain. Usually the data types
       should have been moved to their own files but I (mmdolze) chose to
       separate them using different header guards.
   2c. Remove many now unused header includes.
Apply (old BSD-) style on menuscreens.c.
This commit is contained in:
mmdolze
2012-02-22 22:25:32 +00:00
parent 5e1edf5b60
commit a151ee0fc4
33 changed files with 321 additions and 247 deletions
+9 -9
View File
@@ -11,7 +11,7 @@
*
* The slider, numeric & string input and menu have their own screen,
* that comes to front when the items are selected.
* One menuitem is in a different file: Menu data is in menu,h.
* One menuitem is in a different file: Menu data is in menu.h.
*/
/* This file is part of LCDd, the lcdproc server.
@@ -27,13 +27,15 @@
#ifndef MENUITEM_H
#define MENUITEM_H
#include "shared/LL.h"
#ifndef bool
# define bool short
# define true 1
# define false 0
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#endif
#include "shared/defines.h"
#include "shared/LL.h"
/*********************************************************************
* Data definitions of the menustuff
@@ -191,8 +193,6 @@ typedef struct MenuItem {
} MenuItem;
#include "screen.h"
/*********************************************************************
* Functions to use the menustuff
*/