Changeset 443
- Timestamp:
- 06/28/07 07:07:14 (1 year ago)
- Files:
-
- todo/trunk/ChangeLog (modified) (1 diff)
- todo/trunk/src/Loaders.cc (modified) (1 diff)
- todo/trunk/src/main.cc (modified) (1 diff)
- todo/trunk/src/support.cc (modified) (2 diffs)
- todo/trunk/src/.todo (modified) (2 diffs)
- todo/trunk/src/.todo.1 (modified) (1 diff)
- todo/trunk/src/TodoDB.cc (modified) (1 diff)
- todo/trunk/src/todoterm.cc (modified) (1 diff)
- todo/trunk/.todo (modified) (1 diff)
- todo/trunk/util/Makefile.am (modified) (1 diff)
- todo/trunk/util/Regex.h (modified) (1 diff)
- todo/trunk/util/Strings.cc (modified) (1 diff)
- todo/trunk/util/XML.cc (modified) (2 diffs)
- todo/trunk/util/XML.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
todo/trunk/ChangeLog
r293 r443 1 0.1.20 2 * A few bugfixes. 3 * Added XML declaration parsing/saving. This is a stop-gap at best, but will 4 hopefully be useful to some. 5 * Removed reliance on builtin regex library. Hopefully the completely broken 6 version of glibc that instigated the inclusion of it is now out of 7 circulation. 8 * Fixed a whole bunch of compiler warnings on more recent GCC versions. 9 1 10 0.1.19 2 11 * Updated my E-Mail address after about a year of having the wrong one :) todo/trunk/src/Loaders.cc
r292 r443 219 219 if (options.verbose > 1) 220 220 cout << "todo: saving to database '" << file << "'" << endl; 221 of << "<?xml version=\"1.0\"?>" << endl; 221 222 of << "<todo version=\"" << VERSION << "\">" << endl; 222 223 if (todo.titleText != "") todo/trunk/src/main.cc
r290 r443 18 18 int main(int argc, char const **argv) { 19 19 // Initialise readline 20 rl_readline_name = PACKAGE;20 rl_readline_name = const_cast<char*>(PACKAGE); 21 21 rl_initialize(); 22 22 todo/trunk/src/support.cc
r290 r443 61 61 vector<string> keys = str::split(",", arg); 62 62 struct { 63 c har *str;63 const char *str; 64 64 int key; 65 65 } table[] = { … … 742 742 } 743 743 if (c == 14) { 744 rl_insert_text( "\n");744 rl_insert_text(const_cast<char*>("\n")); 745 745 return 0; 746 746 } todo/trunk/src/.todo
r290 r443 1 < !-- Automagically generated by the ToDo program on 05/05/03, 23:56 -->2 <todo version="0.1. 17">1 <?xml version="1.0"?> 2 <todo version="0.1.20"> 3 3 <note priority="medium" time="1052142714"> 4 4 Lalalalala … … 7 7 Blah blah 8 8 </note> 9 <note priority="medium" time="1183035293"> 10 Test 11 </note> 12 <note priority="medium" time="1183035381"> 13 foo 14 </note> 9 15 </todo> todo/trunk/src/.todo.1
r290 r443 1 <!-- Automagically generated by the ToDo program on 05/05/03, 23:56 --> 2 <todo version="0.1.17"> 1 <todo version="0.1.20"> 3 2 <note priority="medium" time="1052142714"> 4 3 Lalalalala 5 4 </note> 6 <note priority="medium" time="1052142724" >5 <note priority="medium" time="1052142724" done="1052143016"> 7 6 Blah blah 8 7 </note> 8 <note priority="medium" time="1183035293"> 9 Test 10 </note> 9 11 </todo> todo/trunk/src/TodoDB.cc
r292 r443 481 481 Todo::Priority TodoDB::getPriority(string current) 482 482 { 483 c har *pri[] = {483 const char *pri[] = { 484 484 "veryhigh", 485 485 "high", todo/trunk/src/todoterm.cc
r290 r443 29 29 term_initialized = true; 30 30 } 31 return tgetnum( "co");31 return tgetnum(const_cast<char*>("co")); 32 32 } 33 33 #else todo/trunk/.todo
r293 r443 1 <?xml version="1.0"?> 1 2 <todo version="0.1.19"> 2 3 <title> todo/trunk/util/Makefile.am
r290 r443 1 1 noinst_LTLIBRARIES=libutil.la 2 libutil_la_SOURCES= c_regex.c c_regex.hTerminal.cc Terminal.h Lexer.cc Lexer.h \2 libutil_la_SOURCES=Terminal.cc Terminal.h Lexer.cc Lexer.h \ 3 3 Regex.cc Regex.h XML.cc XML.h Strings.cc Strings.h CommandArgs.cc CommandArgs.h 4 4 todo/trunk/util/Regex.h
r290 r443 10 10 #include <cassert> 11 11 #include <sys/types.h> 12 #include "c_regex.h"12 #include <regex.h> 13 13 14 14 #ifndef CRASH_REGEX_CACHE_THRESHOLD todo/trunk/util/Strings.cc
r290 r443 97 97 string replace(string const &match, string const &repl, string const &in) { 98 98 string out; 99 unsignedfound = 0, lastfound = 0;99 string::size_type found = 0, lastfound = 0; 100 100 101 101 while ((found = in.find(match, found)) != string::npos) { todo/trunk/util/XML.cc
r340 r443 37 37 Lexer::iterator i = xmlScan.begin(str); 38 38 39 if (i.type() == XmlDecl) { 40 ++i; 41 } 39 42 parseElement(i); 40 43 } catch (Lexer::exception &e) { … … 46 49 // Only initialise scanners once 47 50 if (!initialised) { 51 // <?xml version="1.0" encoding="UTF-8" standalone="no"?> 52 xmlScan.addPattern(XmlDecl, "<\\?xml.*?>[[:space:]]*"); 48 53 xmlScan.addPattern(XmlCommentBegin, "<!--"); 49 54 xmlScan.addPattern(XmlBegin, "<[a-zA-Z0-9_-]+" todo/trunk/util/XML.h
r290 r443 65 65 66 66 // Lexer constants 67 enum { Xml CommentBegin = 256, XmlBegin, XmlEnd, XmlDataBegin, XmlContent };67 enum { XmlDecl = 256, XmlCommentBegin, XmlBegin, XmlEnd, XmlDataBegin, XmlContent }; 68 68 enum { ElementWS = 256, ElementValue, ElementKey, ElementAssignment, ElementTerminator}; 69 69 enum { CommentEnd = 256, CommentBody };
