changeset 630:46fcab5ff44e

Use the new th_growbuf module.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 21 Jun 2014 20:01:08 +0300
parents 005d7a0351b6
children 2c6945599b16
files Makefile.gen ui.h util.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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 <time.h>
 #include "th_types.h"
 #include "th_string.h"
+#include "th_growbuf.h"
 #include "th_network.h"
 
 #define SET_MAX_WINDOWS   (32)
--- 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 <time.h>
 
 
@@ -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)
 {