]> git.sesse.net Git - vlc/commitdiff
* removed vlc_wraptext
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 27 May 2003 01:48:50 +0000 (01:48 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 27 May 2003 01:48:50 +0000 (01:48 +0000)
include/vlc_common.h
src/extras/libc.c

index bca6a853778144a00f17ce18e5340349f090cb03..838d584eb7aa1f22271e41bc36ce290844e37656 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.65 2003/05/25 17:27:13 massiot Exp $
+ * $Id: vlc_common.h,v 1.66 2003/05/27 01:48:50 hartman Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -563,8 +563,6 @@ static inline uint64_t U64_AT( void * _p )
 #   define vlc_strncasecmp NULL
 #endif
 
-VLC_EXPORT( char *, vlc_wraptext, ( char *psz_text, size_t i_line ) );
-
 /* Format type specifiers for 64 bits numbers */
 #if !defined(WIN32) && !defined(UNDER_CE)
 #   define I64Fd "%lld"
index 3d6e493d6b3011a676a539693706753a9c439ef0..37c664dd4171e7de268dcb4b6298f1ef471b0ec1 100644 (file)
@@ -2,7 +2,7 @@
  * libc.c: Extra libc function for some systems.
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: libc.c,v 1.7 2003/02/08 22:20:28 massiot Exp $
+ * $Id: libc.c,v 1.8 2003/05/27 01:48:50 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Samuel Hocevar <sam@zoy.org>
@@ -171,55 +171,3 @@ char *vlc_dgettext( const char *package, const char *msgid )
 #endif
 }
 
-/*****************************************************************************
- * wraptext: insert \n at convenient places. CAUTION: modifies its argument
- *****************************************************************************/
-char *vlc_wraptext( char *psz_text, size_t i_line )
-{
-    size_t i_len = strlen(psz_text);
-    char * psz_line = psz_text;
-
-    while ( i_len > i_line )
-    {
-        /* Look if there is a newline somewhere. */
-        char * psz_parser = psz_line;
-        while ( psz_parser <= psz_line + i_line && *psz_parser != '\n' )
-        {
-            psz_parser++;
-        }
-        if ( *psz_parser == '\n' )
-        {
-            i_len -= psz_parser + 1 - psz_line;
-            psz_line = psz_parser + 1;
-            continue;
-        }
-
-        /* Find the furthest space. */
-        psz_parser = psz_line + i_line;
-        while ( psz_parser > psz_line && *psz_parser != ' ' )
-        {
-            psz_parser--;
-        }
-        if ( *psz_parser == ' ' )
-        {
-            *psz_parser = '\n';
-            i_len -= psz_parser + 1 - psz_line;
-            psz_line = psz_parser + 1;
-            continue;
-        }
-
-        /* Wrapping has failed. Find the first space or newline after i_line. */
-        psz_parser = psz_line + i_line + 1;
-        while ( psz_parser < psz_line + i_len
-                 && *psz_parser != ' ' && *psz_parser != '\n' )
-        {
-            psz_parser++;
-        }
-
-        if ( psz_parser < psz_line + i_len ) *psz_parser = '\n';
-        i_len -= psz_parser + 1 - psz_line;
-        psz_line = psz_parser + 1;
-    }
-
-    return psz_text;
-}