Re: Porting SANE backends

Svend Daugaard Pedersen (sdp@vip.cybercity.dk)
Fri, 26 Feb 1999 08:48:08 +0100

Oliver Rauch wrote

>Svend Daugaard Pedersen wrote:

>> - don't use 'alloca()'
>> this routine is not an ANSI routine and it is difficult
>> (in many cases impossible) to implement in a C system not
>> having it.
>>

>Thats no problem, changed it in the umax backend.

The 'alloca()' is not the biggest problem (it is possible for me
to implement it). But it is not an ANSI C routine.

>> - don't use 'fork()' and related routines
>> if you feel it is necessary, do it in a way that makes it
>> easy to change the code (snapscan.c is a good example) or
>> better: make this part of the code conditional.
>>

>What is the problem with fork. The amiga has a multi-tasking system,
>so I don`t understand the problem.

It's correct that amiga has a multi-tasking system (and the access
to the SCSI port is in fact always done in a separate task), but
'fork' is not an ANSI C routine and it is not easy to implement on
C systems not having it.

The fact is that I have given up porting some of the backends because
of this 'fork'. As you can see from my comments, I know that there are
good reasons for using it. What I'm asking for is that it is used in
a way that makes it possible to remove (in the snapscan backend there
is code for the case that fork fails).

>Bye
>Oliver

Regards
Svend

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