[iwyu] more include cleanup

pull/1161/merge
Tim Stack 10 months ago
parent 78c643fea7
commit 6e1a664286

@ -31,6 +31,7 @@
#include "base/attr_line.hh"
#include "config.h"
#include "data_parser.hh"
static auto intern_lifetime = intern_string::get_table_lifetime();

@ -32,7 +32,6 @@
#include <array>
#include "data_parser.hh"
#include "log_vtab_impl.hh"
/**

@ -29,7 +29,6 @@
#include "field_overlay_source.hh"
#include "base/ansi_scrubber.hh"
#include "base/humanize.time.hh"
#include "base/snippet_highlighters.hh"
#include "config.h"
@ -38,7 +37,6 @@
#include "log_vtab_impl.hh"
#include "md2attr_line.hh"
#include "readline_highlighters.hh"
#include "relative_time.hh"
#include "vtab_module.hh"
#include "vtab_module_json.hh"

@ -30,6 +30,8 @@
#include "highlighter.hh"
#include "config.h"
#include "pcrepp/pcre2pp.hh"
#include "view_curses.hh"
highlighter&
highlighter::operator=(const highlighter& other)

@ -35,10 +35,10 @@
#include <set>
#include <utility>
#include "optional.hpp"
#include "pcrepp/pcre2pp.hh"
#include "base/attr_line.hh"
#include "pcrepp/pcre2pp_fwd.hh"
#include "styling.hh"
#include "text_format.hh"
#include "view_curses.hh"
struct highlighter {
highlighter() = default;

@ -38,18 +38,11 @@
#include "bound_tags.hh"
#include "command_executor.hh"
#include "config.h"
#include "environ_vtab.hh"
#include "field_overlay_source.hh"
#include "lnav.hh"
#include "lnav_config.hh"
#include "lnav_util.hh"
#include "log_data_helper.hh"
#include "plain_text_source.hh"
#include "readline_highlighters.hh"
#include "shlex.hh"
#include "sql_util.hh"
#include "sysclip.hh"
#include "termios_guard.hh"
#include "xterm_mouse.hh"
using namespace lnav::roles::literals;

@ -29,6 +29,7 @@
#include "log_data_table.hh"
#include "column_namer.hh"
#include "config.h"
#include "scn/scn.h"

@ -35,7 +35,6 @@
#include <string>
#include <vector>
#include "column_namer.hh"
#include "data_parser.hh"
#include "log_vtab_impl.hh"
#include "logfile.hh"

@ -34,8 +34,6 @@
#include "log_format_loader.hh"
#include <errno.h>
#include <fcntl.h>
#include <glob.h>
#include <libgen.h>
#include <sys/stat.h>

@ -1,6 +1,7 @@
add_library(pcrepp STATIC
../config.h.in
pcre2pp.hh
pcre2pp_fwd.hh
pcre2pp.cc)
target_include_directories(pcrepp PUBLIC . .. ../third-party/scnlib/include

@ -16,7 +16,8 @@ AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS)
noinst_LIBRARIES = libpcrepp.a
noinst_HEADERS = \
pcre2pp.hh
pcre2pp.hh \
pcre2pp_fwd.hh
libpcrepp_a_SOURCES = \
pcre2pp.cc

@ -0,0 +1,41 @@
/**
* Copyright (c) 2023, Timothy Stack
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of Timothy Stack nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef lnav_pcre2pp_fwd_hh
#define lnav_pcre2pp_fwd_hh
namespace lnav {
namespace pcre2pp {
class code;
}
} // namespace lnav
#endif

@ -28,7 +28,6 @@
*/
#include <chrono>
#include <thread>
#include "piper.looper.hh"
@ -37,7 +36,6 @@
#include "base/fs_util.hh"
#include "base/injector.hh"
#include "base/paths.hh"
#include "base/time_util.hh"
#include "config.h"
#include "hasher.hh"

@ -44,7 +44,6 @@
#include "readline_highlighters.hh"
#include "service_tags.hh"
#include "sql_help.hh"
#include "sqlite-extension-func.hh"
#include "tailer/tailer.looper.hh"
#include "view_helpers.examples.hh"
#include "vtab_module.hh"

