complete implementation of the command line

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@65 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2004-07-14 21:52:41 +00:00
parent b69178b067
commit e61e9244aa
12 changed files with 663 additions and 509 deletions

View file

@ -5,6 +5,8 @@
#include <stdarg.h>
#include <stdio.h>
#include "strbuf.h"
struct chunk {
struct chunk *next;
size_t length;
@ -63,11 +65,17 @@ char *pa_strbuf_tostring_free(struct pa_strbuf *sb) {
}
void pa_strbuf_puts(struct pa_strbuf *sb, const char *t) {
struct chunk *c;
size_t l;
assert(sb && t);
pa_strbuf_putsn(sb, t, strlen(t));
}
l = strlen(t);
void pa_strbuf_putsn(struct pa_strbuf *sb, const char *t, size_t l) {
struct chunk *c;
assert(sb && t);
if (!l)
return;
c = malloc(sizeof(struct chunk)+l);
assert(c);