diff options
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r-- | apps/tagtree.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index d53b8cf3a6..69a462fd06 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c | |||
@@ -145,7 +145,7 @@ struct menu_entry { | |||
145 | int link; | 145 | int link; |
146 | }; | 146 | }; |
147 | 147 | ||
148 | struct root_menu { | 148 | struct menu_root { |
149 | char title[64]; | 149 | char title[64]; |
150 | char id[MAX_MENU_ID_SIZE]; | 150 | char id[MAX_MENU_ID_SIZE]; |
151 | int itemcount; | 151 | int itemcount; |
@@ -155,12 +155,12 @@ struct root_menu { | |||
155 | /* Statusbar text of the current view. */ | 155 | /* Statusbar text of the current view. */ |
156 | static char current_title[MAX_TAGS][128]; | 156 | static char current_title[MAX_TAGS][128]; |
157 | 157 | ||
158 | static struct root_menu *menus[TAGMENU_MAX_MENUS]; | 158 | static struct menu_root *menus[TAGMENU_MAX_MENUS]; |
159 | static struct root_menu *menu; | 159 | static struct menu_root *menu; |
160 | static struct search_instruction *csi; | 160 | static struct search_instruction *csi; |
161 | static const char *strp; | 161 | static const char *strp; |
162 | static int menu_count; | 162 | static int menu_count; |
163 | static int root_menu; | 163 | static int rootmenu; |
164 | 164 | ||
165 | static int current_offset; | 165 | static int current_offset; |
166 | static int current_entry_count; | 166 | static int current_entry_count; |
@@ -551,7 +551,7 @@ static bool parse_search(struct menu_entry *entry, const char *str) | |||
551 | struct search_instruction *inst = entry->si; | 551 | struct search_instruction *inst = entry->si; |
552 | char buf[MAX_PATH]; | 552 | char buf[MAX_PATH]; |
553 | int i; | 553 | int i; |
554 | struct root_menu *new_menu; | 554 | struct menu_root *new_menu; |
555 | 555 | ||
556 | strp = str; | 556 | strp = str; |
557 | 557 | ||
@@ -588,9 +588,9 @@ static bool parse_search(struct menu_entry *entry, const char *str) | |||
588 | } | 588 | } |
589 | 589 | ||
590 | /* Allocate a new menu unless link is found. */ | 590 | /* Allocate a new menu unless link is found. */ |
591 | menus[menu_count] = buffer_alloc(sizeof(struct root_menu)); | 591 | menus[menu_count] = buffer_alloc(sizeof(struct menu_root)); |
592 | new_menu = menus[menu_count]; | 592 | new_menu = menus[menu_count]; |
593 | memset(new_menu, 0, sizeof(struct root_menu)); | 593 | memset(new_menu, 0, sizeof(struct menu_root)); |
594 | strncpy(new_menu->id, buf, MAX_MENU_ID_SIZE-1); | 594 | strncpy(new_menu->id, buf, MAX_MENU_ID_SIZE-1); |
595 | entry->link = menu_count; | 595 | entry->link = menu_count; |
596 | ++menu_count; | 596 | ++menu_count; |
@@ -829,10 +829,10 @@ static int parse_line(int n, const char *buf, void *parameters) | |||
829 | 829 | ||
830 | if (menu == NULL) | 830 | if (menu == NULL) |
831 | { | 831 | { |
832 | menus[menu_count] = buffer_alloc(sizeof(struct root_menu)); | 832 | menus[menu_count] = buffer_alloc(sizeof(struct menu_root)); |
833 | menu = menus[menu_count]; | 833 | menu = menus[menu_count]; |
834 | ++menu_count; | 834 | ++menu_count; |
835 | memset(menu, 0, sizeof(struct root_menu)); | 835 | memset(menu, 0, sizeof(struct menu_root)); |
836 | strncpy(menu->id, data, MAX_MENU_ID_SIZE-1); | 836 | strncpy(menu->id, data, MAX_MENU_ID_SIZE-1); |
837 | } | 837 | } |
838 | 838 | ||
@@ -847,12 +847,12 @@ static int parse_line(int n, const char *buf, void *parameters) | |||
847 | 847 | ||
848 | case var_rootmenu: | 848 | case var_rootmenu: |
849 | /* Only set root menu once. */ | 849 | /* Only set root menu once. */ |
850 | if (root_menu >= 0) | 850 | if (rootmenu >= 0) |
851 | break; | 851 | break; |
852 | 852 | ||
853 | if (get_token_str(data, sizeof(data)) < 0) | 853 | if (get_token_str(data, sizeof(data)) < 0) |
854 | { | 854 | { |
855 | logf("%%root_menu empty"); | 855 | logf("%%rootmenu empty"); |
856 | return 0; | 856 | return 0; |
857 | } | 857 | } |
858 | 858 | ||
@@ -860,7 +860,7 @@ static int parse_line(int n, const char *buf, void *parameters) | |||
860 | { | 860 | { |
861 | if (!strcasecmp(menus[i]->id, data)) | 861 | if (!strcasecmp(menus[i]->id, data)) |
862 | { | 862 | { |
863 | root_menu = i; | 863 | rootmenu = i; |
864 | } | 864 | } |
865 | } | 865 | } |
866 | break; | 866 | break; |
@@ -922,13 +922,13 @@ void tagtree_init(void) | |||
922 | format_count = 0; | 922 | format_count = 0; |
923 | menu_count = 0; | 923 | menu_count = 0; |
924 | menu = NULL; | 924 | menu = NULL; |
925 | root_menu = -1; | 925 | rootmenu = -1; |
926 | parse_menu(FILE_SEARCH_INSTRUCTIONS); | 926 | parse_menu(FILE_SEARCH_INSTRUCTIONS); |
927 | 927 | ||
928 | /* If no root menu is set, assume it's the first single menu | 928 | /* If no root menu is set, assume it's the first single menu |
929 | * we have. That shouldn't normally happen. */ | 929 | * we have. That shouldn't normally happen. */ |
930 | if (root_menu < 0) | 930 | if (rootmenu < 0) |
931 | root_menu = 0; | 931 | rootmenu = 0; |
932 | 932 | ||
933 | uniqbuf = buffer_alloc(UNIQBUF_SIZE); | 933 | uniqbuf = buffer_alloc(UNIQBUF_SIZE); |
934 | 934 | ||
@@ -1306,7 +1306,7 @@ static int load_root(struct tree_context *c) | |||
1306 | tc = c; | 1306 | tc = c; |
1307 | c->currtable = ROOT; | 1307 | c->currtable = ROOT; |
1308 | if (c->dirlevel == 0) | 1308 | if (c->dirlevel == 0) |
1309 | c->currextra = root_menu; | 1309 | c->currextra = rootmenu; |
1310 | 1310 | ||
1311 | menu = menus[c->currextra]; | 1311 | menu = menus[c->currextra]; |
1312 | if (menu == NULL) | 1312 | if (menu == NULL) |
@@ -1350,7 +1350,7 @@ int tagtree_load(struct tree_context* c) | |||
1350 | c->dirfull = false; | 1350 | c->dirfull = false; |
1351 | table = ROOT; | 1351 | table = ROOT; |
1352 | c->currtable = table; | 1352 | c->currtable = table; |
1353 | c->currextra = root_menu; | 1353 | c->currextra = rootmenu; |
1354 | } | 1354 | } |
1355 | 1355 | ||
1356 | switch (table) | 1356 | switch (table) |