s5curl_global_init - global initialisation for slow5curl
int s5curl_global_init()
The s5curl_global_init()
function sets up the program environment for s5curl. This must be called once before all s5curl orperations are peformed.
Every s5curl_global_init()
should be followed by a corresponding s5curl_global_cleanup()
function when all s5curl operations are completed.
Upon successful completion, s5curl_global_init()
returns a non negative integer (>=0). Otherwise, a negative value is returned that indicates the error.
S5CURL_ERR_CURL
Failed to initialise CURL global resrouces.#include <slow5curl/s5curl.h>
int main () {
int ret = s5curl_global_init();
if (ret < 0) {
fprintf(stderr, "Error initialising global resources\n");
exit(EXIT_FAILURE);
}
// s5curl operations
s5curl_global_cleanup();
}