Updates to prepare for 1.0.20 release:

* configure.in: change version to 1.0.20cvs
* configure: rebuild from configure.in
* include/sane/sane.h: hide API changes (minor, frame and status)
* backend/canon_dr.c, backend/fujitsu.c: SANE_FRAME_JPEG
* backend/coolscan3.c: SANE_FRAME_RGBI
* backend/genesys_gl646.c, backend/genesys_gl841.c: STATUS_HW_LOCKED
* backend/rts8891.c, frontend/scanimage.c: STATUS_WARMING_UP
* backend/pixma_io_sanei.c, backend/xerox_mfp.c,
  backend/sane_strstatus.c: STATUS_HW_LOCKED & STATUS_WARMING_UP
* doc/releases.txt: minor updates for new build system
merge-requests/1/head
m. allan noah 2009-04-12 19:40:31 +00:00
rodzic d11e9363ab
commit 0342a63033
15 zmienionych plików z 125 dodań i 31 usunięć

Wyświetl plik

@ -1,3 +1,14 @@
2009-04-12 m. allan noah <kitno455 a t gmail d o t com>
* configure.in: change version to 1.0.20cvs
* configure: rebuild from configure.in
* include/sane/sane.h: hide API changes (minor, frame and status)
* backend/canon_dr.c, backend/fujitsu.c: SANE_FRAME_JPEG
* backend/coolscan3.c: SANE_FRAME_RGBI
* backend/genesys_gl646.c, backend/genesys_gl841.c: STATUS_HW_LOCKED
* backend/rts8891.c, frontend/scanimage.c: STATUS_WARMING_UP
* backend/pixma_io_sanei.c, backend/xerox_mfp.c,
backend/sane_strstatus.c: STATUS_HW_LOCKED & STATUS_WARMING_UP
* doc/releases.txt: minor updates for new build system
2009-04-07 Nicolas Martin <nicols-guest at users.alioth.debian.org>
* doc/sane-pixma.man, doc/descriptions/pixma.desc:

Wyświetl plik

