#wizcustom command to see glyphmap customizations */
| 1931 | |
| 1932 | /* #wizcustom command to see glyphmap customizations */ |
| 1933 | int |
| 1934 | wiz_custom(void) |
| 1935 | { |
| 1936 | extern const char *const known_handling[]; /* symbols.c */ |
| 1937 | |
| 1938 | if (wizard) { |
| 1939 | static const char wizcustom[] = "#wizcustom"; |
| 1940 | winid win; |
| 1941 | char buf[BUFSZ], bufa[BUFSZ]; |
| 1942 | int n; |
| 1943 | #if 0 |
| 1944 | int j, glyph; |
| 1945 | #endif |
| 1946 | menu_item *pick_list = (menu_item *) 0; |
| 1947 | |
| 1948 | if (!glyphid_cache_status()) |
| 1949 | fill_glyphid_cache(); |
| 1950 | |
| 1951 | win = create_nhwindow(NHW_MENU); |
| 1952 | start_menu(win, MENU_BEHAVE_STANDARD); |
| 1953 | add_menu_heading(win, |
| 1954 | " glyph glyph identifier " |
| 1955 | " sym clr customcolor unicode utf8"); |
| 1956 | Sprintf(bufa, "%s: colorcount=%ld %s", wizcustom, |
| 1957 | (long) iflags.colorcount, |
| 1958 | gs.symset[PRIMARYSET].name ? gs.symset[PRIMARYSET].name |
| 1959 | : "default"); |
| 1960 | if (gc.currentgraphics == PRIMARYSET && gs.symset[PRIMARYSET].name) |
| 1961 | Strcat(bufa, ", active"); |
| 1962 | if (gs.symset[PRIMARYSET].handling) { |
| 1963 | Sprintf(eos(bufa), ", handler=%s", |
| 1964 | known_handling[gs.symset[PRIMARYSET].handling]); |
| 1965 | } |
| 1966 | Sprintf(buf, "%s", bufa); |
| 1967 | wizcustom_glyphids(win); |
| 1968 | end_menu(win, bufa); |
| 1969 | n = select_menu(win, PICK_NONE, &pick_list); |
| 1970 | destroy_nhwindow(win); |
| 1971 | #if 0 |
| 1972 | for (j = 0; j < n; ++j) { |
| 1973 | glyph = pick_list[j].item.a_int - 1; /* -1: reverse +1 above */ |
| 1974 | } |
| 1975 | #endif |
| 1976 | if (n >= 1) |
| 1977 | free((genericptr_t) pick_list); |
| 1978 | if (glyphid_cache_status()) |
| 1979 | free_glyphid_cache(); |
| 1980 | docrt(); |
| 1981 | } else |
| 1982 | pline(unavailcmd, ecname_from_fn(wiz_custom)); |
| 1983 | return ECMD_OK; |
| 1984 | } |
| 1985 | |
| 1986 | void |
| 1987 | wizcustom_callback(winid win, int glyphnum, char *id) |
nothing calls this directly
no test coverage detected