[Zlib-devel] Some questions about gz* functions

niXman i.nixman at gmail.com
Wed Feb 8 14:17:00 EST 2012


2012/2/8 Török Edwin <edwintorok at gmail.com>:
>
> Isn't fopen() C89?
I don`t know.


>
> Anyway I don't see a point in changing the gz interfaces, one can always use fileno()/fdopen() if they want to interact
> with FILE*.
I implemented IO-API abstraction. Now gz* functions can use both
fopen/fclose/fread/fwrite/fseek, and
libssh2_sftp_open/libssh2_sftp_close/libssh2_sftp_read/libssh2_sftp_write/libssh2_sftp_seek,
and any other functions implementing their behavior.
This was the idea consisted of - to abstract gz* functions from IO
functions. So I replace 'int fd' to 'void * fp' for point to a FILE*
and LIBSSH2_SFTP_HANDLE*
As an alternative, 'int fd' may be replaced by 'union {int fd; void * fp;};' ...

ps
sorry for my bad English.

>
> Best regards,
> --Edwin
>
> _______________________________________________
> Zlib-devel mailing list
> Zlib-devel at madler.net
> http://mail.madler.net/mailman/listinfo/zlib-devel_madler.net




More information about the Zlib-devel mailing list