From 3ef844de5fb63ae236cc6a7778e769b4178173c8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 7 Sep 2009 09:51:20 -0400 Subject: [PATCH 1/6] Packaging - Adding updated package files for OSX, from the 1.8.2 release. --- package-config/osx/task.pmdoc/01task-contents.xml | 2 +- package-config/osx/task.pmdoc/01task.xml | 2 +- package-config/osx/task.pmdoc/index.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-config/osx/task.pmdoc/01task-contents.xml b/package-config/osx/task.pmdoc/01task-contents.xml index 7b4f85219..a317238f4 100644 --- a/package-config/osx/task.pmdoc/01task-contents.xml +++ b/package-config/osx/task.pmdoc/01task-contents.xml @@ -1 +1 @@ - \ No newline at end of file +groupowner \ No newline at end of file diff --git a/package-config/osx/task.pmdoc/01task.xml b/package-config/osx/task.pmdoc/01task.xml index 27576e7f1..f3c7d27b1 100644 --- a/package-config/osx/task.pmdoc/01task.xml +++ b/package-config/osx/task.pmdoc/01task.xml @@ -1 +1 @@ -com.beckingham.task180.task.pkg1.8.0/Users/paul/task.git/package-config/osx/binary/task/usr/local/binparentlocationTyperelocatableversioninstallTo.pathinstallTo01task-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file +com.beckingham.task182.task.pkg1.8.2/Users/paul/task.git/package-config/osx/binary/task/usr/local/bininstallTolocationTyperelocatableidentifierparentversioninstallTo.path01task-contents.xml/CVS$/\.svn$/\.cvsignore$/\.cvspass$/\.DS_Store$ \ No newline at end of file diff --git a/package-config/osx/task.pmdoc/index.xml b/package-config/osx/task.pmdoc/index.xml index 35f24a7fa..1a4dbfbf2 100644 --- a/package-config/osx/task.pmdoc/index.xml +++ b/package-config/osx/task.pmdoc/index.xml @@ -1 +1 @@ -Task 1.8.0/Users/paul/Desktop/task-1.8.0.pkgcom.beckingham/Users/paul/task.git/package-config/osx/binary/COPYING.txt/Users/paul/task.git/package-config/osx/binary/README.txt01task.xmlproperties.titleproperties.anywhereDomainproperties.systemDomain \ No newline at end of file +Task 1.8.2/Users/paul/Desktop/task-1.8.2.pkgcom.beckingham/Users/paul/task.git/package-config/osx/binary/COPYING.txt/Users/paul/task.git/package-config/osx/binary/README.txt01task.xmlproperties.titleproperties.customizeOptionproperties.anywhereDomainproperties.systemDomain \ No newline at end of file From fba076a0d03bd438600fc423af3154350cbae35b Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 7 Sep 2009 16:13:37 +0200 Subject: [PATCH 2/6] Bumped version number to 1.8.3 --- ChangeLog | 6 ++++-- configure.ac | 2 +- doc/man/task-tutorial.5 | 2 +- doc/man/task.1 | 2 +- doc/man/taskrc.5 | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 704cbaa04..0c594256b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ ------ current release --------------------------- +1.8.3 () + +------ old releases ------------------------------ + 1.8.2 (9/7/2009) f243f0ed443ecd7dde779de8a6525222591024db + Added feature #282 that returns useful exit codes to the shell. Now a script can detect whether no tasks were returned by a report (thanks to @@ -14,8 +18,6 @@ + Fixed bug #288 which failed to propagate rc file overrides on the command line to the default command (thanks to Zach Frazier). ------- old releases ------------------------------ - 1.8.1 (8/20/2009) 35792e7874d2bb664abb1a0a67960b7fe7e0fccf + Fixed bug #231 that broke the build on OpenBSD 32-bit due to a time_t and int collision (thanks to Pietro Cerutti). diff --git a/configure.ac b/configure.ac index 52acb3632..6ffdd1329 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) -AC_INIT(task, 1.8.2, support@taskwarrior.org) +AC_INIT(task, 1.8.3, support@taskwarrior.org) CFLAGS="${CFLAGS=}" CXXFLAGS="${CXXFLAGS=}" diff --git a/doc/man/task-tutorial.5 b/doc/man/task-tutorial.5 index 234b9c049..59942d771 100644 --- a/doc/man/task-tutorial.5 +++ b/doc/man/task-tutorial.5 @@ -1,4 +1,4 @@ -.TH task-tutorial 5 2009-09-07 "task 1.8.2" "User Manuals" +.TH task-tutorial 5 2009-09-07 "task 1.8.3" "User Manuals" .SH NAME task-tutorial \- A tutorial for the task(1) command line todo manager. diff --git a/doc/man/task.1 b/doc/man/task.1 index 4d7cb0247..dbbeac5d2 100644 --- a/doc/man/task.1 +++ b/doc/man/task.1 @@ -1,4 +1,4 @@ -.TH task 1 2009-09-07 "task 1.8.2" "User Manuals" +.TH task 1 2009-09-07 "task 1.8.3" "User Manuals" .SH NAME task \- A command line todo manager. diff --git a/doc/man/taskrc.5 b/doc/man/taskrc.5 index 775fc88d6..51008828c 100644 --- a/doc/man/taskrc.5 +++ b/doc/man/taskrc.5 @@ -1,4 +1,4 @@ -.TH taskrc 5 2009-09-07 "task 1.8.2" "User Manuals" +.TH taskrc 5 2009-09-07 "task 1.8.3" "User Manuals" .SH NAME taskrc \- Configuration file for the task(1) command From b3d40b25545b3c7a666310b6ab5bb93eb5d5802c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 27 Sep 2009 17:02:20 -0400 Subject: [PATCH 3/6] Portability - Haiku R1/alpha1 - Added necessary include files and edits in order to build task on Haiku R1/alpha1. --- src/Context.cpp | 1 + src/Date.cpp | 29 +++++++++++++++-------------- src/Nibbler.cpp | 4 ++-- src/Sequence.cpp | 2 +- src/Table.cpp | 2 +- src/Timer.cpp | 2 +- src/import.cpp | 20 ++++++++++---------- src/report.cpp | 16 ++++++++-------- src/text.cpp | 24 ++++++++++++------------ 9 files changed, 51 insertions(+), 49 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 81ee76b8c..1b7ba1072 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include "Context.h" #include "Timer.h" #include "text.h" diff --git a/src/Date.cpp b/src/Date.cpp index 1d7692ced..55abd8421 100644 --- a/src/Date.cpp +++ b/src/Date.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include "Date.h" #include "text.h" #include "util.h" @@ -82,14 +83,14 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */) // Single or double digit. case 'm': if (i >= mdy.length () || - ! ::isdigit (mdy[i])) + ! isdigit (mdy[i])) { throw std::string ("\"") + mdy + "\" is not a valid date."; } if (i + 1 < mdy.length () && (mdy[i + 0] == '0' || mdy[i + 0] == '1') && - ::isdigit (mdy[i + 1])) + isdigit (mdy[i + 1])) { month = ::atoi (mdy.substr (i, 2).c_str ()); i += 2; @@ -103,14 +104,14 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */) case 'd': if (i >= mdy.length () || - ! ::isdigit (mdy[i])) + ! isdigit (mdy[i])) { throw std::string ("\"") + mdy + "\" is not a valid date."; } if (i + 1 < mdy.length () && (mdy[i + 0] == '0' || mdy[i + 0] == '1' || mdy[i + 0] == '2' || mdy[i + 0] == '3') && - ::isdigit (mdy[i + 1])) + isdigit (mdy[i + 1])) { day = ::atoi (mdy.substr (i, 2).c_str ()); i += 2; @@ -125,8 +126,8 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */) // Double digit. case 'y': if (i + 1 >= mdy.length () || - ! ::isdigit (mdy[i + 0]) || - ! ::isdigit (mdy[i + 1])) + ! isdigit (mdy[i + 0]) || + ! isdigit (mdy[i + 1])) { throw std::string ("\"") + mdy + "\" is not a valid date."; } @@ -137,8 +138,8 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */) case 'M': if (i + 1 >= mdy.length () || - ! ::isdigit (mdy[i + 0]) || - ! ::isdigit (mdy[i + 1])) + ! isdigit (mdy[i + 0]) || + ! isdigit (mdy[i + 1])) { throw std::string ("\"") + mdy + "\" is not a valid date."; } @@ -149,8 +150,8 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */) case 'D': if (i + 1 >= mdy.length () || - ! ::isdigit (mdy[i + 0]) || - ! ::isdigit (mdy[i + 1])) + ! isdigit (mdy[i + 0]) || + ! isdigit (mdy[i + 1])) { throw std::string ("\"") + mdy + "\" is not a valid date."; } @@ -162,10 +163,10 @@ Date::Date (const std::string& mdy, const std::string& format /* = "m/d/Y" */) // Quadruple digit. case 'Y': if (i + 3 >= mdy.length () || - ! ::isdigit (mdy[i + 0]) || - ! ::isdigit (mdy[i + 1]) || - ! ::isdigit (mdy[i + 2]) || - ! ::isdigit (mdy[i + 3])) + ! isdigit (mdy[i + 0]) || + ! isdigit (mdy[i + 1]) || + ! isdigit (mdy[i + 2]) || + ! isdigit (mdy[i + 3])) { throw std::string ("\"") + mdy + "\" is not a valid date."; } diff --git a/src/Nibbler.cpp b/src/Nibbler.cpp index 8941fb3c7..dce165412 100644 --- a/src/Nibbler.cpp +++ b/src/Nibbler.cpp @@ -243,7 +243,7 @@ bool Nibbler::getInt (int& result) ++i; } - while (i < mInput.length () && ::isdigit (mInput[i])) + while (i < mInput.length () && isdigit (mInput[i])) ++i; if (i > mCursor) @@ -260,7 +260,7 @@ bool Nibbler::getInt (int& result) bool Nibbler::getUnsignedInt (int& result) { std::string::size_type i = mCursor; - while (i < mInput.length () && ::isdigit (mInput[i])) + while (i < mInput.length () && isdigit (mInput[i])) ++i; if (i > mCursor) diff --git a/src/Sequence.cpp b/src/Sequence.cpp index 44fc3f2ce..85702398b 100644 --- a/src/Sequence.cpp +++ b/src/Sequence.cpp @@ -153,7 +153,7 @@ bool Sequence::validId (const std::string& input) const return false; for (size_t i = 0; i < input.length (); ++i) - if (!::isdigit (input[i])) + if (!isdigit (input[i])) return false; return true; diff --git a/src/Table.cpp b/src/Table.cpp index 9a9058150..59cdd782a 100644 --- a/src/Table.cpp +++ b/src/Table.cpp @@ -876,7 +876,7 @@ void Table::sort (std::vector & order) if (gap > 1) { gap = (int) ((float)gap / 1.3); - if (gap == 10 or gap == 9) + if (gap == 10 || gap == 9) gap = 11; } diff --git a/src/Timer.cpp b/src/Timer.cpp index 5d25dd4f4..cc9a76abe 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -52,7 +52,7 @@ Timer::~Timer () << mDescription << " " << std::setprecision (6) - << std::fixed +// << std::fixed << ((end.tv_sec - mStart.tv_sec) + ((end.tv_usec - mStart.tv_usec ) / 1000000.0)) << " sec"; diff --git a/src/import.cpp b/src/import.cpp index 939e04710..2ad65c948 100644 --- a/src/import.cpp +++ b/src/import.cpp @@ -106,16 +106,16 @@ static fileType determineFileType (const std::vector & lines) { if ( lines[i][0] == 'x' && lines[i][1] == ' ' && - ::isdigit (lines[i][2]) && - ::isdigit (lines[i][3]) && - ::isdigit (lines[i][4]) && - ::isdigit (lines[i][5]) && + isdigit (lines[i][2]) && + isdigit (lines[i][3]) && + isdigit (lines[i][4]) && + isdigit (lines[i][5]) && lines[i][6] == '-' && - ::isdigit (lines[i][7]) && - ::isdigit (lines[i][8]) && + isdigit (lines[i][7]) && + isdigit (lines[i][8]) && lines[i][9] == '-' && - ::isdigit (lines[i][10]) && - ::isdigit (lines[i][11])) + isdigit (lines[i][10]) && + isdigit (lines[i][11])) return todo_sh_2_0; } @@ -126,13 +126,13 @@ static fileType determineFileType (const std::vector & lines) // +project if (words[w].length () > 1 && words[w][0] == '+' && - ::isalnum (words[w][1])) + isalnum (words[w][1])) return todo_sh_2_0; // @context if (words[w].length () > 1 && words[w][0] == '@' && - ::isalnum (words[w][1])) + isalnum (words[w][1])) return todo_sh_2_0; } } diff --git a/src/report.cpp b/src/report.cpp index 45f6558bf..ccb90b195 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -1400,9 +1400,9 @@ std::string renderMonths ( row = 0; // Loop through days in month and add to table. - for (int d = 1; d <= daysInMonth.at (mpl); ++d) + for (int d = 1; d <= daysInMonth[mpl]; ++d) { - Date temp (months.at (mpl), d, years.at (mpl)); + Date temp (months[mpl], d, years[mpl]); int dow = temp.dayOfWeek (); int woy = temp.weekOfYear (weekStart); @@ -1420,9 +1420,9 @@ std::string renderMonths ( table.addCell (row, thisCol, d); if ((context.config.get ("color", true) || context.config.get (std::string ("_forcecolor"), false)) && - today.day () == d && - today.month () == months.at (mpl) && - today.year () == years.at (mpl)) + today.day () == d && + today.month () == months[mpl] && + today.year () == years[mpl]) table.setCellFg (row, thisCol, Text::cyan); foreach (task, all) @@ -1434,8 +1434,8 @@ std::string renderMonths ( if ((context.config.get ("color", true) || context.config.get (std::string ("_forcecolor"), false)) && due.day () == d && - due.month () == months.at (mpl) && - due.year () == years.at (mpl)) + due.month () == months[mpl] && + due.year () == years[mpl]) { table.setCellFg (row, thisCol, Text::black); table.setCellBg (row, thisCol, due < today ? Text::on_red : Text::on_yellow); @@ -1447,7 +1447,7 @@ std::string renderMonths ( int eow = 6; if (weekStart == 1) eow = 0; - if (dow == eow && d < daysInMonth.at (mpl)) + if (dow == eow && d < daysInMonth[mpl]) row++; } } diff --git a/src/text.cpp b/src/text.cpp index 0e511b551..d980b7c34 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -209,7 +209,7 @@ std::string commify (const std::string& data) int i; for (int i = 0; i < (int) data.length (); ++i) { - if (::isdigit (data[i])) + if (isdigit (data[i])) end = i; if (data[i] == '.') @@ -227,11 +227,11 @@ std::string commify (const std::string& data) int consecutiveDigits = 0; for (; i >= 0; --i) { - if (::isdigit (data[i])) + if (isdigit (data[i])) { result += data[i]; - if (++consecutiveDigits == 3 && i && ::isdigit (data[i - 1])) + if (++consecutiveDigits == 3 && i && isdigit (data[i - 1])) { result += ','; consecutiveDigits = 0; @@ -251,11 +251,11 @@ std::string commify (const std::string& data) int consecutiveDigits = 0; for (; i >= 0; --i) { - if (::isdigit (data[i])) + if (isdigit (data[i])) { result += data[i]; - if (++consecutiveDigits == 3 && i && ::isdigit (data[i - 1])) + if (++consecutiveDigits == 3 && i && isdigit (data[i - 1])) { result += ','; consecutiveDigits = 0; @@ -279,8 +279,8 @@ std::string lowerCase (const std::string& input) { std::string output = input; for (int i = 0; i < (int) input.length (); ++i) - if (::isupper (input[i])) - output[i] = ::tolower (input[i]); + if (isupper (input[i])) + output[i] = tolower (input[i]); return output; } @@ -290,8 +290,8 @@ std::string upperCase (const std::string& input) { std::string output = input; for (int i = 0; i < (int) input.length (); ++i) - if (::islower (input[i])) - output[i] = ::toupper (input[i]); + if (islower (input[i])) + output[i] = toupper (input[i]); return output; } @@ -302,7 +302,7 @@ std::string ucFirst (const std::string& input) std::string output = input; if (output.length () > 0) - output[0] = ::toupper (output[0]); + output[0] = toupper (output[0]); return output; } @@ -352,7 +352,7 @@ void guess ( bool digitsOnly (const std::string& input) { for (size_t i = 0; i < input.length (); ++i) - if (!::isdigit (input[i])) + if (!isdigit (input[i])) return false; return true; @@ -362,7 +362,7 @@ bool digitsOnly (const std::string& input) bool noSpaces (const std::string& input) { for (size_t i = 0; i < input.length (); ++i) - if (::isspace (input[i])) + if (isspace (input[i])) return false; return true; From fdb359c180866a486bab75071b32b16f1c6ed534 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Wed, 21 Oct 2009 22:15:20 +0200 Subject: [PATCH 4/6] Fix confirm() to handle EOF Signed-off-by: Federico Hernandez --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 76ebd1312..75938a318 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -64,7 +64,7 @@ bool confirm (const std::string& question) << " "; std::getline (std::cin, answer); - answer = lowerCase (trim (answer)); + answer = std::cin.eof() ? "no" : lowerCase (trim (answer)); } while (answer != "y" && // TODO i18n answer != "ye" && // TODO i18n From 469cafa053f21f64f64da907add11b6f9cb81505 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Wed, 21 Oct 2009 22:20:32 +0200 Subject: [PATCH 5/6] Make run_all more portable. - Changed shebang for portability - Fix date command for FreeBSD Signed-off-by: Federico Hernandez --- src/tests/run_all | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/run_all b/src/tests/run_all index 6383568cf..ab1629002 100755 --- a/src/tests/run_all +++ b/src/tests/run_all @@ -1,4 +1,4 @@ -#! /bin/bash +#! /bin/sh date > all.log @@ -14,7 +14,7 @@ END=`tail -1 all.log` OS=`uname` case $OS in - Darwin) + Darwin | FreeBSD) STARTEPOCH=`date -j -f "%a %b %d %T %Z %Y" "${START}" "+%s"` ENDEPOCH=`date -j -f "%a %b %d %T %Z %Y" "${END}" "+%s"` ;; From bcdcbeeea0d92f21c3565aebfaf6332b959f4025 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Wed, 21 Oct 2009 22:53:26 +0200 Subject: [PATCH 6/6] Preparing release - Updating dist documentation - Release date in man pages --- ChangeLog | 3 ++- NEWS | 1 + doc/man/task-tutorial.5 | 2 +- doc/man/task.1 | 2 +- doc/man/taskrc.5 | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c594256b..3455827c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,8 @@ ------ current release --------------------------- -1.8.3 () +1.8.3 (10/21/2009) + + Added support for Haiku R1/alpha1 ------ old releases ------------------------------ diff --git a/NEWS b/NEWS index 02f401fb1..6a358f0b1 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,7 @@ Task has been built and tested on the following configurations: - OpenBSD 4.5 - FreeBSD - Cygwin 1.5 + - Haiku R1/alpha1 While Task has undergone testing, bugs are sure to remain. If you encounter a bug, please enter a new issue at: diff --git a/doc/man/task-tutorial.5 b/doc/man/task-tutorial.5 index 59942d771..85acc0958 100644 --- a/doc/man/task-tutorial.5 +++ b/doc/man/task-tutorial.5 @@ -1,4 +1,4 @@ -.TH task-tutorial 5 2009-09-07 "task 1.8.3" "User Manuals" +.TH task-tutorial 5 2009-10-21 "task 1.8.3" "User Manuals" .SH NAME task-tutorial \- A tutorial for the task(1) command line todo manager. diff --git a/doc/man/task.1 b/doc/man/task.1 index dbbeac5d2..a10efec25 100644 --- a/doc/man/task.1 +++ b/doc/man/task.1 @@ -1,4 +1,4 @@ -.TH task 1 2009-09-07 "task 1.8.3" "User Manuals" +.TH task 1 2009-10-21 "task 1.8.3" "User Manuals" .SH NAME task \- A command line todo manager. diff --git a/doc/man/taskrc.5 b/doc/man/taskrc.5 index 51008828c..c1a9997c1 100644 --- a/doc/man/taskrc.5 +++ b/doc/man/taskrc.5 @@ -1,4 +1,4 @@ -.TH taskrc 5 2009-09-07 "task 1.8.3" "User Manuals" +.TH taskrc 5 2009-10-21 "task 1.8.3" "User Manuals" .SH NAME taskrc \- Configuration file for the task(1) command