forked from enlightenment/efl
parent
d4cd8f28ae
commit
333b64f15e
|
@ -19,6 +19,8 @@
|
|||
#ifndef EINA_INLINE_ARRAY_X_
|
||||
#define EINA_INLINE_ARRAY_X_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/**
|
||||
* @cond LOCAL
|
||||
*/
|
||||
|
@ -51,7 +53,6 @@ EAPI Eina_Bool eina_array_grow(Eina_Array *array);
|
|||
* #EINA_ERROR_OUT_OF_MEMORY is set. Otherwise, #EINA_TRUE is
|
||||
* returned.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
static inline Eina_Bool
|
||||
eina_array_push(Eina_Array *array, const void *data)
|
||||
|
|
|
@ -22,8 +22,9 @@
|
|||
|
||||
#include "eina_unicode.h"
|
||||
#include "eina_ustringshare.h"
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_UStringshare_Group UStringshare
|
||||
* @addtogroup Eina_UStringshare_Group Unicode Stringshare
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
*/
|
||||
EAPI extern int EINA_LOG_DOMAIN_GLOBAL;
|
||||
|
||||
#ifndef EINA_LOG_DOMAIN_DEFAULT
|
||||
|
||||
/**
|
||||
* @def EINA_LOG_DOMAIN_DEFAULT
|
||||
* This macro defines the domain to use with the macros EINA_LOG_DOM_DBG(),
|
||||
|
@ -102,9 +104,9 @@ EAPI extern int EINA_LOG_DOMAIN_GLOBAL;
|
|||
* @endcode
|
||||
*
|
||||
*/
|
||||
#ifndef EINA_LOG_DOMAIN_DEFAULT
|
||||
#define EINA_LOG_DOMAIN_DEFAULT EINA_LOG_DOMAIN_GLOBAL
|
||||
#endif
|
||||
# define EINA_LOG_DOMAIN_DEFAULT EINA_LOG_DOMAIN_GLOBAL
|
||||
|
||||
#endif /* EINA_LOG_DOMAIN_DEFAULT */
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,19 +21,6 @@
|
|||
|
||||
#include "eina_types.h"
|
||||
|
||||
#define EINA_VERSION_MAJOR 1
|
||||
#define EINA_VERSION_MINOR 0
|
||||
|
||||
typedef struct _Eina_Version
|
||||
{
|
||||
int major;
|
||||
int minor;
|
||||
int micro;
|
||||
int revision;
|
||||
} Eina_Version;
|
||||
|
||||
EAPI extern Eina_Version *eina_version;
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_Core_Group Core
|
||||
*
|
||||
|
@ -46,6 +33,32 @@ EAPI extern Eina_Version *eina_version;
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @def EINA_VERSION_MAJOR
|
||||
* @brief Major version of Eina
|
||||
*/
|
||||
#define EINA_VERSION_MAJOR 1
|
||||
|
||||
/**
|
||||
* @def EINA_VERSION_MINOR
|
||||
* @brief Minor version of Eina
|
||||
*/
|
||||
#define EINA_VERSION_MINOR 0
|
||||
|
||||
/**
|
||||
* @struct Eina_Version
|
||||
* The version of Eina.
|
||||
*/
|
||||
typedef struct _Eina_Version
|
||||
{
|
||||
int major; /**< Major component of the version */
|
||||
int minor; /**< Minor component of the version */
|
||||
int micro; /**< Micro component of the version */
|
||||
int revision; /**< Revision component of the version */
|
||||
} Eina_Version;
|
||||
|
||||
EAPI extern Eina_Version *eina_version;
|
||||
|
||||
EAPI int eina_init(void);
|
||||
EAPI int eina_shutdown(void);
|
||||
EAPI int eina_threads_init(void);
|
||||
|
|
|
@ -99,4 +99,5 @@ void eina_share_common_population_del(Eina_Share *share, int slen);
|
|||
#endif
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_eina_share_common_log_dom, __VA_ARGS__)
|
||||
extern int _eina_share_common_log_dom;
|
||||
|
||||
#endif /* EINA_STRINGSHARE_H_ */
|
||||
|
|
|
@ -11,16 +11,13 @@
|
|||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_String_Buffer_Group String Buffer
|
||||
*
|
||||
* @brief These functions provide string buffers management.
|
||||
*
|
||||
* The String Buffer data type is designed to be a mutable string,
|
||||
* allowing to append, prepend or insert a string to a buffer.
|
||||
* @defgroup Eina_String_Buffer_Group String Buffer
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Eina_Strbuf
|
||||
* Type for a string buffer.
|
||||
|
@ -41,6 +38,7 @@ typedef struct _Eina_Strbuf Eina_Strbuf;
|
|||
* @see eina_strbuf_string_get()
|
||||
*/
|
||||
EAPI Eina_Strbuf *eina_strbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* @brief Free a string buffer.
|
||||
*
|
||||
|
@ -50,6 +48,7 @@ EAPI Eina_Strbuf *eina_strbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
|
|||
* created by eina_strbuf_new().
|
||||
*/
|
||||
EAPI void eina_strbuf_free(Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Reset a string buffer.
|
||||
*
|
||||
|
@ -77,6 +76,7 @@ EAPI void eina_strbuf_reset(Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
|
|||
* @see eina_strbuf_append_length()
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_append(Eina_Strbuf *buf, const char *str) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Append an escaped string to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -89,6 +89,7 @@ EAPI Eina_Bool eina_strbuf_append(Eina_Strbuf *buf, const char *str) EINA_ARG
|
|||
* #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_append_escaped(Eina_Strbuf *buf, const char *str) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Append a string to a buffer, reallocating as necessary,
|
||||
* limited by the given length.
|
||||
|
@ -111,6 +112,7 @@ EAPI Eina_Bool eina_strbuf_append_escaped(Eina_Strbuf *buf, const char *str)
|
|||
* @see eina_strbuf_append_length()
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_append_n(Eina_Strbuf *buf, const char *str, size_t maxlen) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Append a string of exact length to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -131,6 +133,7 @@ EAPI Eina_Bool eina_strbuf_append_n(Eina_Strbuf *buf, const char *str, size_t
|
|||
* @see eina_strbuf_append_n()
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_append_length(Eina_Strbuf *buf, const char *str, size_t length) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Append a character to a string buffer, reallocating as
|
||||
* necessary.
|
||||
|
@ -143,6 +146,7 @@ EAPI Eina_Bool eina_strbuf_append_length(Eina_Strbuf *buf, const char *str, s
|
|||
* #EINA_FALSE is returned, otherwise #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_append_char(Eina_Strbuf *buf, char c) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Append a string to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -153,16 +157,19 @@ EAPI Eina_Bool eina_strbuf_append_char(Eina_Strbuf *buf, char c) EINA_ARG_NON
|
|||
* @see eina_strbuf_append()
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_append_printf(Eina_Strbuf *buf, const char *fmt, ...) EINA_ARG_NONNULL(1, 2) EINA_PRINTF(2, 3);
|
||||
|
||||
/**
|
||||
* @brief Append a string to a buffer, reallocating as necessary.
|
||||
*
|
||||
* @param buf The string buffer to append to.
|
||||
* @param fmt The string to append.
|
||||
* @param args The variable arguments.
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* @see eina_strbuf_append()
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_append_vprintf(Eina_Strbuf *buf, const char *fmt, va_list args) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert a string to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -178,6 +185,7 @@ EAPI Eina_Bool eina_strbuf_append_vprintf(Eina_Strbuf *buf, const char *fmt,
|
|||
* is returned, otherwise #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_insert(Eina_Strbuf *buf, const char *str, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert an escaped string to a buffer, reallocating as
|
||||
* necessary.
|
||||
|
@ -192,6 +200,7 @@ EAPI Eina_Bool eina_strbuf_insert(Eina_Strbuf *buf, const char *str, size_t p
|
|||
* returned, otherwise #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_insert_escaped(Eina_Strbuf *buf, const char *str, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert a string to a buffer, reallocating as necessary. Limited by maxlen.
|
||||
*
|
||||
|
@ -211,6 +220,7 @@ EAPI Eina_Bool eina_strbuf_insert_escaped(Eina_Strbuf *buf, const char *str,
|
|||
* otherwise, #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_insert_n(Eina_Strbuf *buf, const char *str, size_t maxlen, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert a string of exact length to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -232,6 +242,7 @@ EAPI Eina_Bool eina_strbuf_insert_n(Eina_Strbuf *buf, const char *str, size_t
|
|||
* @see eina_strbuf_insert_n()
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_insert_length(Eina_Strbuf *buf, const char *str, size_t length, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert a character to a string buffer, reallocating as
|
||||
* necessary.
|
||||
|
@ -246,6 +257,7 @@ EAPI Eina_Bool eina_strbuf_insert_length(Eina_Strbuf *buf, const char *str, s
|
|||
* returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_insert_char(Eina_Strbuf *buf, char c, size_t pos) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Insert a string to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -255,12 +267,14 @@ EAPI Eina_Bool eina_strbuf_insert_char(Eina_Strbuf *buf, char c, size_t pos)
|
|||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_insert_printf(Eina_Strbuf *buf, const char *fmt, size_t pos, ...) EINA_ARG_NONNULL(1, 2) EINA_PRINTF(2, 4);
|
||||
|
||||
/**
|
||||
* @brief Insert a string to a buffer, reallocating as necessary.
|
||||
*
|
||||
* @param buf The string buffer to insert.
|
||||
* @param fmt The string to insert.
|
||||
* @param pos The position to insert the string.
|
||||
* @param args The variable arguments.
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*/
|
||||
EAPI Eina_Bool eina_strbuf_insert_vprintf(Eina_Strbuf *buf, const char *fmt, size_t pos, va_list args) EINA_ARG_NONNULL(1, 2);
|
||||
|
@ -342,7 +356,7 @@ EAPI Eina_Bool eina_strbuf_insert_vprintf(Eina_Strbuf *buf, const char *fmt,
|
|||
* @brief Prepend the given string to the given buffer
|
||||
*
|
||||
* @param buf The string buffer to prepend to.
|
||||
* @param str The string to prepend.
|
||||
* @param fmt The string to prepend.
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This macro is calling eina_strbuf_insert_printf() at position 0.If @p buf
|
||||
|
@ -357,6 +371,7 @@ EAPI Eina_Bool eina_strbuf_insert_vprintf(Eina_Strbuf *buf, const char *fmt,
|
|||
*
|
||||
* @param buf The string buffer to prepend to.
|
||||
* @param fmt The string to prepend.
|
||||
* @param args The variable arguments.
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This macro is calling eina_strbuf_insert_vprintf() at position 0.If @p buf
|
||||
|
@ -381,6 +396,7 @@ EAPI Eina_Bool eina_strbuf_insert_vprintf(Eina_Strbuf *buf, const char *fmt,
|
|||
*/
|
||||
|
||||
EAPI Eina_Bool eina_strbuf_remove(Eina_Strbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Retrieve a pointer to the contents of a string buffer
|
||||
*
|
||||
|
@ -395,6 +411,7 @@ EAPI Eina_Bool eina_strbuf_remove(Eina_Strbuf *buf, size_t start, size_t end) EI
|
|||
* @see eina_strbuf_string_steal()
|
||||
*/
|
||||
EAPI const char *eina_strbuf_string_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* @brief Steal the contents of a string buffer.
|
||||
*
|
||||
|
@ -409,6 +426,7 @@ EAPI const char *eina_strbuf_string_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL
|
|||
* @see eina_strbuf_string_get()
|
||||
*/
|
||||
EAPI char *eina_strbuf_string_steal(Eina_Strbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Free the contents of a string buffer but not the buffer.
|
||||
*
|
||||
|
@ -418,6 +436,7 @@ EAPI char *eina_strbuf_string_steal(Eina_Strbuf *buf) EINA_MALLOC EINA_WARN_UNUS
|
|||
* @p buf.
|
||||
*/
|
||||
EAPI void eina_strbuf_string_free(Eina_Strbuf *buf) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the length of the string buffer content.
|
||||
*
|
||||
|
@ -427,6 +446,7 @@ EAPI void eina_strbuf_string_free(Eina_Strbuf *buf) EINA_ARG_NONNULL
|
|||
* This function returns the length of @p buf.
|
||||
*/
|
||||
EAPI size_t eina_strbuf_length_get(const Eina_Strbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
|
||||
|
||||
EAPI Eina_Bool eina_strbuf_replace(Eina_Strbuf *buf, const char *str, const char *with, unsigned int n) EINA_ARG_NONNULL(1, 2, 3);
|
||||
|
||||
/**
|
||||
|
@ -449,7 +469,9 @@ EAPI int eina_strbuf_replace_all(Eina_Strbuf *buf, const char *str, const char *
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* EINA_STRBUF_H */
|
||||
|
|
|
@ -11,13 +11,9 @@
|
|||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_Unicode_String_Buffer_Group Unicode String Buffer
|
||||
*
|
||||
* @brief These functions provide unicode string buffers management.
|
||||
*
|
||||
* The Unicode String Buffer data type is designed to be a mutable string,
|
||||
* allowing to append, prepend or insert a string to a buffer.
|
||||
* @defgroup Eina_Unicode_String_Buffer_Group Unicode String Buffer
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
@ -52,6 +48,7 @@ EAPI Eina_UStrbuf *eina_ustrbuf_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
|
|||
* created by eina_ustrbuf_new().
|
||||
*/
|
||||
EAPI void eina_ustrbuf_free(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Reset a string buffer.
|
||||
*
|
||||
|
@ -79,6 +76,7 @@ EAPI void eina_ustrbuf_reset(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1);
|
|||
* @see eina_ustrbuf_append_length()
|
||||
*/
|
||||
EAPI Eina_Bool eina_ustrbuf_append(Eina_UStrbuf *buf, const Eina_Unicode *str) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Append an escaped string to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -91,6 +89,7 @@ EAPI Eina_Bool eina_ustrbuf_append(Eina_UStrbuf *buf, const Eina_Unicode *st
|
|||
* #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf *buf, const Eina_Unicode *str) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Append a string to a buffer, reallocating as necessary,
|
||||
* limited by the given length.
|
||||
|
@ -113,6 +112,7 @@ EAPI Eina_Bool eina_ustrbuf_append_escaped(Eina_UStrbuf *buf, const Eina_Uni
|
|||
* @see eina_ustrbuf_append_length()
|
||||
*/
|
||||
EAPI Eina_Bool eina_ustrbuf_append_n(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t maxlen) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Append a string of exact length to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -162,6 +162,7 @@ EAPI Eina_Bool eina_ustrbuf_append_char(Eina_UStrbuf *buf, Eina_Unicode c) E
|
|||
* is returned, otherwise #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_ustrbuf_insert(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert an escaped string to a buffer, reallocating as
|
||||
* necessary.
|
||||
|
@ -176,6 +177,7 @@ EAPI Eina_Bool eina_ustrbuf_insert(Eina_UStrbuf *buf, const Eina_Unicode *st
|
|||
* returned, otherwise #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_ustrbuf_insert_escaped(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert a string to a buffer, reallocating as necessary. Limited by maxlen.
|
||||
*
|
||||
|
@ -195,6 +197,7 @@ EAPI Eina_Bool eina_ustrbuf_insert_escaped(Eina_UStrbuf *buf, const Eina_Uni
|
|||
* otherwise, #EINA_TRUE is returned.
|
||||
*/
|
||||
EAPI Eina_Bool eina_ustrbuf_insert_n(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t maxlen, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert a string of exact length to a buffer, reallocating as necessary.
|
||||
*
|
||||
|
@ -216,6 +219,7 @@ EAPI Eina_Bool eina_ustrbuf_insert_n(Eina_UStrbuf *buf, const Eina_Unicode *
|
|||
* @see eina_ustrbuf_insert_n()
|
||||
*/
|
||||
EAPI Eina_Bool eina_ustrbuf_insert_length(Eina_UStrbuf *buf, const Eina_Unicode *str, size_t length, size_t pos) EINA_ARG_NONNULL(1, 2);
|
||||
|
||||
/**
|
||||
* @brief Insert a character to a string buffer, reallocating as
|
||||
* necessary.
|
||||
|
@ -308,7 +312,7 @@ EAPI Eina_Bool eina_ustrbuf_insert_char(Eina_UStrbuf *buf, Eina_Unicode c, s
|
|||
* @brief Prepend the given string to the given buffer
|
||||
*
|
||||
* @param buf The string buffer to prepend to.
|
||||
* @param str The string to prepend.
|
||||
* @param fmt The string to prepend.
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This macro is calling eina_ustrbuf_insert_printf() at position 0.If @p buf
|
||||
|
@ -323,6 +327,7 @@ EAPI Eina_Bool eina_ustrbuf_insert_char(Eina_UStrbuf *buf, Eina_Unicode c, s
|
|||
*
|
||||
* @param buf The string buffer to prepend to.
|
||||
* @param fmt The string to prepend.
|
||||
* @param args The variable arguments.
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This macro is calling eina_ustrbuf_insert_vprintf() at position 0.If @p buf
|
||||
|
@ -347,6 +352,7 @@ EAPI Eina_Bool eina_ustrbuf_insert_char(Eina_UStrbuf *buf, Eina_Unicode c, s
|
|||
*/
|
||||
EAPI Eina_Bool
|
||||
eina_ustrbuf_remove(Eina_UStrbuf *buf, size_t start, size_t end) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Retrieve a pointer to the contents of a string buffer
|
||||
*
|
||||
|
@ -362,6 +368,7 @@ eina_ustrbuf_remove(Eina_UStrbuf *buf, size_t start, size_t end) EINA_ARG_NONNUL
|
|||
*/
|
||||
EAPI const Eina_Unicode *
|
||||
eina_ustrbuf_string_get(const Eina_UStrbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* @brief Steal the contents of a string buffer.
|
||||
*
|
||||
|
@ -377,6 +384,7 @@ eina_ustrbuf_string_get(const Eina_UStrbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_U
|
|||
*/
|
||||
EAPI Eina_Unicode *
|
||||
eina_ustrbuf_string_steal(Eina_UStrbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Free the contents of a string buffer but not the buffer.
|
||||
*
|
||||
|
@ -387,6 +395,7 @@ eina_ustrbuf_string_steal(Eina_UStrbuf *buf) EINA_MALLOC EINA_WARN_UNUSED_RESULT
|
|||
*/
|
||||
EAPI void
|
||||
eina_ustrbuf_string_free(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the length of the string buffer content.
|
||||
*
|
||||
|
@ -397,10 +406,13 @@ eina_ustrbuf_string_free(Eina_UStrbuf *buf) EINA_ARG_NONNULL(1);
|
|||
*/
|
||||
EAPI size_t
|
||||
eina_ustrbuf_length_get(const Eina_UStrbuf *buf) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#endif /* EINA_STRBUF_H */
|
||||
|
|
|
@ -124,8 +124,8 @@
|
|||
#include "eina_array.h"
|
||||
|
||||
/*============================================================================*
|
||||
* Local *
|
||||
*============================================================================*/
|
||||
* Local *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @cond LOCAL
|
||||
|
@ -292,8 +292,8 @@ eina_array_grow(Eina_Array *array)
|
|||
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -345,8 +345,8 @@ eina_array_shutdown(void)
|
|||
}
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_Array_Group Array
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef EFL_HAVE_POSIX_THREADS
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
|
@ -51,9 +51,6 @@
|
|||
#include "eina_rectangle.h"
|
||||
#include "eina_safety_checks.h"
|
||||
|
||||
static Eina_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
||||
EAPI Eina_Version *eina_version = &_version;
|
||||
|
||||
/*============================================================================*
|
||||
* Local *
|
||||
*============================================================================*/
|
||||
|
@ -62,6 +59,8 @@ EAPI Eina_Version *eina_version = &_version;
|
|||
* @cond LOCAL
|
||||
*/
|
||||
|
||||
static Eina_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
||||
|
||||
static int _eina_main_count = 0;
|
||||
#ifdef EFL_HAVE_THREADS
|
||||
static int _eina_main_thread_count = 0;
|
||||
|
@ -182,6 +181,7 @@ _eina_shutdown_from_desc(const struct eina_desc_setup *itr)
|
|||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
@ -195,6 +195,12 @@ _eina_shutdown_from_desc(const struct eina_desc_setup *itr)
|
|||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var eina_version
|
||||
* @brief Eina version (defined at configuration time)
|
||||
*/
|
||||
EAPI Eina_Version *eina_version = &_version;
|
||||
|
||||
/**
|
||||
* @brief Initialize the Eina library.
|
||||
*
|
||||
|
|
|
@ -16,6 +16,25 @@
|
|||
* Local *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @cond LOCAL
|
||||
*/
|
||||
|
||||
#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
|
||||
|
||||
/**
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
|
@ -26,6 +45,18 @@
|
|||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_String_Buffer_Group String Buffer
|
||||
*
|
||||
* @brief These functions provide string buffers management.
|
||||
*
|
||||
* The String Buffer data type is designed to be a mutable string,
|
||||
* allowing to append, prepend or insert a string to a buffer.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
EAPI Eina_Bool
|
||||
eina_strbuf_append_printf(Eina_Strbuf *buf, const char *fmt, ...)
|
||||
{
|
||||
|
@ -105,15 +136,8 @@ eina_strbuf_insert_vprintf(Eina_Strbuf *buf,
|
|||
|
||||
/* 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"
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -32,6 +32,48 @@
|
|||
#define EINA_STRBUF_INIT_STEP 32
|
||||
#define EINA_STRBUF_MAX_STEP 4096
|
||||
|
||||
/**
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @brief Initialize the strbuf module.
|
||||
*
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This function sets up the strbuf module of Eina. It is called by
|
||||
* eina_init().
|
||||
*
|
||||
* @see eina_init()
|
||||
*/
|
||||
Eina_Bool
|
||||
eina_strbuf_common_init(void)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @brief Shut down the strbuf module.
|
||||
*
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This function shuts down the strbuf module set up by
|
||||
* eina_strbuf_common_init(). It is called by eina_shutdown().
|
||||
*
|
||||
* @see eina_shutdown()
|
||||
*/
|
||||
Eina_Bool
|
||||
eina_strbuf_common_shutdown(void)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
|
@ -166,52 +208,6 @@ _eina_strbuf_common_insert_length(size_t csize,
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @cond LOCAL
|
||||
*/
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @brief Initialize the strbuf module.
|
||||
*
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This function sets up the strbuf module of Eina. It is called by
|
||||
* eina_init().
|
||||
*
|
||||
* @see eina_init()
|
||||
*/
|
||||
Eina_Bool
|
||||
eina_strbuf_common_init(void)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @brief Shut down the strbuf module.
|
||||
*
|
||||
* @return #EINA_TRUE on success, #EINA_FALSE on failure.
|
||||
*
|
||||
* This function shuts down the strbuf module set up by
|
||||
* eina_strbuf_common_init(). It is called by eina_shutdown().
|
||||
*
|
||||
* @see eina_shutdown()
|
||||
*/
|
||||
Eina_Bool
|
||||
eina_strbuf_common_shutdown(void)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
@ -658,15 +654,7 @@ eina_strbuf_common_length_get(const Eina_Strbuf *buf)
|
|||
{
|
||||
return buf->len;
|
||||
}
|
||||
/**
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_Data_Types_Group Data Types
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @addtogroup Eina_String_Buffer_Group String Buffer
|
||||
*
|
||||
|
@ -677,25 +665,27 @@ eina_strbuf_common_length_get(const Eina_Strbuf *buf)
|
|||
*
|
||||
* @{
|
||||
*/
|
||||
/*FIXME: Implementing them here is a hack! */
|
||||
|
||||
#ifdef _STRBUF_CSIZE
|
||||
# undef _STRBUF_CSIZE
|
||||
#endif
|
||||
#ifdef _STRBUF_MAGIC
|
||||
# undef _STRBUF_MAGIC
|
||||
#endif
|
||||
#ifdef _STRBUF_MAGIC_STR
|
||||
# undef _STRBUF_MAGIC_STR
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @cond LOCAL
|
||||
*/
|
||||
|
||||
/*FIXME: Implementing them here is a hack! */
|
||||
|
||||
#define _STRBUF_CSIZE 1
|
||||
#define _STRBUF_MAGIC EINA_MAGIC_STRBUF
|
||||
#define _STRBUF_MAGIC_STR __STRBUF_STR_MAGIC_STR
|
||||
static const char __STRBUF_STR_MAGIC_STR[] = "Eina Strbuf";
|
||||
|
||||
|
||||
/**
|
||||
* @ brief Replace the n-th string with an other string.
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Replace the n-th string with an other string.
|
||||
*
|
||||
* @param buf The string buffer to work with.
|
||||
* @param str The string to replace.
|
||||
|
@ -858,6 +848,3 @@ eina_strbuf_replace_all(Eina_Strbuf *buf, const char *str, const char *with)
|
|||
/**
|
||||
* @}
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
#include "eina_unicode.h"
|
||||
#include "eina_ustrbuf.h"
|
||||
|
||||
/*============================================================================*
|
||||
* Local *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @cond LOCAL
|
||||
*/
|
||||
|
||||
#define _STRBUF_DATA_TYPE Eina_Unicode
|
||||
#define _STRBUF_CSIZE sizeof(_STRBUF_DATA_TYPE)
|
||||
|
@ -18,4 +25,33 @@ static const char __USTRBUF_MAGIC_STR[] = "Eina UStrbuf";
|
|||
|
||||
#define _FUNC_EXPAND(y) eina_ustrbuf_ ## y
|
||||
|
||||
/**
|
||||
* @endcond
|
||||
*/
|
||||
|
||||
|
||||
/*============================================================================*
|
||||
* Global *
|
||||
*============================================================================*/
|
||||
|
||||
|
||||
/*============================================================================*
|
||||
* API *
|
||||
*============================================================================*/
|
||||
|
||||
/**
|
||||
* @addtogroup Eina_Unicode_String_Buffer_Group Unicode String Buffer
|
||||
*
|
||||
* @brief These functions provide unicode string buffers management.
|
||||
*
|
||||
* The Unicode String Buffer data type is designed to be a mutable string,
|
||||
* allowing to append, prepend or insert a string to a buffer.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "eina_strbuf_template_c.x"
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue