Here is a patch for new method pdf_fsys_build_path(). I tested it
    on GNU/Linux.

    +...@item ...
    +Variable-length pdf_text_t object list, last element must be NULL.

It is dangerous to rely on the client of the function to terminate the
list with a NULL value: if she forgets about the rule then the results
would be unpredictable.

I think that it would be better to use an explicit parameter with the
number of expected elements:

pdf_status_t pdf_fsys_build_path (pdf_fsys_t filesystem,
                                  pdf_text_t *output,
                                  pdf_size_t num_elements,
                                  pdf_text_t first_element,
                                  ...);

In that way we would still get unpredictable effects if there is a
mismatch between 'num_elements' and the list of elements, but the bug
could be found by inspecting the code.  What do you think?

    Could anyone test it under win32 ?

It compiles with mingw32, so I guess it should be ok.  The tests are
not yet working under wine (I get an error from the check library) but
if it compiles with mingw32 it is enough for now.

--
Jose E. Marchesi    [email protected]
GNU Project         http://www.gnu.org


Reply via email to