From c19823f72c01c6046b161a372998ab0478459424 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 20 Apr 2006 15:58:03 +0000 Subject: gestion de buffer a taille variable pour eliminer les pbs de taille static dans le code --- src/ivybuffer.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/ivybuffer.h (limited to 'src/ivybuffer.h') diff --git a/src/ivybuffer.h b/src/ivybuffer.h new file mode 100644 index 0000000..86c5474 --- /dev/null +++ b/src/ivybuffer.h @@ -0,0 +1,39 @@ +/* + * Ivy, C interface + * + * Copyright 1997-2000 + * Centre d'Etudes de la Navigation Aerienne + * + * Sockets + * + * Authors: Francois-Regis Colin + * + * $Id$ + * + * Please refer to file version.h for the + * copyright notice regarding this software + */ + +#ifndef IVYBUFFER_H +#define IVYBUFFER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +typedef struct { + char * data; + int size; + int offset; + } IvyBuffer; +/* utility fonction do make vsprintf without buffer limit */ +extern int make_message(IvyBuffer * buffer, const char *fmt, va_list ap); +extern int make_message_var(IvyBuffer* buffer, const char *fmt, ...); + +#ifdef __cplusplus +} +#endif + +#endif + -- cgit v1.1