global variable 'colr' suppressed
This commit is contained in:
parent
7ca3bc06be
commit
ba7189e688
14
src/utils.c
14
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
|
* 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
|
* environment, otherwise the cursor would move from place to place without
|
||||||
* control.
|
* 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;
|
int ch, newpos, len = 0;
|
||||||
char *orig;
|
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. */
|
/* 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;
|
char *newstr;
|
||||||
int escape, len = strlen(*str) + 1;
|
int escape, len = strlen(*str) + 1;
|
||||||
|
|
||||||
newstr = (char *) malloc(MAX_LENGTH);
|
newstr = (char *) malloc(MAX_LENGTH);
|
||||||
(void)memcpy(newstr, *str, len);
|
(void)memcpy(newstr, *str, len);
|
||||||
escape = getstring(win, colr, newstr, MAX_LENGTH, x, y);
|
escape = getstring(win, newstr, MAX_LENGTH, x, y);
|
||||||
if (!escape) {
|
if (!escape) {
|
||||||
len = strlen(newstr) + 1;
|
len = strlen(newstr) + 1;
|
||||||
if ((*str = (char *) realloc(*str, len)) == NULL) {
|
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
|
* 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.
|
* 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;
|
int cmd_length, space_between_cmds, start, end, i, j = 0;
|
||||||
const int pos[NB_PANELS + 1] =
|
const int pos[NB_PANELS + 1] =
|
||||||
|
11
src/utils.h
11
src/utils.h
@ -1,4 +1,4 @@
|
|||||||
/* $calcurse: utils.h,v 1.14 2007/03/04 16:13:09 culot Exp $ */
|
/* $calcurse: utils.h,v 1.15 2007/03/10 16:45:56 culot Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calcurse - text-based organizer
|
* Calcurse - text-based organizer
|
||||||
@ -53,19 +53,18 @@ typedef struct { /* structure defining a keybinding */
|
|||||||
void status_mesg(char *mesg_line1, char *mesg_line2);
|
void status_mesg(char *mesg_line1, char *mesg_line2);
|
||||||
void erase_window_part(WINDOW *win, int first_col, int first_row,
|
void erase_window_part(WINDOW *win, int first_col, int first_row,
|
||||||
int last_col, int last_row);
|
int last_col, int last_row);
|
||||||
WINDOW *popup(int pop_row, int pop_col,
|
WINDOW *popup(int pop_row, int pop_col, int pop_y, int pop_x, char *pop_lab);
|
||||||
int pop_y, int pop_x, char *pop_lab);
|
|
||||||
void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string);
|
void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string);
|
||||||
void del_char(int pos, char *str);
|
void del_char(int pos, char *str);
|
||||||
char *add_char(int pos, int ch, char *str);
|
char *add_char(int pos, int ch, char *str);
|
||||||
void showcursor(WINDOW *win, int y, int pos, char *str, int l, int offset);
|
void showcursor(WINDOW *win, int y, int pos, char *str, int l, int offset);
|
||||||
void showstring(WINDOW *win, int y, int x, char *str, int len, int pos);
|
void showstring(WINDOW *win, int y, int x, char *str, int len, int pos);
|
||||||
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 updatestring(WINDOW *win, int colr, char **str, int x, int y);
|
int updatestring(WINDOW *win, char **str, int x, int y);
|
||||||
int is_all_digit(char *string);
|
int is_all_digit(char *string);
|
||||||
void border_color(WINDOW *window);
|
void border_color(WINDOW *window);
|
||||||
void border_nocolor(WINDOW *window);
|
void border_nocolor(WINDOW *window);
|
||||||
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);
|
||||||
long date2sec(unsigned year, unsigned month, unsigned day, unsigned hour,
|
long date2sec(unsigned year, unsigned month, unsigned day, unsigned hour,
|
||||||
unsigned min);
|
unsigned min);
|
||||||
char *date_sec2hour_str(long sec);
|
char *date_sec2hour_str(long sec);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user