Ignore:
Timestamp:
Nov 16, 2009, 11:27:19 PM (12 years ago)
Author:
Jari Häkkinen
Message:

Merged trunk changes -r782:844 to replacing_gnuplot branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/replacing_gnuplot/lib/utility.cc

    r784 r845  
    33/*
    44  Copyright (C) 2006, 2007, 2009 Jari Häkkinen, Peter Johansson
    5   Copyright (C) 2008 Peter Johansson
     5  Copyright (C) 2008, 2009 Peter Johansson
    66
    77  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    167167
    168168
    169   bool is_int(std::string s)
    170   {
    171     std::stringstream ss(s);
    172     int a;
    173     ss >> a;
    174     if(ss.fail())
    175       return false;
    176     // Check that nothing is left on stream
    177     std::string b;
    178     ss >> b;
    179     return b.empty();
    180   }
    181 
    182 
    183169  std::string ltrim(std::string str)
    184170  {
     
    197183      throw std::runtime_error(ss.str());
    198184    }
     185  }
     186
     187
     188  void mkdir_p(const std::string& dir)
     189  {
     190    if (node_exist(dir))
     191      return;
     192    std::string mother = directory_name(dir);
     193    mkdir_p(mother);
     194    mkdir(dir);
    199195  }
    200196
Note: See TracChangeset for help on using the changeset viewer.