[sane-devel] dell1600n_net backend

Henning Meier-Geinitz henning at meier-geinitz.de
Tue May 9 20:22:44 UTC 2006


Hi,

On 2006-04-23 15:16, Jon Chambers wrote:
> I have a nominally functional backend for network scanning using a Dell 
> 1600n MFP.  The source can be found at 
> http://www.jon.demon.co.uk/sane-dell1600n_net/dell1600n_net.c

[...]

> I am keen to get the source into CVS and also to verify the build on some 
> other platforms (I suspect that some of the network headers may require 
> some #ifdef magic).

Ok, let's try (Linux i386):
dell1600n_net.c:78:20: error: tiffio.h: No such file or directory

I guess you must add some magic to not compile the backend if the jpeg
and tiff headers are not present. Or, if this is possible/makes sense,
to #ifdef out that functions calls in your backend.

With libtiff installed, I get these warnings:
dell1600n_net.c: In function 'sane_dell1600n_net_init':
dell1600n_net.c:225: warning: unused parameter 'authorize'
dell1600n_net.c: In function 'sane_dell1600n_net_get_devices':
dell1600n_net.c:263: warning: unused parameter 'local_only'
dell1600n_net.c: In function 'sane_dell1600n_net_get_option_descriptor':
dell1600n_net.c:498: warning: unused parameter 'handle'
dell1600n_net.c: In function 'sane_dell1600n_net_control_option':
dell1600n_net.c:522: warning: unused parameter 'handle'
dell1600n_net.c:522: warning: unused parameter 'info'
dell1600n_net.c: In function 'sane_dell1600n_net_read':
dell1600n_net.c:721: warning: comparison between signed and unsigned
dell1600n_net.c: In function 'sane_dell1600n_net_cancel':
dell1600n_net.c:749: warning: unused parameter 'handle'
dell1600n_net.c: In function 'sane_dell1600n_net_set_io_mode':
dell1600n_net.c:755: warning: unused parameter 'handle'
dell1600n_net.c:755: warning: unused parameter 'non_blocking'
dell1600n_net.c: In function 'sane_dell1600n_net_get_select_fd':
dell1600n_net.c:765: warning: unused parameter 'handle'
dell1600n_net.c:765: warning: unused parameter 'fd'
dell1600n_net.c: In function 'ClearKnownDevices':
dell1600n_net.c:787: warning: cast discards qualifiers from pointer target type
dell1600n_net.c:789: warning: cast discards qualifiers from pointer target type
dell1600n_net.c: In function 'JpegDecompTermSource':
dell1600n_net.c:1869: warning: unused parameter 'cinfo'

Doesn't look critical, but you could use __sane_unused__ to mark
unused parameters explicitely.

Ok, next test on HP-UX risc:
dell1600n_net.c:74:24: sys/select.h: No such file or directory
dell1600n_net.c:77:21: jpeglib.h: No such file or directory
dell1600n_net.c:78:20: tiffio.h: No such file or directory
[more errors deleted]


Before including the code into CVS, please run "indent -gnu" on it.

SANE_Status sane_get_select_fd (SANE_Handle handle,
                                SANE_Int * fd)
{

  return SANE_STATUS_ACCESS_DENIED;
  
Why is the access denied? I think the normal answer would be
SANE_STATUS_UNSUPPORTED as you don't implement the function. Same for
set_io_mode.

Bye,
  Henning



More information about the sane-devel mailing list