A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
document the strbuf
[simgrid.git]
/
src
/
xbt
/
xbt_strbuff.c
diff --git
a/src/xbt/xbt_strbuff.c
b/src/xbt/xbt_strbuff.c
index
b73f511
..
0780895
100644
(file)
--- a/
src/xbt/xbt_strbuff.c
+++ b/
src/xbt/xbt_strbuff.c
@@
-12,12
+12,14
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(strbuff, xbt, "String buffers");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(strbuff, xbt, "String buffers");
+/** @brief Remove any content from the buffer */
inline void xbt_strbuff_empty(xbt_strbuff_t b)
{
b->used = 0;
b->data[0] = '\0';
}
inline void xbt_strbuff_empty(xbt_strbuff_t b)
{
b->used = 0;
b->data[0] = '\0';
}
+/** @brief Constructor */
xbt_strbuff_t xbt_strbuff_new(void)
{
xbt_strbuff_t res = xbt_malloc(sizeof(s_xbt_strbuff_t));
xbt_strbuff_t xbt_strbuff_new(void)
{
xbt_strbuff_t res = xbt_malloc(sizeof(s_xbt_strbuff_t));
@@
-54,6
+56,7
@@
inline void xbt_strbuff_free(xbt_strbuff_t b)
}
}
}
}
+/** @brief Adds some content at the end of the buffer */
void xbt_strbuff_append(xbt_strbuff_t b, const char *toadd)
{
int addlen;
void xbt_strbuff_append(xbt_strbuff_t b, const char *toadd)
{
int addlen;