lucas pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ad76ce025c024ef0909292c791bc6f0836761f54

commit ad76ce025c024ef0909292c791bc6f0836761f54
Author: Lucas De Marchi <[email protected]>
Date:   Wed Sep 25 22:51:03 2013 -0300

    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.
---
 ChangeLog               |  1 -
 NEWS                    |  1 -
 src/lib/eina/eina_str.c | 41 -----------------------------------------
 src/lib/eina/eina_str.h | 33 ---------------------------------
 4 files changed, 76 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 08204e8..72873d0 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 0dd45af..e40c53f 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 283476b..11fef3c 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 615cc71..dae592b 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"
 
 /**

-- 


Reply via email to