![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
#include "data.h"#include <assert.h>#include <errno.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <sys/stat.h>#include <curl/curl.h>#include "mem.h"#include "util.h"#include "xxhash.h"Data Structures | |
| struct | curl_data_t |
Macros | |
| #define | XXH_STATIC_LINKING_ONLY |
| #define | REGRESSION_RELEASE(x) |
Functions | |
| int | data_has_dict (data_t const *data) |
| data_buffer_t | data_buffer_create (size_t const capacity) |
| data_buffer_t | data_buffer_read (char const *filename) |
| data_buffer_t | data_buffer_get_data (data_t const *data) |
| data_buffer_t | data_buffer_get_dict (data_t const *data) |
| int | data_buffer_compare (data_buffer_t buffer1, data_buffer_t buffer2) |
| void | data_buffer_free (data_buffer_t buffer) |
| FileNamesTable * | data_filenames_get (data_t const *data) |
| data_buffers_t | data_buffers_get (data_t const *data) |
| void | data_buffers_free (data_buffers_t buffers) |
| int | data_init (char const *dir) |
| void | data_finish (void) |
Variables | |
| data_t | silesia |
| data_t | silesia_tar |
| data_t | github |
| data_t | github_tar |
| data_t const *const * | data = (data_t const* const*)g_data |
| #define REGRESSION_RELEASE | ( | x | ) |
Data objects
| #define XXH_STATIC_LINKING_ONLY |
| int data_buffer_compare | ( | data_buffer_t | buffer1, |
| data_buffer_t | buffer2 ) |
Calls memcmp() on the contents [0, size) of both buffers.
| data_buffer_t data_buffer_create | ( | size_t const | capacity | ) |
data buffer helper functions (documented in header).
| void data_buffer_free | ( | data_buffer_t | buffer | ) |
Frees an allocated buffer.
| data_buffer_t data_buffer_get_data | ( | data_t const * | data | ) |
Read the file that data points to into a buffer. NOTE: data must be a file, not a directory.
| data_buffer_t data_buffer_get_dict | ( | data_t const * | data | ) |
Read the dictionary that the data points to into a buffer.
| data_buffer_t data_buffer_read | ( | char const * | filename | ) |
Read the contents of filename into a buffer.
| void data_buffers_free | ( | data_buffers_t | buffers | ) |
Frees the data buffers.
| data_buffers_t data_buffers_get | ( | data_t const * | data | ) |
data buffers helpers.
| FileNamesTable * data_filenames_get | ( | data_t const * | data | ) |
data filenames helpers.
| void data_finish | ( | void | ) |
Must be called at exit to free resources allocated by data_init().
Initializes the data module and downloads the data necessary. Caches the downloads in dir. We add a stamp file in the directory after a successful download. If a stamp file already exists, and matches our current data stamp, we will use the cached data without downloading.
| dir | The directory to cache the downloaded data into. |
| data_t github |
| data_t github_tar |
| data_t silesia |
| data_t silesia_tar |