summaryrefslogtreecommitdiff
path: root/src/data_count.c
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
commit8b2630a82fbecfd57fa38aebb397a755936690e5 (patch)
treea9cfcd7bb5bea87d63fc8ef81c8456a130a249bc /src/data_count.c
parente57c8295ebe92b58ca3e68fa8ea8f70d4b0b4cee (diff)
downloadlighttpd-master.tar.gz
add README to point to lighttpd-1.4.x as stableHEADmaster
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@3041 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/data_count.c')
-rw-r--r--src/data_count.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/data_count.c b/src/data_count.c
deleted file mode 100644
index 5c5a5f06..00000000
--- a/src/data_count.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "array.h"
-
-static data_unset *data_count_copy(const data_unset *s) {
- data_count *src = (data_count *)s;
- data_count *ds = data_count_init();
-
- buffer_copy_string_buffer(ds->key, src->key);
- ds->count = src->count;
- ds->is_index_key = src->is_index_key;
- return (data_unset *)ds;
-}
-
-static void data_count_free(data_unset *d) {
- data_count *ds = (data_count *)d;
-
- buffer_free(ds->key);
-
- free(d);
-}
-
-static void data_count_reset(data_unset *d) {
- data_count *ds = (data_count *)d;
-
- buffer_reset(ds->key);
-
- ds->count = 0;
-}
-
-static int data_count_insert_dup(data_unset *dst, data_unset *src) {
- data_count *ds_dst = (data_count *)dst;
- data_count *ds_src = (data_count *)src;
-
- ds_dst->count += ds_src->count;
-
- src->free(src);
-
- return 0;
-}
-
-static void data_count_print(const data_unset *d, int depth) {
- data_count *ds = (data_count *)d;
- UNUSED(depth);
-
- fprintf(stdout, "count(%d)", ds->count);
-}
-
-
-data_count *data_count_init(void) {
- data_count *ds;
-
- ds = calloc(1, sizeof(*ds));
-
- ds->key = buffer_init();
- ds->count = 1;
-
- ds->copy = data_count_copy;
- ds->free = data_count_free;
- ds->reset = data_count_reset;
- ds->insert_dup = data_count_insert_dup;
- ds->print = data_count_print;
- ds->type = TYPE_COUNT;
-
- return ds;
-}