From b09aa6584d8e52a3565b7c775cad37842c039885 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Mon, 16 Sep 2019 11:36:02 +0300 Subject: [PATCH] genesys: Add include guards to headers where missing --- backend/genesys_gl124.h | 5 +++++ backend/genesys_gl646.h | 5 +++++ backend/genesys_gl841.h | 5 +++++ backend/genesys_gl843.h | 5 +++++ backend/genesys_gl846.h | 6 ++++++ backend/genesys_gl847.h | 6 ++++++ 6 files changed, 32 insertions(+) diff --git a/backend/genesys_gl124.h b/backend/genesys_gl124.h index 87190ecd8..1706844a6 100644 --- a/backend/genesys_gl124.h +++ b/backend/genesys_gl124.h @@ -41,6 +41,9 @@ If you do not wish that, delete this exception notice. */ +#ifndef BACKEND_GENESYS_GL124_H +#define BACKEND_GENESYS_GL124_H + #include "genesys.h" #define SETREG(adr,val) { dev->reg.init_reg(adr, val); } @@ -123,3 +126,5 @@ static void gl124_stop_action(Genesys_Device* dev); static void gl124_send_slope_table(Genesys_Device* dev, int table_nr, const std::vector& slope_table, int steps); + +#endif // BACKEND_GENESYS_GL124_H diff --git a/backend/genesys_gl646.h b/backend/genesys_gl646.h index dbc72e776..f1582ac96 100644 --- a/backend/genesys_gl646.h +++ b/backend/genesys_gl646.h @@ -44,6 +44,9 @@ If you do not wish that, delete this exception notice. */ +#ifndef BACKEND_GENESYS_GL646_H +#define BACKEND_GENESYS_GL646_H + #include "genesys.h" static void gl646_set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint8_t set, int dpi); @@ -242,3 +245,5 @@ static Motor_Master motor_master[] = { {MOTOR_5345, 1200, 1, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 2750, 2750, 255, 2000, 300, 0.3, 0.4, 146}, {MOTOR_5345, 2400, 1, QUATER_STEP, SANE_FALSE, SANE_TRUE , 0, 16, 5500, 5500, 255, 2000, 300, 0.3, 0.4, 146}, /* 5500 guessed */ }; + +#endif // BACKEND_GENESYS_GL646_H diff --git a/backend/genesys_gl841.h b/backend/genesys_gl841.h index b8357cf22..022f5da77 100644 --- a/backend/genesys_gl841.h +++ b/backend/genesys_gl841.h @@ -43,6 +43,9 @@ #include "genesys.h" +#ifndef BACKEND_GENESYS_GL841_H +#define BACKEND_GENESYS_GL841_H + #define INITREG(adr,val) {dev->reg.init_reg(adr, val); } /** @@ -55,3 +58,5 @@ int gl841_exposure_time(Genesys_Device *dev, const Genesys_Sensor& sensor, int scan_step_type, int start, int used_pixels); + +#endif // BACKEND_GENESYS_GL841_H diff --git a/backend/genesys_gl843.h b/backend/genesys_gl843.h index 3cf4624d0..4124548f0 100644 --- a/backend/genesys_gl843.h +++ b/backend/genesys_gl843.h @@ -43,6 +43,9 @@ #include "genesys.h" +#ifndef BACKEND_GENESYS_GL843_H +#define BACKEND_GENESYS_GL843_H + #define SCAN_TABLE 0 /* table 1 at 0x4000 */ #define BACKTRACK_TABLE 1 /* table 2 at 0x4800 */ #define STOP_TABLE 2 /* table 3 at 0x5000 */ @@ -58,3 +61,5 @@ #define SCAN_FLAG_DYNAMIC_LINEART 0x080 #define SETREG(adr,val) { dev->reg.init_reg(adr, val); } + +#endif // BACKEND_GENESYS_GL843_H diff --git a/backend/genesys_gl846.h b/backend/genesys_gl846.h index 8765e0f7c..ddb50590c 100644 --- a/backend/genesys_gl846.h +++ b/backend/genesys_gl846.h @@ -43,6 +43,9 @@ #include "genesys.h" +#ifndef BACKEND_GENESYS_GL846_H +#define BACKEND_GENESYS_GL846_H + // Send the low-level scan command static void gl846_begin_scan(Genesys_Device* dev, const Genesys_Sensor& sensor, Genesys_Register_Set* reg, SANE_Bool start_motor); @@ -140,3 +143,6 @@ static Memory_layout layouts[]={ /* list terminating entry */ { NULL, 0, 0, 0, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }; + + +#endif // BACKEND_GENESYS_GL846_H diff --git a/backend/genesys_gl847.h b/backend/genesys_gl847.h index 9ca245cf7..e3209569f 100644 --- a/backend/genesys_gl847.h +++ b/backend/genesys_gl847.h @@ -41,6 +41,9 @@ If you do not wish that, delete this exception notice. */ +#ifndef BACKEND_GENESYS_GL847_H +#define BACKEND_GENESYS_GL847_H + #include "genesys.h" /** set up registers for an actual scan @@ -124,3 +127,6 @@ static Memory_layout layouts[]={ 0x02, 0x14, 0x09, 0x09, 0x09, 0x0a, 0x0f, 0xff } }; + + +#endif // BACKEND_GENESYS_GL847_H