Added definition MC_MAXFILENAMELEN for specify maximum file lenght.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2010-10-07 11:29:36 +03:00
parent 504bd05729
commit a8aa5cf678
3 changed files with 9 additions and 3 deletions

View File

@ -56,6 +56,12 @@
#define NLENGTH(dirent) (strlen ((dirent)->d_name))
#define DIRENT_LENGTH_COMPUTED 1
#ifndef MAXNAMLEN
# define MC_MAXFILENAMELEN 256
#else
# define MC_MAXFILENAMELEN MAXNAMLEN
#endif
static inline void
compute_namelen (struct dirent *dent __attribute__ ((unused)))
{

View File

@ -98,8 +98,8 @@ typedef struct WPanel {
int codepage; /* panel codepage */
gboolean searching;
char search_buffer [256];
char prev_search_buffer [256];
char search_buffer [MC_MAXFILENAMELEN];
char prev_search_buffer [MC_MAXFILENAMELEN];
char search_char [MB_LEN_MAX]; /*buffer for multibytes characters*/
int search_chpoint; /*point after last characters in search_char*/
} WPanel;

View File

@ -82,7 +82,7 @@ struct WTree
Widget widget;
struct TreeStore *store;
tree_entry *selected_ptr; /* The selected directory */
char search_buffer[256]; /* Current search string */
char search_buffer[MC_MAXFILENAMELEN]; /* Current search string */
tree_entry **tree_shown; /* Entries currently on screen */
int is_panel; /* panel or plain widget flag */
int active; /* if it's currently selected */