Thread
Thread Index
- Re: zipint.h missing in debian package, (continued)
Message
On Jun 17, 2010, at 12:16, Pierre Joye wrote:
> zipint.h is required as of now. I don't think it is very clean, zip.h
> should expose all we need to use the library and leave private
> definitions in zipint.h.
Exactly. zipint.h is an internal header with details that should not be
exposed to libzip users.
The contents of struct zip are private to libzip.
An application using libzip does not need to know them, nor the size of it.
If you want a struct zip, you call zip_open (or one of its variants), which
allocates and initializes it for you. If you want to add a file to a zip
archive from a buffer, you open (or create) the archive with zip_open, and pass
the returned struct zip pointer as the first argument to zip_source_buffer.
> Right now it is mixed and zipint.h should be
> distributed as well.
Why do you think so? What are you missing from zip.h?
> On Thu, Jun 17, 2010 at 11:33 AM, Claudio_Unige
> <claudiounige%gmail.com@localhost> wrote:
>>
>>
>> On Thu, Jun 17, 2010 at 11:29 AM, Pierre Joye
>> <pierre.php%gmail.com@localhost> wrote:
>>>
>>> hi,
>>>
>>> On Thu, Jun 17, 2010 at 10:45 AM, Claudio_Unige
>>> <claudiounige%gmail.com@localhost>
>>> wrote:
>>>> Hi,
>>>>
>>>> I am using libzip-dev package for my distribution but when I try
>>>> buillding
>>>> he cannot find the definition of the struct zip. I found in the source
>>>> it is
>>>> defined in zipint.h but that header is not present in my system's
>>>> include
>>>> folder.
>>>>
>>>> Is there a missing dependency I dont know of?
>>>
>>> That's an internal header only used to build libzip. To use libzip,
>>> only the zip.h should be used.
>>>
>>> Cheers,
>>> --
>>> Pierre
>>>
>>> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>>
>> Hi, thanks for the answer, but I cannot open a zip file because I cannot
>> create a struct zip on the stack to pass to zip_source_buffer. gcc says that
>> "error: storage size of ‘arc’ isn’t known" also in zip.h there is struct
>> zip; but there is no declaration of the structure and its contents.
>>
>> Maybe I misunderstood how to use zip_source_buffer, how would you use it?
>>
>> -Claudio
>>
>>
>
>
>
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
Made by MHonArc.
|