cregit-Linux how code gets into the kernel

Release 4.14 tools/perf/ui/gtk/helpline.c

// SPDX-License-Identifier: GPL-2.0
#include <stdio.h>
#include <string.h>

#include "gtk.h"
#include "../ui.h"
#include "../helpline.h"
#include "../../util/debug.h"


static void gtk_helpline_pop(void) { if (!perf_gtk__is_active_context(pgctx)) return; gtk_statusbar_pop(GTK_STATUSBAR(pgctx->statbar), pgctx->statbar_ctx_id); }

Contributors

PersonTokensPropCommitsCommitProp
Namhyung Kim31100.00%1100.00%
Total31100.00%1100.00%


static void gtk_helpline_push(const char *msg) { if (!perf_gtk__is_active_context(pgctx)) return; gtk_statusbar_push(GTK_STATUSBAR(pgctx->statbar), pgctx->statbar_ctx_id, msg); }

Contributors

PersonTokensPropCommitsCommitProp
Namhyung Kim36100.00%1100.00%
Total36100.00%1100.00%


static int gtk_helpline_show(const char *fmt, va_list ap) { int ret; char *ptr; static int backlog; ret = vscnprintf(ui_helpline__current + backlog, sizeof(ui_helpline__current) - backlog, fmt, ap); backlog += ret; /* only first line can be displayed */ ptr = strchr(ui_helpline__current, '\n'); if (ptr && (ptr - ui_helpline__current) <= backlog) { *ptr = '\0'; ui_helpline__puts(ui_helpline__current); backlog = 0; } return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Namhyung Kim90100.00%2100.00%
Total90100.00%2100.00%

static struct ui_helpline gtk_helpline_fns = { .pop = gtk_helpline_pop, .push = gtk_helpline_push, .show = gtk_helpline_show, };
void perf_gtk__init_helpline(void) { helpline_fns = &gtk_helpline_fns; }

Contributors

PersonTokensPropCommitsCommitProp
Namhyung Kim12100.00%1100.00%
Total12100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Namhyung Kim20999.52%375.00%
Greg Kroah-Hartman10.48%125.00%
Total210100.00%4100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.