* Allow "print" command to take a list of parameters.

* Added "d_{start,stop,open,close,erase}" commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@934 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-07-11 19:22:34 +00:00
parent 36251a46bf
commit 3570602a08
6 changed files with 92 additions and 57 deletions
+5 -1
View File
@@ -80,6 +80,8 @@ parse_command_single(const char* first) {
parse_command_single(first, first + std::strlen(first));
}
// Set 'download' to NULL to call the generic functions, thus reusing
// the code below for both cases.
torrent::Object
parse_command_d_single(core::Download* download, const char* first, const char* last) {
first = std::find_if(first, last, std::not1(command_map_is_space()));
@@ -97,8 +99,10 @@ parse_command_d_single(core::Download* download, const char* first, const char*
torrent::Object args;
parse_whole_list(first + 1, last, &args);
// Replace any strings starting with '$' with the result of the
// following command.
if (args.is_list()) {
for (torrent::Object::list_type::iterator itr = args.as_list().begin(), last = args.as_list().begin(); itr != last; itr++) {
for (torrent::Object::list_type::iterator itr = args.as_list().begin(), last = args.as_list().end(); itr != last; itr++) {
if (!itr->is_string())
continue;