php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
flatfile.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#ifndef PHP_LIB_FLATFILE_H
18#define PHP_LIB_FLATFILE_H
19
20typedef struct {
21 char *dptr;
22 size_t dsize;
23} datum;
24
32
33#define FLATFILE_INSERT 1
34#define FLATFILE_REPLACE 0
35
36int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode);
37datum flatfile_fetch(flatfile *dba, datum key_datum);
38int flatfile_delete(flatfile *dba, datum key_datum);
39int flatfile_findkey(flatfile *dba, datum key_datum);
42const char *flatfile_version(void);
43
44#endif
int flatfile_findkey(flatfile *dba, datum key_datum)
Definition flatfile.c:152
int flatfile_delete(flatfile *dba, datum key_datum)
Definition flatfile.c:101
datum flatfile_fetch(flatfile *dba, datum key_datum)
Definition flatfile.c:82
datum flatfile_firstkey(flatfile *dba)
Definition flatfile.c:194
datum flatfile_nextkey(flatfile *dba)
Definition flatfile.c:236
int flatfile_store(flatfile *dba, datum key_datum, datum value_datum, int mode)
Definition flatfile.c:47
const char * flatfile_version(void)
Definition flatfile.c:279
char * mode
struct _php_stream php_stream
Definition php_streams.h:96
char * dptr
Definition flatfile.h:21
size_t dsize
Definition flatfile.h:22
php_stream * fp
Definition flatfile.h:28
datum nextkey
Definition flatfile.h:30
char * lockfn
Definition flatfile.h:26
int lockfd
Definition flatfile.h:27
size_t CurrentFlatFilePos
Definition flatfile.h:29