Changeset 469 for branches


Ignore:
Timestamp:
Aug 31, 2007, 11:40:14 AM (16 years ago)
Author:
Peter Johansson
Message:

fixes #259

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.6-stable/bin/Parameter.cc

    r430 r469  
    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;
     
    7790      }
    7891      else if (myargv=="-t" || myargv=="--target"){
    79         if (++i<argc){
     92        if (value.size()) {
     93          targetdir_= value;
     94          ok=true;
     95        }
     96        else if (++i<argc){
    8097          targetdir_= std::string(argv[i]);
    8198          ok=true;
     
    209226    cs.width(0)=79;
    210227    cs << PACKAGE_STRING
    211        << "\nCopyright (C) 2007 Jari Häkkinen and Peter Johansson.\n\n"
     228       << "\nCopyright (C) 2007 Jari Häkkinen and Peter Johansson.\n\n"
    212229       << "This is free software; see the source for copying conditions. "
    213230       << "There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR "
Note: See TracChangeset for help on using the changeset viewer.