mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
etags: make new type 'etags_hash_t'
This commit is contained in:
parent
474d22d6c9
commit
00567b61b2
@ -3033,12 +3033,12 @@ edit_load_back_cmd (WEdit *edit)
|
||||
/* let the user select where function definition */
|
||||
static void
|
||||
edit_select_definition_dialog (WEdit * edit, char *match_expr, int max_len, int word_len,
|
||||
struct etags_hash_type *def_hash, int num_lines)
|
||||
etags_hash_t *def_hash, int num_lines)
|
||||
{
|
||||
|
||||
int start_x, start_y, offset, i;
|
||||
char *curr = NULL;
|
||||
struct etags_hash_type *curr_def;
|
||||
etags_hash_t *curr_def;
|
||||
Dlg_head *def_dlg;
|
||||
WListbox *def_list;
|
||||
int def_dlg_h; /* dialog height */
|
||||
@ -3145,7 +3145,7 @@ edit_get_match_keyword_cmd (WEdit *edit)
|
||||
char *ptr = NULL;
|
||||
char *tagfile = NULL;
|
||||
|
||||
struct etags_hash_type def_hash[MAX_DEFINITIONS];
|
||||
etags_hash_t def_hash[MAX_DEFINITIONS];
|
||||
|
||||
for ( int i = 0; i < MAX_DEFINITIONS; i++) {
|
||||
def_hash[i].filename = NULL;
|
||||
@ -3175,7 +3175,7 @@ edit_get_match_keyword_cmd (WEdit *edit)
|
||||
} while (strcmp( path, G_DIR_SEPARATOR_S) != 0);
|
||||
|
||||
if (tagfile){
|
||||
etags_set_definition_hash(tagfile, path, match_expr, (struct etags_hash_type *) &def_hash, &num_def);
|
||||
etags_set_definition_hash(tagfile, path, match_expr, (etags_hash_t *) &def_hash, &num_def);
|
||||
g_free (tagfile);
|
||||
}
|
||||
g_free (path);
|
||||
@ -3184,7 +3184,7 @@ edit_get_match_keyword_cmd (WEdit *edit)
|
||||
word_len = 0;
|
||||
if ( num_def > 0 ) {
|
||||
edit_select_definition_dialog (edit, match_expr, max_len, word_len,
|
||||
(struct etags_hash_type *) &def_hash,
|
||||
(etags_hash_t *) &def_hash,
|
||||
num_def);
|
||||
}
|
||||
g_free (match_expr);
|
||||
|
@ -114,7 +114,7 @@ int parse_define(char *buf, char **long_name, char **short_name, long *line)
|
||||
|
||||
int etags_set_definition_hash(const char *tagfile, const char *start_path,
|
||||
const char *match_func,
|
||||
struct etags_hash_type *def_hash,
|
||||
etags_hash_t *def_hash,
|
||||
int *num)
|
||||
{
|
||||
FILE *f;
|
||||
|
@ -6,14 +6,14 @@
|
||||
#define LONG_DEF_LEN 40
|
||||
#define LINE_DEF_LEN 16
|
||||
|
||||
struct etags_hash_type {
|
||||
typedef struct etags_hash_struct {
|
||||
int filename_len;
|
||||
unsigned char *fullpath;
|
||||
unsigned char *filename;
|
||||
unsigned char *short_define;
|
||||
long line;
|
||||
};
|
||||
} etags_hash_t;
|
||||
|
||||
int etags_set_def_hash(char *tagfile, char *start_path, char *match_func, struct etags_hash_type *def_hash, int *num);
|
||||
int etags_set_def_hash(char *tagfile, char *start_path, char *match_func, etags_hash_t *def_hash, int *num);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user