PUD: clean up includes
authorFerry Huberts <f.huberts@mindef.nl>
Tue, 12 Jul 2011 10:01:32 +0000 (12:01 +0200)
committerFerry Huberts <f.huberts@mindef.nl>
Wed, 13 Jul 2011 10:54:16 +0000 (12:54 +0200)
Signed-off-by: Ferry Huberts <f.huberts@mindef.nl>
16 files changed:
lib/pud/src/configuration.c
lib/pud/src/configuration.h
lib/pud/src/dedup.c
lib/pud/src/dedup.h
lib/pud/src/dump.c
lib/pud/src/gpsConversion.c
lib/pud/src/networkInterfaces.c
lib/pud/src/nmeaTools.c
lib/pud/src/nodeIdConversion.c
lib/pud/src/nodeIdConversion.h
lib/pud/src/posAvg.c
lib/pud/src/pud.c
lib/pud/src/pudOlsrdPlugin.c
lib/pud/src/receiver.c
lib/pud/src/receiver.h
lib/pud/src/wireFormat.c

index 425675a..37f9e94 100644 (file)
@@ -9,8 +9,7 @@
 
 /* OLSR includes */
 #include "olsr_types.h"
-#include "olsr_protocol.h"
-#include "cfgparser/olsrd_conf.h"
+#include "olsr_cfg.h"
 
 /* System includes */
 #include <assert.h>
@@ -22,7 +21,6 @@
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #include <unistd.h>
-#include <stdint.h>
 
 /*
  * Utility functions
index 1114fda..a61fe36 100644 (file)
@@ -8,7 +8,6 @@
 #include "olsrd_plugin.h"
 
 /* System includes */
-#include <stddef.h>
 #include <stdbool.h>
 #include <sys/socket.h>
 
index e4ee84d..38cb3b6 100644 (file)
@@ -7,8 +7,6 @@
 
 /* System includes */
 #include <assert.h>
-#include <stddef.h>
-#include <string.h>
 
 #ifdef PUD_DUMP_DEDUP
 #include <arpa/inet.h>
index d9f934c..b37ede1 100644 (file)
@@ -10,7 +10,6 @@
 /* System includes */
 #include <stdint.h>
 #include <stdbool.h>
