Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
I know I'm picky
[simgrid.git] / include / xbt / strbuff.h
1 /* $Id: buff.h 3483 2007-05-07 11:18:56Z mquinson $ */
2
3 /* strbuff -- string buffers                                                */
4
5 /* Copyright (c) 2007 Martin Quinson.                                       */
6 /* All rights reserved.                                                     */
7
8 /* This program is free software; you can redistribute it and/or modify it
9  * under the terms of the license (GNU LGPL) which comes with this package. */
10
11 #ifndef XBT_STRBUFF_H
12 #define XBT_STRBUFF_H
13
14 #include "xbt/sysdep.h"
15 #include "xbt/function_types.h"
16 #include "xbt/log.h"
17 #include "xbt/str.h"
18
19 /**
20  ** Buffer code
21  **/
22 typedef struct {
23   char *data;
24   int used,size;
25 } s_xbt_strbuff_t, *xbt_strbuff_t;
26
27
28 XBT_PUBLIC(void)          xbt_strbuff_empty(xbt_strbuff_t b);
29 XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new(void);
30 XBT_PUBLIC(void)          xbt_strbuff_free(xbt_strbuff_t b);
31 XBT_PUBLIC(void)          xbt_strbuff_append(xbt_strbuff_t b, const char *toadd);
32 XBT_PUBLIC(void)          xbt_strbuff_chomp(xbt_strbuff_t b);
33 XBT_PUBLIC(void)          xbt_strbuff_trim(xbt_strbuff_t b);
34
35 #endif