forked from enlightenment/efl
parent
2e13d0c790
commit
4e09c14e08
|
@ -1,9 +1,11 @@
|
|||
#ifndef EINA_STRBUF_COMMON_H
|
||||
#define EINA_STRBUF_COMMON_H
|
||||
#include <Eina.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "eina_private.h"
|
||||
#include "eina_magic.h"
|
||||
#include "eina_strbuf.h"
|
||||
|
||||
struct _Eina_Strbuf
|
||||
{
|
||||
|
|
|
@ -16,10 +16,6 @@
|
|||
* a lot easier since those are essentially the same just with different sizes.
|
||||
*/
|
||||
|
||||
#include <Eina.h>
|
||||
#include "eina_strbuf_common.h"
|
||||
#include "eina_unicode.h"
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @brief Initialize the strbuf module.
|
||||
|
|
|
@ -1,51 +1,16 @@
|
|||
#ifdef _STRBUF_DATA_TYPE
|
||||
# undef _STRBUF_DATA_TYPE
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#ifdef _STRBUF_CSIZE
|
||||
# undef _STRBUF_CSIZE
|
||||
#endif
|
||||
#ifdef _STRBUF_STRUCT_NAME
|
||||
# undef _STRBUF_STRUCT_NAME
|
||||
#endif
|
||||
#ifdef _STRBUF_STRLEN_FUNC
|
||||
# undef _STRBUF_STRLEN_FUNC
|
||||
#endif
|
||||
#ifdef _STRBUF_STRESCAPE_FUNC
|
||||
# undef _STRBUF_STRESCAPE_FUNC
|
||||
#endif
|
||||
#ifdef _STRBUF_MAGIC
|
||||
# undef _STRBUF_MAGIC
|
||||
#endif
|
||||
#ifdef _STRBUF_MAGIC_STR
|
||||
# undef _STRBUF_MAGIC_STR
|
||||
#endif
|
||||
#ifdef _FUNC_EXPAND
|
||||
# undef _FUNC_EXPAND
|
||||
#endif
|
||||
|
||||
#define _STRBUF_DATA_TYPE char
|
||||
#define _STRBUF_CSIZE sizeof(_STRBUF_DATA_TYPE)
|
||||
#define _STRBUF_STRUCT_NAME Eina_Strbuf
|
||||
#define _STRBUF_STRLEN_FUNC(x) strlen(x)
|
||||
#define _STRBUF_STRESCAPE_FUNC(x) eina_str_escape(x)
|
||||
#define _STRBUF_MAGIC EINA_MAGIC_STRBUF
|
||||
#define _STRBUF_MAGIC_STR __STRBUF_MAGIC_STR
|
||||
static const char __STRBUF_MAGIC_STR[] = "Eina Strbuf";
|
||||
|
||||
#define _FUNC_EXPAND(y) eina_strbuf_ ## y
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include "eina_strbuf.h"
|
||||
#include "eina_private.h"
|
||||
#include "eina_str.h"
|
||||
#include "eina_strbuf_common.h"
|
||||
#include "eina_unicode.h"
|
||||
#include "eina_private.h"
|
||||
|
||||
#include "eina_strbuf_template_c.x"
|
||||
|
||||
|
||||
|
||||
EAPI Eina_Bool
|
||||
eina_strbuf_append_printf(Eina_Strbuf *buf, const char *fmt, ...)
|
||||
|
@ -123,3 +88,18 @@ eina_strbuf_insert_vprintf(Eina_Strbuf *buf,
|
|||
free(str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Unicode */
|
||||
|
||||
#define _STRBUF_DATA_TYPE char
|
||||
#define _STRBUF_CSIZE sizeof(_STRBUF_DATA_TYPE)
|
||||
#define _STRBUF_STRUCT_NAME Eina_Strbuf
|
||||
#define _STRBUF_STRLEN_FUNC(x) strlen(x)
|
||||
#define _STRBUF_STRESCAPE_FUNC(x) eina_str_escape(x)
|
||||
#define _STRBUF_MAGIC EINA_MAGIC_STRBUF
|
||||
#define _STRBUF_MAGIC_STR __STRBUF_MAGIC_STR
|
||||
static const char __STRBUF_MAGIC_STR[] = "Eina Strbuf";
|
||||
|
||||
#define _FUNC_EXPAND(y) eina_strbuf_ ## y
|
||||
|
||||
#include "eina_strbuf_template_c.x"
|
||||
|
|
|
@ -1,32 +1,11 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include "eina_strbuf_common.h"
|
||||
#include "eina_unicode.h"
|
||||
#include "eina_ustrbuf.h"
|
||||
|
||||
#ifdef _STRBUF_DATA_TYPE
|
||||
# undef _STRBUF_DATA_TYPE
|
||||
#endif
|
||||
#ifdef _STRBUF_CSIZE
|
||||
# undef _STRBUF_CSIZE
|
||||
#endif
|
||||
#ifdef _STRBUF_STRUCT_NAME
|
||||
# undef _STRBUF_STRUCT_NAME
|
||||
#endif
|
||||
#ifdef _STRBUF_STRLEN_FUNC
|
||||
# undef _STRBUF_STRLEN_FUNC
|
||||
#endif
|
||||
#ifdef _STRBUF_STRESCAPE_FUNC
|
||||
# undef _STRBUF_STRESCAPE_FUNC
|
||||
#endif
|
||||
#ifdef _STRBUF_MAGIC
|
||||
# undef _STRBUF_MAGIC
|
||||
#endif
|
||||
#ifdef _STRBUF_MAGIC_STR
|
||||
# undef _STRBUF_MAGIC_STR
|
||||
#endif
|
||||
#ifdef _FUNC_EXPAND
|
||||
# undef _FUNC_EXPAND
|
||||
#endif
|
||||
|
||||
|
||||
#define _STRBUF_DATA_TYPE Eina_Unicode
|
||||
#define _STRBUF_CSIZE sizeof(_STRBUF_DATA_TYPE)
|
||||
|
|
Loading…
Reference in New Issue