Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
1ca8d7ad
Commit
1ca8d7ad
authored
Aug 07, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TextInputStream: don't strip
Let the caller decide whether to strip. Only remove \n and \r (end-of-line markers).
parent
67958f7f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
TextInputStream.cxx
src/input/TextInputStream.cxx
+3
-3
ExtM3uPlaylistPlugin.cxx
src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
+3
-1
M3uPlaylistPlugin.cxx
src/playlist/plugins/M3uPlaylistPlugin.cxx
+2
-2
No files found.
src/input/TextInputStream.cxx
View file @
1ca8d7ad
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
#include "config.h"
#include "config.h"
#include "TextInputStream.hxx"
#include "TextInputStream.hxx"
#include "InputStream.hxx"
#include "InputStream.hxx"
#include "util/StringUtil.hxx"
#include "util/Error.hxx"
#include "util/Error.hxx"
#include "Log.hxx"
#include "Log.hxx"
...
@@ -37,8 +36,9 @@ TextInputStream::ReadBufferedLine()
...
@@ -37,8 +36,9 @@ TextInputStream::ReadBufferedLine()
buffer
.
Consume
(
newline
+
1
-
r
.
data
);
buffer
.
Consume
(
newline
+
1
-
r
.
data
);
char
*
end
=
StripRight
(
r
.
data
,
newline
);
if
(
newline
>
r
.
data
&&
newline
[
-
1
]
==
'\r'
)
*
end
=
0
;
--
newline
;
*
newline
=
0
;
return
r
.
data
;
return
r
.
data
;
}
}
...
...
src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
View file @
1ca8d7ad
...
@@ -104,13 +104,15 @@ DetachedSong *
...
@@ -104,13 +104,15 @@ DetachedSong *
ExtM3uPlaylist
::
NextSong
()
ExtM3uPlaylist
::
NextSong
()
{
{
Tag
tag
;
Tag
tag
;
c
onst
c
har
*
line_s
;
char
*
line_s
;
do
{
do
{
line_s
=
tis
.
ReadLine
();
line_s
=
tis
.
ReadLine
();
if
(
line_s
==
nullptr
)
if
(
line_s
==
nullptr
)
return
nullptr
;
return
nullptr
;
StripRight
(
line_s
);
if
(
StringStartsWith
(
line_s
,
"#EXTINF:"
))
{
if
(
StringStartsWith
(
line_s
,
"#EXTINF:"
))
{
tag
=
extm3u_parse_tag
(
line_s
+
8
);
tag
=
extm3u_parse_tag
(
line_s
+
8
);
continue
;
continue
;
...
...
src/playlist/plugins/M3uPlaylistPlugin.cxx
View file @
1ca8d7ad
...
@@ -45,14 +45,14 @@ m3u_open_stream(InputStream &is)
...
@@ -45,14 +45,14 @@ m3u_open_stream(InputStream &is)
DetachedSong
*
DetachedSong
*
M3uPlaylist
::
NextSong
()
M3uPlaylist
::
NextSong
()
{
{
c
onst
c
har
*
line_s
;
char
*
line_s
;
do
{
do
{
line_s
=
tis
.
ReadLine
();
line_s
=
tis
.
ReadLine
();
if
(
line_s
==
nullptr
)
if
(
line_s
==
nullptr
)
return
nullptr
;
return
nullptr
;
line_s
=
Strip
Left
(
line_s
);
line_s
=
Strip
(
line_s
);
}
while
(
line_s
[
0
]
==
'#'
||
*
line_s
==
0
);
}
while
(
line_s
[
0
]
==
'#'
||
*
line_s
==
0
);
return
new
DetachedSong
(
line_s
);
return
new
DetachedSong
(
line_s
);
...
...
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