Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added #define NOSHORTS in order to fix a bug in the csdp library.
[simgrid.git] / include / xbt / str.h
1 /* $Id$ */
2
3 /* str.h - XBT string related functions.                                    */
4
5 /* Copyright (c) 2004-7, Martin Quinson, Arnaud Legrand and  Cherier Malek. */
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 #include "xbt/misc.h"
12
13
14
15 #ifndef XBT_STR_H
16 #define XBT_STR_H
17
18 #if defined(_WIN32)
19 #include <stdio.h>
20 #endif
21
22 SG_BEGIN_DECL()
23
24 XBT_PUBLIC(int) asprintf  (char **ptr, const char *fmt, /*args*/ ...) _XBT_GNUC_PRINTF(2,3);
25 XBT_PUBLIC(int) vasprintf (char **ptr, const char *fmt, va_list ap);
26 XBT_PUBLIC(char*) bprintf   (const char*fmt, ...) _XBT_GNUC_PRINTF(1,2);
27
28 #if defined(_WIN32) || !defined(__GNUC__)
29 XBT_PUBLIC(long) getline(char **lineptr, size_t *n, FILE *stream);
30 #endif
31
32 /* Trim related functions */
33 XBT_PUBLIC(char*) rtrim(char* s, const char* char_list);
34 XBT_PUBLIC(char*) ltrim( char* s, const char* char_list);
35 XBT_PUBLIC(char*) trim(char* s, const char* char_list);
36
37 SG_END_DECL()
38
39 #endif /* XBT_STR_H */
40
41
42
43