mustek backend in OS/2

Bohumir Horeni (horeni@login.cz)
Mon, 15 Jun 1998 20:43:57 MET

OS/2 required minor changes in mustek backend ( testetd with MFS-12000SP
firmware 1.02 ), maybe in other backends if fork() is used.

(1) required for OS/2 if fork() used in backend
-----------------------------------------------

/*=============*/
/*sanei_scsi.c */
/*=============*/
/* static int */
/* open_aspi (void) */

297,298c297,298
< rc = DosAllocSharedMem (&aspi_buf, 0, sanei_scsi_max_request_size,
< OBJ_TILE | PAG_READ | PAG_WRITE | PAG_COMMIT | OBJ_GETTABLE );

---
>   rc = DosAllocMem (&aspi_buf, sanei_scsi_max_request_size,
> 		    OBJ_TILE | PAG_READ | PAG_WRITE | PAG_COMMIT);

/* new function for mustek backend */ /* ( umax, qcam ... ) */ 368,376d367

< int sanei_fork_init() < { < #if USE == OS2_INTERFACE < if(DosOpenEventSem(0,&postSema)|| < DosGetSharedMem(aspi_buf,PAG_READ|PAG_WRITE))return -1; < #endif < return SANE_STATUS_GOOD; < } < /* #ifndef WE_HAVE_FIND_DEVICES */ /* missing parameter in */ /* sanei_scsi_find_devices */ 2087d2077 < const char *type,

/*===========================*/ /* mustek.c ( umax.c, .... ) */ /*===========================*/

/* s->reader_pid = fork (); */ /* if (s->reader_pid == 0) */ /* { */ /* sigset_t ignore_set; */ /* struct SIGACTION act; */

2760,2762d2759 < < status=sanei_fork_init(); < if (status != SANE_STATUS_GOOD)_exit(status);

(2) Scanner MFS-12000SP firmware 1.02 -------------------------------------

a) stop_scan (s); failed in OS/2

if (DosWaitEventSem (postSema, -1) || /* wait forever for sema. */ DosResetEventSem (postSema, &count)) /* reset semaphore. */ really "wait forever" -> ^C ; work ok if stop_scan() removed

b) ? maybe better default value ( ... protection against exceeding the physical scan area height, ... small buffer 32kB etc. ) s->val[OPT_BACKTRACK].w = SANE_TRUE; /* SANE_FALSE; */

Regards

Bohumir Horeni horeni@login.cz

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