mirror of
https://github.com/javalsai/lidm.git
synced 2026-02-27 03:50:44 +01:00
bodge: shut linter
This commit is contained in:
@@ -1,10 +1,14 @@
|
|||||||
#ifndef DESKTOP_EXEC_H_
|
// TODO: rewrite properly
|
||||||
#define DESKTOP_EXEC_H_
|
// NOLINTBEGIN(clang-diagnostic-nullability-completeness)
|
||||||
|
|
||||||
#include "macros.h"
|
#ifndef DESKTOP_EXEC_H_
|
||||||
|
#define DESKTOP_EXEC_H_
|
||||||
|
|
||||||
|
#include "macros.h"
|
||||||
|
|
||||||
int execvpe_desktop(char** args, char* NNULLABLE* NNULLABLE envlist);
|
int execvpe_desktop(char** args, char* NNULLABLE* NNULLABLE envlist);
|
||||||
int parse_exec_string(const char* exec_s, int* arg_count, char*** args);
|
int parse_exec_string(const char* exec_s, int* arg_count, char*** args);
|
||||||
void free_parsed_args(int arg_count, char** args);
|
void free_parsed_args(int arg_count, char** args);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
// NOLINTEND(clang-diagnostic-nullability-completeness)
|
||||||
|
|||||||
@@ -7,25 +7,25 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Do we just replace the compiler with clang??
|
// Do we just replace the compiler with clang??
|
||||||
#if defined(__clang__)
|
#ifdef __clang__
|
||||||
#define NULLABLE _Nullable
|
#define NULLABLE _Nullable
|
||||||
#else
|
#else
|
||||||
#define NULLABLE
|
#define NULLABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__clang__)
|
#ifdef __clang__
|
||||||
#define NNULLABLE _Nonnull
|
#define NNULLABLE _Nonnull
|
||||||
#else
|
#else
|
||||||
#define NNULLABLE
|
#define NNULLABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__clang__)
|
#ifdef __clang__
|
||||||
#define UNULLABLE _Null_unspecified
|
#define UNULLABLE _Null_unspecified
|
||||||
#else
|
#else
|
||||||
#define UNULLABLE
|
#define UNULLABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__clang__)
|
#ifdef __clang__
|
||||||
#define COMPILER_VERSION __VERSION__
|
#define COMPILER_VERSION __VERSION__
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#define xstr(s) str(s)
|
#define xstr(s) str(s)
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// TODO: rewrite properly
|
||||||
|
// NOLINTBEGIN(clang-diagnostic-nullability-completeness)
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -133,6 +135,7 @@ int push_arg(struct ctx* st) {
|
|||||||
3 = syntax
|
3 = syntax
|
||||||
Important: call free_parsed_args afterwards to free the passed ***args
|
Important: call free_parsed_args afterwards to free the passed ***args
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// NOLINTBEGIN(readability-function-cognitive-complexity)
|
// NOLINTBEGIN(readability-function-cognitive-complexity)
|
||||||
int parse_exec_string(const char* exec_s, int* arg_count, char*** args) {
|
int parse_exec_string(const char* exec_s, int* arg_count, char*** args) {
|
||||||
if (!exec_s || !args || !arg_count) return 1;
|
if (!exec_s || !args || !arg_count) return 1;
|
||||||
@@ -226,3 +229,4 @@ syntax_err:
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
// NOLINTEND(readability-function-cognitive-complexity)
|
// NOLINTEND(readability-function-cognitive-complexity)
|
||||||
|
// NOLINTEND(clang-diagnostic-nullability-completeness)
|
||||||
|
|||||||
6
src/ui.c
6
src/ui.c
@@ -193,8 +193,8 @@ void scratch_print_ui() {
|
|||||||
.y = ((window.ws_row - BOX_HEIGHT) / 2), // leave more space under
|
.y = ((window.ws_row - BOX_HEIGHT) / 2), // leave more space under
|
||||||
};
|
};
|
||||||
|
|
||||||
if (window.ws_row < BOX_HEIGHT + INNER_BOX_OUT_MARGIN * 2 ||
|
if (window.ws_row < BOX_HEIGHT + (INNER_BOX_OUT_MARGIN * 2) ||
|
||||||
window.ws_col < BOX_WIDTH + INNER_BOX_OUT_MARGIN * 2) {
|
window.ws_col < BOX_WIDTH + (INNER_BOX_OUT_MARGIN * 2)) {
|
||||||
printf("\033[2J\033[H"); // Clear screen
|
printf("\033[2J\033[H"); // Clear screen
|
||||||
printf("\x1b[1;31mScreen too small\x1b[0m\n");
|
printf("\x1b[1;31mScreen too small\x1b[0m\n");
|
||||||
printf("\x1b[%s;%sm\x1b[2J", g_config->colors.bg, g_config->colors.fg);
|
printf("\x1b[%s;%sm\x1b[2J", g_config->colors.bg, g_config->colors.fg);
|
||||||
@@ -537,7 +537,7 @@ static void print_footer() {
|
|||||||
utf8len(g_config->strings.f_refresh) +
|
utf8len(g_config->strings.f_refresh) +
|
||||||
utf8len(KEY_NAMES[g_config->functions.refresh]);
|
utf8len(KEY_NAMES[g_config->functions.refresh]);
|
||||||
|
|
||||||
bsize += 2 * 2 + 3 * 1;
|
bsize += (2 * 2) + (3 * 1);
|
||||||
|
|
||||||
if (fido_enabled) {
|
if (fido_enabled) {
|
||||||
bsize += utf8len(g_config->strings.f_fido) +
|
bsize += utf8len(g_config->strings.f_fido) +
|
||||||
|
|||||||
Reference in New Issue
Block a user