Module: xenomai-forge
Branch: next
Commit: 287efaa1f068685ec89449dd87941f9b09abe3d0
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=287efaa1f068685ec89449dd87941f9b09abe3d0

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue May 27 07:29:31 2014 +0200

copperplate/registry: add fsobstack_grow_string(), fsobstack_grow_char()

---

 include/copperplate/registry-obstack.h |    6 ++++++
 lib/copperplate/registry.c             |   10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/include/copperplate/registry-obstack.h 
b/include/copperplate/registry-obstack.h
index 645fa61..fe192fa 100644
--- a/include/copperplate/registry-obstack.h
+++ b/include/copperplate/registry-obstack.h
@@ -56,6 +56,12 @@ struct syncobj;
 extern "C" {
 #endif
 
+void fsobstack_grow_string(struct fsobstack *o,
+                          const char *s);
+
+void fsobstack_grow_char(struct fsobstack *o,
+                        char c);
+
 int fsobstack_grow_format(struct fsobstack *o,
                          const char *fmt, ...);
 
diff --git a/lib/copperplate/registry.c b/lib/copperplate/registry.c
index 4e91b8d..01fe3e3 100644
--- a/lib/copperplate/registry.c
+++ b/lib/copperplate/registry.c
@@ -834,6 +834,16 @@ int fsobstack_grow_format(struct fsobstack *o, const char 
*fmt, ...)
        return -ENOMEM;
 }
 
+void fsobstack_grow_string(struct fsobstack *o, const char *s)
+{
+       obstack_grow(&o->obstack, s, strlen(s));
+}
+
+void fsobstack_grow_char(struct fsobstack *o, char c)
+{
+       obstack_1grow(&o->obstack, c);
+}
+
 int fsobstack_grow_file(struct fsobstack *o, const char *path)
 {
        int len = 0;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to