mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-10 12:12:31 +00:00
* Allow ';' as a separator for multi-command lines. Not recognized by
the string parser, so it must be preceeded by whitespace. * Allow escaping of newlines in the resource file. * Cleanup of the parse_command_* commands. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@936 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+4
-6
@@ -45,7 +45,7 @@ namespace rpc {
|
||||
|
||||
const char*
|
||||
parse_skip_wspace(const char* first, const char* last) {
|
||||
while (first != last && std::isspace(*first))
|
||||
while (first != last && parse_is_space(*first))
|
||||
first++;
|
||||
|
||||
return first;
|
||||
@@ -53,8 +53,7 @@ parse_skip_wspace(const char* first, const char* last) {
|
||||
|
||||
const char*
|
||||
parse_skip_wspace(const char* first) {
|
||||
// Assume isspace('\0') == false.
|
||||
while (std::isspace(*first))
|
||||
while (parse_is_space(*first))
|
||||
first++;
|
||||
|
||||
return first;
|
||||
@@ -190,7 +189,7 @@ parse_list(const char* first, const char* last, torrent::Object* dest) {
|
||||
return first;
|
||||
}
|
||||
|
||||
void
|
||||
const char*
|
||||
parse_whole_list(const char* first, const char* last, torrent::Object* dest) {
|
||||
std::string str;
|
||||
|
||||
@@ -208,8 +207,7 @@ parse_whole_list(const char* first, const char* last, torrent::Object* dest) {
|
||||
*dest = str;
|
||||
}
|
||||
|
||||
if (first != last)
|
||||
throw torrent::input_error("Junk at end of input.");
|
||||
return first;
|
||||
}
|
||||
|
||||
std::string
|
||||
|
||||
Reference in New Issue
Block a user