builtin-help.c (c25141062a82ae8bddced1b3ce2b57a1c0efabe0) | builtin-help.c (2f0af8600e82e9f950fc32908386b9c639f88d48) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * builtin-help.c 4 * 5 * Builtin help command 6 */ 7#include "perf.h" 8#include "util/config.h" --- 270 unchanged lines hidden (view full) --- 279 return 0; 280 } 281 if (!strcmp(var, "man.viewer")) { 282 if (!value) 283 return config_error_nonbool(var); 284 add_man_viewer(value); 285 return 0; 286 } | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * builtin-help.c 4 * 5 * Builtin help command 6 */ 7#include "perf.h" 8#include "util/config.h" --- 270 unchanged lines hidden (view full) --- 279 return 0; 280 } 281 if (!strcmp(var, "man.viewer")) { 282 if (!value) 283 return config_error_nonbool(var); 284 add_man_viewer(value); 285 return 0; 286 } |
287 if (!strstarts(var, "man.")) | 287 if (strstarts(var, "man.")) |
288 return add_man_viewer_info(var, value); 289 290 return 0; 291} 292 293static struct cmdnames main_cmds, other_cmds; 294 295void list_common_cmds_help(void) --- 13 unchanged lines hidden (view full) --- 309} 310 311static const char *cmd_to_page(const char *perf_cmd) 312{ 313 char *s; 314 315 if (!perf_cmd) 316 return "perf"; | 288 return add_man_viewer_info(var, value); 289 290 return 0; 291} 292 293static struct cmdnames main_cmds, other_cmds; 294 295void list_common_cmds_help(void) --- 13 unchanged lines hidden (view full) --- 309} 310 311static const char *cmd_to_page(const char *perf_cmd) 312{ 313 char *s; 314 315 if (!perf_cmd) 316 return "perf"; |
317 else if (!strstarts(perf_cmd, "perf")) | 317 else if (strstarts(perf_cmd, "perf")) |
318 return perf_cmd; 319 320 return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s; 321} 322 323static void setup_man_path(void) 324{ 325 char *new_path; --- 168 unchanged lines hidden --- | 318 return perf_cmd; 319 320 return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s; 321} 322 323static void setup_man_path(void) 324{ 325 char *new_path; --- 168 unchanged lines hidden --- |