Changeset 339


Ignore:
Timestamp:
May 19, 2007, 11:33:08 AM (14 years ago)
Author:
Peter Johansson
Message:

ignoring .in in filenames. fixes #199

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Parser.cc

    r299 r339  
    3838
    3939
    40   Parser::Parser(const std::string& path)
     40  Parser::Parser(std::string path)
    4141  {
    4242    std::ifstream is(path.c_str());
    4343    assert(is.good());
    4444    std::vector<std::pair<std::string, std::string> > codon;
     45    // Ignore trailing '.in' in file names
     46    if (match_end(path.rbegin(), path.rend(), ".in"))
     47      path = path.substr(0, path.size()-3);
    4548    if (match_end(path.rbegin(), path.rend(), ".ac") ||
    4649        match_end(path.rbegin(), path.rend(), ".am") ||
  • trunk/lib/Parser.h

    r261 r339  
    5656    /// @brief Constructor
    5757    ///
    58     explicit Parser(const std::string&);
     58    explicit Parser(std::string);
    5959
    6060    ///
Note: See TracChangeset for help on using the changeset viewer.