mirror of https://github.com/getdnsapi/getdns.git
Updating coding style for context.c/h
This commit is contained in:
parent
f8380ff862
commit
74fcc3c81b
|
@ -28,19 +28,35 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <event2/event.h>
|
||||
#include <ldns/ldns.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "context.h"
|
||||
#include "util-internal.h"
|
||||
#include "types-internal.h"
|
||||
#include <ldns/ldns.h>
|
||||
#include <event2/event.h>
|
||||
#include <unbound.h>
|
||||
#include <unbound-event.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unbound.h>
|
||||
|
||||
/* stuff to make it compile pedantically */
|
||||
#include "context.h"
|
||||
#include "types-internal.h"
|
||||
#include "util-internal.h"
|
||||
|
||||
/* Private functions */
|
||||
static uint16_t *create_default_namespaces();
|
||||
static struct getdns_list *create_default_root_servers();
|
||||
static getdns_return_t add_ip_str(getdns_dict *);
|
||||
static struct getdns_dict *create_ipaddr_dict_from_rdf(ldns_rdf *);
|
||||
static struct getdns_list *create_from_ldns_list(ldns_rdf **, size_t);
|
||||
static getdns_return_t set_os_defaults(getdns_context_t);
|
||||
static int transaction_id_cmp(const void *, const void *);
|
||||
static void set_ub_string_opt(getdns_context_t, char *, char *);
|
||||
static void set_ub_number_opt(getdns_context_t, char *, uint16_t);
|
||||
static inline void clear_resolution_type_set_flag(getdns_context_t, uint16_t);
|
||||
static void dispatch_updated(getdns_context_t, uint16_t);
|
||||
static void cancel_dns_req(getdns_dns_req *);
|
||||
|
||||
/* Stuff to make it compile pedantically */
|
||||
#define UNUSED_PARAM(x) ((void)(x))
|
||||
|
||||
/**
|
||||
|
@ -210,7 +226,7 @@ transaction_id_cmp(const void *id1, const void *id2)
|
|||
/*
|
||||
* getdns_context_create
|
||||
*
|
||||
* call this to initialize the context that is used in other getdns calls
|
||||
* Call this to initialize the context that is used in other getdns calls.
|
||||
*/
|
||||
getdns_return_t
|
||||
getdns_context_create(getdns_context_t * context, int set_from_os)
|
||||
|
@ -279,8 +295,8 @@ getdns_context_create(getdns_context_t * context, int set_from_os)
|
|||
/*
|
||||
* getdns_context_destroy
|
||||
*
|
||||
* call this to dispose of resources associated with a context once you
|
||||
* are done with it
|
||||
* Call this to dispose of resources associated with a context once you
|
||||
* are done with it.
|
||||
*/
|
||||
void
|
||||
getdns_context_destroy(getdns_context_t context)
|
||||
|
|
|
@ -33,16 +33,15 @@
|
|||
#include <getdns/getdns.h>
|
||||
|
||||
struct event_base;
|
||||
struct ub_ctx;
|
||||
struct ldns_rbtree_t;
|
||||
struct getdns_dns_req;
|
||||
struct ldns_rbtree_t;
|
||||
struct ub_ctx;
|
||||
|
||||
/** function pointer typedefs */
|
||||
typedef void (*getdns_update_callback) (getdns_context_t context,
|
||||
uint16_t changed_item);
|
||||
typedef void *(*getdns_memory_allocator) (size_t size);
|
||||
typedef void (*getdns_update_callback) (getdns_context_t, uint16_t);
|
||||
typedef void *(*getdns_memory_allocator) (size_t);
|
||||
typedef void (*getdns_memory_deallocator) (void *);
|
||||
typedef void *(*getdns_memory_reallocator) (void *ptr, size_t size);
|
||||
typedef void *(*getdns_memory_reallocator) (void *, size_t);
|
||||
|
||||
struct getdns_context_t
|
||||
{
|
||||
|
@ -106,4 +105,4 @@ getdns_return_t getdns_context_clear_outbound_request(struct getdns_dns_req
|
|||
getdns_return_t getdns_context_cancel_request(getdns_context_t context,
|
||||
getdns_transaction_t transaction_id, int fire_callback);
|
||||
|
||||
#endif
|
||||
#endif /* _GETDNS_CONTEXT_H_ */
|
||||
|
|
Loading…
Reference in New Issue