comparison util.c @ 630:46fcab5ff44e

Use the new th_growbuf module.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 21 Jun 2014 20:01:08 +0300
parents 97a49a6cc959
children 5b059a85cab8
comparison
equal deleted inserted replaced
629:005d7a0351b6 630:46fcab5ff44e
2 * NNChat - Custom chat client for NewbieNudes.com chatrooms 2 * NNChat - Custom chat client for NewbieNudes.com chatrooms
3 * Written by Matti 'ccr' Hämäläinen 3 * Written by Matti 'ccr' Hämäläinen
4 * (C) Copyright 2008-2013 Tecnic Software productions (TNSP) 4 * (C) Copyright 2008-2013 Tecnic Software productions (TNSP)
5 */ 5 */
6 #include "util.h" 6 #include "util.h"
7 #include "th_growbuf.h"
7 #include <time.h> 8 #include <time.h>
8 9
9 10
10 BOOL str_get_timestamp(char *str, size_t len, const char *fmt) 11 BOOL str_get_timestamp(char *str, size_t len, const char *fmt)
11 { 12 {
46 { 47 {
47 return th_strcasecmp((const char *) s1, (const char *) s2); 48 return th_strcasecmp((const char *) s1, (const char *) s2);
48 } 49 }
49 50
50 51
51 #define PUSHCHAR(x) th_vputch(&result, &resSize, &resPos, x) 52 #define PUSHCHAR(x) th_strbuf_putch(&result, &resSize, &resPos, x)
52 #define PUSHSTR(x) th_vputs(&result, &resSize, &resPos, x) 53 #define PUSHSTR(x) th_strbuf_puts(&result, &resSize, &resPos, x)
53 54
54 char *nn_encode_str1(const char *str) 55 char *nn_encode_str1(const char *str)
55 { 56 {
56 const char *s = str; 57 const char *s = str;
57 char *result; 58 char *result;