LibreOffice Module extensions (master) 1
Macros | Functions | Variables
sane.cxx File Reference
#include <type_traits>
#include <math.h>
#include <o3tl/safeint.hxx>
#include <osl/file.h>
#include <sal/log.hxx>
#include <tools/stream.hxx>
#include <unotools/tempfile.hxx>
#include "sane.hxx"
#include <dlfcn.h>
#include <stdio.h>
#include <sys/time.h>
#include <sal/config.h>
#include <sal/macros.h>
#include <memory>
#include <stdarg.h>
Include dependency graph for sane.cxx:

Go to the source code of this file.

Macros

#define dump_state(a, b, c, d)   fprintf( stderr, a, b, c, d );
 
#define FAIL_SHUTDOWN_STATE(x, y, z)
 
#define FAIL_STATE(x, y, z)
 
#define DUMP_STATE(x, y)
 
#define BYTE_BUFFER_SIZE   32768
 

Functions

static void dbg_msg (const char *pString,...)
 
static sal_uInt8 ReadValue (FILE *fp, int depth)
 

Variables

static bool bSaneSymbolLoadFailed = false
 
static const char * ppUnits []
 

Macro Definition Documentation

◆ BYTE_BUFFER_SIZE

#define BYTE_BUFFER_SIZE   32768

Definition at line 479 of file sane.cxx.

◆ dump_state

#define dump_state (   a,
  b,
  c,
  d 
)    fprintf( stderr, a, b, c, d );

Definition at line 38 of file sane.cxx.

◆ DUMP_STATE

#define DUMP_STATE (   x,
  y 
)
Value:
if( x != SANE_STATUS_GOOD ) \
{ \
dump_state( "%s returned error %d (%s)\n", \
y, x, p_strstatus( x ) ); \
}

Definition at line 71 of file sane.cxx.

◆ FAIL_SHUTDOWN_STATE

#define FAIL_SHUTDOWN_STATE (   x,
  y,
  z 
)
Value:
if( x != SANE_STATUS_GOOD ) \
{ \
dump_state( "%s returned error %d (%s)\n", \
y, x, p_strstatus( x ) ); \
DeInit(); \
return z; \
}
float z

Definition at line 54 of file sane.cxx.

◆ FAIL_STATE

#define FAIL_STATE (   x,
  y,
  z 
)
Value:
if( x != SANE_STATUS_GOOD ) \
{ \
dump_state( "%s returned error %d (%s)\n", \
y, x, p_strstatus( x ) ); \
return z; \
}

Definition at line 63 of file sane.cxx.

Function Documentation

◆ dbg_msg()

static void dbg_msg ( const char *  pString,
  ... 
)
static

Definition at line 42 of file sane.cxx.

Referenced by Sane::CheckConsistency(), Sane::ControlOption(), Sane::GetRange(), and Sane::Start().

◆ ReadValue()

static sal_uInt8 ReadValue ( FILE *  fp,
int  depth 
)
static

Definition at line 481 of file sane.cxx.

References SAL_WARN.

Referenced by Sane::Start().

Variable Documentation

◆ bSaneSymbolLoadFailed

bool bSaneSymbolLoadFailed = false
static

Definition at line 106 of file sane.cxx.

Referenced by Sane::Init(), and Sane::LoadSymbol().

◆ ppUnits

const char* ppUnits[]
static
Initial value:
= {
"",
"[Pixel]",
"[Bit]",
"[mm]",
"[DPI]",
"[%]",
"[usec]"
}

Definition at line 968 of file sane.cxx.

Referenced by Sane::GetOptionUnitName().