@ -61,7 +61,6 @@
#include "base/string_util.hh"
#include "fmt/format.h"
#include "fts_fuzzy_match.hh"
#include "lnav_util.hh"
#include "readline_curses.hh"
#include "shlex.hh"
#include "spookyhash/SpookyV2.h"

@ -33,7 +33,6 @@
#include "base/ansi_scrubber.hh"
#include "base/math_util.hh"
#include "command_executor.hh"
#include "config.h"
nonstd::optional<size_t>

@ -31,13 +31,11 @@
#include "static_file_vtab.hh"
#include <stdlib.h>
#include <string.h>
#include "base/auto_mem.hh"
#include "base/fs_util.hh"
#include "base/lnav_log.hh"
#include "base/paths.hh"
#include "config.h"
#include "ghc/filesystem.hpp"
#include "lnav.hh"

@ -37,7 +37,6 @@
#include "base/injector.hh"
#include "base/time_util.hh"
#include "config.h"
#include "data_parser.hh"
#include "fmt/format.h"
#include "lnav_config.hh"
#include "log_format.hh"
@ -546,57 +545,6 @@ textview_curses::textview_value_for_row(vis_line_t row, attr_line_t& value_out)
value_out.apply_hide();
}
#if 0
typedef std::map<std::string, role_t> key_map_t;
static key_map_t key_roles;
data_scanner ds(str);
data_parser dp(&ds);
dp.parse();
for (list<data_parser::element>::iterator iter = dp.dp_stack.begin();
iter != dp.dp_stack.end();
++iter) {
view_colors &vc = view_colors::singleton();
if (iter->e_token == DNT_PAIR) {
list<data_parser::element>::iterator pair_iter;
key_map_t::iterator km_iter;
data_token_t value_token;
struct line_range lr;
string key;
value_token =
iter->e_sub_elements->back().e_sub_elements->front().e_token;
if (value_token == DT_STRING) {
continue;
}
lr.lr_start = iter->e_capture.c_begin;
lr.lr_end = iter->e_capture.c_end;
key = ds.get_input().get_substr(
&iter->e_sub_elements->front().e_capture);
if ((km_iter = key_roles.find(key)) == key_roles.end()) {
key_roles[key] = vc.next_highlight();
}
/* fprintf(stderr, "key = %s\n", key.c_str()); */
sa[lr].insert(make_string_attr("style",
vc.attrs_for_role(key_roles[key])));
pair_iter = iter->e_sub_elements->begin();
++pair_iter;
lr.lr_start = pair_iter->e_capture.c_begin;
lr.lr_end = pair_iter->e_capture.c_end;
sa[lr].insert(make_string_attr("style",
COLOR_PAIR(view_colors::VC_WHITE) |
A_BOLD));
}
}
#endif
const auto& user_marks = this->tc_bookmarks[&BM_USER];
const auto& user_expr_marks = this->tc_bookmarks[&BM_USER_EXPR];
if (binary_search(user_marks.begin(), user_marks.end(), row)

@ -36,7 +36,6 @@
#include "base/date_time_scanner.hh"
#include "base/humanize.time.hh"
#include "base/lrucache.hpp"
#include "config.h"
#include "relative_time.hh"
#include "sql_util.hh"

@ -29,7 +29,6 @@
#include "view_helpers.hh"
#include "base/humanize.hh"
#include "base/itertools.hh"
#include "config.h"
#include "document.sections.hh"

@ -34,14 +34,11 @@
#include <unistd.h>
#include "base/injector.bind.hh"
#include "base/itertools.hh"
#include "base/lnav_log.hh"
#include "base/opt_util.hh"
#include "config.h"
#include "lnav.hh"
#include "lnav_util.hh"
#include "sql_util.hh"
#include "view_curses.hh"
#include "vtab_module_json.hh"
#include "yajlpp/yajlpp_def.hh"

@ -34,8 +34,6 @@
#include "yajlpp.hh"
#include "base/fs_util.hh"
#include "base/snippet_highlighters.hh"
#include "config.h"
#include "fmt/format.h"
#include "ghc/filesystem.hpp"

@ -36,7 +36,6 @@
#include "ryml_all.hpp"
#include "sqlite-extension-func.hh"
#include "vtab_module.hh"
#include "yajlpp/yajlpp.hh"
using namespace lnav::roles::literals;

Loading…
Cancel
Save