Hi Fred, Good job.
I have a few remarks about the the code: - option are prefixed by LXK_ (eg LXK_OPT_SCAN_SIZE). Backends usually don't use a prefix. - size_list[] doesn't have A4 and other standard formats. You can get some values at http://www.cl.cam.ac.uk/~mgk25/iso-paper.html - in sane_start(), sane_read(), and probably other, you check whether the handle is a valid one. While this is correct I think it's overkill. The frontend should be trusted. - bytes_read in sane_read() should be a long instead of ssize_t to avoid a cast. - in lexmark-x1000.c, there 6 global variables (transfer_buffer, ...). They should be per scanner instance. Same thing with at least eof, x_dpi and y_dpi in lexmark.c. - shouldnt the lexmark copyright be in lexmark-x1000.c too? - unless you intend to add more code to read_buffer_is_empty(), get rid of it. - you could replace "scan-size" with SANE_NAME_PAPER_SIZE which is already used by 2 other backends. I also get the following warnings when I compile (target is x86_64): lexmark-x1100.c:59:1: warning: "BACKEND_NAME" redefined <command line>:10:1: warning: this is the location of the previous definition lexmark-x1100.c: In function `x1100_read_scan_data': lexmark-x1100.c:2359: warning: unsigned int format, different type arg (arg 3) lexmark-x1100.c:2360: warning: unsigned int format, different type arg (arg 3) lexmark-x1100.c:2361: warning: cast from pointer to integer of different size lexmark-x1100.c:2395: warning: unsigned int format, different type arg (arg 3) lexmark-x1100.c:2396: warning: unsigned int format, different type arg (arg 3) lexmark-x1100.c: In function `read_buffer_bytes_available': lexmark-x1100.c:2728: warning: comparison between signed and unsigned Regards, Frank.