mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -18,7 +18,7 @@ char PC;
|
|||
char* UP;
|
||||
char* BC;
|
||||
|
||||
int __attribute__((weak)) tgetent([[maybe_unused]] char* bp, [[maybe_unused]] const char* name)
|
||||
int __attribute__((weak)) tgetent([[maybe_unused]] char* bp, [[maybe_unused]] char const* name)
|
||||
{
|
||||
warnln_if(TERMCAP_DEBUG, "tgetent: bp={:p}, name='{}'", bp, name);
|
||||
PC = '\0';
|
||||
|
@ -27,13 +27,13 @@ int __attribute__((weak)) tgetent([[maybe_unused]] char* bp, [[maybe_unused]] co
|
|||
return 1;
|
||||
}
|
||||
|
||||
static HashMap<String, const char*>* caps = nullptr;
|
||||
static HashMap<String, char const*>* caps = nullptr;
|
||||
|
||||
static void ensure_caps()
|
||||
{
|
||||
if (caps)
|
||||
return;
|
||||
caps = new HashMap<String, const char*>;
|
||||
caps = new HashMap<String, char const*>;
|
||||
caps->set("DC", "\033[%p1%dP");
|
||||
caps->set("IC", "\033[%p1%d@");
|
||||
caps->set("ce", "\033[K");
|
||||
|
@ -75,14 +75,14 @@ static void ensure_caps()
|
|||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
char* __attribute__((weak)) tgetstr(const char* id, char** area)
|
||||
char* __attribute__((weak)) tgetstr(char const* id, char** area)
|
||||
{
|
||||
ensure_caps();
|
||||
warnln_if(TERMCAP_DEBUG, "tgetstr: id='{}'", id);
|
||||
auto it = caps->find(id);
|
||||
if (it != caps->end()) {
|
||||
char* ret = *area;
|
||||
const char* val = (*it).value;
|
||||
char const* val = (*it).value;
|
||||
strcpy(*area, val);
|
||||
*area += strlen(val) + 1;
|
||||
return ret;
|
||||
|
@ -93,7 +93,7 @@ char* __attribute__((weak)) tgetstr(const char* id, char** area)
|
|||
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
int __attribute__((weak)) tgetflag([[maybe_unused]] const char* id)
|
||||
int __attribute__((weak)) tgetflag([[maybe_unused]] char const* id)
|
||||
{
|
||||
warnln_if(TERMCAP_DEBUG, "tgetflag: '{}'", id);
|
||||
auto it = caps->find(id);
|
||||
|
@ -102,7 +102,7 @@ int __attribute__((weak)) tgetflag([[maybe_unused]] const char* id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __attribute__((weak)) tgetnum(const char* id)
|
||||
int __attribute__((weak)) tgetnum(char const* id)
|
||||
{
|
||||
warnln_if(TERMCAP_DEBUG, "tgetnum: '{}'", id);
|
||||
auto it = caps->find(id);
|
||||
|
@ -112,7 +112,7 @@ int __attribute__((weak)) tgetnum(const char* id)
|
|||
}
|
||||
|
||||
static Vector<char> s_tgoto_buffer;
|
||||
char* __attribute__((weak)) tgoto([[maybe_unused]] const char* cap, [[maybe_unused]] int col, [[maybe_unused]] int row)
|
||||
char* __attribute__((weak)) tgoto([[maybe_unused]] char const* cap, [[maybe_unused]] int col, [[maybe_unused]] int row)
|
||||
{
|
||||
auto cap_str = StringView(cap).replace("%p1%d", String::number(col)).replace("%p2%d", String::number(row));
|
||||
|
||||
|
@ -122,7 +122,7 @@ char* __attribute__((weak)) tgoto([[maybe_unused]] const char* cap, [[maybe_unus
|
|||
return s_tgoto_buffer.data();
|
||||
}
|
||||
|
||||
int __attribute__((weak)) tputs(const char* str, [[maybe_unused]] int affcnt, int (*putc)(int))
|
||||
int __attribute__((weak)) tputs(char const* str, [[maybe_unused]] int affcnt, int (*putc)(int))
|
||||
{
|
||||
size_t len = strlen(str);
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue