]> sigrok.org Git - sigrok-util.git/commitdiff
new-driver: *.c: Only #include protocol.h.
authorUwe Hermann <redacted>
Wed, 30 Jan 2013 16:04:44 +0000 (17:04 +0100)
committerUwe Hermann <redacted>
Wed, 30 Jan 2013 16:04:44 +0000 (17:04 +0100)
Since both api.c and protocol.c need to include protocol.h anyway,
we can consistently keep all #includes in protocol.h.

source/drv-api.c
source/drv-protocol.c
source/drv-protocol.h

index 536c8588c72396ae878c07551b7f4f309e4f02ed..df3e3ece451b3bdbf2e221d639342bc22bc724de 100644 (file)
@@ -17,9 +17,6 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <glib.h>
-#include "libsigrok.h"
-#include "libsigrok-internal.h"
 #include "protocol.h"
 
 SR_PRIV struct sr_dev_driver ${lib}_driver_info;
 #include "protocol.h"
 
 SR_PRIV struct sr_dev_driver ${lib}_driver_info;
index bc235036ec021a53143a4058a6caa750f0a3b1a1..75ab353e3781ff5e636583acae9684e7000f0150 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <stdlib.h>
-#include <glib.h>
-#include "libsigrok.h"
-#include "libsigrok-internal.h"
 #include "protocol.h"
 
 SR_PRIV int ${lib}_receive_data(int fd, int revents, void *cb_data)
 #include "protocol.h"
 
 SR_PRIV int ${lib}_receive_data(int fd, int revents, void *cb_data)
index ec14a717f6c34b538957323c3a7ba4225a285807..84b7ef516101799ea2aacc1f1bbe8da9c15efeff 100644 (file)
@@ -21,6 +21,7 @@
 #define LIBSIGROK_HARDWARE_${upper}_PROTOCOL_H
 
 #include <stdint.h>
 #define LIBSIGROK_HARDWARE_${upper}_PROTOCOL_H
 
 #include <stdint.h>
+#include <glib.h>
 #include "libsigrok.h"
 #include "libsigrok-internal.h"
 
 #include "libsigrok.h"
 #include "libsigrok-internal.h"