Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
We need the os threads here
[simgrid.git] / tools / tesh / buff.h
1 /* $Id$ */
2
3 /* buff -- buffers as needed by tesh                                        */
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 TESH_BUFF_H
12 #define TESH_BUFF_H
13
14 #include "portable.h"
15 #include "xbt/sysdep.h"
16 #include "xbt/function_types.h"
17 #include "xbt/log.h"
18 #include "xbt/str.h"
19
20 /**
21  ** Buffer code
22  **/
23 typedef struct {
24   char *data;
25   int used,size;
26 } s_buff_t, *buff_t;
27
28
29 void buff_empty(buff_t b);
30 buff_t buff_new(void);
31 void buff_free(buff_t b);
32 void buff_append(buff_t b, const char *toadd);
33 void buff_chomp(buff_t b);
34 void buff_trim(buff_t b);
35
36 #endif