mirror of https://github.com/MidnightCommander/mc
Added definition MC_MAXFILENAMELEN for specify maximum file lenght.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
504bd05729
commit
a8aa5cf678
6
lib/fs.h
6
lib/fs.h
|
@ -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)))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue