summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-07-02Add child_wait() functionLukas Fleischer
Can be used to wait for the termination of a child process. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02Add fork_exec() functionLukas Fleischer
Can be used to execute an external program. Provides the possibility to optionally create a pipe to the new process. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02Make recur_*_write() publicLukas Fleischer
This allows one to serialize and send recurrent items to arbitrary output streams. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02Refactor out todo item serializationLukas Fleischer
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>
2011-07-02doc/manual.txt: Remove note on missing UTF-8 supportLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02TODO: Remove UTF-8 support from TODO listLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02utf8_width() performance improvementsLukas Fleischer
* Sort character width lookup table by character ranges. * Use binary search instead of linear search for UTF-8 character width lookups which will speed up utf8_width() (O(log n) instead of O(n)). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02Avoid segfault in getstr_fixscr()Lukas Fleischer
Avoid a segfault that may occur if getstr_fixscr() changes the scroll offset to something outside the input boundaries (e.g. if a word that is only partly visible is killed via backward-kill-word). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02Use constant for maximum UTF-8 character sizeLukas Fleischer
Introduce a UTF8_MAXLEN constant instead of using the literal value "6" at various places. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02Refactor getstring codeLukas Fleischer
* Rename static showstring() function to getstr_print(), rename ins_char() to getstr_ins_char() and del_char() to getstr_del_char(). * Refactor out getstring data structure initialization and window scrolling routines. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02Make display_todo_item() UTF-8 compatibleLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29Make display_item() UTF-8 compatibleLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29Make getstring() UTF-8 compatibleLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29Split line editing functions into separate fileLukas Fleischer
Move getstring() related stuff into a separate file as a first step on our way to UTF-8 support for line editing helpers. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29Add basic UTF-8 helper functionsLukas Fleischer
Add utf8_width() and utf8_strwidth() which can be used to calculate the display width of a single character or a string, respectively. A lookup table is used to spot double width characters, as well as composing characters. There currently isn't any code to deal with ambigious characters. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29src/calcurse.h: Add UTF-8 related macrosLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29Enable arrow key navigation by defaultLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29doc/manual.txt: Document backward-kill-wordLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-29Handle resize properly in the sidebar config menuLukas Fleischer
There used to be no resize handler in custom_sidebar_config() which resulted in a messed up screen if the terminal was resized during sidebar configuration. Doing a simple wins_reset() if the terminal was resized works around this problem. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-28Do not try to display items with negative widthLukas Fleischer
Don't display anything rather than segfault if the appointment panel becomes too small (e.g. during a terminal resize). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-28Always work with new window dimensions on resizeLukas Fleischer
This one came up after improving resizing behaviour in commit fec37db06bbbdff79bc9816046a76e0b29e173b4. We used to use outdated width and height values at various places without noticing it due to the resize algorithm being called several times on every resize. This patch ensures we retrieve the new window dimensions *before* doing any layout calculations. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-28Avoid redundant redraws on resizeLukas Fleischer
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>
2011-06-20doc/Makefile.am: Fix "--without-asciidoc"Lukas Fleischer
Do not try to distribute man page and manual files if documentation generation is disabled. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-20src/llist.c: Use stable insertion algorithmLukas Fleischer
Ensure the relative order of elements with equal keys is maintained when inserting into a sorted list. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-09Fix whitespace issuesLukas Fleischer
Strip trailing whitespaces in all source files. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-06-07src/utils.c: Make bell() staticLukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-05-24Release 2.9.0.v2.9.0Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-05-24build-aux/git-version-gen: Ignore timestamps.Lukas Fleischer
Do not declare the working tree dirty if only a timestamp has changed. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-05-24Add version information to distribution tarball.Lukas Fleischer
We somehow forgot this when adding Git version string support in commit c5e4187590f37e9524a8e3fcb2bccb20f2e8b4eb. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-05-24README: Add missing translators.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-05-24Translation updates from Transifex.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-05-18.tx/config: Add EOL character to the last line.Lukas Fleischer
Be a little more consistent here. Also, transifex-client will automatically add a newline character to the last line of its config file unless it is already there. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-05-17Add missing llist header files to "_SOURCES".Lukas Fleischer
We forgot to add those to the "_SOURCES" variable in commit 0eb1da8dd7fa3ae9d95e12df6058fb41a5ec1c11 and d668963e2056027526374098efe2869a0d389b92. Spotted by `make distcheck`. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Add iCalendar keywords TODO entry.Lukas Fleischer
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-22TODO overhaul.Lukas Fleischer
* Use AsciiDoc style formatting. * Fix some wording. Use "we" instead of "I" and "us" instead of "me". * Update mail addresses. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22README overhaul.Lukas Fleischer
* Use AsciiDoc style formatting. * Remove outdated information on the "ChangeLog" file (removed that in commit b9fa5bdbb17f507ba756fe38a14d5993e522bb6c). * Replace references to language specific manual files by "doc/manual.html". * Update author roles. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Ignore daemon lock file if the daemon process died.Lukas Fleischer
Do this in a fashion similar to what was done in commit 6ff95238766656c5ea9d5c65c35d3aef93499f60. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Be a bit more fail-safe in "build-aux/git-version-gen".Lukas Fleischer
The existence of a ".git" directory is not a sufficient condition to be sure we are in a Git repository. Only overwrite the version information file if `git describe` returns a non-empty string. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Return -1 in io_file_is_empty() if file cannot be accessed.Lukas Fleischer
Ensure files don't appear as empty if fopen() fails (e.g. on temporary EACCES failures). Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Documentation Makefile overhaul.Lukas Fleischer
* Add documentation input and output files to distribution tarballs. * Use a more generic rule to generate man pages instead of the hardcoded "calcurse.1" target. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Add Git version string support.Lukas Fleischer
Introduce a script to auto-generate version strings. Use `git describe` to create descriptive version strings when building from a Git checkout, use ".version" files for release tarballs. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Use "event" structure when iterating over events in app_arg().Lukas Fleischer
Regression introduced in commit 5b174ba5d46c256f41c1cfb952d46f49a088db8a. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Add comments to linked list functions.Lukas Fleischer
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22llist.c: Nullify pointers after free()'ing.Lukas Fleischer
* Set all data members to "NULL" in llist_free_inner() after freeing them. Altough we normally shouldn't continue working with a list that already went through llist_free_inner(), this will protect against dangling pointer bugs in case anyone will ever come up with the idea of doing so. * Set list head to "NULL" in llist_free(), basically to put the list into an initialized state. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-22Use generic lists for recurring item exceptions.Lukas Fleischer
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>
2011-04-19Remove "next" member from "recur_apoint" structure.Lukas Fleischer
Field seems to be unused. Verify using following spatch: ---- @@ struct recur_apoint *rapt; @@ * rapt->next ---- Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-19Use generic lists for recurring apointments and events.Lukas Fleischer
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>
2011-04-19Add recur_apoint_inday() and recur_event_inday().Lukas Fleischer
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>
2011-04-19Use generic lists for generic day items.Lukas Fleischer
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>