From 481cb5524f8e165bbe3c17bb04bdc7330dd7a923 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 2 Mar 2012 09:28:13 +0100 Subject: Do not strncpy() strings returned by gettext() Translated strings returned by gettext() are statically allocated. There's no need to copy them to a buffer, we can use the pointers returned by gettext() instead. Signed-off-by: Lukas Fleischer --- src/calcurse.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/calcurse.h') diff --git a/src/calcurse.h b/src/calcurse.h index fa026f8..a0e53e0 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -463,7 +463,7 @@ struct scrollwin { struct window pad; unsigned first_visible_line; unsigned total_lines; - char label[BUFSIZ]; + const char *label; }; /* Pad structure to handle scrolling. */ @@ -634,7 +634,7 @@ void custom_layout_config (void); void custom_sidebar_config (void); void custom_color_config (void); void custom_color_theme_name (char *); -void custom_confwin_init (struct window *, char *); +void custom_confwin_init (struct window *, const char *); void custom_set_swsiz (struct scrollwin *); void custom_general_config (void); void custom_keys_config (void); @@ -897,7 +897,7 @@ void warnbox (const char *); void status_mesg (char *, char *); void erase_window_part (WINDOW *, int, int, int, int); WINDOW *popup (int, int, int, int, char *, char *, int); -void print_in_middle (WINDOW *, int, int, int, char *); +void print_in_middle (WINDOW *, int, int, int, const char *); int is_all_digit (const char *); long get_item_time (long); int get_item_hour (long); @@ -985,7 +985,7 @@ void wins_scrollwin_up (struct scrollwin *, int); void wins_scrollwin_down (struct scrollwin *, int); void wins_reinit (void); void wins_reinit_panels (void); -void wins_show (WINDOW *, char *); +void wins_show (WINDOW *, const char *); void wins_get_config (void); void wins_update_border (int); void wins_update_panels (int); -- cgit v1.2.3-54-g00ecf