@ -176,6 +176,8 @@
- hide modes and resolutions that DR-2510C lies about
- read_panel() logs front-end access to sensors instead of timing
- rewrite do_usb_cmd() to use remainder from RS info
v25 2009-04-12, MAN
- disable SANE_FRAME_JPEG
SANE FLOW DIAGRAM
@ -236,7 +238,7 @@
#include "canon_dr.h"
#define DEBUG 1
#define BUILD 24
#define BUILD 25
/* values for SANE_DEBUG_CANON_DR env var:
- errors 5
@ -1061,7 +1063,9 @@ init_model (struct scanner *s)
/* specific settings missing from vpd */
if (strstr (s->model_name,"DR-9080")
|| strstr (s->model_name,"DR-7580")){
#ifdef SANE_FRAME_JPEG
s->has_comp_JPEG = 1;
#endif
s->rgb_format = 2;
}
@ -2875,12 +2879,14 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
params->format = SANE_FRAME_RGB;
params->depth = 8;
#ifdef SANE_FRAME_JPEG
/* jpeg requires 8x8 squares */
if(s->compress == COMP_JPEG){
params->format = SANE_FRAME_JPEG;
params->pixels_per_line -= params->pixels_per_line % 8;
params->lines -= params->lines % 8;
}
#endif
params->bytes_per_line = params->pixels_per_line * 3;
}
@ -2888,12 +2894,14 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
params->format = SANE_FRAME_GRAY;
params->depth = 8;
#ifdef SANE_FRAME_JPEG
/* jpeg requires 8x8 squares */
if(s->compress == COMP_JPEG){
params->format = SANE_FRAME_JPEG;
params->pixels_per_line -= params->pixels_per_line % 8;
params->lines -= params->lines % 8;
}
#endif
params->bytes_per_line = params->pixels_per_line;
}
@ -3266,11 +3274,14 @@ set_window (struct scanner *s)
set_WD_compress_type(desc1, COMP_NONE);
set_WD_compress_arg(desc1, 0);
#ifdef SANE_FRAME_JPEG
/* some scanners support jpeg image compression, for color/gs only */
if(s->params.format == SANE_FRAME_JPEG){
set_WD_compress_type(desc1, COMP_JPEG);
set_WD_compress_arg(desc1, s->compress_arg);
}
#endif
/*build the command*/
memset(cmd,0,cmdLen);
@ -3458,7 +3469,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, SANE_Int * len
/* double width pnm interlacing */
if(s->source == SOURCE_ADF_DUPLEX
&& s->params.format != SANE_FRAME_JPEG
&& s->params.format <= SANE_FRAME_RGB
&& s->duplex_interlace != DUPLEX_INTERLACE_NONE
){
@ -3562,6 +3573,7 @@ read_from_scanner(struct scanner *s, int side)
inLen = 0;
}
#ifdef SANE_FRAME_JPEG
/* this is jpeg data, we need to fix the missing image size */
if(s->params.format == SANE_FRAME_JPEG){
@ -3611,6 +3623,7 @@ read_from_scanner(struct scanner *s, int side)
}
}
}
#endif
/*scanner may have sent more data than we asked for, chop it*/
if(inLen > remain){
@ -3741,7 +3754,7 @@ copy_simplex(struct scanner *s, unsigned char * buf, int len, int side)
/* invert image if scanner needs it for this mode */
/* jpeg data does not use inverting */
if(s->params.format != SANE_FRAME_JPEG && s->reverse_by_mode[s->mode]){
if(s->params.format <= SANE_FRAME_RGB && s->reverse_by_mode[s->mode]){
for(i=0; i<len; i++){
buf[i] ^= 0xff;
}

Wyświetl plik

@ -1397,7 +1397,11 @@ sane_get_parameters(SANE_Handle h, SANE_Parameters * p)
s->n_colors * s->logical_width * s->bytes_per_pixel;
if (s->infrared) {
#ifdef SANE_FRAME_RGBI
p->format = SANE_FRAME_RGBI;
#else
p->format = SANE_FRAME_RGB;
#endif
} else {
p->format = SANE_FRAME_RGB; /* XXXXXXXX CCCCCCCCCC */
}

Wyświetl plik

@ -423,6 +423,8 @@
- added ScanSnap S510M usb ids
v91 2009-03-20, MAN
- remove unused temp file code
v92 2009-04-12, MAN
- disable SANE_FRAME_JPEG support (again)
SANE FLOW DIAGRAM
@ -483,7 +485,7 @@
#include "fujitsu.h"
#define DEBUG 1
#define BUILD 91
#define BUILD 92
/* values for SANE_DEBUG_FUJITSU env var:
- errors 5
@ -1536,6 +1538,10 @@ init_vpd (struct fujitsu *s)
s->has_comp_JPG1 = get_IN_compression_JPG_BASE (in);
DBG (15, " compression JPG1: %d\n", s->has_comp_JPG1);
#ifndef SANE_FRAME_JPEG
DBG (15, " (Disabled)\n");
s->has_comp_JPG1 = 0;
#endif
s->has_comp_JPG2 = get_IN_compression_JPG_EXT (in);
DBG (15, " compression JPG2: %d\n", s->has_comp_JPG2);
@ -5757,6 +5763,7 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
if (s->mode == MODE_COLOR) {
params->depth = 8;
#ifdef SANE_FRAME_JPEG
/* jpeg requires 8x8 squares */
if(s->compress == COMP_JPEG){
params->format = SANE_FRAME_JPEG;
@ -5764,16 +5771,20 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
params->lines -= params->lines % 8;
}
else{
#endif
params->format = SANE_FRAME_RGB;
params->pixels_per_line
-= params->pixels_per_line % s->ppl_mod_by_mode[s->mode];
#ifdef SANE_FRAME_JPEG
}
#endif
params->bytes_per_line = params->pixels_per_line * 3;
}
else if (s->mode == MODE_GRAYSCALE) {
params->depth = 8;
#ifdef SANE_FRAME_JPEG
/* jpeg requires 8x8 squares */
if(s->compress == COMP_JPEG){
params->format = SANE_FRAME_JPEG;
@ -5781,10 +5792,13 @@ sane_get_parameters (SANE_Handle handle, SANE_Parameters * params)
params->lines -= params->lines % 8;
}
else{
#endif
params->format = SANE_FRAME_GRAY;
params->pixels_per_line
-= params->pixels_per_line % s->ppl_mod_by_mode[s->mode];
#ifdef SANE_FRAME_JPEG
}
#endif
params->bytes_per_line = params->pixels_per_line;
}
@ -6291,11 +6305,14 @@ set_window (struct fujitsu *s)
set_WD_compress_type(desc1, COMP_NONE);
set_WD_compress_arg(desc1, 0);
#ifdef SANE_FRAME_JPEG
/* some scanners support jpeg image compression, for color/gs only */
if(s->params.format == SANE_FRAME_JPEG){
set_WD_compress_type(desc1, COMP_JPEG);
set_WD_compress_arg(desc1, s->compress_arg);
}
#endif
/* the remainder of the block varies based on model and mode,
* except for gamma and paper size, those are in the same place */
@ -6742,6 +6759,7 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, SANE_Int * len
} /* end 3091 */
#ifdef SANE_FRAME_JPEG
/* alternating jpeg duplex interlacing */
else if(s->source == SOURCE_ADF_DUPLEX
&& s->params.format == SANE_FRAME_JPEG
@ -6759,10 +6777,11 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len, SANE_Int * len
}
} /* end alt jpeg */
#endif
/* alternating pnm interlacing */
/* alternating pnm duplex interlacing */
else if(s->source == SOURCE_ADF_DUPLEX
&& s->params.format != SANE_FRAME_JPEG
&& s->params.format <= SANE_FRAME_RGB
&& s->duplex_interlace == DUPLEX_INTERLACE_ALT){
/* buffer front side */
@ -7396,15 +7415,15 @@ read_from_buffer(struct fujitsu *s, SANE_Byte * buf,
return SANE_STATUS_GOOD;
}
#ifdef SANE_FRAME_JPEG
/* jpeg data does not use typical interlacing or inverting, just copy */
if(s->compress == COMP_JPEG &&
(s->mode == MODE_COLOR || s->mode == MODE_GRAYSCALE)){
if(s->params.format == SANE_FRAME_JPEG){
memcpy(buf,s->buffers[side]+s->bytes_tx[side],bytes);
}
/* not using jpeg, colors maybe interlaced, pixels maybe inverted */
else {
#endif
/* scanners interlace colors in many different ways */
/* use separate code to convert to regular rgb */
@ -7453,7 +7472,9 @@ read_from_buffer(struct fujitsu *s, SANE_Byte * buf,
buf[i] ^= 0xff;
}
}
#ifdef SANE_FRAME_JPEG
}
#endif
s->bytes_tx[side] += *len;

Wyświetl plik

@ -4443,7 +4443,11 @@ gl646_init (Genesys_Device * dev)
DBG (DBG_error0,
"Your scanner is locked. Please move the lock switch "
"to the unlocked position\n");
#ifdef SANE_STATUS_HW_LOCKED
return SANE_STATUS_HW_LOCKED;
#else
return SANE_STATUS_JAMMED;
#endif
}
else
DBG (DBG_error,

Wyświetl plik

@ -5438,7 +5438,11 @@ gl841_coarse_gain_calibration (Genesys_Device * dev, int dpi)
DBG (DBG_error0, "**********************************************\n");
DBG (DBG_error0, "**********************************************\n");
#ifdef SANE_STATUS_HW_LOCKED
return SANE_STATUS_HW_LOCKED;
#else
return SANE_STATUS_JAMMED;
#endif
}
}

