Changeset 1513


Ignore:
Timestamp:
Sep 23, 2012, 6:09:08 AM (7 years ago)
Author:
Peter Johansson
Message:

remove trailing whitespace

Location:
trunk
Files:
63 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/AbstractParameter.cc

    r1373 r1513  
    4949
    5050  AbstractParameter::AbstractParameter(void)
    51     : cmd_( std::string("Mandatory arguments to long options ") + 
    52             std::string("are mandatory for short options too.")), 
     51    : cmd_( std::string("Mandatory arguments to long options ") +
     52            std::string("are mandatory for short options too.")),
    5353      help_(cmd_),
    54       root_(cmd_, "r,root", 
     54      root_(cmd_, "r,root",
    5555            "svn controlled directory to perform statistics on [.]"),
    5656      verbose_(cmd_, "v,verbose", "explain what is being done"),
     
    7777    check_readable(root);
    7878    check_is_dir(root);
    79    
     79
    8080    std::string save_wd = pwd();
    8181    chdir(root);
    8282    root_full_ = pwd();
    8383    chdir(save_wd);
    84    
     84
    8585    // take care of when root is a symlink (see ticket #477)
    8686    struct stat stats;
     
    9898      return;
    9999    std::stringstream ss;
    100     ss << cmd_.program_name() << ": cannot stat '" << path << "': " 
     100    ss << cmd_.program_name() << ": cannot stat '" << path << "': "
    101101       << strerror(errno);
    102102    throw yat::utility::cmd_error(ss.str());
    103103  }
    104104
    105  
     105
    106106  void AbstractParameter::check_is_dir(std::string path) const
    107107  {
     
    115115    std::stringstream ss;
    116116    assert(errno);
    117     ss << cmd_.program_name() << ": '" << path << "': " 
     117    ss << cmd_.program_name() << ": '" << path << "': "
    118118       << strerror(errno);
    119119    throw yat::utility::cmd_error(ss.str());
    120120  }
    121121
    122  
     122
    123123  void AbstractParameter::check_readable(std::string path) const
    124124  {
     
    126126      return;
    127127    std::stringstream ss;
    128     ss << cmd_.program_name() << ": cannot open '" << path << "': " 
     128    ss << cmd_.program_name() << ": cannot open '" << path << "': "
    129129       << strerror(errno);
    130130    throw yat::utility::cmd_error(ss.str());
    131131  }
    132  
     132
    133133
    134134  void AbstractParameter::init(void)
  • trunk/bin/AbstractParameter.h

    r1293 r1513  
    3535
    3636namespace theplu {
    37 namespace yat { 
     37namespace yat {
    3838namespace utility {
    3939  class OptionHelp;
  • trunk/bin/Parameter.cc

    r1435 r1513  
    2525#include "Parameter.h"
    2626
    27 #include "lib/utility.h" 
     27#include "lib/utility.h"
    2828
    2929#include "yat/ColumnStream.h"
     
    4646
    4747  Parameter::Parameter(void)
    48     : config_file_(cmd_, "config-file", 
     48    : config_file_(cmd_, "config-file",
    4949                   "configuration file [<ROOT>/.svndigest/config]"),
    50       generate_config_(cmd_, "g,generate-config", 
     50      generate_config_(cmd_, "g,generate-config",
    5151                       "write configuration to standard output"),
    52       ignore_cache_(cmd_, "ignore-cache", 
     52      ignore_cache_(cmd_, "ignore-cache",
    5353                    std::string("ignore cache files and analyze ") +
    5454                    std::string("everything from repository"))
     
    8585      if (S_ISDIR(nodestat.st_mode)) {
    8686        std::stringstream ss;
    87         ss << cmd_.program_name() << ": '" << config_file_.value() 
     87        ss << cmd_.program_name() << ": '" << config_file_.value()
    8888           << "' is a directory";
    8989        throw yat::utility::cmd_error(ss.str());
  • trunk/bin/Parameter.h

    r1293 r1513  
    4646
    4747    std::string config_file(void) const;
    48    
     48
    4949    bool generate_config(void) const ;
    5050    bool ignore_cache(void) const;
  • trunk/bin/svncopyrightParameter.h

    r1119 r1513  
    3838
    3939  // class for command line options.
    40   class svncopyrightParameter : public Parameter 
     40  class svncopyrightParameter : public Parameter
    4141  {
    4242  public:
  • trunk/bin/svndigest.cc

    r1423 r1513  
    6060void copy_option2config(const svndigestParameter&, Configuration&);
    6161
    62 void create_file_struct(std::string stats_type, 
     62void create_file_struct(std::string stats_type,
    6363                        const theplu::svndigest::Stats& stats);
    6464
     
    131131
    132132    if (option.report())
    133       print_main_page(tree.name(), tree.log(), tree.stats(), 
     133      print_main_page(tree.name(), tree.log(), tree.stats(),
    134134                      tree.svn_info().url(), file_count);
    135135
     
    151151{
    152152  try {
    153     if (option.format().present()) 
     153    if (option.format().present())
    154154      Configuration::instance().image_format(option.format().value());
    155155  }
    156156  catch (std::runtime_error& e) {
    157157    std::stringstream ss;
    158     ss << "invalid argument `" 
    159        << option.format().value() << "' for `--" 
     158    ss << "invalid argument `"
     159       << option.format().value() << "' for `--"
    160160       << option.format().long_name() << "'\n"
    161161       << e.what() << "\n"
    162        << "Try `svndigest --help' for more information.\n"; 
     162       << "Try `svndigest --help' for more information.\n";
    163163    throw std::runtime_error(ss.str());
    164164  }
    165165  try {
    166     if (option.anchor_format().present()) 
     166    if (option.anchor_format().present())
    167167      config.image_anchor_format(option.anchor_format().value());
    168168  }
    169169  catch (std::runtime_error& e) {
    170170    std::stringstream ss;
    171     ss << "invalid argument `" 
    172        << option.anchor_format().value() << "' for `--" 
     171    ss << "invalid argument `"
     172       << option.anchor_format().value() << "' for `--"
    173173       << option.anchor_format().long_name() << "'\n"
    174174       << e.what() << "\n"
    175        << "Try `svndigest --help' for more information.\n"; 
     175       << "Try `svndigest --help' for more information.\n";
    176176    throw std::runtime_error(ss.str());
    177177  }
     
    179179
    180180
    181 void create_file_struct(std::string stats_type, 
     181void create_file_struct(std::string stats_type,
    182182                        const theplu::svndigest::Stats& stats)
    183183{
     
    230230
    231231void prepare_report(const svndigestParameter& option, const std::string& repo,
    232                     const Node& tree) 
    233 {
    234   std::string target_path = concatenate_path(option.targetdir(), 
     232                    const Node& tree)
     233{
     234  std::string target_path = concatenate_path(option.targetdir(),
    235235                                             file_name(option.root()));
    236236  // remove target if needed
     
    239239    remove_target(target_path, option.verbose());
    240240  }
    241  
     241
    242242  if (option.verbose())
    243243    std::cout << "Retrieving log information" << std::endl;
  • trunk/bin/svndigestParameter.cc

    r1435 r1513  
    5353  svndigestParameter::svndigestParameter(void)
    5454    : Parameter(),
    55       anchor_format_(cmd_,"anchor-format", 
     55      anchor_format_(cmd_,"anchor-format",
    5656                     "override anchor image format defined in config file"),
    57       force_(cmd_, "f,force", 
     57      force_(cmd_, "f,force",
    5858             std::string("if sub-directory named <ROOT> exists in target dire")+
    5959             std::string("ctory, remove sub-directory before writing results")),
    6060      format_(cmd_,"format", "override image format defined in config file"),
    6161      report_(cmd_, "report", "create no HTML report", true),
    62       revisions_(cmd_, "revisions", 
     62      revisions_(cmd_, "revisions",
    6363                 "use revision number as time scale instead of dates [dates]"),
    6464      target_(cmd_, "t,target", "output directory [.]")
     
    7272
    7373
    74   const yat::utility::OptionArg<std::string>& 
     74  const yat::utility::OptionArg<std::string>&
    7575  svndigestParameter::anchor_format(void) const
    7676  {
     
    8989        check_readable(target_.value());
    9090        check_is_dir(target_.value());
    91         std::string path = concatenate_path(target_.value(),root_basename()); 
     91        std::string path = concatenate_path(target_.value(),root_basename());
    9292        if (access_rights(target_.value(), "w")) {
    9393          std::stringstream ss;
    94           ss << "svndigest: cannot create directory '" << path 
     94          ss << "svndigest: cannot create directory '" << path
    9595             << "': " << strerror(errno);
    9696          throw yat::utility::cmd_error(ss.str());
     
    116116
    117117
    118   const yat::utility::OptionArg<std::string>& 
     118  const yat::utility::OptionArg<std::string>&
    119119  svndigestParameter::format(void) const
    120120  {
     
    128128    format_.print_arg("=FMT");
    129129    target_.print_arg("=TARGET");
    130     help_.synopsis() = 
     130    help_.synopsis() =
    131131      "Generate statistical report for a subversion repository\n";
    132132
  • trunk/bin/svndigestParameter.h

    r1234 r1513  
    3737
    3838namespace theplu {
    39 namespace yat { 
     39namespace yat {
    4040namespace utility {
    4141  class OptionSwitch;
     
    4444
    4545  // class for command line options.
    46   class svndigestParameter : public Parameter 
     46  class svndigestParameter : public Parameter
    4747  {
    4848  public:
     
    5050    virtual ~svndigestParameter(void);
    5151    const yat::utility::OptionArg<std::string>& anchor_format(void) const;
    52    
     52
    5353    bool force(void) const;
    5454    const yat::utility::OptionArg<std::string>& format(void) const;
  • trunk/bin/svndigest_copy_cacheParameter.cc

    r1435 r1513  
    3232
    3333  svndigest_copy_cacheParameter::svndigest_copy_cacheParameter(void)
    34     : AbstractParameter(), 
     34    : AbstractParameter(),
    3535      target_(cmd_, "t,target", "svn wc cache is copied to")
    3636  {
     
    4646  {
    4747    analyse_root(root_.value());
    48     // check target 
     48    // check target
    4949    check_existence(target_.value());
    5050    check_readable(target_.value());
     
    5757    if (root()==target()) {
    5858      std::stringstream ss;
    59       ss << cmd_.program_name() << ": '" << root() << "' and '" 
     59      ss << cmd_.program_name() << ": '" << root() << "' and '"
    6060         << target() << "' are identical (no copy)\n";
    6161      throw yat::utility::cmd_error(ss.str());
     
    6868    target_.print_arg("=TARGET");
    6969    root_.description("svn wc cache is copied from");
    70     help_.synopsis() = 
     70    help_.synopsis() =
    7171      "Copy svndigest cache from one working copy to another.\n";
    7272    version_.program_name("svndigest-copy-cache");
  • trunk/bin/svndigest_copy_cacheParameter.h

    r1294 r1513  
    3636
    3737  // class for command line options.
    38   class svndigest_copy_cacheParameter : public AbstractParameter 
     38  class svndigest_copy_cacheParameter : public AbstractParameter
    3939  {
    4040  public:
     
    4848    void set_default1(void);
    4949    yat::utility::OptionArg<std::string> target_;
    50  
     50
    5151  };
    5252
  • trunk/lib/AddStats.h

    r1194 r1513  
    3636  {
    3737  public:
    38     /// 
    39     /// @brief Default Constructor 
     38    ///
     39    /// @brief Default Constructor
    4040    ///
    4141    explicit AddStats(const std::string& path);
     
    4545  private:
    4646    void do_parse(const std::string&, svn_revnum_t);
    47     unsigned int max_element(const SumVector&) const; 
     47    unsigned int max_element(const SumVector&) const;
    4848
    4949  };
    5050}} // end of namespace svndigest end of namespace theplu
    5151
    52 #endif 
     52#endif
  • trunk/lib/Alias.cc

    r978 r1513  
    3636  {}
    3737
    38  
     38
    3939  std::string Alias::name(void) const
    4040  {
     
    4949
    5050  bool operator<(const Alias& lhs, const Alias& rhs)
    51   { 
    52     return lhs.name() < rhs.name(); 
     51  {
     52    return lhs.name() < rhs.name();
    5353  }
    5454
    5555
    5656  bool operator==(const Alias& lhs, const Alias& rhs)
    57   { 
    58     return lhs.name() == rhs.name(); 
     57  {
     58    return lhs.name() == rhs.name();
    5959  }
    6060
  • trunk/lib/Alias.h

    r1237 r1513  
    2828namespace svndigest{
    2929
    30   /// 
     30  ///
    3131  /// @brief Class holding a copyright alias
    32   /// 
     32  ///
    3333  class Alias
    3434  {
     
    4343    ///
    4444    Alias(std::string alias, size_t id);
    45    
     45
    4646    ///
    4747    /// @return name
     
    5757    //Alias& Alias(const Alias&) using compiler generated copy ctor
    5858    //Alias& operator=(const Alias&) using compiler generated operator
    59    
     59
    6060    std::string name_;
    6161    size_t id_;
     
    6868  ///
    6969  /// @brief Functor to compare using Id
    70   /// 
     70  ///
    7171  struct IdCompare
    7272  {
  • trunk/lib/BlameStats.h

    r1194 r1513  
    3636  {
    3737  public:
    38     /// 
    39     /// @brief Default Constructor 
     38    ///
     39    /// @brief Default Constructor
    4040    ///
    4141    explicit BlameStats(const std::string& path);
     
    5050}} // end of namespace svndigest end of namespace theplu
    5151
    52 #endif 
     52#endif
  • trunk/lib/ClassicStats.cc

    r1478 r1513  
    8181
    8282
    83   unsigned int 
    84   ClassicStats::max_element(const SumVector& v) const 
     83  unsigned int
     84  ClassicStats::max_element(const SumVector& v) const
    8585  {
    8686    if (v.size()==0)
  • trunk/lib/ClassicStats.h

    r1194 r1513  
    3636  {
    3737  public:
    38     /// 
    39     /// @brief Default Constructor 
     38    ///
     39    /// @brief Default Constructor
    4040    ///
    4141    explicit ClassicStats(const std::string& path);
     
    4545  private:
    4646    void do_parse(const std::string&, svn_revnum_t);
    47     unsigned int max_element(const SumVector&) const; 
     47    unsigned int max_element(const SumVector&) const;
    4848
    4949  };
    5050}} // end of namespace svndigest end of namespace theplu
    5151
    52 #endif 
     52#endif
  • trunk/lib/Colors.cc

    r1267 r1513  
    6565    color_map_[12].str="000000";
    6666    // calculate corresponding rgb values
    67     for (std::vector<color>::iterator col = color_map_.begin(); 
     67    for (std::vector<color>::iterator col = color_map_.begin();
    6868         col!=color_map_.end(); ++col) {
    6969      str2rgb(col->str, col->r, col->g, col->b);
     
    152152      b = 17*to_decimal(str[2]);
    153153    }
    154     else 
     154    else
    155155      throw std::runtime_error("invalid color format: " + str);
    156156  }
  • trunk/lib/Commitment.cc

    r1306 r1513  
    3434
    3535
    36   Commitment::Commitment(const std::string& author, const std::string& date, 
     36  Commitment::Commitment(const std::string& author, const std::string& date,
    3737                         const std::string& msg, svn_revnum_t rev)
    3838    : author_(author), date_(date), msg_(msg), rev_(rev)
  • trunk/lib/Commitment.h

    r1306 r1513  
    4848       \brief The contructor.
    4949    */
    50     Commitment(const std::string& author, const std::string& date, 
     50    Commitment(const std::string& author, const std::string& date,
    5151               const std::string& msg, svn_revnum_t rev);
    5252
     
    8585  };
    8686
    87  
     87
    8888  struct GreaterRevision
    8989  {
  • trunk/lib/Configuration.h

    r1502 r1513  
    6565       \return vector of parse codons for the given \a file_name
    6666     */
    67     const std::vector<std::pair<std::string, std::string> >* 
     67    const std::vector<std::pair<std::string, std::string> >*
    6868    codon(std::string file_name) const;
    6969
     
    104104    void image_format(const std::string&);
    105105
    106     /// 
     106    ///
    107107    /// throw if stream is not a valid config
    108108    ///
    109109    /// @brief load configuration from stream
    110     /// 
     110    ///
    111111    void load(std::istream&);
    112112
     
    133133       \return NULL if there is no prop for \a filename in config
    134134     */
    135     const std::map<std::string, std::string>& 
     135    const std::map<std::string, std::string>&
    136136    svn_properties(const std::string& filename) const;
    137137
     
    149149
    150150  private:
    151     /// 
     151    ///
    152152    /// Creates a Config object with default settings.
    153153    ///
    154     /// @brief Default Constructor 
    155     /// 
     154    /// @brief Default Constructor
     155    ///
    156156    Configuration(void);
    157157    // Copy Constructor not implemented
     
    184184                     const std::string& filename) const;
    185185
    186     /// 
     186    ///
    187187    /// @brief load deafult configuration
    188     /// 
     188    ///
    189189    void load(void);
    190190
     
    193193       Translate string \a str using dictionary \a dict
    194194
    195        \note \a str must be equal to d.first (see regexp(5)), 
     195       \note \a str must be equal to d.first (see regexp(5)),
    196196       or behavior is unspecified.
    197197
     
    201201    std::string translate(const std::string& str,
    202202                          const std::pair<std::string, std::string>& d) const;
    203    
     203
    204204    void validate_dictionary(void) const;
    205205
     
    211211
    212212    bool missing_copyright_warning_;
    213    
     213
    214214    typedef std::vector<std::pair<std::string, std::string> > VectorPair;
    215     typedef std::vector<std::pair<std::string, VectorPair> > String2Codons; 
     215    typedef std::vector<std::pair<std::string, VectorPair> > String2Codons;
    216216    String2Codons string2codons_;
    217217
     
    247247  /**
    248248     Trim \a c from beginning and end of string \a str;
    249      
     249
    250250     \return resulting string
    251251
     
    280280
    281281#endif
    282 
    283 
  • trunk/lib/CopyrightVisitor.h

    r1456 r1513  
    9999       \return true if Copyright block is found
    100100     */
    101     bool detect_copyright(const std::string& path, std::string& block, 
    102                           size_t& start_at_line, size_t& end_at_line, 
     101    bool detect_copyright(const std::string& path, std::string& block,
     102                          size_t& start_at_line, size_t& end_at_line,
    103103                          std::string& prefix) const;
    104104
  • trunk/lib/Date.h

    r978 r1513  
    3131
    3232  ///
    33   /// Class taking care of time and date handling. 
     33  /// Class taking care of time and date handling.
    3434  ///
    35   class Date 
     35  class Date
    3636  {
    3737  public:
     
    8383    /// \a format sets the format of the returned string. Supported
    8484    /// parameters are:
    85     /// %a - short string of weekday e.g. Wed 
     85    /// %a - short string of weekday e.g. Wed
    8686    /// %A - long string of weekday e.g. Wednesday
    87     /// %b - short string of month e.g. Apr 
     87    /// %b - short string of month e.g. Apr
    8888    /// %B - long string of weekday e.g. April
    8989    /// %d - day of month integer e.g. 9
     
    101101    /// %Z - timezone abbrevation
    102102    ///
    103     /// \return date and time 
     103    /// \return date and time
    104104    ///
    105105    std::string operator()(std::string format) const;
     
    115115    /// @return true if lhs is earlier than \a rhs
    116116    ///
    117     inline bool operator<(const Date& rhs) const 
     117    inline bool operator<(const Date& rhs) const
    118118    { return time_<rhs.time_; }
    119119
  • trunk/lib/Directory.cc

    r1485 r1513  
    117117
    118118  std::string Directory::href(void) const
    119   { 
     119  {
    120120    return name() + "/index.html";
    121121  }
  • trunk/lib/Directory.h

    r1290 r1513  
    5353    /// traversed.
    5454    ///
    55     Directory(const unsigned int level, const std::string& path, 
     55    Directory(const unsigned int level, const std::string& path,
    5656              const std::string& output="", const std::string& project="");
    5757
  • trunk/lib/DirectoryPrinter.cc

    r1435 r1513  
    8181
    8282  void DirectoryPrinter::print_core(const std::string& stats_type,
    83                              const std::string& user, 
     83                             const std::string& user,
    8484                             const std::string& line_type,
    8585                             const SVNlog& log) const
     
    100100    assert(os.good());
    101101    if (node().local_path().empty())
    102       print_header(os, node().name(), directory_.level_+3, user, line_type, "index.html", 
     102      print_header(os, node().name(), directory_.level_+3, user, line_type, "index.html",
    103103                   stats_type);
    104104    else
    105       print_header(os, node().name(), directory_.level_+3, user, line_type, 
     105      print_header(os, node().name(), directory_.level_+3, user, line_type,
    106106                   node().local_path()+"/index.html", stats_type);
    107107    path_anchor(os);
     
    115115    else
    116116      ss << imagedir << "/index";
    117     os << "<p class=\"plot\">\n"; 
     117    os << "<p class=\"plot\">\n";
    118118    os << image(ss.str());
    119119    os << "</p>\n";
     
    122122    if (user!="all")
    123123      os << " for " << user;
    124     os << "</h3>";     
     124    os << "</h3>";
    125125    os << "<table class=\"listings\">\n";
    126126    os << "<thead>\n";
     
    146146
    147147    // print html links to daughter nodes
    148     for (NodeConstIterator d = directory_.daughters_.begin(); 
     148    for (NodeConstIterator d = directory_.daughters_.begin();
    149149         d!=directory_.daughters_.end(); ++d) {
    150150
     
    164164    }
    165165    else {
    166       os << "<td>" << stats.lines(user); 
    167       if (stats.lines(user)) 
    168         os << " (" << percent(stats.lines(user),stats.lines()) << "%)"; 
     166      os << "<td>" << stats.lines(user);
     167      if (stats.lines(user))
     168        os << " (" << percent(stats.lines(user),stats.lines()) << "%)";
    169169      os << "</td>\n";
    170       os << "<td>" << stats.code(user); 
    171       if (stats.code(user)) 
    172         os << " (" << percent(stats.code(user),stats.code()) << "%)"; 
     170      os << "<td>" << stats.code(user);
     171      if (stats.code(user))
     172        os << " (" << percent(stats.code(user),stats.code()) << "%)";
    173173      os << "</td>\n";
    174       os << "<td>" << stats.comments(user); 
    175       if (stats.comments(user)) 
    176         os << " (" << percent(stats.comments(user),stats.comments()) << "%)"; 
     174      os << "<td>" << stats.comments(user);
     175      if (stats.comments(user))
     176        os << " (" << percent(stats.comments(user),stats.comments()) << "%)";
    177177      os << "</td>\n";
    178       os << "<td>" << stats.empty(user); 
    179       if (stats.empty(user)) 
    180         os << " (" << percent(stats.empty(user),stats.empty()) << "%)"; 
     178      os << "<td>" << stats.empty(user);
     179      if (stats.empty(user))
     180        os << " (" << percent(stats.empty(user),stats.empty()) << "%)";
    181181      os << "</td>\n";
    182182    }
     
    189189    os << "\n";
    190190    print_footer(os);
    191     os.close(); 
     191    os.close();
    192192  }
    193193
  • trunk/lib/DirectoryPrinter.h

    r1290 r1513  
    6767    void print_core(bool verbose=false) const;
    6868
    69     void print_core(const std::string& stats_type, const std::string& user, 
     69    void print_core(const std::string& stats_type, const std::string& user,
    7070                    const std::string& line_type, const SVNlog&) const;
    7171
    7272
    73    
     73
    7474
    7575    const Directory& directory_;
  • trunk/lib/FilePrinter.cc

    r1418 r1513  
    5555namespace svndigest{
    5656
    57   FilePrinter::FilePrinter(const File& file) 
     57  FilePrinter::FilePrinter(const File& file)
    5858    : NodePrinter(), file_(file)
    5959  {
     
    107107    blame.reset();
    108108
    109     std::vector<LineTypeParser::line_type>::const_iterator 
     109    std::vector<LineTypeParser::line_type>::const_iterator
    110110      line_type(parser.type().begin());
    111111    int last=0;
     
    126126    // brightest color (for oldest rev in log) is set to 192.
    127127    double k = 192.0/(first-last);
    128     double m = -last*k; 
     128    double m = -last*k;
    129129    while (blame.valid()) {
    130130      std::string color;
     
    136136      os << "<tr>\n<td class=\"rev\">";
    137137      std::stringstream color_ss;
    138       color_ss << "#" << color << color << color; 
     138      color_ss << "#" << color << color << color;
    139139      os << "<font color=\"" << color_ss.str() << "\">"
    140140         << trac_revision(blame.revision(), color_ss.str())
    141          << "</font></td>\n<td class=\"date\"><font color=\"#" << color 
     141         << "</font></td>\n<td class=\"date\"><font color=\"#" << color
    142142         << color << color << "\">" ;
    143143      hs << date("%d %b %y");
    144144      os << "</font></td>\n<td class=\"author\">";
    145       const std::string& author_color = 
     145      const std::string& author_color =
    146146        Colors::instance().color_str(blame.author());
    147147      assert(!author_color.empty());
     
    152152      if (*line_type==LineTypeParser::other)
    153153        os << "line-other";
    154       else if (*line_type==LineTypeParser::comment || 
    155                *line_type==LineTypeParser::copyright)       
     154      else if (*line_type==LineTypeParser::comment ||
     155               *line_type==LineTypeParser::copyright)
    156156        os << "line-comment";
    157157      else if (*line_type==LineTypeParser::code)
     
    173173
    174174
    175   void FilePrinter::print_core(const bool verbose) const 
     175  void FilePrinter::print_core(const bool verbose) const
    176176  {
    177177    if (!Configuration::instance().output_blame_information())
     
    187187
    188188
    189   void FilePrinter::print_core(const std::string& stats_type, 
     189  void FilePrinter::print_core(const std::string& stats_type,
    190190                        const std::string& user, const std::string& line_type,
    191                         const SVNlog& log) const 
     191                        const SVNlog& log) const
    192192  {
    193193    std::string lpath = node().local_path();
     
    213213    else
    214214      ss << imagefile;
    215     os << "<p class=\"plot\">\n"; 
     215    os << "<p class=\"plot\">\n";
    216216    os << image(ss.str());
    217217    os << "</p>\n";
     
    221221    if (Configuration::instance().output_blame_information())
    222222      os << "<h3>"
    223          << anchor(blame_output_file_name(), "Blame Information", file_.level_+3) 
     223         << anchor(blame_output_file_name(), "Blame Information", file_.level_+3)
    224224         << "</h3>\n";
    225225
    226226    print_footer(os);
    227     os.close(); 
     227    os.close();
    228228  }
    229229
  • trunk/lib/FilePrinter.h

    r1290 r1513  
    3636  {
    3737  public:
    38     /// 
    39     /// @brief Default Constructor 
    40     /// 
     38    ///
     39    /// @brief Default Constructor
     40    ///
    4141    explicit FilePrinter(const File& file);
    4242
     
    6767
    6868    /**
    69        @brief Print blame output 
     69       @brief Print blame output
    7070    */
    7171    void print_blame(std::ofstream& os) const;
     
    7777    /// (or total).
    7878    ///
    79     void print_core(const std::string& stats_type, const std::string& user, 
    80                     const std::string& line_type, const SVNlog&) const; 
     79    void print_core(const std::string& stats_type, const std::string& user,
     80                    const std::string& line_type, const SVNlog&) const;
    8181
    8282    const Node& node(void) const;
     
    8989
    9090#endif
    91 
    92 
  • trunk/lib/Functor.cc

    r978 r1513  
    3535    : char1_(c1), char2_(c2)
    3636  {}
    37    
     37
    3838
    3939  not2Str::not2Str(std::string s1, std::string s2)
    4040    : str1_(s1), str2_(s2)
    4141  {}
    42    
     42
    4343}} // end of namespace svndigest and namespace theplu
  • trunk/lib/Functor.h

    r1495 r1513  
    3838  struct AlNum
    3939  {
    40     inline bool operator()(std::string::const_iterator i) const 
     40    inline bool operator()(std::string::const_iterator i) const
    4141    { return isalnum(*i); }
    4242  };
     
    4545  struct Digit
    4646  {
    47     inline bool operator()(std::string::const_iterator i) const 
     47    inline bool operator()(std::string::const_iterator i) const
    4848    { return isdigit(*i); }
    4949  };
     
    5454  public:
    5555    notChar(char);
    56     inline bool operator()(std::string::const_iterator i) const 
     56    inline bool operator()(std::string::const_iterator i) const
    5757    { return *i!=char_; }
    5858  private:
     
    6565  public:
    6666    not2Char(char, char);
    67     inline bool operator()(std::string::const_iterator i) const 
     67    inline bool operator()(std::string::const_iterator i) const
    6868    { return *i!=char1_ && *i!=char2_; }
    6969  private:
     
    7676  public:
    7777    not2Str(std::string, std::string);
    78     inline bool operator()(std::string::const_iterator i) const 
    79     { 
     78    inline bool operator()(std::string::const_iterator i) const
     79    {
    8080      return !(std::equal(str1_.begin(), str1_.end(), i) ||
    8181              std::equal(str2_.begin(), str2_.end(), i));
    82     } 
     82    }
    8383
    8484  private:
     
    9393  /// Requirements on T is that has rend and rbegin. T::value_type
    9494  /// must be comparable (i.e. have operator<)
    95   /// 
     95  ///
    9696  template <typename T>
    9797  struct LessReversed
     
    123123                           const std::pair<T1,T2>& y) {
    124124      return ((x.second<y.second) ||
    125               (!(y.second<x.second) && (x.first<y.first))); 
     125              (!(y.second<x.second) && (x.first<y.first)));
    126126    }
    127127  };
    128128
    129  
     129
    130130  ///
    131131  /// Functor working on pair.second, using a user passed functor.
     
    153153
    154154  };
    155  
     155
    156156  /**
    157157     Functor perfoming plus assignment on first argument using second argument
     
    182182}} // end of namespace svndigest end of namespace theplu
    183183
    184 #endif 
     184#endif
  • trunk/lib/Graph.cc

    r1418 r1513  
    196196
    197197
    198   void Graph::staircase(svn_revnum_t rev0, PLFLT y0, 
     198  void Graph::staircase(svn_revnum_t rev0, PLFLT y0,
    199199                        svn_revnum_t rev1, PLFLT y1)
    200200  {
  • trunk/lib/Graph.h

    r1332 r1513  
    5757     the appropriate modules. If not, rebuild and reinstall plplot.
    5858  */
    59   class Graph 
     59  class Graph
    6060  {
    6161  public:
  • trunk/lib/HtmlBuf.cc

    r1267 r1513  
    3333
    3434  HtmlBuf::HtmlBuf(std::streambuf& buf)
    35     : std::streambuf(), buf_(buf) 
     35    : std::streambuf(), buf_(buf)
    3636  {
    3737    map_['"']=std::string("&quot;");
     
    5353    if (i==map_.end())
    5454      return buf_.sputc(c);
    55     // writing 
    56     if (buf_.sputn(i->second.c_str(), i->second.size()) == 
     55    // writing
     56    if (buf_.sputn(i->second.c_str(), i->second.size()) ==
    5757        static_cast<std::streamsize>(i->second.size()))
    5858      return c;
  • trunk/lib/HtmlStream.h

    r1398 r1513  
    3030namespace svndigest{
    3131  ///
    32   /// \brief Convenient class for using HtmlBuf. 
     32  /// \brief Convenient class for using HtmlBuf.
    3333  ///
    3434  /// Class is created from another ostream, whose buffer is used to
  • trunk/lib/LineTypeParser.cc

    r1267 r1513  
    4141    : mode_(0), post_copyright_(false), copyright_found_(false)
    4242  {
    43     codon_ = Configuration::instance().codon(file_name(path)); 
     43    codon_ = Configuration::instance().codon(file_name(path));
    4444  }
    4545
     
    5353        post_copyright_ = true;
    5454        for (size_t i=0; i<line.size()&&post_copyright_; ++i)
    55           if (isalnum(line[i]) && 
     55          if (isalnum(line[i]) &&
    5656              !(i<copyright_prefix_.size() && copyright_prefix_[i]==line[i])){
    5757            post_copyright_ = false;
     
    8383      type_.push_back(text_mode(line));
    8484    return type_.back();
    85                      
     85
    8686  }
    8787
     
    9191    // mode zero means we are currently not in a comment
    9292    // if mode!=0 comment is closed by codon[mode-1].second -> mode=0
    93     // if codon[x-1].start is found and x >= mode -> mode=x 
     93    // if codon[x-1].start is found and x >= mode -> mode=x
    9494    line_type lt=other;
    9595    {
    9696      for (std::string::const_iterator iter=str.begin();iter!=str.end();++iter){
    9797        for (size_t i=mode_; i<codon_->size(); ++i) {
    98           if ( iter==str.begin() && (*codon_)[i].first[0] == '\n' && 
     98          if ( iter==str.begin() && (*codon_)[i].first[0] == '\n' &&
    9999               match_begin(iter, str.end(), (*codon_)[i].first.substr(1)) ) {
    100100            iter += (*codon_)[i].first.size()-1;
  • trunk/lib/LineTypeParser.h

    r978 r1513  
    3333  /**
    3434     \brief differentiate code, comments, and blank lines
    35      
     35
    3636     Class gets parsing rules from Configuration. Which rules depends
    3737     on the filename. Typical use is then to add lines using the add
     
    5555    };
    5656
    57     /// 
    58     /// @brief Constructor 
    59     /// \param filename is used to decide which parsing rules to use 
     57    ///
     58    /// @brief Constructor
     59    /// \param filename is used to decide which parsing rules to use
    6060    ///
    6161    explicit LineTypeParser(std::string filename);
     
    6464    inline bool copyright_found(void) const { return copyright_found_; }
    6565
    66     inline size_t end_line(void) const { return end_line_; } 
     66    inline size_t end_line(void) const { return end_line_; }
    6767
    6868    /**
     
    7171       \return line_type of parsed line
    7272
    73        The line is parsed and added to internal vector. 
     73       The line is parsed and added to internal vector.
    7474     */
    7575    line_type parse(std::string line);
     
    7777    const std::string& prefix(void) const { return copyright_prefix_; }
    7878
    79     inline size_t start_line(void) const { return start_line_; } 
     79    inline size_t start_line(void) const { return start_line_; }
    8080
    8181    ///
     
    9999    size_t start_line_;
    100100    size_t end_line_;
    101    
     101
    102102    std::vector<line_type> type_;
    103103    const std::vector<std::pair<std::string, std::string> >* codon_;
     
    110110  {
    111111    inline bool operator()(const char c) const
    112     { 
    113       return isalnum(c); 
     112    {
     113      return isalnum(c);
    114114    }
    115115  };
     
    119119  ///
    120120  /// @see isspace
    121   /// 
     121  ///
    122122  /// @return true if @a c is '\t', '\n', '\v', '\f' or ' '.
    123123  ///
     
    125125  {
    126126    inline bool operator()(const char c) const
    127     { 
    128       return isspace(c); 
     127    {
     128      return isspace(c);
    129129    }
    130130  };
     
    132132}} // end of namespace svndigest end of namespace theplu
    133133
    134 #endif 
     134#endif
  • trunk/lib/NodeCounter.cc

    r1449 r1513  
    3939
    4040
    41   bool NodeCounter::enter(Directory& dir) 
     41  bool NodeCounter::enter(Directory& dir)
    4242  {
    4343    if (dir.svndigest_ignore())
     
    4646    return true;
    4747  }
    48  
     48
    4949
    5050  unsigned int NodeCounter::files(void) const
     
    5454
    5555
    56   void NodeCounter::leave(Directory& dir) 
     56  void NodeCounter::leave(Directory& dir)
    5757  {
    5858  }
    59  
     59
    6060
    6161  void NodeCounter::visit(File& file)
     
    6666
    6767}} // end of namespace svndigest and namespace theplu
    68 
  • trunk/lib/NodeCounter.h

    r1254 r1513  
    7474    unsigned int files_;
    7575  };
    76  
     76
    7777
    7878}} // end of namespace svndigest and namespace theplu
  • trunk/lib/NodePrinter.cc

    r1449 r1513  
    4444namespace svndigest{
    4545
    46   NodePrinter::NodePrinter(void) 
     46  NodePrinter::NodePrinter(void)
    4747  {
    4848  }
     
    7777        os << "<span class=\"sep\">/</span>";
    7878      }
    79       os << anchor(node().href(), words.back(), node().level_+2-words.size(), 
    80              "View " + words.back()); 
     79      os << anchor(node().href(), words.back(), node().level_+2-words.size(),
     80             "View " + words.back());
    8181    }
    8282    os << "\n</h2>\n";
     
    113113
    114114
    115   void NodePrinter::print_author_summary(std::ostream& os, 
     115  void NodePrinter::print_author_summary(std::ostream& os,
    116116                                  const Stats& stats,
    117117                                  const std::string& line_type,
    118118                                  const SVNlog& log) const
    119   { 
     119  {
    120120    HtmlStream hs(os);
    121121    os << "<h3>Author Summary</h3>";
     
    149149      else
    150150        color="dark";
    151       os << "<tr class=\"" << color << "\"><td>"; 
     151      os << "<tr class=\"" << color << "\"><td>";
    152152      os << anchor(*i+"/"+line_type+"/"+output_path()
    153                    ,*i, node().level_+2, "View statistics for "+*i); 
     153                   ,*i, node().level_+2, "View statistics for "+*i);
    154154      os << "</td><td>" << stats.lines(*i)
    155155         << "</td><td>" << stats.code(*i)
     
    158158      if (log.exist(*i)) {
    159159        const Commitment& lc(log.latest_commit(*i));
    160         os << "</td>" << "<td>" << trac_revision(lc.revision()) 
     160        os << "</td>" << "<td>" << trac_revision(lc.revision())
    161161           << "</td>" << "<td>";
    162162        hs << Date(lc.date())(timefmt);
     
    170170
    171171    os << "<tr class=\"" << color << "\">\n";
    172     os << "<td>"; 
     172    os << "<td>";
    173173    if (node().dir())
    174174      if (node().local_path().empty())
    175175        os << anchor("all/"+line_type+"/index.html"
    176                      ,"Total", node().level_+2, "View statistics for all"); 
     176                     ,"Total", node().level_+2, "View statistics for all");
    177177      else
    178178        os << anchor("all/"+line_type+"/"+node().local_path()+"/index.html"
    179                      ,"Total", node().level_+2, "View statistics for all"); 
     179                     ,"Total", node().level_+2, "View statistics for all");
    180180    else
    181181      os << anchor("all/"+line_type+"/"+node().local_path()+".html"
    182                    ,"Total", node().level_+2, "View statistics for all"); 
     182                   ,"Total", node().level_+2, "View statistics for all");
    183183    os << "</td>\n";
    184184    os << "<td>" << stats.lines() << "</td>\n";
     
    196196  }
    197197
    198  
     198
    199199}} // end of namespace svndigest and namespace theplu
  • trunk/lib/NodePrinter.h

    r1321 r1513  
    4848  public:
    4949
    50     /// 
    51     /// @brief Constructor 
    52     /// 
     50    ///
     51    /// @brief Constructor
     52    ///
    5353    NodePrinter(void);
    5454
     
    7676    void print(const bool verbose=false) const;
    7777
    78     void print_author_summary(std::ostream&, 
    79                               const Stats& stats, 
    80                               const std::string& line_type, 
    81                               const SVNlog&) const; 
     78    void print_author_summary(std::ostream&,
     79                              const Stats& stats,
     80                              const std::string& line_type,
     81                              const SVNlog&) const;
    8282
    8383  protected:
     
    8585    /// print path in html format (with anchors) to @a os
    8686    ///
    87     void path_anchor(std::ostream& os) const; 
     87    void path_anchor(std::ostream& os) const;
    8888
    8989  private:
     
    102102    ///
    103103    virtual void print_core(const std::string& stats_type,
    104                             const std::string& user, 
     104                            const std::string& user,
    105105                            const std::string& line_type,
    106                             const SVNlog&) const=0; 
     106                            const SVNlog&) const=0;
    107107
    108108  };
  • trunk/lib/OptionVersion.cc

    r1340 r1513  
    4141namespace svndigest {
    4242
    43   OptionVersion::OptionVersion(yat::utility::CommandLine& cmd, std::string flag, 
     43  OptionVersion::OptionVersion(yat::utility::CommandLine& cmd, std::string flag,
    4444                               std::string desc, OptionSwitch* const verbose)
    4545    : yat::utility::OptionSwitch(cmd, flag, desc, false), verbose_(verbose)
     
    4848
    4949
    50   void OptionVersion::do_parse2(std::vector<std::string>::iterator first, 
     50  void OptionVersion::do_parse2(std::vector<std::string>::iterator first,
    5151                                std::vector<std::string>::iterator last)
    5252  {
     
    6060      if (DEV_BUILD)
    6161        cs << "r" << svn_revision() << " ";
    62       cs << "compiled " << compilation_time() << ", " << compilation_date() 
     62      cs << "compiled " << compilation_time() << ", " << compilation_date()
    6363         << ")";
    64     } 
    65     cs << "\n\nCopyright (C) " << RELEASE_YEAR 
     64    }
     65    cs << "\n\nCopyright (C) " << RELEASE_YEAR
    6666       << " Jari H\u00E4kkinen and Peter Johansson.\n"
    6767       << "License GPLv3+: GNU GPL version 3 or later "
     
    7171    if (verbose) {
    7272      cs << "\n"
    73          << "Compiled with libsvn_subr " << SVN_VER_NUM 
     73         << "Compiled with libsvn_subr " << SVN_VER_NUM
    7474         << "; using libsvn_subr ";
    7575      const svn_version_t* svn_ver = svn_subr_version();
    7676      cs << svn_ver->major << '.' << svn_ver->minor << '.' << svn_ver->patch;
    7777      cs << "\n"
    78          << "Compiled with libapr " << APR_VERSION_STRING 
     78         << "Compiled with libapr " << APR_VERSION_STRING
    7979         << "; using libapr ";
    8080      cs << apr_version_string();
  • trunk/lib/OptionVersion.h

    r1060 r1513  
    4646  public:
    4747    /**
    48        \brief Constructor 
    49        
     48       \brief Constructor
     49
    5050       \param cmd Commandline Option is associated with
    5151       \param name string such as "help" for --help, "h" for -h or
     
    5353       \param desc string used in help display
    5454    */
    55     OptionVersion(yat::utility::CommandLine& cmd, std::string name="version", 
     55    OptionVersion(yat::utility::CommandLine& cmd, std::string name="version",
    5656                  std::string desc="print version information and exit",
    57                   OptionSwitch* const verbose=NULL); 
     57                  OptionSwitch* const verbose=NULL);
    5858
    5959    /**
     
    7979    /**
    8080     */
    81     void do_parse2(std::vector<std::string>::iterator, 
     81    void do_parse2(std::vector<std::string>::iterator,
    8282                   std::vector<std::string>::iterator);
    8383
  • trunk/lib/SVN.cc

    r1373 r1513  
    6767
    6868
    69   SVNException::~SVNException(void) throw() 
     69  SVNException::~SVNException(void) throw()
    7070  {
    7171    --(*ref_count_);
     
    293293
    294294    for (int j = 0; j < properties->nelts; ++j) {
    295       svn_client_proplist_item_t *item = 
     295      svn_client_proplist_item_t *item =
    296296        ((svn_client_proplist_item_t **)properties->elts)[j];
    297       for (apr_hash_index_t *hi = apr_hash_first(subpool, item->prop_hash); hi; 
     297      for (apr_hash_index_t *hi = apr_hash_first(subpool, item->prop_hash); hi;
    298298           hi = apr_hash_next (hi)) {
    299299        const void *key;
  • trunk/lib/SVN.h

    r1267 r1513  
    5050  ///
    5151  struct SVNException : public std::runtime_error
    52   { 
     52  {
    5353    SVNException(const std::string& msg, svn_error_t* error=NULL);
    5454
     
    294294    */
    295295    static svn_error_t*
    296     root_url_receiver(void *baton, const char *path, 
     296    root_url_receiver(void *baton, const char *path,
    297297                      const svn_info_t *info, apr_pool_t *pool);
    298298
  • trunk/lib/SVNinfo.h

    r978 r1513  
    4242    ///
    4343    /// Retrieve meta information about the item with \a path.
    44     /// 
     44    ///
    4545    /// @note The recursivness of the underlying subversion API is not
    4646    /// allowed (nor supported).
  • trunk/lib/SVNlog.cc

    r1304 r1513  
    5353  }
    5454
    55  
     55
    5656  bool SVNlog::exist(std::string name) const
    5757  {
    58    
     58
    5959    SVNlog::container::const_reverse_iterator iter = commits().rbegin();
    6060    for ( ; iter!= commits().rend(); ++iter)
     
    8686
    8787
    88   svn_error_t* 
     88  svn_error_t*
    8989  SVNlog::log_message_receiver(void *baton, apr_hash_t *changed_paths,
    9090                               svn_revnum_t rev, const char *author,
     
    116116      std::stringstream msg;
    117117      msg << "No date defined for revision: " << rev;
    118       throw SVNException(msg.str()); 
     118      throw SVNException(msg.str());
    119119    }
    120120    std::string a;
  • trunk/lib/SVNlog.h

    r978 r1513  
    5757    /**
    5858       \brief The contructor.
    59        
     59
    6060       The constructor performs an 'svn log' on \a path and
    6161       stores the information for later access.
     
    9999     */
    100100    void swap(SVNlog&);
    101    
     101
    102102  private:
    103103
  • trunk/lib/StatsPlotter.cc

    r1495 r1513  
    5656  }
    5757
    58  
     58
    5959  std::string StatsPlotter::plot(const std::string& filename,
    6060                                 const std::string& linetype) const
     
    6464      return filename;
    6565    plot(filename, linetype, format);
    66     const std::string& anchor_format = 
     66    const std::string& anchor_format =
    6767      Configuration::instance().image_anchor_format();
    6868
     
    9090    assert(stat->size());
    9191    assert(stat->find("all")!=stat->end());
    92     const SumVector& total=stats_.get_vector(*stat, "all");   
     92    const SumVector& total=stats_.get_vector(*stat, "all");
    9393    double yrange_max=1.03 * stats_.max_element(total) +1.0;
    9494    gp.ymax(yrange_max);
     
    9797    vec_type author_cont;
    9898    author_cont.reserve(stat->size());
    99     for (std::set<std::string>::const_iterator i=stats_.authors_.begin(); 
     99    for (std::set<std::string>::const_iterator i=stats_.authors_.begin();
    100100         i != stats_.authors_.end(); ++i) {
    101101      assert(stat->find(*i)!=stat->end());
     
    107107
    108108    LessReversed<SumVector> lr;
    109     PairSecondCompare<std::string, SumVector, LessReversed<SumVector> > 
     109    PairSecondCompare<std::string, SumVector, LessReversed<SumVector> >
    110110      compare(lr);
    111111    std::sort(author_cont.begin(), author_cont.end(), compare);
     
    145145      return;
    146146    plot_summary(filename, format);
    147     const std::string& anchor_format = 
     147    const std::string& anchor_format =
    148148      Configuration::instance().image_anchor_format();
    149149
     
    153153
    154154
    155   void StatsPlotter::plot_summary(const std::string& filename, 
     155  void StatsPlotter::plot_summary(const std::string& filename,
    156156                                  const std::string& format) const
    157157  {
     
    160160    double yrange_max=1.03*stats_.max_element(total)+1;
    161161    gp.ymax(yrange_max);
    162    
     162
    163163    const SumVector& x(stats_.get_vector(stats_.code_stats(), "all"));
    164164    gp.current_color(255,255,0);
    165165    gp.plot(x, "code", x.back());
    166166
    167     const SumVector& y = stats_.get_vector(stats_.comment_or_copy_stats(), 
     167    const SumVector& y = stats_.get_vector(stats_.comment_or_copy_stats(),
    168168                                           "all");
    169169    gp.current_color(0,0,255);
  • trunk/lib/StatsPlotter.h

    r1306 r1513  
    3939  {
    4040  public:
    41     /** 
    42         \brief Default Constructor 
     41    /**
     42        \brief Default Constructor
    4343    */
    4444    explicit StatsPlotter(const Stats& stats);
     
    7373       called from plot_summary(1)
    7474     */
    75     void plot_summary(const std::string& basename, 
     75    void plot_summary(const std::string& basename,
    7676                      const std::string& format) const;
    7777
     
    7979}} // end of namespace svndigest end of namespace theplu
    8080
    81 #endif 
     81#endif
  • trunk/lib/TinyStats.h

    r1234 r1513  
    5151}} // end of namespace svndigest end of namespace theplu
    5252
    53 #endif 
     53#endif
  • trunk/lib/Trac.cc

    r1267 r1513  
    3333
    3434  Trac::Trac(HtmlStream& hs)
    35     : hs_(hs) 
     35    : hs_(hs)
    3636  {}
    3737
     
    4949
    5050
    51   bool Trac::changeset(const std::string::const_iterator& first, 
     51  bool Trac::changeset(const std::string::const_iterator& first,
    5252                       std::string::const_iterator& iter,
    5353                       const std::string::const_iterator& last,
     
    6464
    6565
    66   bool Trac::changeset1(const std::string::const_iterator& first, 
     66  bool Trac::changeset1(const std::string::const_iterator& first,
    6767                        std::string::const_iterator& iter,
    6868                        const std::string::const_iterator& last,
     
    8383    }
    8484    std::string href(Configuration::instance().trac_root()+"changeset/"+rev);
    85     hs_.stream() << anchor(href, anchor_text(iter_orig, iter, last_trunc)); 
    86     return true;
    87   }
    88 
    89 
    90   bool Trac::changeset2(std::string::const_iterator& first, 
     85    hs_.stream() << anchor(href, anchor_text(iter_orig, iter, last_trunc));
     86    return true;
     87  }
     88
     89
     90  bool Trac::changeset2(std::string::const_iterator& first,
    9191                        const std::string::const_iterator& last,
    9292                        const std::string::const_iterator& last_trunc)
     
    105105    ++first;
    106106    std::string href(Configuration::instance().trac_root()+"changeset/"+rev);
    107     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    108     return true;
    109   }
    110 
    111 
    112   bool Trac::changeset3(std::string::const_iterator& first, 
     107    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     108    return true;
     109  }
     110
     111
     112  bool Trac::changeset3(std::string::const_iterator& first,
    113113                        const std::string::const_iterator& last,
    114114                        const std::string::const_iterator& last_trunc)
     
    127127    }
    128128    std::string href(Configuration::instance().trac_root()+"changeset/"+rev);
    129     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    130     return true;
    131   }
    132 
    133 
    134   bool Trac::comment(std::string::const_iterator& first, 
     129    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     130    return true;
     131  }
     132
     133
     134  bool Trac::comment(std::string::const_iterator& first,
    135135                     const std::string::const_iterator& last,
    136136                     const std::string::const_iterator& last_trunc)
     
    144144      return false;
    145145    }
    146      
     146
    147147    std::string ticket = match(first, last, AlNum());
    148148    if (ticket.empty() || first == last || *first != ':') {
     
    158158    std::string href(Configuration::instance().trac_root()+"ticket/"+ticket+
    159159                     "#comment:"+comment);
    160     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    161     return true;
    162   }
    163 
    164 
    165   bool Trac::diff(std::string::const_iterator& first, 
     160    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     161    return true;
     162  }
     163
     164
     165  bool Trac::diff(std::string::const_iterator& first,
    166166                  const std::string::const_iterator& last,
    167167                  const std::string::const_iterator& last_trunc)
     
    177177
    178178
    179   bool Trac::diff1(std::string::const_iterator& first, 
     179  bool Trac::diff1(std::string::const_iterator& first,
    180180                   const std::string::const_iterator& last,
    181181                   const std::string::const_iterator& last_trunc)
     
    194194      return false;
    195195    }
    196     ++first; 
     196    ++first;
    197197    std::string old_rev = match(first, last, AlNum());
    198198    if (old_rev.empty() || first == last || *first != ':') {
     
    214214                         "changeset?new="+new_rev+"&amp;new_path="+node+
    215215                         "&amp;old="+old_rev+"&amp;old_path="+node);
    216     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    217     return true;
    218   }
    219 
    220 
    221   bool Trac::diff2(std::string::const_iterator& first, 
     216    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     217    return true;
     218  }
     219
     220
     221  bool Trac::diff2(std::string::const_iterator& first,
    222222                   const std::string::const_iterator& last,
    223223                   const std::string::const_iterator& last_trunc)
     
    245245    std::string href(Configuration::instance().trac_root()+
    246246                     "changeset?new_path="+new_path+"&amp;old_path="+old_path);
    247     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    248     return true;
    249   }
    250 
    251 
    252   bool Trac::diff3(std::string::const_iterator& first, 
     247    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     248    return true;
     249  }
     250
     251
     252  bool Trac::diff3(std::string::const_iterator& first,
    253253                   const std::string::const_iterator& last,
    254254                   const std::string::const_iterator& last_trunc)
     
    284284      return false;
    285285    }
    286    
     286
    287287    std::string href(Configuration::instance().trac_root()+
    288288                     "changeset?new="+new_rev+"&amp;new_path="+new_path+
    289289                     "&amp;old="+old_rev+"&amp;old_path="+old_path);
    290     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
     290    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    291291    return true;
    292292  }
     
    294294
    295295  bool Trac::log(const std::string::const_iterator& first,
    296                  std::string::const_iterator& iter, 
     296                 std::string::const_iterator& iter,
    297297                 const std::string::const_iterator& last,
    298298                 const std::string::const_iterator& last_trunc)
     
    309309
    310310  bool Trac::log1(const std::string::const_iterator& first,
    311                   std::string::const_iterator& iter, 
     311                  std::string::const_iterator& iter,
    312312                  const std::string::const_iterator& last,
    313313                  const std::string::const_iterator& last_trunc)
     
    336336    std::string href(Configuration::instance().trac_root()+"log/?rev="+
    337337                     rev+"&amp;stop_rev="+stop_rev);
    338     hs_.stream() << anchor(href, anchor_text(iter_orig,iter, last_trunc)); 
    339     return true;
    340   }
    341 
    342 
    343   bool Trac::log2(std::string::const_iterator& first, 
     338    hs_.stream() << anchor(href, anchor_text(iter_orig,iter, last_trunc));
     339    return true;
     340  }
     341
     342
     343  bool Trac::log2(std::string::const_iterator& first,
    344344                  const std::string::const_iterator& last,
    345345                  const std::string::const_iterator& last_trunc)
     
    367367    std::string href(Configuration::instance().trac_root()+"log/?rev="+
    368368                     rev+"&amp;stop_rev="+stop_rev);
    369     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    370     return true;
    371   }
    372 
    373 
    374   bool Trac::log3(std::string::const_iterator& first, 
     369    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     370    return true;
     371  }
     372
     373
     374  bool Trac::log3(std::string::const_iterator& first,
    375375                  const std::string::const_iterator& last,
    376376                  const std::string::const_iterator& last_trunc)
     
    381381    const std::string::const_iterator first_orig(first);
    382382
    383     const std::string log_str("log:"); 
     383    const std::string log_str("log:");
    384384    if (!match_begin(first, last, log_str)) {
    385385      first = first_orig;
     
    407407      href = std::string(Configuration::instance().trac_root()+"log/"+node+
    408408                         "?rev="+rev+"&amp;stop_rev="+stop_rev);
    409      
    410     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    411     return true;
    412   }
    413 
    414 
    415   bool Trac::milestone(std::string::const_iterator& first, 
     409
     410    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     411    return true;
     412  }
     413
     414
     415  bool Trac::milestone(std::string::const_iterator& first,
    416416                       const std::string::const_iterator& last,
    417417                       const std::string::const_iterator& last_trunc)
     
    431431    // find the last alphanumerical char before next space (or last)
    432432    for (std::string::const_iterator i(first); i!=last && *i!=' '; ++i)
    433       if (isalnum(*i)) 
     433      if (isalnum(*i))
    434434        first = i+1;
    435435
     
    442442    const Configuration& conf = Configuration::instance();
    443443    std::string href(conf.trac_root()+"milestone/"+milestone);
    444     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
     444    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    445445    return true;
    446446  }
     
    476476
    477477
    478   bool Trac::source(std::string::const_iterator& first, 
     478  bool Trac::source(std::string::const_iterator& first,
    479479                    const std::string::const_iterator& last,
    480480                    const std::string::const_iterator& last_trunc)
     
    497497    node = match(first, last, not2Char('@', ' '));
    498498    if (!node.empty() && node[0]=='/')
    499       node = node.substr(1, node.size()-1); 
    500  
     499      node = node.substr(1, node.size()-1);
     500
    501501    if (*first == '@'){
    502502      ++first;
     
    515515        href += "#"+line;
    516516    }
    517     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
    518     return true;
    519   }
    520 
    521 
    522   bool Trac::ticket(std::string::const_iterator& first, 
     517    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
     518    return true;
     519  }
     520
     521
     522  bool Trac::ticket(std::string::const_iterator& first,
    523523                    const std::string::const_iterator& last,
    524524                    const std::string::const_iterator& last_trunc)
     
    532532
    533533
    534   bool Trac::ticket1(std::string::const_iterator& first, 
     534  bool Trac::ticket1(std::string::const_iterator& first,
    535535                     const std::string::const_iterator& last,
    536536                     const std::string::const_iterator& last_trunc)
     
    552552    const Configuration& conf = Configuration::instance();
    553553    hs_.stream() << anchor(conf.trac_root()+"ticket/"+ticket,
    554                            anchor_text(first_orig,first, last_trunc)); 
    555     return true;
    556   }
    557 
    558 
    559   bool Trac::ticket2(std::string::const_iterator& first, 
     554                           anchor_text(first_orig,first, last_trunc));
     555    return true;
     556  }
     557
     558
     559  bool Trac::ticket2(std::string::const_iterator& first,
    560560                     const std::string::const_iterator& last,
    561561                     const std::string::const_iterator& last_trunc)
     
    567567
    568568    if (match(first, last, std::string("ticket:")).empty()){
    569       first = first_orig; 
     569      first = first_orig;
    570570      return false;
    571571    }
     
    574574    const Configuration& conf = Configuration::instance();
    575575    std::string href(conf.trac_root()+"ticket/"+ticket);
    576     hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc)); 
     576    hs_.stream() << anchor(href, anchor_text(first_orig,first, last_trunc));
    577577    return true;
    578578  }
  • trunk/lib/Trac.h

    r978 r1513  
    4242    ///
    4343    Trac(HtmlStream& html);
    44    
    45     ///
    46     /// 
     44
     45    ///
     46    ///
    4747    ///
    4848    void print(std::string str, size_t width);
     
    5959    /// @return true if any of changesetX returns true
    6060    ///
    61     bool changeset(const std::string::const_iterator& first, 
     61    bool changeset(const std::string::const_iterator& first,
    6262                   std::string::const_iterator& iter,
    6363                   const std::string::const_iterator& last,
     
    7777    /// @return true if expression is found
    7878    ///
    79     bool changeset1(const std::string::const_iterator& first, 
     79    bool changeset1(const std::string::const_iterator& first,
    8080                    std::string::const_iterator& iter,
    8181                    const std::string::const_iterator& last,
     
    9292    /// @return true if expression is found
    9393    ///
    94     bool changeset2(std::string::const_iterator& first, 
     94    bool changeset2(std::string::const_iterator& first,
    9595                    const std::string::const_iterator& last,
    9696                    const std::string::const_iterator& last_trunc);
     
    106106    /// @return true if expression is found
    107107    ///
    108     bool changeset3(std::string::const_iterator& first, 
     108    bool changeset3(std::string::const_iterator& first,
    109109                    const std::string::const_iterator& last,
    110110                    const std::string::const_iterator& last_trunc);
     
    120120    /// @return true if expression is found
    121121    ///
    122     bool comment(std::string::const_iterator& first, 
     122    bool comment(std::string::const_iterator& first,
    123123                 const std::string::const_iterator& last,
    124124                 const std::string::const_iterator& last_trunc);
     
    129129    /// @return true if any of diffX returns true
    130130    ///
    131     bool diff(std::string::const_iterator& first, 
     131    bool diff(std::string::const_iterator& first,
    132132              const std::string::const_iterator& last,
    133133              const std::string::const_iterator& last_trunc);
     
    147147    /// @return true if expression is found
    148148    ///
    149     bool diff1(std::string::const_iterator& first, 
     149    bool diff1(std::string::const_iterator& first,
    150150               const std::string::const_iterator& last,
    151151               const std::string::const_iterator& last_trunc);
     
    166166    /// @return true if expression is found
    167167    ///
    168     bool diff2(std::string::const_iterator& first, 
     168    bool diff2(std::string::const_iterator& first,
    169169               const std::string::const_iterator& last,
    170170               const std::string::const_iterator& last_trunc);
     
    183183    /// @return true if expression is found
    184184    ///
    185     bool diff3(std::string::const_iterator& first, 
     185    bool diff3(std::string::const_iterator& first,
    186186               const std::string::const_iterator& last,
    187187               const std::string::const_iterator& last_trunc);
     
    193193    /// @return true if any of logX returns true
    194194    ///
    195     bool log(const std::string::const_iterator& first, 
     195    bool log(const std::string::const_iterator& first,
    196196             std::string::const_iterator& iter,
    197197             const std::string::const_iterator& last,
     
    213213    ///
    214214    bool log1(const std::string::const_iterator& first,
    215               std::string::const_iterator& iter, 
     215              std::string::const_iterator& iter,
    216216              const std::string::const_iterator& last,
    217217              const std::string::const_iterator& last_trunc);
     
    229229    /// @return true if expression is found
    230230    ///
    231     bool log2(std::string::const_iterator& first, 
     231    bool log2(std::string::const_iterator& first,
    232232              const std::string::const_iterator& last,
    233233              const std::string::const_iterator& last_trunc);
     
    245245    /// @return true if expression is found
    246246    ///
    247     bool log3(std::string::const_iterator& first, 
     247    bool log3(std::string::const_iterator& first,
    248248              const std::string::const_iterator& last,
    249249              const std::string::const_iterator& last_trunc);
     
    261261    /// @return true if expression is found
    262262    ///
    263     bool milestone(std::string::const_iterator& first, 
     263    bool milestone(std::string::const_iterator& first,
    264264                   const std::string::const_iterator& last,
    265265                   const std::string::const_iterator& last_trunc);
     
    267267    ///
    268268    /// @brief search for source:trunk or source:trunk@123 or
    269     /// source:trunk@123#L3 
     269    /// source:trunk@123#L3
    270270    ///
    271271    /// Search in range [\a first, \a last) for expression
     
    281281    /// @return true if expression is found
    282282    ///
    283     bool source(std::string::const_iterator& first, 
     283    bool source(std::string::const_iterator& first,
    284284                const std::string::const_iterator& last,
    285285                const std::string::const_iterator& last_trunc);
     
    290290    /// @return true ticket1 or ticket2 returns true
    291291    ///
    292     bool ticket(std::string::const_iterator& first, 
     292    bool ticket(std::string::const_iterator& first,
    293293                const std::string::const_iterator& last,
    294294                const std::string::const_iterator& last_trunc);
     
    306306    /// @return true if expression is found
    307307    ///
    308     bool ticket1(std::string::const_iterator& first, 
     308    bool ticket1(std::string::const_iterator& first,
    309309                 const std::string::const_iterator& last,
    310310                 const std::string::const_iterator& last_trunc);
     
    322322    /// @return true if expression is found
    323323    ///
    324     bool ticket2(std::string::const_iterator& first, 
     324    bool ticket2(std::string::const_iterator& first,
    325325                 const std::string::const_iterator& last,
    326326                 const std::string::const_iterator& last_trunc);
     
    333333}} // end of namespace svndigest end of namespace theplu
    334334
    335 #endif 
     335#endif
  • trunk/lib/Vector.cc

    r1436 r1513  
    3232    result.clear();
    3333    int value = 0;
    34     for (SparseVector::const_iterator iter = vec.begin(); 
     34    for (SparseVector::const_iterator iter = vec.begin();
    3535         iter!=vec.end();++iter) {
    3636      value += iter->second;
  • trunk/lib/Vector.h

    r1495 r1513  
    4949       \brief default constructor
    5050     */
    51     Vector(void) 
     51    Vector(void)
    5252      : size_(0)
    5353    {}
     
    5959     */
    6060    T back(void) const
    61     { 
     61    {
    6262      assert(size()>0);
    6363      if (map_.empty() || size()-1 > map_.rbegin()->first)
     
    8080       \brief make container empty
    8181     */
    82     void clear(void) 
    83     { 
    84       map_.clear(); 
     82    void clear(void)
     83    {
     84      map_.clear();
    8585      size_ = 0;
    8686    }
     
    9898
    9999    /**
    100        same as begin() but reverse iterator 
     100       same as begin() but reverse iterator
    101101     */
    102102    const_reverse_iterator rbegin(void) const { return map_.rbegin(); }
    103103
    104104    /**
    105        same as end() but reverse iterator 
     105       same as end() but reverse iterator
    106106     */
    107107    const_reverse_iterator rend(void) const { return map_.rend(); }
     
    232232     */
    233233    T get(const M& map, typename M::const_iterator iter) const
    234     { 
     234    {
    235235      if (iter==map.begin())
    236236        return 0;
  • trunk/lib/css.cc

    r1253 r1513  
    4040      << "Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson\n"
    4141      << "Copyright (C) 2009, 2010 Peter Johansson\n"
    42       << "\nThis file is part of svndigest, " 
     42      << "\nThis file is part of svndigest, "
    4343      << "http://dev.thep.lu.se/svndigest\n\n"
    4444
    45       << "svndigest is free software; you can redistribute it and/or " 
     45      << "svndigest is free software; you can redistribute it and/or "
    4646      << "modify it\n"
    4747      << "under the terms of the GNU General Public License as published by\n"
     
    6565      << "modification, are permitted provided that the following conditions\n"
    6666      << "are met:\n\n"
    67      
     67
    6868      << "1. Redistributions of source code must retain the above copyright\n"
    6969      << "   notice, this list of conditions and the following disclaimer.\n"
     
    7575      << "   products derived from this software without specific prior\n"
    7676      << "   written permission.\n\n"
    77      
     77
    7878      << "THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS\n"
    7979      << "OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n"
     
    108108      << "border-bottom: 1px solid black;}\n";
    109109    s << "#menu ul li { display: inline; border-right: 1px solid black;}\n";
    110     s << "#menu ul li a {text-decoration: none; padding-right: 1em;" 
     110    s << "#menu ul li a {text-decoration: none; padding-right: 1em;"
    111111      << "padding-left: 1em; margin: 0px;}\n";
    112112    s << "#menu ul li a:hover{ color: #000; background: #ddd;}\n";
     
    129129
    130130    s << "div.main {\n";
    131     s << "margin-top: 50px;\n";         
     131    s << "margin-top: 50px;\n";
    132132    s << "margin-left: 50px;\n";
    133133    s << " \n";
    134134    s << "}\n";
    135135
    136     s << "table.main {\n"; 
     136    s << "table.main {\n";
    137137    s << " text-align: left;\n";
    138138    s << " padding: 0 1em .1em 0;\n";
     
    199199    std::string bg_lt_comment("e8e8ff");
    200200    std::string bg_lt_other("ffffff");
    201     s << "table.blame tbody td.line-code { text-align: right; " 
     201    s << "table.blame tbody td.line-code { text-align: right; "
    202202      << "background: #" << bg_lt_code << "; }\n";
    203203    s << "table.blame tbody td.line-comment { text-align: right; "
  • trunk/lib/css.h

    r1303 r1513  
    3636}} // end of namespace svndigest end of namespace theplu
    3737
    38 #endif 
     38#endif
  • trunk/lib/first_page.cc

    r1290 r1513  
    5454
    5555  void print_main_page(const std::string& dir, const SVNlog& log,
    56                        const StatsCollection& stats, std::string url, 
     56                       const StatsCollection& stats, std::string url,
    5757                       const NodeCounter& node_counter)
    5858  {
     
    6464    set<string> authors;
    6565    std::transform(log.commits().begin(), log.commits().end(),
    66                    std::inserter(authors, authors.begin()), 
     66                   std::inserter(authors, authors.begin()),
    6767                   std::mem_fun_ref(&Commitment::author));
    6868    // erase invalid authors
     
    8585  }
    8686
    87   void print_general_information(std::ostream& os, const SVNlog& log, 
     87  void print_general_information(std::ostream& os, const SVNlog& log,
    8888                                 size_t nof_authors, std::string url,
    8989                                 const NodeCounter& node_counter)
    90   { 
     90  {
    9191    assert(log.commits().size());
    92     Date begin(log.commits().begin()->date());   
     92    Date begin(log.commits().begin()->date());
    9393    Date end(log.latest_commit().date());
    9494    std::string timefmt("%a %b %e %H:%M:%S %Y");
    9595
    96     os << "<div class=\"main\">" 
    97        << "<table class=\"main\"><thead><tr><th colspan=\"2\">" 
     96    os << "<div class=\"main\">"
     97       << "<table class=\"main\"><thead><tr><th colspan=\"2\">"
    9898       << "General Information"
    9999       << "</th></tr></thead>\n"
    100100       << "<tbody>\n"
    101        << "<tr><td>URL:</td><td>"; 
     101       << "<tr><td>URL:</td><td>";
    102102    if (url.size()>=4 && url.substr(0,4)=="http")
    103103      os << anchor(url, url);
     
    105105      os << url;
    106106    os << "</td></tr>\n"
    107        << "<tr><td>First Revision Date:</td><td>" 
     107       << "<tr><td>First Revision Date:</td><td>"
    108108       << begin(timefmt) << "</td></tr>\n"
    109        << "<tr><td>Latest Revision Date:</td><td>" 
     109       << "<tr><td>Latest Revision Date:</td><td>"
    110110       << end(timefmt) << "</td></tr>\n"
    111        << "<tr><td>Age:</td><td>"; 
     111       << "<tr><td>Age:</td><td>";
    112112    os << end.difftime(begin);
    113113    os << "</td></tr>\n"
    114        << "<tr><td>Smallest Revision:</td><td>" 
    115        << log.commits().begin()->revision() 
    116        << "</td></tr>\n"
    117        << "<tr><td>Largest Revision:</td><td>" << log.latest_commit().revision() 
    118        << "</td></tr>\n"
    119        << "<tr><td>Revision Count:</td><td>" << log.commits().size() 
     114       << "<tr><td>Smallest Revision:</td><td>"
     115       << log.commits().begin()->revision()
     116       << "</td></tr>\n"
     117       << "<tr><td>Largest Revision:</td><td>" << log.latest_commit().revision()
     118       << "</td></tr>\n"
     119       << "<tr><td>Revision Count:</td><td>" << log.commits().size()
    120120       << "</td></tr>\n"
    121121       << "<tr><td>Number of Authors:</td><td>" << nof_authors
    122122       << "</td></tr>\n"
    123        << "<tr><td>Number of Directories:</td><td>" 
     123       << "<tr><td>Number of Directories:</td><td>"
    124124       << node_counter.directories()
    125125       << "</td></tr>\n"
    126        << "<tr><td>Number of Files:</td><td>" 
     126       << "<tr><td>Number of Files:</td><td>"
    127127       << node_counter.files()
    128128       << "</td></tr>\n"
     
    132132
    133133
    134   void print_authors(std::ostream& os, 
     134  void print_authors(std::ostream& os,
    135135                     const std::vector<Commitment>& lc,
    136136                     const Stats& stats)
     
    138138    HtmlStream hs(os);
    139139    os << "<div class=\"main\">"
    140        << "<table class=\"main\"><thead><tr><th colspan=\"2\">" 
     140       << "<table class=\"main\"><thead><tr><th colspan=\"2\">"
    141141       << "Authors"
    142142       << "</th></tr></thead>\n";
    143143
    144     os << "<tr><td>Author</td>" 
     144    os << "<tr><td>Author</td>"
    145145       << "<td>Number of Lines</td>"
    146146       << "<td>Code Lines</td>"
     
    152152    using namespace std;
    153153    for (vector<Commitment>::const_iterator i=lc.begin(); i!=lc.end(); ++i) {
    154       os << "<tr><td>"; 
     154      os << "<tr><td>";
    155155      if (!stats.lines(i->author()))
    156156        os << i->author();
     
    158158        os << anchor(std::string("classic/"+i->author()+"/total/index.html"),
    159159                     i->author());
    160       os << "</td><td>" << stats.lines(i->author()) << " (" 
     160      os << "</td><td>" << stats.lines(i->author()) << " ("
    161161         << 100*stats.lines(i->author())/(stats.lines()?stats.lines():1)
    162          << "%)</td><td>" << stats.code(i->author()) << " (" 
     162         << "%)</td><td>" << stats.code(i->author()) << " ("
    163163         << 100*stats.code(i->author())/(stats.code()?stats.code():1)
    164          << "%)</td><td>" << stats.comments(i->author()) << " (" 
     164         << "%)</td><td>" << stats.comments(i->author()) << " ("
    165165         << 100*stats.comments(i->author())/(stats.comments()?stats.comments():1)
    166166         << "%)</td><td>";
     
    190190  {
    191191    os << "<div class=\"main\">\n"
    192        << "<table class=\"main\"><thead><tr><th colspan=\"2\">" 
     192       << "<table class=\"main\"><thead><tr><th colspan=\"2\">"
    193193       << "Recent Log"
    194194       << "</th></tr></thead>\n";
     
    202202    typedef SVNlog::container::const_reverse_iterator iter;
    203203    size_t count = 0;
    204     for (iter i=log.commits().rbegin(); 
     204    for (iter i=log.commits().rbegin();
    205205         i != log.commits().rend() && count<10; ++i) {
    206       os << "<tr><td>" 
     206      os << "<tr><td>"
    207207         << anchor(std::string("classic/")+i->author()+"/total/index.html",
    208                    i->author()) 
     208                   i->author())
    209209         << "</td>";
    210210      Date date(i->date());
    211211      os << "<td>";
    212       hs << date(timefmt); 
    213       os << "</td>";
    214       os << "<td>"; 
     212      hs << date(timefmt);
     213      os << "</td>";
     214      os << "<td>";
    215215      os << trac_revision(i->revision());
    216216      os << "</td>";
    217217      os << "<td>";
    218218      int added = stats["add"](LineTypeParser::total, "all", i->revision()) -
    219         stats["add"](LineTypeParser::total, "all", i->revision() - 1); 
     219        stats["add"](LineTypeParser::total, "all", i->revision() - 1);
    220220      os << added;
    221221      os << "</td>";
    222222      os << "<td>";
    223223      os << added-(stats["blame"](LineTypeParser::total, "all", i->revision()) -
    224                    stats["blame"](LineTypeParser::total,"all",i->revision()-1)); 
     224                   stats["blame"](LineTypeParser::total,"all",i->revision()-1));
    225225      os << "</td>";
    226226      os << "<td>";
  • trunk/lib/first_page.h

    r1303 r1513  
    3838  class SVNlog;
    3939
    40   void print_authors(std::ostream& os, 
     40  void print_authors(std::ostream& os,
    4141                     const std::vector<Commitment>& latest_commit,
    4242                     const Stats& stats);
     
    4545  /// called by print_main_page
    4646  ///
    47   void print_general_information(std::ostream&, const SVNlog&, size_t, 
     47  void print_general_information(std::ostream&, const SVNlog&, size_t,
    4848                                 std::string url, const NodeCounter&);
    4949
     
    5151  /// @brief print main page
    5252  ///
    53   void print_main_page(const std::string&, const SVNlog&, 
     53  void print_main_page(const std::string&, const SVNlog&,
    5454                       const StatsCollection&, std::string url,
    5555                       const NodeCounter&);
    56    
     56
    5757  void print_recent_logs(std::ostream&, const SVNlog& log,
    5858                         const StatsCollection&);
    59    
     59
    6060  void print_summary_plot(std::ostream&, const Stats& stats);
    61    
     61
    6262}} // end of namespace svndigest end of namespace theplu
    6363
    64 #endif 
     64#endif
  • trunk/lib/html_utility.cc

    r1337 r1513  
    3939
    4040  std::string anchor(const std::string& url,
    41                      const std::string& name, unsigned int level, 
     41                     const std::string& name, unsigned int level,
    4242                     const std::string& title,
    4343                     const std::string& color)
     
    4646    HtmlStream hs(ss);
    4747    ss << "<a title=\"";
    48     hs << title; 
     48    hs << title;
    4949    ss << "\" href=\"";
    5050    for (size_t i=0; i<level; ++i)
    5151      ss << "../";
    52     ss << url; 
    53     ss << "\">"; 
     52    ss << url;
     53    ss << "\">";
    5454    if (color.size())
    5555      ss << "<font color=\"" << color << "\">";
    56     hs << name; 
     56    hs << name;
    5757    if (color.size())
    5858      ss << "</font>";
     
    6161  }
    6262
    63  
     63
    6464  std::string image(const std::string& name)
    6565  {
    6666    std::ostringstream os;
    6767    const std::string& format = Configuration::instance().image_format();
    68     const std::string& anchor_format = 
     68    const std::string& anchor_format =
    6969      Configuration::instance().image_anchor_format();
    7070    if (format=="svg") {
     
    8282        os << "<img src='" << name << ".png' alt='[plot]'/>";
    8383      else
    84         os << "<a href=\"" << name << "." << anchor_format << "\">" 
     84        os << "<a href=\"" << name << "." << anchor_format << "\">"
    8585           << "<img src='" << name << ".png' alt='[plot]'/>"
    8686           << "</a>";
     
    131131    else
    132132      os << "<li>\n";
    133     os << anchor(stats_local+"/"+user+"/total/"+path, "Total", level, 
     133    os << anchor(stats_local+"/"+user+"/total/"+path, "Total", level,
    134134           "View statistics of all lines");
    135135    os << "</li>\n";
     
    139139    else
    140140      os << "<li>";
    141     os << anchor(stats_local+"/"+user+"/code/"+path, "Code", level, 
     141    os << anchor(stats_local+"/"+user+"/code/"+path, "Code", level,
    142142                 "View statistics of code lines");
    143143    os << "</li>\n";
     
    147147    else
    148148      os << "<li>";
    149     os << anchor(stats_local+"/"+user+"/comments/"+path, "Comment", level, 
     149    os << anchor(stats_local+"/"+user+"/comments/"+path, "Comment", level,
    150150                 "View statistics of comment lines");
    151151    os << "</li>\n";
     
    156156    else
    157157      os << "<li>";
    158     os << anchor(stats_local+"/"+user+"/empty/"+path, "Other", level, 
     158    os << anchor(stats_local+"/"+user+"/empty/"+path, "Other", level,
    159159                 "View statistics of other lines");
    160160    os << "</li>\n";
     
    175175    else
    176176      os << "<li>";
    177     os << anchor("classic/"+user+"/"+item_local+"/"+path, "Classic", level, 
     177    os << anchor("classic/"+user+"/"+item_local+"/"+path, "Classic", level,
    178178                 "View classic statistics");
    179179    os << "</li>\n";
     
    183183    else
    184184      os << "<li>";
    185     os << anchor("blame/"+user+"/"+item_local+"/"+path, "Blame", level, 
     185    os << anchor("blame/"+user+"/"+item_local+"/"+path, "Blame", level,
    186186                 "View blame statistics");
    187187    os << "</li>\n";
     
    191191    else
    192192      os << "<li>";
    193     os << anchor("add/"+user+"/"+item_local+"/"+path, "Add", level, 
     193    os << anchor("add/"+user+"/"+item_local+"/"+path, "Add", level,
    194194                 "View add statistics");
    195195    os << "</li>\n";
     
    202202
    203203
    204   void print_html_start(std::ostream& os, const std::string& title, 
     204  void print_html_start(std::ostream& os, const std::string& title,
    205205                        unsigned int level)
    206206  {
     
    214214       << "<title> " << title << " - svndigest</title>\n"
    215215       << "<meta http-equiv=\"Content-type\" content=\"text/html; "
    216        << "charset=UTF-8\" />\n" 
     216       << "charset=UTF-8\" />\n"
    217217       << "<link rel=\"stylesheet\" "
    218218       << "href=\"";
     
    229229    std::stringstream ss;
    230230    if (conf.trac_root().empty())
    231       ss << r; 
     231      ss << r;
    232232    else {
    233233      std::stringstream rev;
  • trunk/lib/html_utility.h

    r1303 r1513  
    4444  ///
    4545  std::string anchor(const std::string& url,
    46                      const std::string& name, unsigned int level=0, 
     46                     const std::string& name, unsigned int level=0,
    4747                     const std::string& title="",
    4848                     const std::string& color="");
     
    5656  ///
    5757  void print_footer(std::ostream&);
    58    
     58
    5959  ///
    6060  /// @brief print html header of page
     
    6767  /// \param path current path
    6868  /// \param stats which stats are we in
    69   void print_header(std::ostream& os, std::string name, unsigned int level, 
     69  void print_header(std::ostream& os, std::string name, unsigned int level,
    7070                    std::string user, std::string item, std::string path,
    7171                    const std::string& stats);
     
    7979     of this function.
    8080   */
    81   void print_html_start(std::ostream& os, const std::string& title, 
     81  void print_html_start(std::ostream& os, const std::string& title,
    8282                        unsigned int level);
    8383
     
    9191}} // end of namespace svndigest end of namespace theplu
    9292
    93 #endif 
     93#endif
  • trunk/lib/main_utility.h

    r1234 r1513  
    5050}} // end of namespace svndigest end of namespace theplu
    5151
    52 #endif 
     52#endif
  • trunk/lib/subversion_revision.h

    r1337 r1513  
    4444}} // end of namespace svndigest and namespace theplu
    4545
    46 #endif 
     46#endif
  • trunk/lib/utility.h

    r1432 r1513  
    106106  /// @brief environment variable @a var
    107107  ///
    108   std::string getenv(const std::string& var); 
     108  std::string getenv(const std::string& var);
    109109
    110110  ///
     
    132132  std::string ltrim(std::string str);
    133133
    134   inline bool match_begin(std::string::const_iterator first, 
    135                           std::string::const_iterator last, 
     134  inline bool match_begin(std::string::const_iterator first,
     135                          std::string::const_iterator last,
    136136                          const std::string& str)
    137   { return (std::distance(first, last)>=static_cast<int>(str.size()) && 
    138             std::equal(str.begin(), str.end(), first)); 
    139   }
    140 
    141   inline bool match_end(std::string::const_reverse_iterator first, 
    142                         std::string::const_reverse_iterator last, 
     137  { return (std::distance(first, last)>=static_cast<int>(str.size()) &&
     138            std::equal(str.begin(), str.end(), first));
     139  }
     140
     141  inline bool match_end(std::string::const_reverse_iterator first,
     142                        std::string::const_reverse_iterator last,
    143143                        const std::string& str)
    144   { return (std::distance(first,last)>=static_cast<int>(str.size()) && 
    145             std::equal(str.rbegin(), str.rend(), first)); 
     144  { return (std::distance(first,last)>=static_cast<int>(str.size()) &&
     145            std::equal(str.rbegin(), str.rend(), first));
    146146  }
    147147
     
    166166
    167167  /**
    168      @return 0 if \a b = 0 otherwise \f$ \frac{100*a}{b} \f$ 
     168     @return 0 if \a b = 0 otherwise \f$ \frac{100*a}{b} \f$
    169169  */
    170170  int percent(int a, int b);
     
    215215  /// @see std::search
    216216  ///
    217   inline std::string::iterator search(std::string::iterator first, 
    218                                       std::string::iterator last, 
     217  inline std::string::iterator search(std::string::iterator first,
     218                                      std::string::iterator last,
    219219                                      std::string str)
    220220  { return std::search(first, last, str.begin(), str.end()); }
     
    225225   */
    226226  template<typename InputIterator, typename T, typename BinaryOperation>
    227   void sum(InputIterator first, InputIterator last, T& result, 
     227  void sum(InputIterator first, InputIterator last, T& result,
    228228           BinaryOperation binary)
    229229  {
     
    260260  {
    261261    std::string res;
    262     for (;first!=last && func(first); ++first) 
     262    for (;first!=last && func(first); ++first)
    263263      res.append(1,*first);
    264264    return res;
Note: See TracChangeset for help on using the changeset viewer.