Subversion Repositories DIN Is Noise

Rev

Rev 1857 | Rev 2009 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1857 Rev 1965
Line 12... Line 12...
12
extern console cons;
12
extern console cons;
13
extern string user_data_dir;
13
extern string user_data_dir;
14
help::help (const string& fname) {
14
help::help (const string& fname) {
15
  string s;
15
  string s;
16
  ifstream file ((user_data_dir + fname).c_str(), ios::in);
16
  ifstream file ((user_data_dir + fname).c_str(), ios::in);
17
  if (!file) text.push_back (fname); else while (getline(file, s)) text.push_back (s);
17
  if (!file) lines.push_back (fname); else while (getline(file, s)) lines.push_back (s);
-
 
18
  dlog << "help file: " << fname << " loaded, num_lines = " << lines.size () << endl;
18
}
19
}
19
void help::operator() () {
20
void help::operator() () {
20
  cons.rollup (0);
21
  cons.rollup (0);
21
  for (int i = 0, j = text.size(); i < j; ++i) cons << console::cyan << text[i] << eol;
22
  for (int i = 0, j = lines.size(); i < j; ++i) {
-
 
23
    dlog << lines[i] << endl;
-
 
24
    cons << CYAN << lines[i] << eol;
-
 
25
  }
22
  cons.last ();
26
  cons.last ();
23
}
27
}