* 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:
rakshasa
2007-07-17 16:24:57 +00:00
parent 3c7144092e
commit 350bdfde7e
18 changed files with 368 additions and 136 deletions
+4 -6
View File
@@ -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