mupdf
Toggle main menu visibility
Loading...
Searching...
No Matches
hash.h
Go to the documentation of this file.
1
// Copyright (C) 2004-2021 Artifex Software, Inc.
2
//
3
// This file is part of MuPDF.
4
//
5
// MuPDF is free software: you can redistribute it and/or modify it under the
6
// terms of the GNU Affero General Public License as published by the Free
7
// Software Foundation, either version 3 of the License, or (at your option)
8
// any later version.
9
//
10
// MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY
11
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
13
// details.
14
//
15
// You should have received a copy of the GNU Affero General Public License
16
// along with MuPDF. If not, see <https://www.gnu.org/licenses/agpl-3.0.en.html>
17
//
18
// Alternative licensing terms are available from the licensor.
19
// For commercial licensing, see <https://www.artifex.com/> or contact
20
// Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
21
// CA 94129, USA, for further information.
22
23
#ifndef MUPDF_FITZ_HASH_H
24
#define MUPDF_FITZ_HASH_H
25
26
#include "
mupdf/fitz/system.h
"
27
#include "
mupdf/fitz/context.h
"
28
#include "
mupdf/fitz/output.h
"
29
30
#define FZ_HASH_TABLE_KEY_LENGTH 48
31
43
44
typedef
struct
fz_hash_table
fz_hash_table
;
45
51
typedef
void (
fz_hash_table_drop_fn
)(
fz_context
*ctx,
void
*val);
52
67
fz_hash_table
*
fz_new_hash_table
(
fz_context
*ctx,
int
initialsize,
int
keylen,
int
lock,
fz_hash_table_drop_fn
*drop_val);
68
74
void
fz_drop_hash_table
(
fz_context
*ctx,
fz_hash_table
*table);
75
80
void
*
fz_hash_find
(
fz_context
*ctx,
fz_hash_table
*table,
const
void
*key);
81
92
void
*
fz_hash_insert
(
fz_context
*ctx,
fz_hash_table
*table,
const
void
*key,
void
*val);
93
100
void
fz_hash_remove
(
fz_context
*ctx,
fz_hash_table
*table,
const
void
*key);
101
106
typedef
void (
fz_hash_table_for_each_fn
)(
fz_context
*ctx,
void
*state,
void
*key,
int
keylen,
void
*val);
107
111
void
fz_hash_for_each
(
fz_context
*ctx,
fz_hash_table
*table,
void
*state,
fz_hash_table_for_each_fn
*callback);
112
118
typedef
int (
fz_hash_table_filter_fn
)(
fz_context
*ctx,
void
*state,
void
*key,
int
keylen,
void
*val);
119
124
void
fz_hash_filter
(
fz_context
*ctx,
fz_hash_table
*table,
void
*state,
fz_hash_table_filter_fn
*callback);
125
126
#endif
context.h
fz_hash_table
struct fz_hash_table fz_hash_table
Definition
hash.h:44
fz_new_hash_table
fz_hash_table * fz_new_hash_table(fz_context *ctx, int initialsize, int keylen, int lock, fz_hash_table_drop_fn *drop_val)
fz_hash_find
void * fz_hash_find(fz_context *ctx, fz_hash_table *table, const void *key)
fz_hash_insert
void * fz_hash_insert(fz_context *ctx, fz_hash_table *table, const void *key, void *val)
fz_hash_table_filter_fn
int fz_hash_table_filter_fn(fz_context *ctx, void *state, void *key, int keylen, void *val)
Definition
hash.h:118
fz_hash_for_each
void fz_hash_for_each(fz_context *ctx, fz_hash_table *table, void *state, fz_hash_table_for_each_fn *callback)
fz_drop_hash_table
void fz_drop_hash_table(fz_context *ctx, fz_hash_table *table)
fz_hash_table_drop_fn
void fz_hash_table_drop_fn(fz_context *ctx, void *val)
Definition
hash.h:51
fz_hash_remove
void fz_hash_remove(fz_context *ctx, fz_hash_table *table, const void *key)
fz_hash_filter
void fz_hash_filter(fz_context *ctx, fz_hash_table *table, void *state, fz_hash_table_filter_fn *callback)
fz_hash_table_for_each_fn
void fz_hash_table_for_each_fn(fz_context *ctx, void *state, void *key, int keylen, void *val)
Definition
hash.h:106
output.h
fz_context
Definition
context.h:886
system.h
include
mupdf
fitz
hash.h
Generated by
1.17.0