Wyświetl plik

@ -306,8 +306,12 @@ map_error (SANE_Status ss)
return PIXMA_ENO_PAPER;
case SANE_STATUS_EOF:
return PIXMA_EOF;
#ifdef SANE_STATUS_HW_LOCKED
case SANE_STATUS_HW_LOCKED: /* unused by pixma */
#endif
#ifdef SANE_STATUS_WARMING_UP
case SANE_STATUS_WARMING_UP: /* unused by pixma */
#endif
break;
}
PDBG (pixma_dbg (1, "BUG:Unmapped SANE Status code %d\n", ss));

Wyświetl plik

@ -1114,11 +1114,17 @@ sane_start (SANE_Handle handle)
gettimeofday (&current, NULL);
if ((current.tv_sec - dev->start_time.tv_sec) < 15)
{
#ifdef SANE_STATUS_WARMING_UP
return SANE_STATUS_WARMING_UP;
#else
DBG (DBG_info,
"sane_start: waiting to let lamp get warm enough ...\n");
sleep(current.tv_sec - dev->start_time.tv_sec);
#endif
}
#else
DBG (DBG_info,
"sane_start: waiting 15s to let lamp getting warm enough ...\n");
"sane_start: waiting 15s to let lamp get warm enough ...\n");
sleep (15);
#endif
}

