]> Git Repo - linux.git/blob - tools/perf/util/print_binary.h
Merge tag 'perf-core-for-mingo-4.15-20171103' of git://git.kernel.org/pub/scm/linux...
[linux.git] / tools / perf / util / print_binary.h
1 #ifndef PERF_PRINT_BINARY_H
2 #define PERF_PRINT_BINARY_H
3
4 #include <stddef.h>
5 #include <stdio.h>
6
7 enum binary_printer_ops {
8         BINARY_PRINT_DATA_BEGIN,
9         BINARY_PRINT_LINE_BEGIN,
10         BINARY_PRINT_ADDR,
11         BINARY_PRINT_NUM_DATA,
12         BINARY_PRINT_NUM_PAD,
13         BINARY_PRINT_SEP,
14         BINARY_PRINT_CHAR_DATA,
15         BINARY_PRINT_CHAR_PAD,
16         BINARY_PRINT_LINE_END,
17         BINARY_PRINT_DATA_END,
18 };
19
20 typedef int (*binary__fprintf_t)(enum binary_printer_ops op,
21                                  unsigned int val, void *extra, FILE *fp);
22
23 int binary__fprintf(unsigned char *data, size_t len,
24                     size_t bytes_per_line, binary__fprintf_t printer,
25                     void *extra, FILE *fp);
26
27 static inline void print_binary(unsigned char *data, size_t len,
28                                 size_t bytes_per_line, binary__fprintf_t printer,
29                                 void *extra)
30 {
31         binary__fprintf(data, len, bytes_per_line, printer, extra, stdout);
32 }
33
34 int is_printable_array(char *p, unsigned int len);
35
36 #endif /* PERF_PRINT_BINARY_H */
This page took 0.034417 seconds and 4 git commands to generate.