-#include <netinet/in.h>
 
 /* A de-duplication entry holding the information to compare, 18 bytes */
 typedef struct _DeDupEntry {
index 097b9a9..1724145 100644 (file)
@@ -64,7 +64,6 @@ void dump_packet(unsigned char* packet, unsigned int length) {
 /* System includes */
 #include <nmea/info.h>
 #include <nmea/sentence.h>
-#include <nmea/gmath.h>
 
 void dump_nmeaInfo(nmeaINFO * nmeaInfo, const char * prefix) {
        olsr_printf(0,
index cad0536..347c708 100644 (file)
@@ -4,6 +4,7 @@
 #include "wireFormat.h"
 #include "pud.h"
 #include "nodeIdConversion.h"
+#include "configuration.h"
 #include "nmeaTools.h"
 
 /* OLSR includes */
@@ -13,6 +14,7 @@
 #include <nmea/gmath.h>
 #include <nmea/tok.h>
 #include <netinet/in.h>
+#include <stdio.h>
 
 /* ************************************************************************
  * OLSR --> External
index 4036953..83fbc5a 100644 (file)
@@ -6,17 +6,15 @@
 #include "netTools.h"
 
 /* OLSRD includes */
-#include "cfgparser/olsrd_conf.h"
+#include "olsr_cfg.h"
 #include "olsr.h"
 
 /* System includes */
 #include <assert.h>
-#include <stddef.h>
 #include <string.h>
 #include <sys/socket.h>
 #include <errno.h>
 #include <unistd.h>
-#include <netinet/in.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <ifaddrs.h>
index 7e4f8dd..39aac02 100644 (file)
@@ -8,7 +8,6 @@
 /* System includes */
 #include <nmea/sentence.h>
 #include <nmea/gmath.h>
-#include <stddef.h>
 #include <string.h>
 #include <assert.h>
 #include <stddef.h>
index a46098d..5644b22 100644 (file)
@@ -10,7 +10,6 @@
 
 /* System includes */
 #include <assert.h>
-#include <string.h>
 #include <arpa/inet.h>
 
 /* ************************************************************************
index d4681d0..aaf3237 100644 (file)
@@ -2,17 +2,14 @@
 #define _PUD_NODEIDCONVERSION_H_
 
 /* Plugin includes */
-#include "configuration.h"
 #include "wireFormat.h"
 
 /* OLSR includes */
 #include "olsr_protocol.h"
-#include "interfaces.h"
 
 /* System includes */
 #include <stdbool.h>
 #include <stddef.h>
-#include <unistd.h>
 
 bool validateNodeId(NodeIdType nodeIdTypeNumber);
 
index 9381135..be8ed31 100644 (file)
@@ -3,14 +3,12 @@
 /* Plugin includes */
 #include "nmeaTools.h"
 #include "dump.h"
-#include "configuration.h"
 
 /* OLSR includes */
 #include "olsr.h"
 
 /* System includes */
 #include <assert.h>
-#include <stddef.h>
 #include <string.h>
 #include <stdlib.h>
 #include <nmea/sentence.h>
index 1c3eddf..4f617d0 100644 (file)
@@ -9,23 +9,12 @@
 #include "dedup.h"
 
 /* OLSRD includes */
-#include "olsr.h"
-#include "cfgparser/olsrd_conf.h"
 #include "ipcalc.h"
-#include "nmea/parser.h"
 #include "parser.h"
+#include "olsr.h"
 
 /* System includes */
-#include <nmea/parser.h>
-#include <stddef.h>
-#include <string.h>
-#include <errno.h>
-#include <stdarg.h>
 #include <assert.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <unistd.h>
 
 /** The size of the buffer in which the received NMEA string is stored */
 #define BUFFER_SIZE_FOR_OLSR   2048
index a0835d2..95f7b0b 100644 (file)
@@ -5,8 +5,8 @@
 #include "version.h"
 
 /* OLSRD includes */
-#include "olsr.h"
 #include "defs.h"
+#include "olsr.h"
 
 /* System includes */
 #include <stdbool.h>
index 9e4dd85..9e6a7f4 100644 (file)
@@ -4,7 +4,6 @@
 #include "pud.h"
 #include "gpsConversion.h"
 #include "configuration.h"
-#include "nodeIdConversion.h"
 #include "dump.h"
 #include "nmeaTools.h"
 #include "posAvg.h"
 #include "olsr_protocol.h"
 #include "interfaces.h"
 #include "net_olsr.h"
-#include "olsr_cookie.h"
-#include "scheduler.h"
 #include "olsr.h"
 
 /* System includes */
 #include <nmea/parser.h>
+#include <pthread.h>
+#include <nmea/info.h>
+#include <string.h>
 #include <nmea/gmath.h>
 #include <nmea/sentence.h>
-#include <assert.h>
-#include <stddef.h>
-#include <time.h>
 #include <sys/timeb.h>
 #include <math.h>
 
index 27224d5..62f27d7 100644 (file)
@@ -6,8 +6,8 @@
 /* OLSRD includes */
 
 /* System includes */
+#include <stddef.h>
 #include <stdbool.h>
-#include <sys/types.h>
 
 bool startReceiver(void);
 void stopReceiver(void);
index 2ee9d0e..ca34a77 100644 (file)
@@ -1,33 +1,14 @@
 #include "wireFormat.h"
 
+/* Plugin includes */
+#include "pud.h"
+
 /* System includes */
 #include <stdlib.h>
 #include <stdbool.h>
 #include <math.h>
 #include <assert.h>
 
-/* ************************************************************************
- * DEFINES
- * ************************************************************************ */
-
-/** Compiler hint to expect x */
-#ifndef likely
-# if defined(__GNUC__)
-#  define likely(x)                                    __builtin_expect((x),1)
-# else
-#  define likely(x)                                            (x)
-# endif
-#endif
-
-/** Compiler hint to not expect x */
-#ifndef unlikely
-# if defined(__GNUC__)
-#  define unlikely(x)                                  __builtin_expect((x),0)
-# else
-#  define unlikely(x)                                  (x)
-# endif
-#endif
-
 /*
  * GPS Information Conversion Functions For OLSR GPS Wire Format
  */