Skip to content

Commit 447de04

Browse files
committed
[build] rename SA_UNSUPPORTED, which is a symbol on some platforms
1 parent 577b946 commit 447de04

8 files changed

Lines changed: 11 additions & 11 deletions

src/base/ansi_scrubber.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
329329
lr.lr_end = cp_dst;
330330
tmp_sa.emplace_back(
331331
lr,
332-
SA_UNSUPPORTED.value(fmt::format(
332+
SAT_UNSUPPORTED.value(fmt::format(
333333
FMT_STRING("ANSI sequence: OSC {} {}"),
334334
md[3],
335335
md[4])));
@@ -497,7 +497,7 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
497497
lr.lr_end = cp_dst;
498498
tmp_sa.emplace_back(
499499
lr,
500-
SA_UNSUPPORTED.value(fmt::format(
500+
SAT_UNSUPPORTED.value(fmt::format(
501501
FMT_STRING("ANSI sequence: ESC [ {} {}"),
502502
seq,
503503
terminator)));

src/base/lnav.console.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ println(FILE* file, const attr_line_t& al)
633633
if (color_opt) {
634634
fg_style = fmt::fg(color_opt.value());
635635
}
636-
} else if (attr.sa_type == &SA_UNSUPPORTED) {
636+
} else if (attr.sa_type == &SAT_UNSUPPORTED) {
637637
line_style |= fmt::fg(fmt::terminal_color::yellow);
638638
} else if (attr.sa_type == &VC_STYLE) {
639639
auto saw = string_attr_wrapper<text_attrs>(&attr);

src/base/string_attr_type.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ constexpr string_attr_type<void> SA_REMOVED("removed");
4646
constexpr string_attr_type<void> SA_PREFORMATTED("preformatted");
4747
constexpr string_attr_type<std::string> SA_INVALID("invalid");
4848
constexpr string_attr_type<std::string> SA_ERROR("error");
49-
constexpr string_attr_type<std::string> SA_UNSUPPORTED("unsupported");
49+
constexpr string_attr_type<std::string> SAT_UNSUPPORTED("unsupported");
5050
constexpr string_attr_type<int64_t> SA_LEVEL("level");
5151
constexpr string_attr_type<int64_t> SA_ORIGIN_OFFSET("origin-offset");
5252
constexpr string_attr_type<text_format_t> SA_QUOTED_TEXT("quoted-text");

src/base/string_attr_type.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ extern const string_attr_type<void> SA_REMOVED;
438438
extern const string_attr_type<void> SA_PREFORMATTED;
439439
extern const string_attr_type<std::string> SA_INVALID;
440440
extern const string_attr_type<std::string> SA_ERROR;
441-
extern const string_attr_type<std::string> SA_UNSUPPORTED;
441+
extern const string_attr_type<std::string> SAT_UNSUPPORTED;
442442
extern const string_attr_type<int64_t> SA_LEVEL;
443443
extern const string_attr_type<int64_t> SA_ORIGIN_OFFSET;
444444
extern const string_attr_type<text_format_t> SA_QUOTED_TEXT;

src/field_overlay_source.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ field_overlay_source::build_field_lines(const listview_curses& lv,
167167

168168
auto first_nl = this->fos_log_helper.ldh_attr_line.al_string.find('\n');
169169
for (const auto& attr : this->fos_log_helper.ldh_attr_line.al_attrs) {
170-
if (attr.sa_type != &SA_UNSUPPORTED) {
170+
if (attr.sa_type != &SAT_UNSUPPORTED) {
171171
continue;
172172
}
173173
if (first_nl != std::string::npos && attr.sa_range.lr_start >= first_nl)
@@ -176,7 +176,7 @@ field_overlay_source::build_field_lines(const listview_curses& lv,
176176
}
177177

178178
const auto& msg
179-
= attr.sa_value.get<decltype(SA_UNSUPPORTED)::value_type>();
179+
= attr.sa_value.get<decltype(SAT_UNSUPPORTED)::value_type>();
180180
auto msg_al
181181
= attr_line_t()
182182
.pad_to(this->fos_lss.get_filename_offset()

src/log_data_helper.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ log_data_helper::load_line(content_line_t line, bool allow_middle)
218218
if (sa.sa_type != &VC_HYPERLINK) {
219219
continue;
220220
}
221-
sa.sa_type = &SA_UNSUPPORTED;
221+
sa.sa_type = &SAT_UNSUPPORTED;
222222
sa.sa_value = fmt::format(FMT_STRING("hyperlink <{}>"),
223223
sa.sa_value.get<std::string>());
224224
}

src/logfile_sub_source.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ logfile_sub_source::text_value_for_line(textview_curses& tc,
323323
}
324324
for (auto& sa : this->lss_token_al.al_attrs) {
325325
if (sa.sa_type == &VC_HYPERLINK) {
326-
sa.sa_type = &SA_UNSUPPORTED;
326+
sa.sa_type = &SAT_UNSUPPORTED;
327327
}
328328
}
329329
this->lss_token_shifts.clear();

src/view_curses.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ view_curses::mvwattrline(ncplane* window,
489489
|| iter->sa_type == &SA_LEVEL || iter->sa_type == &VC_FOREGROUND
490490
|| iter->sa_type == &VC_BACKGROUND
491491
|| iter->sa_type == &VC_BLOCK_ELEM || iter->sa_type == &VC_ICON
492-
|| iter->sa_type == &SA_UNSUPPORTED))
492+
|| iter->sa_type == &SAT_UNSUPPORTED))
493493
{
494494
continue;
495495
}
@@ -579,7 +579,7 @@ view_curses::mvwattrline(ncplane* window,
579579
attrs.ta_bg_color = styling::color_unit::EMPTY;
580580
} else if (iter->sa_type == &VC_STYLE) {
581581
attrs = iter->sa_value.get<text_attrs>();
582-
} else if (iter->sa_type == &SA_UNSUPPORTED) {
582+
} else if (iter->sa_type == &SAT_UNSUPPORTED) {
583583
attrs = vc.attrs_for_role(role_t::VCR_WARNING);
584584
attrs |= text_attrs::style::reverse;
585585
} else if (iter->sa_type == &SA_LEVEL) {

0 commit comments

Comments
 (0)