[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] return type of pdf_fsys_file_set_mode ?
From: |
jemarch |
Subject: |
Re: [pdf-devel] return type of pdf_fsys_file_set_mode ? |
Date: |
Fri, 18 Dec 2009 14:16:07 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.92 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Hi Scott.
The documentation suggests that pdf_fsys_file_set_mode(...) should
return type "enum pdf_fsys_file_mode_e"
pdf-fsys.h is conflicted on the topic -- with the prototype returning
pdf_status_t, but with the function-pointer prototype returning the enum.
The disk implementation returns pdf_status_t
Could someone please clarify?
It is a bug in the reference manual. The prototype using the
File Interface is:
-- Function: pdf_status_t pdf_fsys_file_set_mode (pdf_fsys_file_t
FILE, enum pdf_fsys_file_mode_e NEW_MODE)
Update the mode of a given open file.
while the callback called by the is:
-- Data Type: enum pdf_fsys_file_mode_e (*pdf_fsys_file_set_mode_fn_t)
(pdf_fsys_file_t FILE, enum pdf_fsys_file_mode_e NEW_MODE)
Filesystem callback used to update the mode of a given open file
with a given set of file modes.
This callback is called by the `pdf_fsys_file_set_mode' file
interface function.
The code of the filesystem module is doing the right thing despite the
error in the documentation, but in the definition of the type
pdf_fsys_file_set_mode_fn_t.
I just pushed a fix for both the reference manual and pdf-fsys.h, so
everything should be coherent now.
--
Jose E. Marchesi address@hidden
GNU Project http://www.gnu.org