kopia lustrzana https://gitlab.com/sane-project/backends
Intented according GNU coding standards.
rodzic
9e0f5f2a58
commit
f2cce09238
|
@ -19,7 +19,7 @@
|
|||
* po/Makefile.in: Added autoconf comment, removed MSGCAT variable.
|
||||
* backend/dll.c doc/sane-dll.man doc/descriptions/dll.desc: Ignore
|
||||
comments that are in the same line as the backend entries. Minor
|
||||
manpage fixes.
|
||||
manpage fixes. Intented according GNU coding standards.
|
||||
|
||||
2002-12-04 Matthew Duggan <stauff1@users.sourceforge.net>
|
||||
* backend/canon_pp-dev.c: Don't compare firmware version numbers -
|
||||
|
|
|
@ -198,8 +198,7 @@ static int devlist_size = 0, devlist_len = 0;
|
|||
static struct alias *first_alias;
|
||||
static SANE_Auth_Callback auth_callback;
|
||||
static struct backend *first_backend;
|
||||
static const char *op_name[] =
|
||||
{
|
||||
static const char *op_name[] = {
|
||||
"init", "exit", "get_devices", "open", "close", "get_option_descriptor",
|
||||
"control_option", "get_parameters", "start", "read", "cancel",
|
||||
"set_io_mode", "get_select_fd"
|
||||
|
@ -260,8 +259,8 @@ add_backend (const char *name, struct backend **bep)
|
|||
#if defined(HAVE_NSLINKMODULE)
|
||||
static const char *dyld_get_error_str ();
|
||||
|
||||
static const char
|
||||
*dyld_get_error_str ()
|
||||
static const char *
|
||||
dyld_get_error_str ()
|
||||
{
|
||||
NSLinkEditErrors c;
|
||||
int errorNumber;
|
||||
|
@ -299,8 +298,7 @@ load (struct backend *be)
|
|||
#elif defined(HAVE_NSLINKMODULE)
|
||||
# define PREFIX "libsane-"
|
||||
# define POSTFIX ".%u.so"
|
||||
mode = NSLINKMODULE_OPTION_RETURN_ON_ERROR +
|
||||
NSLINKMODULE_OPTION_PRIVATE;
|
||||
mode = NSLINKMODULE_OPTION_RETURN_ON_ERROR + NSLINKMODULE_OPTION_PRIVATE;
|
||||
#else
|
||||
# error "Tried to compile unsupported DLL."
|
||||
#endif /* HAVE_DLOPEN */
|
||||
|
@ -408,7 +406,8 @@ load (struct backend *be)
|
|||
#ifdef HAVE_DLOPEN
|
||||
op = (void *(*)(void)) dlsym (be->handle, funcname + 1);
|
||||
#elif defined(HAVE_SHL_LOAD)
|
||||
shl_findsym ((shl_t*)&(be->handle), funcname + 1, TYPE_UNDEFINED, &op);
|
||||
shl_findsym ((shl_t *) & (be->handle), funcname + 1, TYPE_UNDEFINED,
|
||||
&op);
|
||||
#elif defined(HAVE_NSLINKMODULE)
|
||||
{
|
||||
NSSymbol *nssym = NSLookupSymbolInModule (be->handle, funcname);
|
||||
|
@ -460,7 +459,8 @@ load (struct backend *be)
|
|||
# undef PREFIX
|
||||
# undef POSTFIX
|
||||
#else /* HAVE_DLL */
|
||||
DBG(1, "load: ignoring attempt to load `%s'; compiled without dl support\n",
|
||||
DBG (1,
|
||||
"load: ignoring attempt to load `%s'; compiled without dl support\n",
|
||||
be->name);
|
||||
return SANE_STATUS_UNSUPPORTED;
|
||||
#endif /* HAVE_DLL */
|
||||
|
@ -487,7 +487,8 @@ init (struct backend *be)
|
|||
|
||||
if (SANE_VERSION_MAJOR (version) != V_MAJOR)
|
||||
{
|
||||
DBG(1, "init: backend `%s' has a wrong major version (%d instead of %d)\n",
|
||||
DBG (1,
|
||||
"init: backend `%s' has a wrong major version (%d instead of %d)\n",
|
||||
be->name, SANE_VERSION_MAJOR (version), V_MAJOR);
|
||||
return SANE_STATUS_INVAL;
|
||||
}
|
||||
|
@ -505,7 +506,9 @@ static void
|
|||
add_alias (const char *line_param)
|
||||
{
|
||||
const char *command;
|
||||
enum { CMD_ALIAS, CMD_HIDE } cmd;
|
||||
enum
|
||||
{ CMD_ALIAS, CMD_HIDE }
|
||||
cmd;
|
||||
const char *oldname, *oldend, *newname;
|
||||
size_t oldlen, newlen;
|
||||
struct alias *alias;
|
||||
|
@ -526,8 +529,7 @@ add_alias (const char *line_param)
|
|||
|
||||
if (strcmp (command, "alias") == 0)
|
||||
cmd = CMD_ALIAS;
|
||||
else
|
||||
if( strcmp(command, "hide") == 0 )
|
||||
else if (strcmp (command, "hide") == 0)
|
||||
cmd = CMD_HIDE;
|
||||
else
|
||||
return;
|
||||
|
@ -704,8 +706,7 @@ sane_exit (void)
|
|||
shl_unload (be->handle);
|
||||
#elif defined(HAVE_NSLINKMODULE)
|
||||
if (be->handle)
|
||||
NSUnLinkModule(be->handle,
|
||||
NSUNLINKMODULE_OPTION_NONE
|
||||
NSUnLinkModule (be->handle, NSUNLINKMODULE_OPTION_NONE
|
||||
# ifdef __ppc__
|
||||
| NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES
|
||||
# endif
|
||||
|
@ -958,7 +959,8 @@ sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
|
|||
{
|
||||
struct meta_scanner *s = handle;
|
||||
|
||||
DBG(3, "sane_get_option_descriptor(handle=%p,option=%d)\n", handle, option);
|
||||
DBG (3, "sane_get_option_descriptor(handle=%p,option=%d)\n", handle,
|
||||
option);
|
||||
return (*s->be->op[OP_GET_OPTION_DESC]) (s->handle, option);
|
||||
}
|
||||
|
||||
|
@ -968,10 +970,11 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
{
|
||||
struct meta_scanner *s = handle;
|
||||
|
||||
DBG(3, "sane_control_option(handle=%p,option=%d,action=%d,value=%p,info=%p)\n",
|
||||
DBG (3,
|
||||
"sane_control_option(handle=%p,option=%d,action=%d,value=%p,info=%p)\n",
|
||||
handle, option, action, value, info);
|
||||
return (long) (*s->be->op[OP_CTL_OPTION]) (s->handle, option, action,
|
||||
value, info);
|
||||
return (long) (*s->be->op[OP_CTL_OPTION]) (s->handle, option, action, value,
|
||||
info);
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
|
@ -1017,7 +1020,8 @@ sane_set_io_mode (SANE_Handle handle, SANE_Bool non_blocking)
|
|||
{
|
||||
struct meta_scanner *s = handle;
|
||||
|
||||
DBG(3, "sane_set_io_mode(handle=%p,nonblocking=%d)\n", handle, non_blocking);
|
||||
DBG (3, "sane_set_io_mode(handle=%p,nonblocking=%d)\n", handle,
|
||||
non_blocking);
|
||||
return (long) (*s->be->op[OP_SET_IO_MODE]) (s->handle, non_blocking);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue