perf string: Move 'dots' and 'graph_dotted_line' out of sane_ctype.h

Those are not in that file in the git repo, lets move it from there so
that we get that sane ctype code fully isolated to allow getting it in
sync either with the git sources or better with the kernel sources
(include/linux/ctype.h + lib/ctype.h), that way we can use
check_headers.h to get notified when changes are made in the original
code so that we can cherry-pick.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-ioh5sghn3943j0rxg6lb2dgs@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 93d50edc
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "util/cpumap.h" #include "util/cpumap.h"
#include "util/debug.h" #include "util/debug.h"
#include "util/string2.h"
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/rbtree.h> #include <linux/rbtree.h>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "util/thread_map.h" #include "util/thread_map.h"
#include "util/color.h" #include "util/color.h"
#include "util/stat.h" #include "util/stat.h"
#include "util/string2.h"
#include "util/callchain.h" #include "util/callchain.h"
#include "util/time-utils.h" #include "util/time-utils.h"
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "util/cpumap.h" #include "util/cpumap.h"
#include "util/xyarray.h" #include "util/xyarray.h"
#include "util/sort.h" #include "util/sort.h"
#include "util/string2.h"
#include "util/term.h" #include "util/term.h"
#include "util/intlist.h" #include "util/intlist.h"
#include "util/parse-branch-options.h" #include "util/parse-branch-options.h"
......
...@@ -30,12 +30,3 @@ unsigned char sane_ctype[256] = { ...@@ -30,12 +30,3 @@ unsigned char sane_ctype[256] = {
A, A, A, A, A, A, A, A, A, A, A, R, R, P, P, 0, /* 112..127 */ A, A, A, A, A, A, A, A, A, A, A, R, R, P, P, 0, /* 112..127 */
/* Nothing in the 128.. range */ /* Nothing in the 128.. range */
}; };
const char *graph_dotted_line =
"---------------------------------------------------------------------"
"---------------------------------------------------------------------"
"---------------------------------------------------------------------";
const char *dots =
"....................................................................."
"....................................................................."
".....................................................................";
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "debug.h" #include "debug.h"
#include "trace-event.h" #include "trace-event.h"
#include "stat.h" #include "stat.h"
#include "string2.h"
#include "memswap.h" #include "memswap.h"
#include "util/parse-branch-options.h" #include "util/parse-branch-options.h"
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
#ifndef _PERF_SANE_CTYPE_H #ifndef _PERF_SANE_CTYPE_H
#define _PERF_SANE_CTYPE_H #define _PERF_SANE_CTYPE_H
extern const char *graph_dotted_line;
extern const char *dots;
/* Sane ctype - no locale, and works with signed chars */ /* Sane ctype - no locale, and works with signed chars */
#undef isascii #undef isascii
#undef isspace #undef isspace
......
...@@ -6,6 +6,15 @@ ...@@ -6,6 +6,15 @@
#include "sane_ctype.h" #include "sane_ctype.h"
const char *graph_dotted_line =
"---------------------------------------------------------------------"
"---------------------------------------------------------------------"
"---------------------------------------------------------------------";
const char *dots =
"....................................................................."
"....................................................................."
".....................................................................";
#define K 1024LL #define K 1024LL
/* /*
* perf_atoll() * perf_atoll()
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
extern const char *graph_dotted_line;
extern const char *dots;
s64 perf_atoll(const char *str); s64 perf_atoll(const char *str);
char **argv_split(const char *str, int *argcp); char **argv_split(const char *str, int *argcp);
void argv_free(char **argv); void argv_free(char **argv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment