# HG changeset patch # User Matti Hamalainen # Date 1403370068 -10800 # Node ID 46fcab5ff44e19893a1578dc78ad3d643f0b5d08 # Parent 005d7a0351b613787e733fdd6b376c2b5412ab7e Use the new th_growbuf module. diff -r 005d7a0351b6 -r 46fcab5ff44e Makefile.gen --- a/Makefile.gen Sat Jun 21 06:38:54 2014 +0300 +++ b/Makefile.gen Sat Jun 21 20:01:08 2014 +0300 @@ -18,7 +18,7 @@ # Objects # THLIBS_A=$(OBJPATH)thlibs.a -THLIBS_OBJ=th_util.o th_string.o th_args.o th_ioctx.o th_config.o th_network.o +THLIBS_OBJ=th_util.o th_string.o th_args.o th_ioctx.o th_config.o th_network.o th_growbuf.o NNCHAT_OBJ=main.o util.o ui.o NNCHAT_BIN=$(BINPATH)nnchat$(EXEEXT) diff -r 005d7a0351b6 -r 46fcab5ff44e ui.h --- a/ui.h Sat Jun 21 06:38:54 2014 +0300 +++ b/ui.h Sat Jun 21 20:01:08 2014 +0300 @@ -22,6 +22,7 @@ #include #include "th_types.h" #include "th_string.h" +#include "th_growbuf.h" #include "th_network.h" #define SET_MAX_WINDOWS (32) diff -r 005d7a0351b6 -r 46fcab5ff44e util.c --- a/util.c Sat Jun 21 06:38:54 2014 +0300 +++ b/util.c Sat Jun 21 20:01:08 2014 +0300 @@ -4,6 +4,7 @@ * (C) Copyright 2008-2013 Tecnic Software productions (TNSP) */ #include "util.h" +#include "th_growbuf.h" #include @@ -48,8 +49,8 @@ } -#define PUSHCHAR(x) th_vputch(&result, &resSize, &resPos, x) -#define PUSHSTR(x) th_vputs(&result, &resSize, &resPos, x) +#define PUSHCHAR(x) th_strbuf_putch(&result, &resSize, &resPos, x) +#define PUSHSTR(x) th_strbuf_puts(&result, &resSize, &resPos, x) char *nn_encode_str1(const char *str) {