[GRASS5] DB default settings now defined in new mapset

Paul Kelly paul-grass at stjohnspoint.co.uk
Tue Oct 18 11:36:13 EDT 2005


On Tue, 18 Oct 2005, Markus Neteler wrote:

>> I think creat() only returns a file descriptor. But fprintf and fclose
>> have a stream as their first argument. So you need to call fdopen() to
>> derive a stream from the file descriptor returned by creat. I think. But
>> why not just do it all in one step with fopen() instead of creat(). I have
>> never seen creat() used like that.
>
> I was looking at lock.c in the same directory. Maybe it's wrong
> as well?

I had a look and it uses write() instead of fprintf(). So that will work 
with creat(). 
I have no idea why it's written like that. Maybe faster.

Paul




More information about the grass-dev mailing list