Changeset 475 for trunk/bin


Ignore:
Timestamp:
Aug 31, 2007, 3:27:33 PM (14 years ago)
Author:
Peter Johansson
Message:

Merged patch release 0.6.3 to trunk. Delta 0.6.3 - 0.6.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.cc

    r442 r475  
    22
    33/*
    4   Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
     4  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
    55
    66  This file is part of svndigest, http://trac.thep.lu.se/trac/svndigest
     
    4343    for (int i=1; i<argc; ++i) {
    4444      bool ok=false;
    45       std::string myargv(argv[i]);
     45      std::stringstream ss(argv[i]);
     46      std::string myargv("");
     47      std::string value("");
     48      getline(ss, myargv, '=');
     49      getline(ss, value);
     50
    4651      if (myargv=="--config-file"){
    47         if (++i<argc){
     52        if (value.size()) {
     53          config_file_= value;
     54          ok=true;
     55        }
     56        else if (++i<argc){
    4857          config_file_= std::string(argv[i]);
    4958          ok=true;
     
    6776      }
    6877      else if (myargv=="-r" || myargv=="--root"){
    69         if (++i<argc){
     78        if (value.size()) {
     79          root_= value;
     80          ok=true;
     81        }
     82        else if (++i<argc){
    7083          root_= std::string(argv[i]);
    7184          ok=true;
     
    8598      }
    8699      else if (myargv=="-t" || myargv=="--target"){
    87         if (++i<argc){
     100        if (value.size()) {
     101          targetdir_= value;
     102          ok=true;
     103        }
     104        else if (++i<argc){
    88105          targetdir_= std::string(argv[i]);
    89106          ok=true;
     
    219236    cs.width(0)=79;
    220237    cs << PACKAGE_STRING
    221        << "\nCopyright (C) 2007 Jari Häkkinen and Peter Johansson.\n\n"
     238       << "\nCopyright (C) 2007 Jari Häkkinen and Peter Johansson.\n\n"
    222239       << "This is free software; see the source for copying conditions. "
    223240       << "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR "
Note: See TracChangeset for help on using the changeset viewer.