Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
48b74806
Commit
48b74806
authored
May 27, 2003
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* removed vlc_wraptext
parent
49ca4940
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
56 deletions
+2
-56
include/vlc_common.h
include/vlc_common.h
+1
-3
src/extras/libc.c
src/extras/libc.c
+1
-53
No files found.
include/vlc_common.h
View file @
48b74806
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.6
5 2003/05/25 17:27:13 massiot
Exp $
* $Id: vlc_common.h,v 1.6
6 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"
...
...
src/extras/libc.c
View file @
48b74806
...
...
@@ -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
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment