aboutsummaryrefslogtreecommitdiffstats
path: root/src/todo.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright rangesLukas Fleischer2012-03-261-1/+1
| | | | | | Add 2012 to the copyright range for all source and documentation files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* src/todo.c: Remove several unneeded variablesLukas Fleischer2011-12-091-19/+14
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use a global configuration variableLukas Fleischer2011-11-141-2/+2
| | | | | | | This is one of the few valid use cases for a global variable. No need to make it pseudo-local and pass it from one function to another. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove parentheses from return statementsLukas Fleischer2011-11-021-5/+5
| | | | | | | | | | | | | | 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>
* Do not cast unused return values to voidLukas Fleischer2011-11-021-4/+4
| | | | | | | | | | | | | | | | | | | | 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>
* Avoid use of printf()/fprintf()Lukas Fleischer2011-11-021-1/+1
| | | | | | | | | | | | | | | | Use one of the following functions where appropriate: * puts() (whenever we print hard coded strings to stdout) * fputs() (whenever we print hard coded strings to a stream) * putchar() (whenever we print a single character to stdout) * fputc() (whenever we print a single character to a stream) * strncpy() (whenever we copy hard coded strings to a buffer) This removes the overhead introduced by the format string parser and reduces the number of false positive C-format strings spotted by xgettext(1)'s heuristics. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add count parameter to *_{in,de}crease()Lukas Fleischer2011-10-061-8/+8
| | | | | | | | | This allows for moving more than one item up/down. This currently isn't used anywhere but will be bound to a key with one of the following patches. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove temporary highlight pointersLukas Fleischer2011-10-061-1/+1
| | | | | | | | | Add an additional check to apoint_update_panel() and todo_update_panel() and only highlight currently selected items if the corresponding panel is active. This allows us to remove all the highlight pointer juggling that we used whenever the panel selection changed. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Do not unlink() note files on note removalLukas Fleischer2011-10-051-6/+6
| | | | | | | | | | Now that we use hash-based note file names, note files should never be unlinked as a note file might be shared. Also, remove the ERASE_FORCE_KEEP_NOTE flag that no longer makes any sense. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Accept variable length note namesLukas Fleischer2011-10-051-2/+2
| | | | | | | | Read up to the first blank in note_read() instead of assuming a fixed-width note file name. Accept everything up to 40 characters (which is the length of a SHA1 hash in hexadecimal representation). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor out note functionsLukas Fleischer2011-07-211-25/+4
| | | | | | | | | | * Add new note_edit() and note_view() helper functions. Use these instead of copy-pasted code in *_note_edit(). * Move all note-related functions (note_edit(), note_view(), note_erase()) to a new source file "note.c". Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Add todo_pipe_item() functionLukas Fleischer2011-07-051-0/+29
| | | | | | | Pipe a serialized todo item to an external process, similar to what day_pipe_item() does (cf. c3f532d814e555abf67efb136491956428f19965). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Refactor out todo item serializationLukas Fleischer2011-07-021-0/+9
| | | | | | | | Add a todo_write() function that allows one to serialize todo items and write serialized data to an output stream in a fashion similar to apoint_write() and event_write(). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use constant for maximum UTF-8 character sizeLukas Fleischer2011-07-021-1/+1
| | | | | | | Introduce a UTF8_MAXLEN constant instead of using the literal value "6" at various places. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Make display_todo_item() UTF-8 compatibleLukas Fleischer2011-07-021-5/+14
| | | | 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>
* Return -1 in io_file_is_empty() if file cannot be accessed.Lukas Fleischer2011-04-221-1/+1
| | | | | | | Ensure files don't appear as empty if fopen() fails (e.g. on temporary EACCES failures). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Use generic lists for todo items.Lukas Fleischer2011-04-191-105/+72
| | | | | | | Use the new generic list implementation instead of "next" pointers in todo items. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Drop empty notes after editing.Lukas Fleischer2011-04-121-0/+3
| | | | | | | | | 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>
* Compare pointers to "NULL" instead of "0".Lukas Fleischer2011-04-051-4/+4
| | | | | | "bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Remove dead assignments spotted by clang-analyzer.Lukas Fleischer2011-04-031-3/+1
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Overall indentation fixes.Lukas Fleischer2011-03-141-52/+52
| | | | | | | Use spaces instead of tabs for source code indentation only, strip trailing whitespaces from lines. 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 CVS "$Id" headers.Lukas Fleischer2011-03-031-2/+0
| | | | Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
* Fixed file permissions.Lukas Fleischer2011-03-031-0/+0
|
* All headers gathered into a single one. Typedefs suppressed.Frederic Culot2010-03-201-28/+23
|
* Make use of erase_note() whenever possible.Frederic Culot2009-07-191-5/+3
|
* stdbool header removed, unsigned type used insteadFrederic Culot2009-07-121-6/+6
|
* Switch to BSD license.Frederic Culot2009-07-051-14/+26
|
* Ability to flag todo items as completed.Frederic Culot2009-06-261-8/+39
|
* more code cleanupFrederic Culot2009-01-031-4/+4
|
* various bugfixesFrederic Culot2009-01-021-3/+3
|
* Added wrappers around libc's memory management functions, to easily debug ↵Frederic Culot2008-12-281-11/+31
| | | | memory usage
* small bugfixes and a major one (freeze when deleting an appointment's note, ↵Frederic Culot2008-12-151-3/+3
| | | | thanks Jan for reporting it)
* code cleanupFrederic Culot2008-12-121-19/+14
|
* color configuration menu adapted to handle user-defined key bindingsFrederic Culot2008-12-081-2/+2
|
* Checks added while loading key bindings configuration.Frederic Culot2008-12-071-4/+4
|
* More work on implementing user-definable keybindingsFrederic Culot2008-11-161-7/+7
|
* Loading of user-configurable keys implementedFrederic Culot2008-11-091-3/+4
|
* some memory leaks fixed using valgrind and some minor code cleanupFrederic Culot2008-04-191-11/+11
|
* Yet another style for source code. GNU style now used (I am fed up with tabs...)Frederic Culot2008-04-121-311/+336
|
* no more segfault when changing item priority (fixes Debian Bug #469297)Frederic Culot2008-04-041-7/+10
|
* Code parts related to item update rewrittenFrederic Culot2008-01-201-3/+3
|
* Ability to attach notes to appointments and events addedFrederic Culot2008-01-131-10/+3
|
* Notes attached to todos can now be suppressedFrederic Culot2007-12-311-18/+82
|
* Ability to attach notes to todo items addedFrederic Culot2007-12-301-10/+71
|
* routines updated to handle new window_t and window_e typesFrederic Culot2007-10-211-10/+11
|
* hilt_tod moved to static variable hiltFrederic Culot2007-08-151-36/+112
| | | | | | todo_hilt(), todo_hilt_set(), todo_hilt_decrease(), todo_hilt_increase(), todo_saved_mesg(), todo_nb(), todo_set_nb(), todo_set_first(), todo_first_increase(), todo_first_decrease(), todo_hilt_pos() added
* unuseful headers removed and some functions became staticFrederic Culot2007-07-281-44/+40
|