php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
cdb_make.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Marcus Boerger <helly@php.net> |
14 +----------------------------------------------------------------------+
15 */
16
17/* incorporated from D.J.Bernstein's cdb-0.75 (http://cr.yp.to/cdb.html)*/
18
19#ifndef CDB_MAKE_H
20#define CDB_MAKE_H
21
22#include <stdio.h>
23#include "uint32.h"
24
25#define CDB_HPLIST 1000
26
27struct cdb_hp {
30};
31
32struct cdb_hplist {
35 int num;
36} ;
37
38struct cdb_make {
39 /* char bspace[8192]; */
40 char final[2048];
44 struct cdb_hp *split; /* includes space for hash */
45 struct cdb_hp *hash;
47 /* buffer b; */
49 /* int fd; */
51};
52
53int cdb_make_start(struct cdb_make *, php_stream *);
54int cdb_make_addbegin(struct cdb_make *, unsigned int, unsigned int);
55int cdb_make_addend(struct cdb_make *, unsigned int, unsigned int, uint32);
56int cdb_make_add(struct cdb_make *, char *, unsigned int, char *, unsigned int);
57int cdb_make_finish(struct cdb_make *);
58const char *cdb_make_version(void);
59
60#endif
int cdb_make_finish(struct cdb_make *)
Definition cdb_make.c:136
const char * cdb_make_version(void)
Definition cdb_make.c:239
#define CDB_HPLIST
Definition cdb_make.h:25
int cdb_make_addend(struct cdb_make *, unsigned int, unsigned int, uint32)
Definition cdb_make.c:74
int cdb_make_add(struct cdb_make *, char *, unsigned int, char *, unsigned int)
Definition cdb_make.c:123
int cdb_make_addbegin(struct cdb_make *, unsigned int, unsigned int)
Definition cdb_make.c:102
int cdb_make_start(struct cdb_make *, php_stream *)
Definition cdb_make.c:57
#define uint32
Definition lsapilib.c:92
struct _php_stream php_stream
Definition php_streams.h:96
uint32 h
Definition cdb_make.h:28
uint32 p
Definition cdb_make.h:29
struct cdb_hplist * next
Definition cdb_make.h:34
struct cdb_hp hp[CDB_HPLIST]
Definition cdb_make.h:33
struct cdb_hp * split
Definition cdb_make.h:44
struct cdb_hp * hash
Definition cdb_make.h:45
uint32 start[256]
Definition cdb_make.h:42
php_stream * fp
Definition cdb_make.h:50
uint32 pos
Definition cdb_make.h:48
uint32 numentries
Definition cdb_make.h:46
struct cdb_hplist * head
Definition cdb_make.h:43
uint32 count[256]
Definition cdb_make.h:41