49 Commits

Author SHA1 Message Date
Lukas Fleischer
6f01c7af97 Remove parentheses from return statements
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-02 19:38:38 +01:00
Lukas Fleischer
7cc6305588 Do not cast unused return values to void
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-11-02 18:32:17 +01:00
Lukas Fleischer
44bc9605d6 Avoid use of printf()/fprintf()
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>
2011-11-02 18:31:10 +01:00
Lukas Fleischer
6bdc36b15a Avoid unnecessary window updates
Add a window bitmask to wins_update() and only update windows that might
actually require an update in our main loop. This improves response
times of the user interface a bit.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-10-06 12:37:05 +02:00
Lukas Fleischer
309fa84cb7 Add key binding for pipe-item command
This removes the need of reading the whole data file and find matching
entries if we want to parse appointments in external programs.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-07 07:05:48 +02:00
Lukas Fleischer
2f8a425756 Move endwin() down in wins_prepare_external()
Invoke endwin() *after* calling any other curses functions, such as
refresh(). Calling refresh() after endwin() might restore curses mode
which is a bad thing for a terminal mode initialization routine.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-05 16:04:33 +02:00
Lukas Fleischer
233980622f Refactor wins_launch_external()
* Do window preparation and restoring in separate functions
  wins_prepare_external() and wins_unprepare_external().

* Use fork_exec() and child_wait() instead of system().

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-07-02 10:15:36 +02:00
Lukas Fleischer
38865b8e48 Update copyright notices in source files, documentation and "COPYING".
* 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-22 07:26:05 +02:00
Lukas Fleischer
5fc6d92866 Remove some more dead assignments spotted by clang-analyzer.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-12 12:02:38 +02:00
Lukas Fleischer
6fb0f6f4c6 Compare pointers to "NULL" instead of "0".
"bad_zero.cocci" spatch from http://coccinelle.lip6.fr/impact_linux.php.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-05 09:27:04 +02:00
Lukas Fleischer
c4c7c8af5d Remove unused variables from wins_show().
Seen with "-Wunused-but-set-variable".

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-04-03 22:09:15 +02:00
Lukas Fleischer
9c9fd5da15 Overall indentation fixes.
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-14 19:03:53 +01:00
Lukas Fleischer
c22dcaf6be Update website links to match the new URL.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04 11:07:49 +01:00
Lukas Fleischer
73e9649387 Update mail addresses to match the new mailing lists.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-04 11:07:40 +01:00
Lukas Fleischer
91c9cac898 Remove CVS "$Id" headers.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
2011-03-03 16:19:45 +01:00
Lukas Fleischer
56b9cbcb84 Fixed file permissions. 2011-03-03 12:21:16 +01:00
Frederic Culot
31136eb80c Check added to avoid problems in case side bar width is not found in configuration file. 2010-03-23 13:08:46 +00:00
Frederic Culot
6892b59622 Avoid concurrent screen refreshes. 2010-03-21 10:17:03 +00:00
Frederic Culot
cc77e839d8 More work on sidebar customization. 2010-03-21 09:21:06 +00:00
Frederic Culot
ec36b96848 Work on sidebar width user-customization. 2010-03-20 13:29:47 +00:00
Frederic Culot
a8cb1c92ef All headers gathered into a single one. Typedefs suppressed. 2010-03-20 10:54:41 +00:00
Frederic Culot
c7cd2c0a01 Key bindings for changing calendar view added to the status bar. 2009-10-28 13:23:04 +00:00
Frederic Culot
700ecefc3a Make use of calendar window attributes instead of constants. 2009-08-25 14:51:05 +00:00
Frederic Culot
5694955002 stdbool header removed, unsigned type used instead 2009-07-12 16:21:57 +00:00
Frederic Culot
27b25548a4 Switch to BSD license. 2009-07-05 20:33:13 +00:00
Frederic Culot
0f38502d59 Flag command added in todo panel 2009-06-26 21:50:18 +00:00
Frederic Culot
936b6fe373 more code cleanup 2009-01-03 21:32:10 +00:00
Frederic Culot
bf3bce0ab2 code cleanup 2009-01-02 22:28:53 +00:00
Frederic Culot
8fdd1510c6 Automatic periodic saves implemented 2008-12-28 19:41:45 +00:00
Frederic Culot
5352496984 Added wrappers around libc's memory management functions, to easily debug memory usage 2008-12-28 13:13:58 +00:00
Frederic Culot
53db22a380 code cleanup 2008-12-12 20:44:50 +00:00
Frederic Culot
eb88eaecb3 Building configuration menu to assign keybindings 2008-11-23 20:38:55 +00:00
Frederic Culot
96b858b8bc More work on ical import. Macros to handle errors and to display messages in both command-line and curses mode added 2008-09-20 12:47:06 +00:00
Frederic Culot
2341c90003 some memory leaks fixed using valgrind and some minor code cleanup 2008-04-19 21:04:47 +00:00
Frederic Culot
2e798df3cb Scrollbar added in general configuration menu 2008-04-19 09:22:14 +00:00
Frederic Culot
f0d4409151 Generic functions to handle scrolling windows created 2008-04-18 17:53:31 +00:00
Frederic Culot
efd782699b Yet another style for source code. GNU style now used (I am fed up with tabs...) 2008-04-12 21:14:03 +00:00
Frederic Culot
120de530e0 proper cvs tag used 2008-02-14 20:16:30 +00:00
Frederic Culot
fe5621c547 manpage updated
NOTESIZ shortened to be 6 characters long, as only 6 'X' are used in the
glibc version of mkstemp(3).
bugfix: wrong calculated len in wins_launch_external(), which lead to
erroneus note file name
2008-02-13 19:44:37 +00:00
Frederic Culot
52340fa0e1 memory leak fixed in notify_thread_app()
check for limits.h header added
asprintf() call replaced in wins_launch_external() as it is not
fully portable
2008-02-10 16:29:50 +00:00
Frederic Culot
478b2762e6 Ability to attach notes to todo items added 2007-12-30 16:27:58 +00:00
Frederic Culot
54db19e8b3 wins_prop() suppressed
routines updated to handle new window_t type
2007-10-21 13:39:49 +00:00
Frederic Culot
fe8935e3fc wins_reset() modified to avoid blank screen when resizing window under Linux 2007-10-16 19:15:43 +00:00
Frederic Culot
cfee31cf75 wins_reset() updated to handle notification bar reset 2007-08-19 13:15:18 +00:00
Frederic Culot
1f523ea9df win and layout become static variables
wins_prop() added
wins_layout() and wins_set_layout() added
wins_reset() added
2007-08-15 15:31:52 +00:00
Frederic Culot
ff60394c8e error handling while in ncurses mode improved 2007-08-04 14:34:03 +00:00
Frederic Culot
4b987f70ac unuseful headers removed and some functions became static 2007-07-28 13:11:42 +00:00
Frederic Culot
5cc85f48ab window_e and window_t added
wins_slct_init(), wins_slctd_set(), wins_slctd_next() and
wins_slctd() created
2007-07-23 19:28:37 +00:00
Frederic Culot
e10dd9cd7f new source files to store windows handling related routines 2007-07-21 19:37:44 +00:00