Back to index

php5  5.3.10
Functions
zip_get_file_comment.c File Reference
#include "zipint.h"

Go to the source code of this file.

Functions

 zip_get_file_comment (struct zip *za, int idx, int *lenp, int flags)

Function Documentation

zip_get_file_comment ( struct zip za,
int  idx,
int lenp,
int  flags 
)

Definition at line 41 of file zip_get_file_comment.c.

{
    if (idx < 0 || idx >= za->nentry) {
       _zip_error_set(&za->error, ZIP_ER_INVAL, 0);
       return NULL;
    }

    if ((flags & ZIP_FL_UNCHANGED)
       || (za->entry[idx].ch_comment_len == -1)) {
       if (lenp != NULL)
           *lenp = za->cdir->entry[idx].comment_len;
       return za->cdir->entry[idx].comment;
    }
    
    if (lenp != NULL)
       *lenp = za->entry[idx].ch_comment_len;
    return za->entry[idx].ch_comment;
}

Here is the call graph for this function: