This file is indexed.

/usr/include/zzip/mmapped.h is in libzzip-dev 0.13.62-3.1ubuntu0.18.04.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#ifndef _ZZIP_MMAPPED_H_
#define _ZZIP_MMAPPED_H_
/*
 * NOTE: this is part of libzzipmmapped (i.e. it is not libzzip).
 *
 * simplified zip disk access using a mmapping of the whole archive.
 *
 * Author:
 *      Guido Draheim <guidod@gmx.de>
 *
 * Copyright (c) 2003,2004 Guido Draheim
 *          All rights reserved,
 *          use under the restrictions of the
 *          Lesser GNU General Public License
 *          or alternatively the restrictions
 *          of the Mozilla Public License 1.1
 */


#include <zzip/types.h>

#ifdef _ZZIP_DISK_FILE_STRUCT
#include <zlib.h> /* z_stream */
#endif

#ifdef __cplusplus
extern "C" {
#endif

typedef struct zzip_disk_file  ZZIP_DISK_FILE;
typedef struct zzip_disk       ZZIP_DISK;
/*  def struct zzip_disk_entry ZZIP_DISK_ENTRY; */

/* we expose this structure so third party applications can augment
 * on them. The mmapped zip access usually just needs the two pointers
 * specifying the mmapped area, whereever you have that from.
 */
struct zzip_disk
{
    zzip_byte_t* buffer; /* start of mmapped area, the base of all seekvals */
    zzip_byte_t* endbuf; /* end of mmapped area, i.e. buffer + buflen */
    void* reserved;    /* - for later extensions (might be renamed) */
    void* user;        /* - free for applications (use this!) */
    long  flags;       /* bit 0: findfile searches case-insensitive */
    long  mapped;      /* used for mmap() wrappers of zzip/__mmap.h */
    long  unused;      /* - for later extensions (might be renamed) */
    long  code;        /* - free for applications (use this!) */
};

/* fnmatch search shall be case insensitive */
#define ZZIP_DISK_FLAGS_MATCH_NOCASE 1
#define ZZIP_DISK_FLAGS_OWNED_BUFFER 2

typedef int (*zzip_strcmp_fn_t)(char*, char*);
typedef int (*zzip_fnmatch_fn_t)(char*, char*, int);

#define zzip_disk_extern extern

zzip_disk_extern int
zzip_disk_init(ZZIP_DISK* disk, void* buffer, zzip_size_t buflen);

zzip_disk_extern zzip__new__ ZZIP_DISK*
zzip_disk_new(void);

zzip_disk_extern zzip__new__ ZZIP_DISK*
zzip_disk_mmap(int fd);

zzip_disk_extern int
zzip_disk_munmap(ZZIP_DISK* disk);

zzip_disk_extern zzip__new__ ZZIP_DISK*
zzip_disk_open(char* filename);

zzip_disk_extern zzip__new__ ZZIP_DISK *
zzip_disk_buffer(void *buffer, size_t buflen);

zzip_disk_extern int
zzip_disk_close(ZZIP_DISK* disk);


zzip_disk_extern ZZIP_DISK_ENTRY*
zzip_disk_findfirst(ZZIP_DISK* disk);

zzip_disk_extern ZZIP_DISK_ENTRY*
zzip_disk_findnext(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry);

zzip_disk_extern zzip__new__ char*
zzip_disk_entry_strdup_name(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry);
zzip_disk_extern zzip__new__ char*
zzip_disk_entry_strdup_comment(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry);
zzip_disk_extern struct zzip_file_header*
zzip_disk_entry_to_file_header(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry);
zzip_disk_extern zzip_byte_t*
zzip_disk_entry_to_data(ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry);

zzip_disk_extern ZZIP_DISK_ENTRY*
zzip_disk_findfile(ZZIP_DISK* disk,
		   char* filename, ZZIP_DISK_ENTRY* after,
		   zzip_strcmp_fn_t compare);
zzip_disk_extern ZZIP_DISK_ENTRY*
zzip_disk_findmatch(ZZIP_DISK* disk,
		    char* filespec, ZZIP_DISK_ENTRY* after,
		    zzip_fnmatch_fn_t compare, int flags);


zzip_disk_extern zzip__new__ ZZIP_DISK_FILE*
zzip_disk_entry_fopen (ZZIP_DISK* disk, ZZIP_DISK_ENTRY* entry);

zzip_disk_extern zzip__new__ ZZIP_DISK_FILE*
zzip_disk_fopen (ZZIP_DISK* disk, char* filename);

zzip_disk_extern _zzip_size_t
zzip_disk_fread (void* ptr, _zzip_size_t size, _zzip_size_t nmemb,
		 ZZIP_DISK_FILE* file);
zzip_disk_extern int
zzip_disk_fclose (ZZIP_DISK_FILE* file);
int
zzip_disk_feof (ZZIP_DISK_FILE* file);

#ifdef _ZZIP_DISK_FILE_STRUCT
/**
 * typedef struct zzip_disk_file ZZIP_DISK_FILE;
 */
struct zzip_disk_file
{
    zzip_byte_t* buffer;               /* fopen disk->buffer */
    zzip_byte_t* endbuf;               /* fopen disk->endbuf */
    zzip_size_t avail;                 /* memorized for checks on EOF */
    z_stream zlib;                     /* for inflated blocks */
    zzip_byte_t* stored;               /* for stored blocks */
};
#endif

#ifdef __cplusplus
}
#endif
#endif