Back to index

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

Go to the source code of this file.

Functions

 zip_get_archive_comment (struct zip *za, int *lenp, int flags)

Function Documentation

zip_get_archive_comment ( struct zip za,
int lenp,
int  flags 
)

Definition at line 41 of file zip_get_archive_comment.c.

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