mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-09 13:02:01 +03:00
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 NLENGTH(dirent) (strlen ((dirent)->d_name))
|
||||||
#define DIRENT_LENGTH_COMPUTED 1
|
#define DIRENT_LENGTH_COMPUTED 1
|
||||||
|
|
||||||
|
#ifndef MAXNAMLEN
|
||||||
|
# define MC_MAXFILENAMELEN 256
|
||||||
|
#else
|
||||||
|
# define MC_MAXFILENAMELEN MAXNAMLEN
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
compute_namelen (struct dirent *dent __attribute__ ((unused)))
|
compute_namelen (struct dirent *dent __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
|
@ -98,8 +98,8 @@ typedef struct WPanel {
|
|||||||
int codepage; /* panel codepage */
|
int codepage; /* panel codepage */
|
||||||
|
|
||||||
gboolean searching;
|
gboolean searching;
|
||||||
char search_buffer [256];
|
char search_buffer [MC_MAXFILENAMELEN];
|
||||||
char prev_search_buffer [256];
|
char prev_search_buffer [MC_MAXFILENAMELEN];
|
||||||
char search_char [MB_LEN_MAX]; /*buffer for multibytes characters*/
|
char search_char [MB_LEN_MAX]; /*buffer for multibytes characters*/
|
||||||
int search_chpoint; /*point after last characters in search_char*/
|
int search_chpoint; /*point after last characters in search_char*/
|
||||||
} WPanel;
|
} WPanel;
|
||||||
|
@ -82,7 +82,7 @@ struct WTree
|
|||||||
Widget widget;
|
Widget widget;
|
||||||
struct TreeStore *store;
|
struct TreeStore *store;
|
||||||
tree_entry *selected_ptr; /* The selected directory */
|
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 */
|
tree_entry **tree_shown; /* Entries currently on screen */
|
||||||
int is_panel; /* panel or plain widget flag */
|
int is_panel; /* panel or plain widget flag */
|
||||||
int active; /* if it's currently selected */
|
int active; /* if it's currently selected */
|
||||||
|
Loading…
Reference in New Issue
Block a user