includes cleanup

- remove uneeded includes from genesys.c
- move backend name define to C file for unit testing
merge-requests/1/head
Stphane Voltz 2011-11-03 22:47:10 +01:00
rodzic 389cef9ca8
commit 11ff6cfaa6
12 zmienionych plików z 23 dodań i 40 usunięć

Wyświetl plik

@ -58,33 +58,12 @@
* SANE backend for Genesys Logic GL646/GL841/GL842/GL843/GL847/GL124 based scanners
*/
#include "../include/sane/config.h"
#define BUILD 64
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#ifdef HAVE_MKDIR
#include <sys/stat.h>
#include <sys/types.h>
#endif
#include "../include/sane/sane.h"
#include "../include/sane/sanei.h"
#include "../include/sane/saneopts.h"
#define BUILD 65
#define BACKEND_NAME genesys
#include "../include/sane/sanei_backend.h"
#include "../include/sane/sanei_usb.h"
#include "../include/sane/sanei_config.h"
#include "../include/_stdint.h"
#include "../include/sane/sanei_magic.h"
#include "genesys.h"
#include "../include/sane/sanei_config.h"
#include "../include/sane/sanei_magic.h"
#include "genesys_devices.c"
static SANE_Int num_devices = 0;

Wyświetl plik

@ -42,6 +42,9 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl124
#include "genesys_gl124.h"
/****************************************************************************

Wyświetl plik

@ -41,9 +41,6 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl124
#include "genesys.h"
#define REG01 0x01

Wyświetl plik

@ -48,6 +48,9 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl646
#include "genesys_gl646.h"
/**

Wyświetl plik

@ -44,9 +44,6 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl646
#include "genesys.h"
/*

Wyświetl plik

@ -3,7 +3,7 @@
Copyright (C) 2003 Oliver Rauch
Copyright (C) 2003, 2004 Henning Meier-Geinitz <henning@meier-geinitz.de>
Copyright (C) 2004 Gerhard Jaeger <gerhard@gjaeger.de>
Copyright (C) 2004-2010 Stephane Voltz <stef.dev@free.fr>
Copyright (C) 2004-2011 Stéphane Voltz <stef.dev@free.fr>
Copyright (C) 2005 Philipp Schmid <philipp8288@web.de>
Copyright (C) 2005-2009 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
Copyright (C) 2006 Laurent Charpentier <laurent_pubs@yahoo.com>
@ -50,6 +50,9 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl841
#include "genesys_gl841.h"
/****************************************************************************

Wyświetl plik

@ -41,9 +41,6 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl841
#include "genesys.h"
/* Individual bits */

Wyświetl plik

@ -42,6 +42,9 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl843
#include "genesys_gl843.h"
/****************************************************************************

Wyświetl plik

@ -41,9 +41,6 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl843
#include "genesys.h"
#ifdef UNIT_TESTING

Wyświetl plik

@ -42,6 +42,9 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl847
#include "genesys_gl847.h"
/****************************************************************************

Wyświetl plik

@ -41,9 +41,6 @@
If you do not wish that, delete this exception notice.
*/
#undef BACKEND_NAME
#define BACKEND_NAME genesys_gl847
#include "genesys.h"
#define REG01 0x01

Wyświetl plik

@ -67,6 +67,10 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_MKDIR
#include <sys/stat.h>
#include <sys/types.h>
#endif
#include "../include/sane/sane.h"
#include "../include/sane/sanei.h"