#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "zlib.h"
#include "gzlog.h"
Go to the source code of this file.
Classes | |
struct | log |
Macros | |
#define | APPEND_OP 1 |
#define | BAIL(n) |
#define | BODY sizeof(log_gzbody) |
#define | COMPRESS_OP 2 |
#define | DICT 32768U |
#define | EXTRA sizeof(log_gzext) /* should be 35 */ |
#define | HEAD sizeof(log_gzhead) /* should be 16 */ |
#define | local static |
#define | LOGID "\106\035\172" /* should be three non-zero characters */ |
#define | MAX_STORE 16 |
#define | NO_OP 0 |
#define | PATIENCE 300 |
#define | PULL2(p) ((p)[0]+((uint)((p)[1])<<8)) |
#define | PULL4(p) (PULL2(p)+((ulong)PULL2(p+2)<<16)) |
#define | PULL8(p) (PULL4(p)+((off_t)PULL4(p+4)<<32)) |
#define | PUT2(p, a) do {(p)[0]=a;(p)[1]=(a)>>8;} while(0) |
#define | PUT4(p, a) do {PUT2(p,a);PUT2(p+2,a>>16);} while(0) |
#define | PUT8(p, a) do {PUT4(p,a);PUT4(p+4,a>>32);} while(0) |
#define | REPLACE_OP 3 |
#define | TRIGGER 1024 |
Typedefs | |
typedef unsigned int | uint |
typedef unsigned long | ulong |
Functions | |
int | gzlog_close (gzlog *logd) |
int | gzlog_compress (gzlog *logd) |
gzlog * | gzlog_open (char *path) |
int | gzlog_write (gzlog *logd, void *data, size_t len) |
int | log_append (struct log *log, unsigned char *data, size_t len) |
int | log_check (struct log *log) |
void | log_close (struct log *log) |
int | log_compress (struct log *log, unsigned char *data, size_t len) |
int | log_head (struct log *log) |
int | log_last (struct log *log, int last) |
int | log_lock (struct log *log) |
void | log_log (struct log *log, int op, char *record) |
int | log_mark (struct log *log, int op) |
int | log_open (struct log *log) |
int | log_recover (struct log *log, int op) |
int | log_replace (struct log *log) |
void | log_touch (struct log *log) |
void | log_unlock (struct log *log) |
Variables | |
unsigned char | log_gzbody [] |
unsigned char | log_gzext [] |
unsigned char | log_gzhead [] |
#define APPEND_OP 1 |
Definition at line 273 of file bloaty/third_party/zlib/examples/gzlog.c.
#define BAIL | ( | n | ) |
Definition at line 254 of file bloaty/third_party/zlib/examples/gzlog.c.
#define BODY sizeof(log_gzbody) |
Definition at line 337 of file bloaty/third_party/zlib/examples/gzlog.c.
#define COMPRESS_OP 2 |
Definition at line 274 of file bloaty/third_party/zlib/examples/gzlog.c.
#define DICT 32768U |
Definition at line 269 of file bloaty/third_party/zlib/examples/gzlog.c.
#define EXTRA sizeof(log_gzext) /* should be 35 */ |
Definition at line 328 of file bloaty/third_party/zlib/examples/gzlog.c.
#define HEAD sizeof(log_gzhead) /* should be 16 */ |
Definition at line 316 of file bloaty/third_party/zlib/examples/gzlog.c.
#define local static |
Definition at line 241 of file bloaty/third_party/zlib/examples/gzlog.c.
#define LOGID "\106\035\172" /* should be three non-zero characters */ |
Definition at line 288 of file bloaty/third_party/zlib/examples/gzlog.c.
#define MAX_STORE 16 |
Definition at line 261 of file bloaty/third_party/zlib/examples/gzlog.c.
#define NO_OP 0 |
Definition at line 272 of file bloaty/third_party/zlib/examples/gzlog.c.
#define PATIENCE 300 |
Definition at line 258 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 278 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 279 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 280 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 283 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 284 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 285 of file bloaty/third_party/zlib/examples/gzlog.c.
#define REPLACE_OP 3 |
Definition at line 275 of file bloaty/third_party/zlib/examples/gzlog.c.
#define TRIGGER 1024 |
Definition at line 266 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 242 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 243 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 1042 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 908 of file bloaty/third_party/zlib/examples/gzlog.c.
gzlog* gzlog_open | ( | char * | path | ) |
Definition at line 865 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 995 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 501 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 384 of file bloaty/third_party/zlib/examples/gzlog.c.
void log_close | ( | struct log * | log | ) |
Definition at line 796 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 608 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 410 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 462 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 348 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 718 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 437 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 813 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 738 of file bloaty/third_party/zlib/examples/gzlog.c.
Definition at line 571 of file bloaty/third_party/zlib/examples/gzlog.c.
void log_touch | ( | struct log * | log | ) |
Definition at line 372 of file bloaty/third_party/zlib/examples/gzlog.c.
void log_unlock | ( | struct log * | log | ) |
Definition at line 396 of file bloaty/third_party/zlib/examples/gzlog.c.
unsigned char log_gzbody[] |
Definition at line 331 of file bloaty/third_party/zlib/examples/gzlog.c.
unsigned char log_gzext[] |
Definition at line 319 of file bloaty/third_party/zlib/examples/gzlog.c.
unsigned char log_gzhead[] |
Definition at line 306 of file bloaty/third_party/zlib/examples/gzlog.c.