* Added '-n' flag that disables loading of ~/.rtorrent.rc.

* Re-added priority change when a download finishes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@686 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-05-09 20:50:07 +00:00
parent 6d07bf3540
commit a851264787
8 changed files with 68 additions and 28 deletions
+16
View File
@@ -74,6 +74,7 @@ OptionParser::process(int argc, char** argv) {
int c;
std::string optString = create_optstring();
optind = 0;
opterr = 0;
while ((c = getopt(argc, argv, optString.c_str())) != -1)
@@ -85,6 +86,21 @@ OptionParser::process(int argc, char** argv) {
return optind;
}
bool
OptionParser::has_flag(char flag, int argc, char** argv) {
int result;
char options[2] = { flag, '\0' };
optind = 0;
opterr = 0;
while ((result = getopt(argc, argv, options)) != -1)
if (result == flag)
return true;
return false;
}
std::string
OptionParser::create_optstring() {
std::string s;