Changeset 462 for todo/trunk/src
- Timestamp:
- 09/06/07 21:42:55 (1 year ago)
- Files:
-
- todo/trunk/src/support.cc (modified) (1 diff)
- todo/trunk/src/TodoDB.cc (modified) (2 diffs)
- todo/trunk/src/TodoDB.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
todo/trunk/src/support.cc
r443 r462 897 897 string var = str.substr(mark, i - mark); 898 898 899 if (!getenv(var.c_str()) && options.verbose) 900 cout << "notice: no such environment variable '" + var + "'." << endl; 901 out += getenv(var.c_str()); 899 if (!getenv(var.c_str())) { 900 if (options.verbose) 901 cout << "notice: no such environment variable '" + var + "'." << endl; 902 } else 903 out += getenv(var.c_str()); 902 904 } else 903 905 out += '$'; todo/trunk/src/TodoDB.cc
r443 r462 1031 1031 } 1032 1032 1033 int TodoDB::markNotDone(Todo &todo) { 1034 int count = 1; 1035 1036 todo.done = false; 1037 for (multiset<Todo>::iterator i = todo.child->begin(); i != todo.child->end(); i++) 1038 count += markNotDone(const_cast<Todo&>(*i)); 1039 return count; 1040 } 1041 1033 1042 void TodoDB::notdone() { 1034 1043 vector<string> done = options.index, notfound; … … 1039 1048 1040 1049 if (t) { 1041 t->done = false; 1042 marked++; 1050 marked += markNotDone(*t); 1043 1051 if (options.verbose > 1) 1044 1052 cout << "todo: marked '" << *j << "' as not done" << endl; 1045 1046 1053 t->db->setDirty(true); 1047 1054 } else todo/trunk/src/TodoDB.h
r340 r462 110 110 Todo::Priority getPriority(string current = ""); 111 111 int markDone(Todo &todo); 112 int markNotDone(Todo &todo); 112 113 113 114 void formatItem(ostream &out, int depth, Todo const &item, string const &format);
