kopia lustrzana https://gitlab.com/sane-project/backends
sanei: Use C linkage for internal functions in C++ mode
rodzic
9e3b5d6381
commit
72121bc7d8
|
@ -5,6 +5,10 @@
|
|||
/* Now define the wrappers (we could use aliases here, but go for
|
||||
robustness for now...: */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SANE_Status
|
||||
sane_init (SANE_Int *vc, SANE_Auth_Callback cb)
|
||||
{
|
||||
|
@ -83,3 +87,7 @@ sane_exit (void)
|
|||
{
|
||||
ENTRY(exit) ();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
|
|
@ -89,6 +89,10 @@
|
|||
|
||||
#include <sane/sane.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @name Public macros and functions
|
||||
* @{
|
||||
*/
|
||||
|
@ -167,5 +171,8 @@ extern SANE_Status sanei_check_value (const SANE_Option_Descriptor * opt,
|
|||
extern SANE_Status sanei_constrain_value (const SANE_Option_Descriptor * opt,
|
||||
void * value, SANE_Word * info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* sanei_h */
|
||||
|
|
|
@ -113,6 +113,10 @@
|
|||
/** @name Declaration of entry points:
|
||||
* @{
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern SANE_Status ENTRY(init) (SANE_Int *, SANE_Auth_Callback);
|
||||
extern SANE_Status ENTRY(get_devices) (const SANE_Device ***, SANE_Bool);
|
||||
extern SANE_Status ENTRY(open) (SANE_String_Const, SANE_Handle *);
|
||||
|
@ -130,6 +134,10 @@ extern void ENTRY(cancel) (SANE_Handle);
|
|||
extern void ENTRY(close) (SANE_Handle);
|
||||
extern void ENTRY(exit) (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#ifndef STUBS
|
||||
/* Now redirect sane_* calls to backend's functions: */
|
||||
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
#include <stdio.h>
|
||||
#include <sane/sane.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Search configuration file \a name along directory list and return file
|
||||
* pointer if such a file exists.
|
||||
*
|
||||
|
@ -172,4 +176,8 @@ extern SANE_Status sanei_configure_attach (
|
|||
*/
|
||||
extern const char *sanei_config_get_paths (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* sanei_config_h */
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
|
||||
#include <sane/sanei.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @name Public macros
|
||||
* These macros can be used in backends and other SANE-related
|
||||
* code.
|
||||
|
@ -150,4 +154,8 @@ extern void sanei_init_debug (const char * backend, int * debug_level_var);
|
|||
|
||||
#endif /* NDEBUG */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* _SANEI_DEBUG_H */
|
||||
|
|
|
@ -57,6 +57,10 @@
|
|||
#ifndef SANEI_MAGIC_H
|
||||
#define SANEI_MAGIC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Initialize sanei_magic.
|
||||
*
|
||||
* Call this before any other sanei_magic function.
|
||||
|
@ -219,4 +223,8 @@ extern SANE_Status
|
|||
sanei_magic_turn(SANE_Parameters * params, SANE_Byte * buffer,
|
||||
int angle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* SANEI_MAGIC_H */
|
||||
|
|
|
@ -68,6 +68,10 @@
|
|||
|
||||
#include <stdlib.h> /* for size_t */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* USB spec defines */
|
||||
#ifndef USB_CLASS_PER_INTERFACE
|
||||
/* Also defined in libusb */
|
||||
|
@ -521,5 +525,9 @@ sanei_usb_set_altinterface (SANE_Int dn, SANE_Int alternate);
|
|||
extern SANE_Status
|
||||
sanei_usb_get_descriptor( SANE_Int dn, struct sanei_usb_dev_descriptor *desc );
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------*/
|
||||
#endif /* sanei_usb_h */
|
||||
|
|
Ładowanie…
Reference in New Issue