summaryrefslogblamecommitdiffstats
path: root/helper.h
blob: 838078f571205670303f61f2355c18f635bb4259 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                                               
                                                       













                                               
#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_printpal(struct PartialAttributeList *pal);
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