summaryrefslogtreecommitdiffstats
path: root/src/calcurse.h
Commit message (Collapse)AuthorAgeFilesLines
* Do not hardcode paths to the default editor/pagerLukas Fleischer2011-10-041-0/+3
| | | | | | | | | | | | | | | Use "vi" instead of "/usr/bin/vi" and "less" instead of "/usr/bin/less". Hardcoding absolute paths is a bad idea: $ uname -rsv Linux 3.0-ARCH #1 SMP PREEMPT Tue Aug 30 07:32:23 UTC 2011 $ which less /bin/less The "$PATH" environment variable will almost always have a better idea of where these binaries are located. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add "force" parameter to notify_check_next_app()Lukas Fleischer2011-07-291-1/+1
| | | | | | | | This allows to force notify_check_next_app() to update the notification appointment, even if start times are equal (e.g. if the item description was changed). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Honor "TMPDIR" environment variableLukas Fleischer2011-07-091-0/+1
| | | | | | | | | Replace all hardcoded paths referring to "/tmp" with a new function that honors the "TMPDIR" environment variable as well as P_tmpdir and uses "/tmp" as a fallback. Thanks-to: Erik Saule <esaule@bmi.osu.edu> Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Avoid redundant redraws on resizeLukas Fleischer2011-06-281-0/+1
| | | | | | | | | | Use a global flag to record whether the terminal was resized instead of redrawing everything each time a KEY_RESIZE is read. Add some additional checks to help_write_pad() as invalid actions may be passed now due to using signals instead of virtual key presses. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fix whitespace issuesLukas Fleischer2011-06-091-9/+9
| | | | | | Strip trailing whitespaces in all source files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update copyright notices in source files, documentation and "COPYING".Lukas Fleischer2011-04-221-1/+1
| | | | | | | | | * 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>
* Use generic lists for recurring item exceptions.Lukas Fleischer2011-04-221-11/+9
| | | | | | | | | Rename "days" structure to "excp" which seems to be a better name here. Use generic linked lists of excp structures instead of using the "days" structure which again contains a linked list implementation. Do some cleanups and invocation fixes. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove "next" member from "recur_apoint" structure.Lukas Fleischer2011-04-191-1/+0
| | | | | | | | | | | | Field seems to be unused. Verify using following spatch: ---- @@ struct recur_apoint *rapt; @@ * rapt->next ---- Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for recurring apointments and events.Lukas Fleischer2011-04-191-9/+2
| | | | | | | | Use them instead of "recur_apoint_list" and "next" pointers in "recur_event" type variables. Includes some code simplifications and cleanups. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add recur_apoint_inday() and recur_event_inday().Lukas Fleischer2011-04-191-0/+2
| | | | | | | | | | | | To be used with llist_fn_match_t callbacks later. I feel a bit ill adding those functions. This definitely is a hack. Ultimately, there should be some generic recur_item_inday() function that accepts both recurring apointments and events (or some wrapper structure) instead of parameter galeere. This is not the right place to fix that tho. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for generic day items.Lukas Fleischer2011-04-191-1/+0
| | | | | | | Use the new generic list implementation instead of "next" pointers in day_item type variables. Includes some cleanups and fixes. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for todo items.Lukas Fleischer2011-04-191-2/+2
| | | | | | | Use the new generic list implementation instead of "next" pointers in todo items. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for events.Lukas Fleischer2011-04-191-3/+2
| | | | | | | Use the new generic list implementation instead of those insane "next" pointers in events. Includes some cleanups. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove "next" member from "apoint" structure.Lukas Fleischer2011-04-191-1/+0
| | | | | | | | | | | | Field seems to be unused. Verify using following spatch: ---- @@ struct apoint *apt; @@ * apt->next ---- Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for appointments.Lukas Fleischer2011-04-191-8/+2
| | | | | | | Use the new generic list implementation instead of "apoint_list" everywhere. Simplify stuff and drop unused variables as well. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add macros to use for thread-safe linked lists.Lukas Fleischer2011-04-191-0/+1
| | | | | | | | | Add LLIST_TS_* macros in a fashion similar to the already existing LLIST_* macros. Unlike the non-thread-safe version, these include LLIST_TS_LOCK and LLIST_TS_UNLOCK which can be used to lock (and unlock) a list (hence the thread-safety). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add linked lists implementation.Lukas Fleischer2011-04-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed on the mailing lists, the various linked list implementations we currently use at a dozen of different places in the calcurse source tree are inconvenient and should be replaced by a single generic solution. This is a first approach to introduce such a generic implemetation. It provides following functions: * llist_init(): Initialize a list. * llist_free_inner(): Loop through a list and free all items. * llist_free(): Free the list itself (but not the individual items). * llist_first(): Get the first item of a list. * llist_nth(): Get the nth item of a list. * llist_next(): Get the successor of a list item. * llist_find_first(): Find an item using a callback function. * llist_find_next(): Find the next match using a callback function. * llist_find_nth(): Find the nth item in a list (using a callback). * llist_get_data(): Get a pointer to the actual data of a list item. * llist_add(): Add an item at the end of a list. * llist_add_sorted(): Add an item to a sorted list (using a comparison callback function). * llist_remove(): Remove an item from a list. Linked lists are stored in "llist_t" structures, list items are to be stored in "llist_item_t" structs. All of the llist_*() functions either expect a pointer to a llist_t structure (in case the function operates on the list itself) or a pointer to a llist_item_t (llist_*_next() and llist_get_data()). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Declare exit_calcurse() "noreturn".Lukas Fleischer2011-04-121-1/+1
| | | | | | | | Functions that never return should be declared "noreturn" to tell the compiler this fact. Also, clang-analyzer will detect this attribute and take it into account when running scan-build. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Drop empty notes after editing.Lukas Fleischer2011-04-121-0/+1
| | | | | | | | | Keeping empty notes doesn't make sense here. Also, there doesn't seem to be a simple way to erase notes yet. This will make calcurse delete any notes that are empty (meaning that they are either 0-byte files or contain nothing but a newline character) when returning from the editor. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update website links to match the new URL.Lukas Fleischer2011-03-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Update mail addresses to match the new mailing lists.Lukas Fleischer2011-03-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove date_sec2hour_str() from "utils.c".Lukas Fleischer2011-03-041-1/+0
| | | | | | | | date_sec2hour_str() is superseded by date_sec2date_str() with "%H:%M" as date format string, so replace all invocations and remove that function from "utils.c". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Simplify str_toupper() in "utils.c".Lukas Fleischer2011-03-041-1/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove CVS "$Id" headers.Lukas Fleischer2011-03-031-2/+0
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make parse_date accept several short forms.Lukas Fleischer2011-01-111-2/+3
| | | | | | | | | 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.
* Compilation issue related to memory functions definition fixed (thanks Doug ↵Frederic Culot2010-03-221-17/+21
| | | | for reporting it).
* Avoid concurrent screen refreshes.Frederic Culot2010-03-211-1/+4
|
* More work on sidebar customization.Frederic Culot2010-03-211-2/+11
|
* Work on sidebar width user-customization.Frederic Culot2010-03-201-2/+5
|
* All headers gathered into a single one. Typedefs suppressed.Frederic Culot2010-03-201-0/+919