summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2013-09-25 22:51:03 -0300
committerLucas De Marchi <lucas.demarchi@intel.com>2013-09-25 22:51:03 -0300
commitad76ce025c024ef0909292c791bc6f0836761f54 (patch)
tree29316f088a9eb46bf7a1d6d6920ba4209302c50f
parentf03148f9e327b4542ef426e1db6841cc251e6569 (diff)
Revert "eina: add functions to alloc strings from a printf fmt"
This reverts commit b5fce696c743c50ea0a049c4f879756b5ed231d4 and fixes to NEWS and @since that came later. These functions are pretty trivial and their functionality can be obtained with asprintf() and snprintf. The first is not available only on windows, but there's an implementation for that one on Evil, that should be used instead.
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/lib/eina/eina_str.c41
-rw-r--r--src/lib/eina/eina_str.h33
4 files changed, 0 insertions, 76 deletions
diff --git a/ChangeLog b/ChangeLog
index 08204e8c6..72873d089 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,7 +14,6 @@
2013-09-24 Jorge Zapata
* Eina: add a substraction in rectangles and more helpers,
- add functions to alloc strings from a printf format,
add double_from/to and helper defines in f16p16.
2013-09-12 Jihoon Kim
diff --git a/NEWS b/NEWS
index 0dd45afb4..e40c53f05 100644
--- a/NEWS
+++ b/NEWS
@@ -39,7 +39,6 @@ Additions:
- Add eina_rectangle_is_valid(), eina_rectangle_max_x(), eina_rectangle_max_y(), eina_rectangle_x_cut(),
eina_rectangle_y_cut(), eina_rectangle_width_cut(), eina_rectangle_height_cut(), eina_rectangle_subtract(),
EINA_RECTANGLE_INIT, EINA_RECTANGLE_FORMAT, EINA_RECTANGLE_ARGS.
- - Add eina_str_vprintf_length(), eina_str_vprintf_dup(), eina_str_printf_dup().
- Add eina_f16p16_double_from(), eina_f16p16_double_to().
* Eet:
- Add eet_mmap()
diff --git a/src/lib/eina/eina_str.c b/src/lib/eina/eina_str.c
index 283476b29..11fef3c7c 100644
--- a/src/lib/eina/eina_str.c
+++ b/src/lib/eina/eina_str.c
@@ -652,44 +652,3 @@ eina_str_toupper(char **str)
for (p = *str; (*p); p++)
*p = toupper((unsigned char)(*p));
}
-
-EAPI size_t
-eina_str_vprintf_length(const char *format, va_list args)
-{
- char c;
- size_t len;
-
- len = vsnprintf(&c, 1, format, args) + 1;
- return len;
-}
-
-EAPI char *
-eina_str_vprintf_dup(const char *format, va_list args)
-{
- size_t length;
- char *ret;
- va_list copy;
-
- /* be sure to use a copy or the printf implementation will
- * step into the args
- */
- va_copy(copy, args);
- length = eina_str_vprintf_length(format, copy);
- va_end(copy);
-
- ret = calloc(length, sizeof(char));
- vsprintf(ret, format, args);
- return ret;
-}
-
-EAPI char *
-eina_str_printf_dup(const char *format, ...)
-{
- char *ret;
- va_list args;
-
- va_start(args, format);
- ret = eina_str_vprintf_dup(format, args);
- va_end(args);
- return ret;
-}
diff --git a/src/lib/eina/eina_str.h b/src/lib/eina/eina_str.h
index 615cc71f3..dae592bac 100644
--- a/src/lib/eina/eina_str.h
+++ b/src/lib/eina/eina_str.h
@@ -345,39 +345,6 @@ static inline size_t eina_str_join(char *dst, size_t size, char sep, const char
static inline size_t eina_strlen_bounded(const char *str, size_t maxlen) EINA_PURE EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
-/**
- * @brief Gets the length needed for a string based on a printf format and args
- *
- * @param format The printf format
- * @param args The printf args
- * @return The length needed for such format and args
- * @since 1.8
- */
-EAPI size_t eina_str_vprintf_length(const char *format, va_list args);
-
-/**
- * @brief Gets a newly allocated string that represents the printf format and args
- *
- * @param format The printf format
- * @param args The printf args
- * @return A newly allocated string
- *
- * @see eina_str_dup_printf
- * @since 1.8
- */
-EAPI char * eina_str_vprintf_dup(const char *format, va_list args);
-
-/**
- * @brief Gets a newly allocated string that represents the printf format and args
- *
- * @param format The printf format
- * @return A newly allocated string
- *
- * @see eina_str_dup_vprintf
- * @since 1.8
- */
-EAPI char * eina_str_printf_dup(const char *format, ...);
-
#include "eina_inline_str.x"
/**