Wyświetl plik

@ -91,11 +91,15 @@ sane_strstatus (SANE_Status status)
case SANE_STATUS_ACCESS_DENIED:
return SANE_I18N("Access to resource has been denied");
#ifdef SANE_STATUS_WARMING_UP
case SANE_STATUS_WARMING_UP:
return SANE_I18N("Lamp not ready, please retry");
#endif
#ifdef SANE_STATUS_HW_LOCKED
case SANE_STATUS_HW_LOCKED:
return SANE_I18N("Scanner mechanism locked for transport");
#endif
default:
/* non-reentrant, but better than nothing */

Wyświetl plik

@ -78,9 +78,17 @@ static int resolv_state(int state)
if (state & STATE_INVALID_AREA)
return SANE_STATUS_INVAL; /* sane_start: implies SANE_INFO_RELOAD_OPTIONS */
if (state & STATE_WARMING)
#ifdef SANE_STATUS_WARMING_UP
return SANE_STATUS_WARMING_UP;
#else
return SANE_STATUS_DEVICE_BUSY;
#endif
if (state & STATE_LOCKING)
#ifdef SANE_STATUS_HW_LOCKED
return SANE_STATUS_HW_LOCKED;
#else
return SANE_STATUS_JAMMED;
#endif
if (state & ~STATE_NO_ERROR)
return SANE_STATUS_DEVICE_BUSY;
return 0;

