diff --git a/libfprint/drivers/aes1610.c b/libfprint/drivers/aes1610.c index b47396b..9ee193f 100644 --- a/libfprint/drivers/aes1610.c +++ b/libfprint/drivers/aes1610.c @@ -26,16 +26,7 @@ #define FP_COMPONENT "aes1610" #include "fp_internal.h" - -#include -#include - -#include - -#include -#include - -#include "driver_ids.h" +#include "aeslib.h" static void start_capture(struct fp_img_dev *dev); static void complete_deactivation(struct fp_img_dev *dev); diff --git a/libfprint/drivers/aes1660.c b/libfprint/drivers/aes1660.c index ad28b06..a4d0853 100644 --- a/libfprint/drivers/aes1660.c +++ b/libfprint/drivers/aes1660.c @@ -20,21 +20,9 @@ #define FP_COMPONENT "aes1660" #include "fp_internal.h" - -#include - -#include -#include - -#include - - -#include -#include - +#include "aeslib.h" #include "aesx660.h" #include "aes1660.h" -#include "driver_ids.h" #define FRAME_WIDTH 128 #define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2)) diff --git a/libfprint/drivers/aes2501.c b/libfprint/drivers/aes2501.c index c1bbc98..36a8ab5 100644 --- a/libfprint/drivers/aes2501.c +++ b/libfprint/drivers/aes2501.c @@ -24,17 +24,8 @@ #define FP_COMPONENT "aes2501" #include "fp_internal.h" - -#include -#include - -#include - -#include -#include - +#include "aeslib.h" #include "aes2501.h" -#include "driver_ids.h" static void start_capture(struct fp_img_dev *dev); static void complete_deactivation(struct fp_img_dev *dev); diff --git a/libfprint/drivers/aes2550.c b/libfprint/drivers/aes2550.c index 0516bbc..da2134c 100644 --- a/libfprint/drivers/aes2550.c +++ b/libfprint/drivers/aes2550.c @@ -24,17 +24,8 @@ #define FP_COMPONENT "aes2550" #include "fp_internal.h" - -#include -#include - -#include - -#include -#include - #include "aes2550.h" -#include "driver_ids.h" +#include "aeslib.h" static void start_capture(struct fp_img_dev *dev); static void complete_deactivation(struct fp_img_dev *dev); diff --git a/libfprint/drivers/aes2660.c b/libfprint/drivers/aes2660.c index bfc457d..1fe9334 100644 --- a/libfprint/drivers/aes2660.c +++ b/libfprint/drivers/aes2660.c @@ -20,20 +20,9 @@ #define FP_COMPONENT "aes2660" #include "fp_internal.h" - -#include - -#include -#include - -#include - -#include -#include - +#include "aeslib.h" #include "aesx660.h" #include "aes2660.h" -#include "driver_ids.h" #define FRAME_WIDTH 192 #define IMAGE_WIDTH (FRAME_WIDTH + (FRAME_WIDTH / 2)) diff --git a/libfprint/drivers/aes3500.c b/libfprint/drivers/aes3500.c index 4428670..ca30b30 100644 --- a/libfprint/drivers/aes3500.c +++ b/libfprint/drivers/aes3500.c @@ -30,16 +30,8 @@ #define FP_COMPONENT "aes3500" #include "fp_internal.h" - -#include - -#include -#include - -#include - +#include "aeslib.h" #include "aes3k.h" -#include "driver_ids.h" #define DATA_BUFLEN 0x2089 diff --git a/libfprint/drivers/aes3k.c b/libfprint/drivers/aes3k.c index f50d2b4..620e8d6 100644 --- a/libfprint/drivers/aes3k.c +++ b/libfprint/drivers/aes3k.c @@ -37,14 +37,7 @@ #define FP_COMPONENT "aes3k" #include "fp_internal.h" - -#include - -#include -#include - -#include - +#include "aeslib.h" #include "aes3k.h" #define CTRL_TIMEOUT 1000 diff --git a/libfprint/drivers/aes4000.c b/libfprint/drivers/aes4000.c index 6118f33..9b6b277 100644 --- a/libfprint/drivers/aes4000.c +++ b/libfprint/drivers/aes4000.c @@ -27,16 +27,8 @@ #define FP_COMPONENT "aes4000" #include "fp_internal.h" - -#include - -#include -#include - -#include - +#include "aeslib.h" #include "aes3k.h" -#include "driver_ids.h" #define DATA_BUFLEN 0x1259 diff --git a/libfprint/drivers/aesx660.c b/libfprint/drivers/aesx660.c index ab67946..5a81403 100644 --- a/libfprint/drivers/aesx660.c +++ b/libfprint/drivers/aesx660.c @@ -24,17 +24,7 @@ #define FP_COMPONENT "aesX660" #include "fp_internal.h" - -#include - -#include -#include - -#include - -#include -#include - +#include "aeslib.h" #include "aesx660.h" static void start_capture(struct fp_img_dev *dev); diff --git a/libfprint/drivers/elan.c b/libfprint/drivers/elan.c index e528ecb..2b31289 100644 --- a/libfprint/drivers/elan.c +++ b/libfprint/drivers/elan.c @@ -21,14 +21,7 @@ #define FP_COMPONENT "elan" #include "fp_internal.h" - -#include -#include -#include -#include - #include "elan.h" -#include "driver_ids.h" unsigned char elan_get_pixel(struct fpi_frame_asmbl_ctx *ctx, struct fpi_frame *frame, unsigned int x, diff --git a/libfprint/drivers/etes603.c b/libfprint/drivers/etes603.c index 2bf5cdd..776ad9a 100644 --- a/libfprint/drivers/etes603.c +++ b/libfprint/drivers/etes603.c @@ -36,15 +36,6 @@ #define FP_COMPONENT "etes603" #include "fp_internal.h" - -#include -#include -#include -#include -#include -#include -#include - #include "driver_ids.h" /* libusb defines */ diff --git a/libfprint/drivers/fdu2000.c b/libfprint/drivers/fdu2000.c index b95ff62..015e4e4 100644 --- a/libfprint/drivers/fdu2000.c +++ b/libfprint/drivers/fdu2000.c @@ -21,14 +21,6 @@ #include "fp_internal.h" -#include -#include -#include - -#include - -#include "driver_ids.h" - #ifndef HAVE_MEMMEM gpointer memmem(const gpointer haystack, size_t haystack_len, const gpointer needle, size_t needle_len) { diff --git a/libfprint/drivers/upeksonly.c b/libfprint/drivers/upeksonly.c index 4d228d9..6e18e23 100644 --- a/libfprint/drivers/upeksonly.c +++ b/libfprint/drivers/upeksonly.c @@ -26,17 +26,7 @@ #define FP_COMPONENT "upeksonly" #include "fp_internal.h" - -#include -#include - -#include -#include - -#include - #include "upeksonly.h" -#include "driver_ids.h" #define CTRL_TIMEOUT 1000 #define NUM_BULK_TRANSFERS 24 diff --git a/libfprint/drivers/upektc.c b/libfprint/drivers/upektc.c index 107f93d..d8ccf5b 100644 --- a/libfprint/drivers/upektc.c +++ b/libfprint/drivers/upektc.c @@ -21,13 +21,7 @@ #define FP_COMPONENT "upektc" #include "fp_internal.h" - -#include -#include -#include - #include "upektc.h" -#include "driver_ids.h" #define UPEKTC_EP_IN (2 | LIBUSB_ENDPOINT_IN) #define UPEKTC_EP_OUT (3 | LIBUSB_ENDPOINT_OUT) diff --git a/libfprint/drivers/upektc_img.c b/libfprint/drivers/upektc_img.c index c193c07..f637156 100644 --- a/libfprint/drivers/upektc_img.c +++ b/libfprint/drivers/upektc_img.c @@ -20,16 +20,8 @@ #define FP_COMPONENT "upektc_img" #include "fp_internal.h" - -#include -#include - -#include - -#include - +#include "aeslib.h" #include "upektc_img.h" -#include "driver_ids.h" static void start_capture(struct fp_img_dev *dev); static void start_deactivation(struct fp_img_dev *dev); diff --git a/libfprint/drivers/upekts.c b/libfprint/drivers/upekts.c index d070404..3078d9d 100644 --- a/libfprint/drivers/upekts.c +++ b/libfprint/drivers/upekts.c @@ -29,14 +29,6 @@ #include "fp_internal.h" -#include -#include - -#include -#include - -#include "driver_ids.h" - #define EP_IN (1 | LIBUSB_ENDPOINT_IN) #define EP_OUT (2 | LIBUSB_ENDPOINT_OUT) #define TIMEOUT 5000 diff --git a/libfprint/drivers/uru4000.c b/libfprint/drivers/uru4000.c index 600bb27..3c00218 100644 --- a/libfprint/drivers/uru4000.c +++ b/libfprint/drivers/uru4000.c @@ -20,17 +20,10 @@ #define FP_COMPONENT "uru4000" -#include "fp_internal.h" - -#include -#include -#include - #include #include -#include -#include "driver_ids.h" +#include "fp_internal.h" #define EP_INTR (1 | LIBUSB_ENDPOINT_IN) #define EP_DATA (2 | LIBUSB_ENDPOINT_IN) diff --git a/libfprint/drivers/vcom5s.c b/libfprint/drivers/vcom5s.c index dfbdca7..eda67c9 100644 --- a/libfprint/drivers/vcom5s.c +++ b/libfprint/drivers/vcom5s.c @@ -28,14 +28,6 @@ * powerdown? does windows do anything special on exit? */ -#include -#include - -#include -#include - -#include "driver_ids.h" - #define CTRL_IN 0xc0 #define CTRL_OUT 0x40 #define CTRL_TIMEOUT 1000 diff --git a/libfprint/drivers/vfs0050.c b/libfprint/drivers/vfs0050.c index 45adaa4..003b1b3 100644 --- a/libfprint/drivers/vfs0050.c +++ b/libfprint/drivers/vfs0050.c @@ -20,12 +20,6 @@ #define FP_COMPONENT "vfs0050" #include "fp_internal.h" - -#include -#include -#include -#include "driver_ids.h" - #include "vfs0050.h" /* USB functions */ diff --git a/libfprint/drivers/vfs101.c b/libfprint/drivers/vfs101.c index afc72d9..98807ee 100644 --- a/libfprint/drivers/vfs101.c +++ b/libfprint/drivers/vfs101.c @@ -21,12 +21,6 @@ #include "fp_internal.h" -#include -#include -#include - -#include "driver_ids.h" - /* Input-Output usb endpoint */ #define EP_IN(n) (n | LIBUSB_ENDPOINT_IN) #define EP_OUT(n) (n | LIBUSB_ENDPOINT_OUT) diff --git a/libfprint/drivers/vfs301.c b/libfprint/drivers/vfs301.c index 1b8a7db..1c1b8d4 100644 --- a/libfprint/drivers/vfs301.c +++ b/libfprint/drivers/vfs301.c @@ -22,19 +22,7 @@ #define FP_COMPONENT "vfs301" #include "fp_internal.h" - -#include -#include -#include -#include -#include -#include -#include - #include "vfs301_proto.h" -#include - -#include "driver_ids.h" /************************** GENERIC STUFF *************************************/ @@ -152,7 +140,7 @@ static void m_loop_state(struct fpi_ssm *ssm) case M_READ_PRINT_POLL: { int rv = vfs301_proto_process_event_poll(dev->udev, vdev); - assert(rv != VFS301_FAILURE); + g_assert(rv != VFS301_FAILURE); if (rv == VFS301_ONGOING) fpi_ssm_jump_to_state(ssm, M_READ_PRINT_WAIT); else @@ -185,7 +173,7 @@ static void m_init_state(struct fpi_ssm *ssm) struct fp_img_dev *dev = ssm->priv; vfs301_dev_t *vdev = dev->priv; - assert(ssm->cur_state == 0); + g_assert(ssm->cur_state == 0); vfs301_proto_init(dev->udev, vdev); diff --git a/libfprint/drivers/vfs5011.c b/libfprint/drivers/vfs5011.c index facb32c..ce19fa3 100644 --- a/libfprint/drivers/vfs5011.c +++ b/libfprint/drivers/vfs5011.c @@ -18,14 +18,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include -#include -#include -#include -#include "driver_ids.h" - +#include "fp_internal.h" #include "vfs5011_proto.h" /* =================== sync/async USB transfer sequence ==================== */ diff --git a/libfprint/fp_internal.h b/libfprint/fp_internal.h index 9c36917..15c7cbd 100644 --- a/libfprint/fp_internal.h +++ b/libfprint/fp_internal.h @@ -28,10 +28,13 @@ #endif #include +#include #include #include -#include +#include "fprint.h" +#include "assembling.h" +#include "drivers/driver_ids.h" #define array_n_elements(array) (sizeof(array) / sizeof(array[0]))