jabberd2  2.3.4
Macros | Functions
serial.c File Reference
#include "util.h"

Go to the source code of this file.

Macros

#define BLOCKSIZE   1024
 
#define SER_SAFE(blocks, size, len)   if((size) > len) len = _ser_realloc((void**)&(blocks),(size));
 this is the safety check used to make sure there's always enough mem More...
 

Functions

int ser_string_get (char **dest, int *source, const char *buf, int len)
 
int ser_int_get (int *dest, int *source, const char *buf, int len)
 
static int _ser_realloc (void **oblocks, int len)
 internal: do and return the math and ensure it gets realloc'd More...
 
void ser_string_set (const char *source, int *dest, char **buf, int *len)
 
void ser_int_set (int source, int *dest, char **buf, int *len)
 

Macro Definition Documentation

#define BLOCKSIZE   1024

Definition at line 91 of file serial.c.

Referenced by _ser_realloc().

#define SER_SAFE (   blocks,
  size,
  len 
)    if((size) > len) len = _ser_realloc((void**)&(blocks),(size));

this is the safety check used to make sure there's always enough mem

Definition at line 109 of file serial.c.

Referenced by ser_int_set(), and ser_string_set().

Function Documentation

int ser_string_get ( char **  dest,
int *  source,
const char *  buf,
int  len 
)

Definition at line 35 of file serial.c.

int ser_int_get ( int *  dest,
int *  source,
const char *  buf,
int  len 
)

Definition at line 58 of file serial.c.

static int _ser_realloc ( void **  oblocks,
int  len 
)
static

internal: do and return the math and ensure it gets realloc'd

Definition at line 94 of file serial.c.

References BLOCKSIZE.

void ser_string_set ( const char *  source,
int *  dest,
char **  buf,
int *  len 
)

Definition at line 111 of file serial.c.

References SER_SAFE.

void ser_int_set ( int  source,
int *  dest,
char **  buf,
int *  len 
)

Definition at line 125 of file serial.c.

References SER_SAFE.