Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix the constness of xbt_strbuff_new_from(), it's too dangerous with previous prototype
[simgrid.git] / include / xbt / strbuff.h
index 63be41d..eb1f59f 100644 (file)
@@ -2,8 +2,8 @@
 
 /* strbuff -- string buffers                                                */
 
-/* Copyright (c) 2007 Martin Quinson.                                       */
-/* All rights reserved.                                                     */
+/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
  **/
 typedef struct {
   char *data;
-  int used,size;
+  int used, size;
 } s_xbt_strbuff_t, *xbt_strbuff_t;
 
 
-XBT_PUBLIC(void)          xbt_strbuff_empty(xbt_strbuff_t b);
+XBT_PUBLIC(void) xbt_strbuff_empty(xbt_strbuff_t b);
 XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new(void);
-XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new_from(void);
-XBT_PUBLIC(void)          xbt_strbuff_free(xbt_strbuff_t b);
-XBT_PUBLIC(void)          xbt_strbuff_free_container(xbt_strbuff_t b);
-XBT_PUBLIC(void)          xbt_strbuff_append(xbt_strbuff_t b, const char *toadd);
-XBT_PUBLIC(void)          xbt_strbuff_chomp(xbt_strbuff_t b);
-XBT_PUBLIC(void)          xbt_strbuff_trim(xbt_strbuff_t b);
-XBT_PUBLIC(void)          xbt_strbuff_varsubst(xbt_strbuff_t b, xbt_dict_t patterns);
+XBT_PUBLIC(xbt_strbuff_t) xbt_strbuff_new_from(const char *s);
+XBT_PUBLIC(void) xbt_strbuff_free(xbt_strbuff_t b);
+XBT_PUBLIC(void) xbt_strbuff_free_container(xbt_strbuff_t b);
+XBT_PUBLIC(void) xbt_strbuff_append(xbt_strbuff_t b, const char *toadd);
+XBT_PUBLIC(void) xbt_strbuff_chomp(xbt_strbuff_t b);
+XBT_PUBLIC(void) xbt_strbuff_trim(xbt_strbuff_t b);
+XBT_PUBLIC(void) xbt_strbuff_varsubst(xbt_strbuff_t b,
+                                      xbt_dict_t patterns);
 
 #endif