kopia lustrzana https://gitlab.com/sane-project/backends
Define MM_PER_INCH once for all
rodzic
a2e6237f6e
commit
b39c12dd7b
|
@ -81,7 +81,6 @@
|
|||
#include "abaton.h"
|
||||
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
static int num_devices;
|
||||
static Abaton_Device *first_dev;
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
# define PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#undef Byte
|
||||
#define Byte SANE_Byte
|
||||
|
|
|
@ -135,7 +135,6 @@
|
|||
|
||||
#include "apple.h"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
static int num_devices;
|
||||
static Apple_Device *first_dev;
|
||||
|
|
|
@ -85,7 +85,6 @@
|
|||
#define ARTEC_SUB 16
|
||||
#define ARTEC_LAST_MOD "05/26/2001 17:28 EST"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024
|
||||
|
|
|
@ -36,7 +36,6 @@ typedef SANE_Byte Artec48U_Packet[ARTEC48U_PACKET_SIZE];
|
|||
#define HIBYTE(w) ((SANE_Byte)(((SANE_Word)(w) >> 8) & 0xFF))
|
||||
#define LOBYTE(w) ((SANE_Byte)(w))
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define CHECK_DEV_NOT_NULL(dev, func_name) \
|
||||
do { \
|
||||
|
|
|
@ -118,7 +118,6 @@ typedef struct AS6E_Scan
|
|||
#define READPIPE 0
|
||||
#define WRITEPIPE 1
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define SCAN_BUF_SIZE 32768
|
||||
|
||||
|
|
|
@ -1182,7 +1182,6 @@ Lexmark X4500 MFP
|
|||
#define AVISION_INQUIRY_SIZE_V2 0x88
|
||||
#define AVISION_INQUIRY_SIZE_MAX AVISION_INQUIRY_SIZE_V2
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define AVISION_BASE_RES 300
|
||||
|
||||
|
|
|
@ -206,7 +206,6 @@ typedef enum
|
|||
} BH_Option;
|
||||
|
||||
/* macros for accessing the value for an option within a scanning context */
|
||||
#define MM_PER_INCH 25.4
|
||||
#define _OPT_VAL_WORD(s, o) ((s)->val[(o)].w)
|
||||
#define _OPT_VAL_WORD_THOUSANDTHS(s, o) \
|
||||
(SANE_UNFIX(_OPT_VAL_WORD((s), (o))) * 1000.0 / MM_PER_INCH)
|
||||
|
|
|
@ -127,7 +127,6 @@
|
|||
#define SANE_I18N(text) text
|
||||
#endif
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
static SANE_Byte primaryHigh[256], primaryLow[256], secondaryHigh[256],
|
||||
secondaryLow[256]; /* modification for FB1200S */
|
||||
|
|
|
@ -397,7 +397,6 @@ enum {
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
|
||||
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@ struct scanner
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
|
||||
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))
|
||||
|
||||
|
|
|
@ -1872,7 +1872,6 @@ sense_handler (int scsi_fd, unsigned char * result, void *arg)
|
|||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
/* ilu per mm */
|
||||
|
||||
#define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 2700.0))
|
||||
|
|
|
@ -263,7 +263,6 @@ struct scanner
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
|
||||
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))
|
||||
|
||||
|
|
|
@ -341,10 +341,6 @@
|
|||
#define PATH_MAX (1024)
|
||||
#endif
|
||||
|
||||
#ifndef MM_PER_INCH
|
||||
#define MM_PER_INCH 25.4
|
||||
#endif
|
||||
|
||||
#define walloc(x) (x *)malloc(sizeof(x))
|
||||
#define walloca(x) (x *)alloca(sizeof(x))
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@
|
|||
|
||||
#define LINES_SHUFFLE_MAX 17 /* 2 x 8 lines plus 1 */
|
||||
#define SANE_EPSON_MAX_RETRIES 14 /* warmup max retry */
|
||||
#define MM_PER_INCH 25.4
|
||||
#define CMD_SIZE_EXT_STATUS 42
|
||||
|
||||
/* NOTE: you can find these codes with "man ascii". */
|
||||
|
|
|
@ -640,7 +640,6 @@ struct fujitsu
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MM_PER_UNIT_UNFIX SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
|
||||
#define MM_PER_UNIT_FIX SANE_FIX(SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0)))
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@
|
|||
if (status != SANE_STATUS_GOOD) return status; \
|
||||
} while (SANE_FALSE)
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/* Flags */
|
||||
#define GENESYS_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
#define HIBYTE(w) ((SANE_Byte)(((SANE_Word)(w) >> 8) & 0xFF))
|
||||
#define LOBYTE(w) ((SANE_Byte)(w))
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/* return if an error occured while the function was called */
|
||||
#ifdef MAX_DEBUG
|
||||
|
|
|
@ -47,6 +47,7 @@ extern int sanei_debug_hp; */
|
|||
#define DEBUG_DECLARE_ONLY
|
||||
|
||||
#include "../include/sane/config.h"
|
||||
#include "../include/sane/sanei_backend.h"
|
||||
|
||||
#include "../include/lassert.h"
|
||||
#include <string.h>
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
extern int sanei_debug_hp; */
|
||||
#define DEBUG_DECLARE_ONLY
|
||||
#include "../include/sane/config.h"
|
||||
#include "../include/sane/sanei_backend.h"
|
||||
#include "../include/lalloca.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
|
||||
#define HP_CONFIG_FILE STRINGIFY(BACKEND_NAME) ".conf"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define DEVPIX_PER_INCH 300.0
|
||||
#define MM_PER_DEVPIX (MM_PER_INCH / DEVPIX_PER_INCH)
|
||||
|
||||
|
|
|
@ -117,7 +117,6 @@
|
|||
typedef int (*rts8801_callback) (void *param, unsigned bytes, void *data);
|
||||
|
||||
#define DEBUG 1
|
||||
#define MM_PER_INCH 25.4
|
||||
#define SCANNER_UNIT_TO_FIXED_MM(number) SANE_FIX(number * MM_PER_INCH / 1200)
|
||||
#define FIXED_MM_TO_SCANNER_UNIT(number) SANE_UNFIX(number) * 1200 / MM_PER_INCH
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -521,7 +521,6 @@ typedef struct mode_page_connect
|
|||
} MP_CXN;
|
||||
|
||||
/* 1 inch = 6 picas = 72 points = 25.4 mm */
|
||||
#define MM_PER_INCH 25.4
|
||||
#define DEFAULT_MUD 1200 /* WHY ? */
|
||||
/* BASIC MEASUREMENT UNIT
|
||||
* 00H INCH
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
#include "ibm.h"
|
||||
#include "ibm-scsi.c"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static int num_devices = 0;
|
||||
|
|
|
@ -201,7 +201,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define mmToIlu(mm) (((mm) * dev->x_resolution) / MM_PER_INCH)
|
||||
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->x_resolution)
|
||||
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
#endif
|
||||
|
||||
#define MA1509_CONFIG_FILE "ma1509.conf"
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/* Convenience macros */
|
||||
#if defined(MIN)
|
||||
|
|
|
@ -162,7 +162,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define mmToIlu(mm) (((mm) * 1200) / MM_PER_INCH)
|
||||
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / 1200)
|
||||
|
||||
|
|
|
@ -85,7 +85,6 @@
|
|||
# define PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define SCSI_BUFF_SIZE sanei_scsi_max_request_size
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
|
||||
#endif /* HAVE_AUTHORIZATION */
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define ENDIAN_TYPE(d) { unsigned i, test = 0; \
|
||||
for (i=0; i < sizeof(int); i++ ) \
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
# define PATH_MAX 1024
|
||||
#endif
|
||||
#define MUSTEK_CONFIG_FILE "mustek.conf"
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define MAX_WAITING_TIME 60 /* How long to wait for scanner to become ready */
|
||||
#define MAX_LINE_DIST 40 /* Extra lines needed for LD correction */
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
#define DISABLE(OPTION) s->opt[OPTION].cap |= SANE_CAP_INACTIVE
|
||||
#define IS_ACTIVE(OPTION) (((s->opt[OPTION].cap) & SANE_CAP_INACTIVE) == 0)
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MUSTEK_USB_CONFIG_FILE "mustek_usb.conf"
|
||||
#define SCAN_BUFFER_SIZE (64 * 1024)
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@
|
|||
#define RIE(function) do {status = function; if (status != SANE_STATUS_GOOD) \
|
||||
return status;} while (SANE_FALSE)
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define SCAN_BUFFER_SIZE (64 * 1024)
|
||||
#define MAX_RESOLUTIONS 12
|
||||
#define DEF_LINEARTTHRESHOLD 128
|
||||
|
|
|
@ -115,7 +115,6 @@
|
|||
#define BUILD 9
|
||||
|
||||
#define PIE_CONFIG_FILE "pie.conf"
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define LINEART_STR "Lineart"
|
||||
#define HALFTONE_STR "Halftone"
|
||||
|
|
|
@ -63,7 +63,6 @@ extern int errno;
|
|||
|
||||
#include "pint.h"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define DECIPOINTS_PER_MM (720.0 / MM_PER_INCH)
|
||||
#define TWELVEHUNDS_PER_MM (1200.0 / MM_PER_INCH)
|
||||
|
||||
|
|
|
@ -475,7 +475,6 @@ typedef struct {
|
|||
|
||||
#ifndef __KERNEL__
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define PLUSTEK_CONFIG_FILE "plustek_pp.conf"
|
||||
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
|
||||
/************************ some definitions ***********************************/
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define PLUSTEK_CONFIG_FILE "plustek.conf"
|
||||
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
|
||||
#include "ricoh.h"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||
|
||||
static int num_devices = 0;
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
#define DBG_io2 7 /* io functions that are called very often */
|
||||
#define DBG_data 8 /* log image data */
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/* Flags */
|
||||
#define RTS8891_FLAG_UNTESTED (1 << 0) /* Print a warning for these scanners */
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#define BACKEND_NAME s9036
|
||||
#include "../include/sane/sanei_backend.h"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#undef Byte
|
||||
#define Byte SANE_Byte
|
||||
|
|
|
@ -229,7 +229,6 @@ CDB;
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 600))
|
||||
#define mmToIlu(mm) ((mm) / length_quant)
|
||||
#define iluToMm(ilu) ((ilu) * length_quant)
|
||||
|
|
|
@ -119,7 +119,6 @@ typedef struct SM3840_Scan
|
|||
|
||||
#define SM3840_CONFIG_FILE "sm3840.conf"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
#define SCAN_BUF_SIZE 65536
|
||||
|
||||
|
|
|
@ -192,7 +192,6 @@ struct sp15c
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define length_quant SANE_UNFIX(SANE_FIX(MM_PER_INCH / 1200.0))
|
||||
#define mmToIlu(mm) ((mm) / length_quant)
|
||||
#define iluToMm(ilu) ((ilu) * length_quant)
|
||||
|
|
|
@ -103,7 +103,6 @@ static ST400_Model st400_models[] = {
|
|||
{ 0, NULL, 0, NULL, 0, 0, 0, NULL, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
static ST400_Device *st400_devices = NULL;
|
||||
static unsigned int st400_num_devices = 0;
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
|
||||
#define TAMARACK_CONFIG_FILE "tamarack.conf"
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
static int num_devices;
|
||||
static Tamarack_Device *first_dev;
|
||||
|
|
|
@ -214,7 +214,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define mmToIlu(mm) (((mm) * dev->def->x_resolution_max) / MM_PER_INCH)
|
||||
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->def->x_resolution_max)
|
||||
|
||||
|
|
|
@ -237,7 +237,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define mmToIlu(mm) (((mm) * dev->def->x_resolution_max) / MM_PER_INCH)
|
||||
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / dev->def->x_resolution_max)
|
||||
|
||||
|
|
|
@ -228,7 +228,6 @@ getbitfield (unsigned char *pageaddr, int mask, int shift)
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define mmToIlu(mm) (((mm) * 300) / MM_PER_INCH)
|
||||
#define iluToMm(ilu) (((ilu) * MM_PER_INCH) / 300)
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
#ifndef test_h
|
||||
#define test_h
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
|
@ -101,7 +101,6 @@ in ADF mode this is done often:
|
|||
|
||||
#define BACKEND_NAME umax
|
||||
#define UMAX_CONFIG_FILE "umax.conf"
|
||||
#define MM_PER_INCH 25.4
|
||||
|
||||
/* ------------------------------------------------------------ SANE INTERNATIONALISATION ------------------ */
|
||||
|
||||
|
|
|
@ -182,7 +182,6 @@ static const SANE_String_Const astra_models[] =
|
|||
#define UMAX_PP_MODE_GRAYSCALE 1
|
||||
#define UMAX_PP_MODE_COLOR 2
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define MM_TO_PIXEL(mm, res) (SANE_UNFIX(mm) * (float )res / MM_PER_INCH)
|
||||
#define PIXEL_TO_MM(px, res) (SANE_FIX((float )(px * MM_PER_INCH / (res / 10)) / 10.0))
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#define UNCONST(ptr) ((void *)(long)(ptr))
|
||||
|
||||
#define MM_PER_INCH 25.4
|
||||
#define PNT_PER_MM (1200. / MM_PER_INCH)
|
||||
|
||||
#define PADDING_SIZE 16
|
||||
|
|
|
@ -56,6 +56,10 @@
|
|||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#ifndef MM_PER_INCH
|
||||
#define MM_PER_INCH 25.4
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGPROCMASK
|
||||
# define SIGACTION sigaction
|
||||
#else
|
||||
|
|
Ładowanie…
Reference in New Issue