#include <stdio.h>
Include dependency graph for dump.h:
Go to the source code of this file.
Defines | |
#define | DUMP_COMMENT_LEN 80 |
Maximum lenght of comments in section header. | |
#define | DUMP_MAGIC "Verball dump v." |
Magic of section. | |
#define | DUMP_MAGIC_LEN 16 |
Lenght of magic. | |
#define | DUMP_NODE_PREV -4 |
Flag for nodes not changed from previous dumped statement. | |
#define | DUMP_SECTIONS 20 |
Maximum number of sections in dump. | |
#define | DUMP_VERSION 0x42302e31 |
Version of dump. | |
Typedefs | |
typedef _dump_desc | DumpDesc |
Descriptor of dump file. | |
typedef _dump_header | DumpHeader |
Header of section. | |
Enumerations | |
enum | DumpSection { DUMP_STMTS = 48, DUMP_NHVS = 49, DUMP_INDEX = 50, DUMP_LOG = 57 } |
Type of section. More... | |
enum | DumpStatus { DUMP_WRITE, DUMP_READ, DUMP_SECTION, DUMP_ERROR } |
Status of descriptor. More... | |
Functions | |
int | dump_begin_section (DumpDesc *d, DumpSection type) |
Writes to dump section header. | |
int | dump_close (DumpDesc *d) |
Close and free Descriptor. | |
int | dump_end_section (DumpDesc *d) |
Fills section header. | |
FILE * | dump_goto (DumpDesc *d, DumpSection sec) |
Seek to some section. | |
FILE * | dump_log_end (DumpDesc *d) |
Seek to the end of dump file. | |
DumpDesc * | dump_read (char *path) |
Reads dump file and inits Descriptor. | |
FILE * | dump_stream (DumpDesc *d) |
Get FILE* pointer from Descriptor. | |
DumpDesc * | dump_write (char *path) |
Creates dump file and inits Descriptor. |
This file define interface to read and write dump file, and its sections. Sections headers are human-readable for now (Ver. 'A').
|
Maximum lenght of comments in section header.
|
|
Magic of section.
|
|
Lenght of magic.
|
|
Flag for nodes not changed from previous dumped statement.
|
|
Maximum number of sections in dump.
|
|
Version of dump.
|
|
Descriptor of dump file.
|
|
Header of section.
|
|
Type of section.
|
|
Status of descriptor.
|
|
Writes to dump section header.
|
|
Close and free Descriptor.
|
|
Fills section header. Fills len field of section header. |
|
Seek to some section.
|
|
Seek to the end of dump file.
|
|
Reads dump file and inits Descriptor. This function checks file headers.
|
|
Get FILE* pointer from Descriptor.
|
|
Creates dump file and inits Descriptor.
|