12 #include <sys/ttydefaults.h> 21 unsigned long offset = (
unsigned long)browser->
priv;
23 if (offset >= strlen(str))
39 "h/?/F1 Show this window\n" 42 "LEFT/RIGHT Navigate\n" 43 "q/ESC/CTRL+C Exit browser";
53 offset = (
unsigned long)menu->
priv;
55 menu->
priv = (
void *)offset;
58 offset = (
unsigned long)menu->
priv;
61 menu->
priv = (
void *)offset;
104 FILE *fp = open_memstream(&ptr, &size);
110 for (pos = ptr, argc = 0; (pos = strchr(pos,
'\n')) != NULL; pos++)
113 argv = calloc(argc + 1,
sizeof(*argv));
118 for (i = 1; (pos = strchr(pos,
'\n')) != NULL; i++) {
123 BUG_ON(i != argc + 1);
unsigned int ui_browser__argv_refresh(struct ui_browser *browser)
#define HE_COLORSET_NORMAL
int ui_browser__show(struct ui_browser *browser, const char *title, const char *helpline,...)
int ui_browser__help_window(struct ui_browser *browser, const char *text)
bool ui_browser__is_current_entry(struct ui_browser *browser, unsigned row)
static struct perf_session * session
static int entry(u64 ip, struct unwind_info *ui)
static int str(yyscan_t scanner, int token)
void(* write)(struct ui_browser *browser, void *entry, int row)
unsigned int(* refresh)(struct ui_browser *browser)
void ui_browser__write_nstring(struct ui_browser *browser __maybe_unused, const char *msg, unsigned int width)
struct perf_header header
#define HE_COLORSET_SELECTED
int ui_browser__run(struct ui_browser *browser, int delay_secs)
void(* seek)(struct ui_browser *browser, off_t offset, int whence)
void ui_browser__hide(struct ui_browser *browser)
int ui_browser__set_color(struct ui_browser *browser, int color)
void ui_browser__argv_seek(struct ui_browser *browser, off_t offset, int whence)