# sane-1.00-patch

Frederick (niles@axp745.gsfc.nasa.gov)
Mon, 23 Nov 98 22:17:11 -0500

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Chris Pinkham: "Re: sane-backends patch"
- Previous message: becka@rz.uni-duesseldorf.de: "Re: Mustek 12000 SP not working"

Here's a patch I applied to make sane-1.00 happy with egcs-1.1b.
They seem like pretty innocent changes. What do you think?

Rick Niles.

------
diff -r -cp sane-1.00/backend/abaton.c sane-1.00.new/backend/abaton.c
*** sane-1.00/backend/abaton.c Sat Nov 21 21:54:14 1998
--- sane-1.00.new/backend/abaton.c Mon Nov 23 21:17:18 1998
*************** sane_control_option (SANE_Handle handle,
*** 1113,1119 ****
case OPT_Y_RESOLUTION:
if (s->val[OPT_PREVIEW].w || s->val[OPT_RESOLUTION_BIND].w) {
! s->val[OPT_X_RESOLUTION] = *(SANE_Word *)val;
if (info)
*info |= SANE_INFO_RELOAD_OPTIONS;
}
--- 1113,1119 ----
case OPT_Y_RESOLUTION:
if (s->val[OPT_PREVIEW].w || s->val[OPT_RESOLUTION_BIND].w) {
! s->val[OPT_X_RESOLUTION] = (Option_Value) *(SANE_Word *) val;
if (info)
*info |= SANE_INFO_RELOAD_OPTIONS;
}
diff -r -cp sane-1.00/backend/agfafocus.c sane-1.00.new/backend/agfafocus.c
*** sane-1.00/backend/agfafocus.c Thu Oct 29 01:52:32 1998
--- sane-1.00.new/backend/agfafocus.c Mon Nov 23 21:25:06 1998
*************** read_data (AgfaFocus_Scanner * s, SANE_B
*** 774,786 ****
/* Reverse: */
if (s->bpp != 1)
! if (s->bpp != 6)
! for (i = 0; i < size; i++)
! buf[i] = 255 - buf[i];
! else
! for (i = 0; i < size; i++)
! buf[i] = 255 - ((buf[i] * 256.0f) / 64.0f);
!
s->lines_available -= lines;
return SANE_STATUS_GOOD;
--- 774,788 ----
/* Reverse: */
if (s->bpp != 1)
! {
! if (s->bpp != 6)
! for (i = 0; i < size; i++)
! buf[i] = 255 - buf[i];
! else
! for (i = 0; i < size; i++)
! buf[i] = 255 - ((buf[i] * 256.0f) / 64.0f);
! }
!
s->lines_available -= lines;
return SANE_STATUS_GOOD;
diff -r -cp sane-1.00/backend/qcam.c sane-1.00.new/backend/qcam.c
*** sane-1.00/backend/qcam.c Fri Jul 24 01:34:07 1998
--- sane-1.00.new/backend/qcam.c Mon Nov 23 21:29:29 1998
*************** reader_process (QC_Scanner *s, int in_fd
*** 1047,1053 ****
static SANE_Status
attach (const char *devname, QC_Device **devp)
{
! int i, n1, n2, s1, s2, cmd, port, force_unidir;
SANE_Status result;
QC_Device * q;
char *endp;
--- 1047,1053 ----
static SANE_Status
attach (const char *devname, QC_Device **devp)
{
! int i, n1=0, n2, s1=0, s2, cmd, port, force_unidir;
SANE_Status result;
QC_Device * q;
char *endp;
diff -r -cp sane-1.00/backend/umax.c sane-1.00.new/backend/umax.c
*** sane-1.00/backend/umax.c Tue Nov 10 00:28:12 1998
--- sane-1.00.new/backend/umax.c Mon Nov 23 21:59:54 1998
***************
*** 101,118 ****
#define DBG_sane_option 13
- /* ------------------------------------------------------------ SANE DEFINES ------------------------------- */
-
-
- #define BACKEND_NAME umax
- #define UMAX_CONFIG_FILE "umax.conf"
- #define MM_PER_INCH 25.4
-
- #ifndef PATH_MAX
- #define PATH_MAX 1024
- #endif
-
-
/* ------------------------------------------------------------ INCLUDES ----------------------------------- */
--- 101,106 ----
***************
*** 153,158 ****
--- 141,158 ----
#include "umax.h"
#include "sane/sanei_backend.h"
#include "sane/sanei_config.h"
+
+
+ /* ------------------------------------------------------------ SANE DEFINES ------------------------------- */
+
+
+ #define BACKEND_NAME umax
+ #define UMAX_CONFIG_FILE "umax.conf"
+ #define MM_PER_INCH 25.4
+
+ #ifndef PATH_MAX
+ #define PATH_MAX 1024
+ #endif
/* ------------------------------------------------------------ STRINGDEFINITIONS -------------------------- */
Only in sane-1.00.new/include: Makefile

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

- Next message: Chris Pinkham: "Re: sane-backends patch"
- Previous message: becka@rz.uni-duesseldorf.de: "Re: Mustek 12000 SP not working"