22
configure vendored
Wyświetl plik

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for sane-backends 1.1.0-cvs.
# Generated by GNU Autoconf 2.63 for sane-backends 1.0.20cvs.
#
# Report bugs to <sane-devel@lists.alioth.debian.org>.
#
@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sane-backends'
PACKAGE_TARNAME='sane-backends'
PACKAGE_VERSION='1.1.0-cvs'
PACKAGE_STRING='sane-backends 1.1.0-cvs'
PACKAGE_VERSION='1.0.20cvs'
PACKAGE_STRING='sane-backends 1.0.20cvs'
PACKAGE_BUGREPORT='sane-devel@lists.alioth.debian.org'
# Factoring default headers for most tests.
@ -1567,7 +1567,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sane-backends 1.1.0-cvs to adapt to many kinds of systems.
\`configure' configures sane-backends 1.0.20cvs to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1637,7 +1637,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sane-backends 1.1.0-cvs:";;
short | recursive ) echo "Configuration of sane-backends 1.0.20cvs:";;
esac
cat <<\_ACEOF
@ -1783,7 +1783,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sane-backends configure 1.1.0-cvs
sane-backends configure 1.0.20cvs
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -1797,7 +1797,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sane-backends $as_me 1.1.0-cvs, which was
It was created by sane-backends $as_me 1.0.20cvs, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@ -2520,7 +2520,7 @@ fi
# Define the identity of the package.
PACKAGE='sane-backends'
VERSION='1.1.0-cvs'
VERSION='1.0.20cvs'
cat >>confdefs.h <<_ACEOF
@ -2689,7 +2689,7 @@ ac_config_headers="$ac_config_headers include/sane/config.h"
PACKAGE=sane-backends
VERSION=1.1.0-cvs
VERSION=1.0.20cvs
NUMBER_VERSION=${V_MAJOR}.${V_MINOR}.${V_REV}
cat >>confdefs.h <<_ACEOF
@ -34886,7 +34886,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sane-backends $as_me 1.1.0-cvs, which was
This file was extended by sane-backends $as_me 1.0.20cvs, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -34949,7 +34949,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sane-backends config.status 1.1.0-cvs
sane-backends config.status 1.0.20cvs
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

Wyświetl plik

@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script. -*-m4-*-
dnl ***********************************************************************
dnl When preparing a release, increase the numeric and string version numbers,
dnl remove the "-cvs" suffix, and set is_release=yes
AC_INIT([sane-backends],[1.1.0-cvs],[sane-devel@lists.alioth.debian.org])
AC_INIT([sane-backends],[1.0.20cvs],[sane-devel@lists.alioth.debian.org])
V_MAJOR=1
V_MINOR=1
V_REV=0

Wyświetl plik

@ -16,8 +16,8 @@ Before the release:
* Make sure that config.guess and config.sub are up-to-date (get them from
savannah.gnu.org/projects/config)
* configure.in: increase version number (twice!)
* configure.in: remove -cvs from textual version number
* configure.in: increase version number
* configure.in: remove 'cvs' from textual version number
* configure.in: set is_release=yes
* OPTIONAL: aclocal.m4: recreate by running aclocal
* OPTIONAL: include/sane/config.h.in: recreate (autoheader in root of checkout)

Wyświetl plik

@ -1196,11 +1196,15 @@ scan_it (void)
{
if (!first_frame)
{
#ifdef SANE_STATUS_WARMING_UP
do
{
status = sane_start (device);
}
while(status == SANE_STATUS_WARMING_UP);
#else
status = sane_start (device);
#endif
if (status != SANE_STATUS_GOOD)
{
fprintf (stderr, "%s: sane_start: %s\n",
@ -1525,11 +1529,16 @@ test_it (void)
static const char *format_name[] =
{ "gray", "RGB", "red", "green", "blue" };
#ifdef SANE_STATUS_WARMING_UP
do
{
status = sane_start (device);
}
while(status == SANE_STATUS_WARMING_UP);
#else
status = sane_start (device);
#endif
if (status != SANE_STATUS_GOOD)
{
fprintf (stderr, "%s: sane_start: %s\n",
@ -2232,11 +2241,15 @@ List of available devices:", prog_name);
fprintf (stderr, "Scanning page %d\n", n);
}
#ifdef SANE_STATUS_WARMING_UP
do
{
status = sane_start (device);
}
while(status == SANE_STATUS_WARMING_UP);
#else
status = sane_start (device);
#endif
if (status != SANE_STATUS_GOOD)
{
fprintf (stderr, "%s: sane_start: %s\n",

Wyświetl plik

@ -25,7 +25,7 @@ extern "C" {
*/
#define SANE_CURRENT_MAJOR 1
#define SANE_CURRENT_MINOR 1
#define SANE_CURRENT_MINOR 0
#define SANE_VERSION_CODE(major, minor, build) \
( (((SANE_Word) (major) & 0xff) << 24) \
@ -66,10 +66,12 @@ typedef enum
SANE_STATUS_COVER_OPEN, /* scanner cover is open */
SANE_STATUS_IO_ERROR, /* error during device I/O */
SANE_STATUS_NO_MEM, /* out of memory */
SANE_STATUS_ACCESS_DENIED, /* access to resource has been denied */
/* the following were added for sane 1.1.0, older frontends wont support */
SANE_STATUS_ACCESS_DENIED /* access to resource has been denied */
/* following are for later sane version, older frontends wont support */
#if 0
SANE_STATUS_WARMING_UP, /* lamp not ready, please retry */
SANE_STATUS_HW_LOCKED /* scanner mechanism locked for transport */
#endif
}
SANE_Status;
@ -172,12 +174,12 @@ typedef enum
SANE_FRAME_RGB, /* pixel-interleaved red/green/blue bands */
SANE_FRAME_RED, /* red band only */
SANE_FRAME_GREEN, /* green band only */
SANE_FRAME_BLUE, /* blue band only */
SANE_FRAME_BLUE /* blue band only */
/* push remaining types down to match existing backends */
/* these were first exposed in SANE 1.1.0 */
/* these are to be exposed in a later version of SANE */
/* most front-ends will require updates to understand them */
#if 0
SANE_FRAME_TEXT = 0x0A, /* backend specific textual data */
SANE_FRAME_JPEG, /* complete baseline JPEG file */
SANE_FRAME_G31D, /* CCITT Group 3 1-D Compressed (MH) */
@ -188,7 +190,7 @@ typedef enum
SANE_FRAME_RGBI, /* red+green+blue+infrared */
SANE_FRAME_GRAYI, /* gray+infrared */
SANE_FRAME_XML /* undefined schema */
#endif
}
SANE_Frame;