aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2007-03-10 16:45:56 +0000
committerFrederic Culot <calcurse@culot.org>2007-03-10 16:45:56 +0000
commitba7189e688aaa4f093175d7d7b86026a0cc9e03b (patch)
treee3764233e7a9416f0f152ffb5b60bebdf53b3106 /src/utils.c
parent7ca3bc06beb54aa08c58f5b08579bfa301c89932 (diff)
downloadcalcurse-ba7189e688aaa4f093175d7d7b86026a0cc9e03b.tar.gz
calcurse-ba7189e688aaa4f093175d7d7b86026a0cc9e03b.zip
global variable 'colr' suppressed
Diffstat (limited to 'src/utils.c')
-rwxr-xr-xsrc/utils.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index efdf28f..e8181ed 100755
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $calcurse: utils.c,v 1.23 2007/03/04 16:13:43 culot Exp $ */
+/* $calcurse: utils.c,v 1.24 2007/03/10 16:45:56 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -187,7 +187,8 @@ void showstring(WINDOW *win, int y, int x, char *str, int len, int pos)
* environment, otherwise the cursor would move from place to place without
* control.
*/
-int getstring(WINDOW *win, int colr, char *str, int l, int x, int y)
+int
+getstring(WINDOW *win, char *str, int l, int x, int y)
{
int ch, newpos, len = 0;
char *orig;
@@ -273,13 +274,15 @@ int getstring(WINDOW *win, int colr, char *str, int l, int x, int y)
}
/* Update an already existing string. */
-int updatestring(WINDOW *win, int colr, char **str, int x, int y) {
+int
+updatestring(WINDOW *win, char **str, int x, int y)
+{
char *newstr;
int escape, len = strlen(*str) + 1;
newstr = (char *) malloc(MAX_LENGTH);
(void)memcpy(newstr, *str, len);
- escape = getstring(win, colr, newstr, MAX_LENGTH, x, y);
+ escape = getstring(win, newstr, MAX_LENGTH, x, y);
if (!escape) {
len = strlen(newstr) + 1;
if ((*str = (char *) realloc(*str, len)) == NULL) {
@@ -365,7 +368,8 @@ border_nocolor(WINDOW *window)
* table, and update the NB_CAL_CMDS, NB_APP_CMDS or NB_TOD_CMDS defines in
* utils.h, depending on which panel the added keybind is assigned to.
*/
-void status_bar(int which_pan, int colr, int nc_bar, int nl_bar)
+void
+status_bar(int which_pan, int nc_bar, int nl_bar)
{
int cmd_length, space_between_cmds, start, end, i, j = 0;
const int pos[NB_PANELS + 1] =