mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
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:
parent
b69178b067
commit
e61e9244aa
12 changed files with 663 additions and 509 deletions
14
src/strbuf.c
14
src/strbuf.c
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue