summaryrefslogtreecommitdiff
path: root/src/calendar.c
AgeCommit message (Collapse)Author
2012-02-19Remove all usages of bzero() and bcopy()Lukas Fleischer
The bzero() and bcopy() functions are deprecated and were removed from the POSIX standard in IEEE Std. 1003.1-2008. Remove all usages of bzero()/bcopy() and replace them by appropriate memset()/memmove() calls. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2012-01-21src/calendar.c: Fix range check in calendar_move()Lukas Fleischer
We added count prefix support to motion commands in commit 59e006e56d9f893506af56a4ca114fe53b537e49 but obviously forgot to check whether the range checks in calendar_move() still work correctly. Refactor out range checks and replace them by a single check that is performed *after* the new date is computed, but before we assign the new value to the actual selected date. This ensures we won't have to bother about these again when changing/adding functionality in/to calendar_move(), while keeping performance (date_change() is pretty cheap and range violations are corner cases anyway). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-11-11Merge branch 'maint'Lukas Fleischer
Conflicts: src/calcurse.h src/io.c
2011-11-02Remove parentheses from return statementsLukas Fleischer
No reason to use "return (x);" here. Refer to the GNU coding guidelines for details. Created using following semantic patch: @@ expression expr; @@ - return (expr); + return expr; Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-11-02Make use of the NULL macroLukas Fleischer
Use this constant everywhere when referring to a null pointer instead of casting 0 to various types of pointers. Created using following semantic patch: @@ type type; @@ - (type *)0 + NULL Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-11-02Do not cast unused return values to voidLukas Fleischer
A small style fix that removes all remaining "(void)" casts. Using these isn't encouraged in GNU coding guidelines and doesn't serve a certain purpose, except for satisfying a few static code analysis tools. We already nuked some of these in previous patches, but this semantic patch should fix what's left: @@ identifier func; @@ - (void)func ( + func ( ...); Long lines were re-formatted manually. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-10-06src/calendar.c: Add a count parameter to calendar_move()Lukas Fleischer
Allows for moving more than one step forward/backward. This is not used anywhere yet but a key binding will likely be added in one of the following patches. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-10-04Cleanup joinable threads on terminationLukas Fleischer
Always invoke pthread_join() when we blow up a thread via pthread_cancel() (avoid zombie threads). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer
* Update copyright dates (use 2004-2011 as date range everywhere). * Change copyright holder from "Frederic Culot" to "calcurse Development Team". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-03Remove dead assignments spotted by clang-analyzer.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-15Use upper case for macro names.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-14Overall indentation fixes.Lukas Fleischer
Use spaces instead of tabs for source code indentation only, strip trailing whitespaces from lines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update website links to match the new URL.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04Update mail addresses to match the new mailing lists.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03Remove CVS "$Id" headers.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03Fixed file permissions.Lukas Fleischer
2011-01-11Make parse_date accept several short forms.Lukas Fleischer
Short forms are only accepted in interactive mode (e.g. when using the "Go to" function, editing a recurrent item's end date, and so on). Samples: "1/1/30" for "01/01/2030", "26" for the 26th of the currently selected month/year or "3/1" for Mar 01 (or Jan 03, depending on the date format) of the currently selected year.
2010-10-23isBissextile() removed and replaced by isleap macro.Frederic Culot
Patch submitted by Lukas Fleischer, thanks.
2010-03-29Cosmetics in the calendar weekly view.Frederic Culot
2010-03-29Adapt the weekly calendar view to the side bar width.Frederic Culot
2010-03-21More work on sidebar customization.Frederic Culot
2010-03-20Work on sidebar width user-customization.Frederic Culot
2010-03-20All headers gathered into a single one. Typedefs suppressed.Frederic Culot
2010-03-08Patch to correct the wrong calculation of recurrent items' dates after aFrederic Culot
turn of year (submitted by Lukas Fleischer, thanks!).
2010-03-01Compiler problem fixed (thanks Petr for reporting it).Frederic Culot
2009-10-28Code to save the calendar default view in the configuration file.Frederic Culot
2009-10-16Changes in the calendar weekly view.Frederic Culot
2009-10-08More work on the weekly calendar view.Frederic Culot
2009-08-25Display week number inside weekly calendar view.Frederic Culot
2009-08-24Work on implementing the weekly calendar view.Frederic Culot
2009-07-12stdbool header removed, unsigned type used insteadFrederic Culot
2009-07-05Switch to BSD license.Frederic Culot
2009-06-20Day names and selected date colour now follow user's theme.Frederic Culot
2009-01-24do not crash when canceling the thread if it was not launched beforeFrederic Culot
2008-12-28Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot
memory usage
2008-12-14small bugfixes and code cleanupFrederic Culot
2008-12-07Checks added while loading key bindings configuration.Frederic Culot
2008-11-16More work on implementing user-definable keybindingsFrederic Culot
2008-08-10pcal export addedFrederic Culot
2008-08-03new keybindings addedFrederic Culot
2008-04-12Yet another style for source code. GNU style now used (I am fed up with tabs...)Frederic Culot
2008-04-09Tony's patch concerning date format configuration importedFrederic Culot
2007-12-10calendar_move_*() functions modified to properly handle leap years andFrederic Culot
merged into calendar_move() date_change() added
2007-10-21routines updated to handle new window_t and window_e typesFrederic Culot
2007-10-16calendar_change_day() and calendar_move_*() updated to prevent user from ↵Frederic Culot
entering an unsupported date
2007-08-12calendar_get_pom(), pom(), potm() and adj360() added, based on the OpenBSD ↵Frederic Culot
version of pom(6)
2007-07-28unuseful headers removed and some functions became staticFrederic Culot
2007-07-01calendar_date_thread implemented to check for day changes (thanks Jupp forFrederic Culot
reporting the problem) code cleanup in goto_day() and update_cal_panel() static variables today and slctd_day added calendar_store_current_date(), calendar_get_slctd_day(), calendar_get_slctd_day_sec(), calendar_init_slctd_day() created calendar_move_up(), calendar_move_down(), calendar_move_left() and calendar_move_right() created calendar_set_first_day_of_week(), calendar_change_first_day_of_week() and calendar_week_begins_on_monday() created
2007-03-10global variable 'colr' suppressedFrederic Culot
2007-01-16use of getstring() definesFrederic Culot