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:
+5
-4
@@ -11,8 +11,6 @@
|
||||
* 2003, Joris Robijn
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -20,13 +18,16 @@
|
||||
#include "shared/sockets.h"
|
||||
#include "shared/report.h"
|
||||
#include "shared/configfile.h"
|
||||
#include "shared/LL.h"
|
||||
|
||||
#include "drivers.h"
|
||||
|
||||
#define INC_TYPES_ONLY 1
|
||||
#include "client.h"
|
||||
#include "screen.h"
|
||||
#undef INC_TYPES_ONLY
|
||||
#include "screenlist.h"
|
||||
#include "menuscreens.h"
|
||||
|
||||
#include "input.h"
|
||||
#include "render.h" /* For server_msg* */
|
||||
|
||||
@@ -137,7 +138,7 @@ void input_send_to_client(Client *c, const char *key)
|
||||
snprintf(s, size, "key %s\n", key);
|
||||
sock_send_string(c->sock, s);
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
else
|
||||
report(RPT_ERR, "%s: malloc failure", __FUNCTION__);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user