Changeset 211 for trunk


Ignore:
Timestamp:
Sep 15, 2006, 1:19:40 PM (17 years ago)
Author:
Peter Johansson
Message:

fixes #94

Location:
trunk/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Directory.cc

    r210 r211  
    146146    std::ofstream os(html_name.c_str());
    147147    assert(os.good());
    148     print_header(os, name(), level_+2);
     148    print_header(os, name(), level_+2, line_type, local_path()+"/index.html");
    149149    path_anchor(os);
    150150    os << "<p align=center>\n<img src='"
  • trunk/lib/File.cc

    r209 r211  
    6262    std::string html_name(outpath + ".html");
    6363    std::ofstream os(html_name.c_str());
    64     print_header(os, name(), level_+2);
     64    print_header(os, name(), level_+2, line_type, local_path()+".html");
    6565    path_anchor(os);
    6666    os << "<p align=center>\n<img src='"
  • trunk/lib/html_utility.cc

    r209 r211  
    190190    std::string filename="index.html";
    191191    std::ofstream os(filename.c_str());
    192     print_header(os, dir, 0);
     192    print_header(os, dir, 0, "", "../index.html");
    193193    time_t now;
    194194    time (&now);
     
    236236
    237237
    238   void print_header(std::ostream& os, const std::string& title, u_int level)
     238  void print_header(std::ostream& os, const std::string& title, u_int level,
     239                    const std::string& line_type, const std::string& path)
    239240  {
    240241    os << "<!DOCTYPE html\n"
     
    258259    os << "</li>"
    259260       << "<li>";
    260     anchor(os, "all/total/index.html", "Total", level,
     261    anchor(os, "all/total/"+path, "Total", level,
    261262           "View statistics of all lines");
    262263    os << "</li>"
    263264       << "<li>";
    264     anchor(os, "all/code/index.html", "Code", level,
     265    anchor(os, "all/code/"+path, "Code", level,
    265266           "View statistics of code lines");
    266267    os << "</li>"
    267268       << "<li>";
    268     anchor(os, "all/comments/index.html", "Comment", level,
     269    anchor(os, "all/comments/"+path, "Comment", level,
    269270           "View statistics of comment lines");
    270271    os << "</li>"
    271272       << "<li>";
    272     anchor(os, "all/empty/index.html", "Empty", level,
     273    anchor(os, "all/empty/", "Empty", level,
    273274           "View statistics of empty lines");
    274275    os << "</li>"
  • trunk/lib/html_utility.h

    r201 r211  
    7070  /// @brief print html header of page
    7171  ///
    72   void print_header(std::ostream&, const std::string& name, u_int level);
     72  void print_header(std::ostream&, const std::string& name, u_int level,
     73                    const std::string&, const std::string&);
    7374
    7475
Note: See TracChangeset for help on using the changeset viewer.