summaryrefslogblamecommitdiffstats
path: root/helper.h
blob: 840813d18cfe6d68baa09d61b762f08e042b5a3b (plain) (tree)


























                                                                                               
#ifndef _HELPER_H_
#define _HELPER_H_

#include "types.h"
#include "ldap.h"

void bail(char *args, ...);
int helper_realloc(char **memory, size_t *curSize, const size_t newSize, const char *location);
int helper_connect4(char *address, int port, char *ip);
void helper_nonblock(const int fd);

void helper_printava(struct AttributeValueAssertion* a,const char* rel);
void helper_printal(struct AttributeDescriptionList* a);
void helper_printfilter(struct Filter* f);

static inline int min(const int a, const int b)
{
	return a < b ? a : b;
}

static inline int max(const int a, const int b)
{
	return a > b ? a : b;
}

#endif