summaryrefslogtreecommitdiff
path: root/src/sbuf.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2004-10-05 20:57:31 +0000
committersabetts <sabetts>2004-10-05 20:57:31 +0000
commita2aeb8461a435621330a692998237f259c356640 (patch)
treefac0c7b51d71fae0f6c1863c03a7bbee9e96e335 /src/sbuf.c
parentf4db5f65334718728090283acbb5b99f4895a469 (diff)
downloadratpoison-a2aeb8461a435621330a692998237f259c356640.zip
* src/actions.c (cmd_unsetenv): add an '=' to the string passed to
putenv.
Diffstat (limited to 'src/sbuf.c')
-rw-r--r--src/sbuf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/sbuf.c b/src/sbuf.c
index c28eed8..52af83e 100644
--- a/src/sbuf.c
+++ b/src/sbuf.c
@@ -53,6 +53,21 @@ sbuf_free (struct sbuf *b)
}
}
+/* Free the structure but return the string. */
+char *
+sbuf_free_struct (struct sbuf *b)
+{
+ if (b != NULL)
+ {
+ char *tmp;
+ tmp = b->data;
+ free (b);
+ return tmp;
+ }
+
+ return NULL;
+}
+
char *
sbuf_concat (struct sbuf *b, const char *str)
{