X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fccan_tokenizer%2Fread_cstring.c;h=d1277ca12315425111ad47c217a1b21fc46c87a3;hp=9a62d0cc5b8c02b171e5b8cc1e56906197298355;hb=f725bbb1987284933e0f21dfb8f2ce7a1f0806e5;hpb=2d98b83701611a4a1d8e9d6874bb560f42cb958c diff --git a/ccan/ccan_tokenizer/read_cstring.c b/ccan/ccan_tokenizer/read_cstring.c index 9a62d0cc..d1277ca1 100644 --- a/ccan/ccan_tokenizer/read_cstring.c +++ b/ccan/ccan_tokenizer/read_cstring.c @@ -11,16 +11,16 @@ static char *strdup_rng(const char *s, const char *e) { //Reads a C string starting at s until quoteChar is found or e is reached // Returns the pointer to the terminating quote character or e if none was found -char *read_cstring(array_char *out, const char *s, const char *e, char quoteChar, tok_message_queue *mq) { +char *read_cstring(darray_char *out, const char *s, const char *e, char quoteChar, tok_message_queue *mq) { const char * const tokstart = s; const char *p; int has_endquote=0, has_newlines=0; //tok_msg_debug(called, s, "Called read_cstring on `%s`", s); - #define append(startptr,endptr) array_append_items(*out, startptr, (endptr)-(startptr)) - #define append_char(theChar) array_append(*out, theChar) - #define append_zero() do {array_append(*out, 0); out->size--;} while(0) + #define append(startptr,endptr) darray_append_items(*out, startptr, (endptr)-(startptr)) + #define append_char(theChar) darray_append(*out, theChar) + #define append_zero() do {darray_append(*out, 0); out->size--;} while(0) p = s; while (p