# Patch to SANE 0.67

Petter Reinholdtsen (pere@link.no)
Mon, 10 Nov 1997 13:58:17 +0100 (MET)

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Helmut Koeberle: "Backend for Canon CanoScan 600"
- Previous message: Andreas Czechanowski: "Re: Help: Mustek 600 II N scanner"

Here is a small bugfix for Sane 0.67. It helps Irix cc more quiet. I
have been unable to get it to run. I hope I'll get time to work on it
later. :-)

diff -rc src-0.67/sanei/sanei_config.c src-0.67-sgiirix5/sanei/sanei_config.c
*** src-0.67/sanei/sanei_config.c Sun Oct 26 18:48:33 1997
--- src-0.67-sgiirix5/sanei/sanei_config.c Sat Nov 8 18:09:26 1997
***************
*** 95,101 ****
void *mem = malloc (len + sizeof (DEFAULT_DIRS));
memcpy (mem, dir_list, len);
! memcpy (mem + len, DEFAULT_DIRS, sizeof (DEFAULT_DIRS));
dir_list = mem;
}
}
--- 95,101 ----
void *mem = malloc (len + sizeof (DEFAULT_DIRS));
memcpy (mem, dir_list, len);
! memcpy (((u_char*)mem + len), DEFAULT_DIRS, sizeof (DEFAULT_DIRS))
;
dir_list = mem;
}
}
diff -rc src-0.67/sanei/sanei_scsi.c src-0.67-sgiirix5/sanei/sanei_scsi.c
*** src-0.67/sanei/sanei_scsi.c Sun Oct 26 18:45:09 1997
--- src-0.67-sgiirix5/sanei/sanei_scsi.c Sat Nov 8 18:06:11 1997
***************
*** 1112,1118 ****
* Copy data portion to local buffer to ensure 32-bit alignment...
*/
! memcpy(databuf, ((u_char)src) + cdb_size, src_size - cdb_size);
}
if (ioctl (fd, DS_ENTER, &scsi_req) < 0)
return SANE_STATUS_IO_ERROR;
--- 1112,1118 ----
* Copy data portion to local buffer to ensure 32-bit alignment...
*/
! memcpy(databuf, ((u_char*)src) + cdb_size, src_size - cdb_size);
}
if (ioctl (fd, DS_ENTER, &scsi_req) < 0)
return SANE_STATUS_IO_ERROR;

    --
    ##>  Petter Reinholdtsen <##    | pere@td.org.uit.no
     O-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
    http://www.td.org.uit.no/~pere/ | Go Mozilla, go! Go!

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

     Next message: Helmut Koeberle: "Backend for Canon CanoScan 600"
     Previous message: Andreas Czechanowski: "Re: Help: Mustek 600 II N scanner"