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
dad7d7e7
Commit
dad7d7e7
authored
Jul 05, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/TruncateString: rename CopyString() to CopyTruncateString()
parent
4b94ae80
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
7 deletions
+7
-7
CdioParanoiaInputPlugin.cxx
src/input/plugins/CdioParanoiaInputPlugin.cxx
+1
-1
String.cxx
src/java/String.cxx
+1
-1
IcyMetaDataServer.cxx
src/output/plugins/httpd/IcyMetaDataServer.cxx
+2
-2
Format.cxx
src/tag/Format.cxx
+1
-1
TruncateString.cxx
src/util/TruncateString.cxx
+1
-1
TruncateString.hxx
src/util/TruncateString.hxx
+1
-1
No files found.
src/input/plugins/CdioParanoiaInputPlugin.cxx
View file @
dad7d7e7
...
...
@@ -143,7 +143,7 @@ parse_cdio_uri(struct cdio_uri *dest, const char *src)
const
char
*
slash
=
strrchr
(
src
,
'/'
);
if
(
slash
==
nullptr
)
{
/* play the whole CD in the specified drive */
CopyString
(
dest
->
device
,
src
,
sizeof
(
dest
->
device
));
Copy
Truncate
String
(
dest
->
device
,
src
,
sizeof
(
dest
->
device
));
dest
->
track
=
-
1
;
return
true
;
}
...
...
src/java/String.cxx
View file @
dad7d7e7
...
...
@@ -38,7 +38,7 @@ Java::String::CopyTo(JNIEnv *env, jstring value,
if
(
p
==
nullptr
)
return
nullptr
;
char
*
result
=
CopyString
(
buffer
,
p
,
max_size
);
char
*
result
=
Copy
Truncate
String
(
buffer
,
p
,
max_size
);
env
->
ReleaseStringUTFChars
(
value
,
p
);
return
result
;
}
src/output/plugins/httpd/IcyMetaDataServer.cxx
View file @
dad7d7e7
...
...
@@ -101,10 +101,10 @@ icy_server_metadata_page(const Tag &tag, const TagType *types)
stream_title
[
0
]
=
'\0'
;
while
(
p
<
end
&&
item
<=
last_item
)
{
p
=
CopyString
(
p
,
tag_items
[
item
++
],
end
-
p
);
p
=
Copy
Truncate
String
(
p
,
tag_items
[
item
++
],
end
-
p
);
if
(
item
<=
last_item
)
p
=
CopyString
(
p
,
" - "
,
end
-
p
);
p
=
Copy
Truncate
String
(
p
,
" - "
,
end
-
p
);
}
const
auto
icy_string
=
icy_server_metadata_string
(
stream_title
,
""
);
...
...
src/tag/Format.cxx
View file @
dad7d7e7
...
...
@@ -73,7 +73,7 @@ SanitizeString(const char *s, char *buffer, size_t buffer_size) noexcept
if
(
!
HasUnsafeChar
(
s
))
return
s
;
char
*
end
=
CopyString
(
buffer
,
s
,
buffer_size
);
char
*
end
=
Copy
Truncate
String
(
buffer
,
s
,
buffer_size
);
std
::
replace_if
(
buffer
,
end
,
IsUnsafeChar
,
' '
);
return
buffer
;
}
...
...
src/util/TruncateString.cxx
View file @
dad7d7e7
...
...
@@ -34,7 +34,7 @@
#include <string.h>
char
*
CopyString
(
char
*
gcc_restrict
dest
,
const
char
*
gcc_restrict
src
,
Copy
Truncate
String
(
char
*
gcc_restrict
dest
,
const
char
*
gcc_restrict
src
,
size_t
size
)
noexcept
{
size_t
length
=
strlen
(
src
);
...
...
src/util/TruncateString.hxx
View file @
dad7d7e7
...
...
@@ -44,6 +44,6 @@
*/
gcc_nonnull_all
char
*
CopyString
(
char
*
dest
,
const
char
*
src
,
size_t
size
)
noexcept
;
Copy
Truncate
String
(
char
*
dest
,
const
char
*
src
,
size_t
size
)
noexcept
;
#endif
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