lint(tidy): some clang-tidy work

This commit is contained in:
2025-06-10 21:43:01 +02:00
parent 6975c265f0
commit a846c1b4c9
16 changed files with 265 additions and 205 deletions

View File

@@ -1,5 +1,5 @@
#ifndef _AUTHH_
#define _AUTHH_
#ifndef AUTHH_
#define AUTHH_
#include <stdbool.h>

View File

@@ -1,5 +1,5 @@
#ifndef _CHVTH_
#define _CHVTH_
#ifndef CHVTH_
#define CHVTH_
#include <fcntl.h>
#include <linux/kd.h>

View File

@@ -1,5 +1,5 @@
#ifndef _CONFIGH_
#define _CONFIGH_
#ifndef CONFIGH_
#define CONFIGH_
#include <stdbool.h>
#include <stdio.h>
@@ -73,11 +73,6 @@ struct config {
struct behavior behavior;
};
bool line_parser(
FILE* fd,
ssize_t* blksize,
u_char (*cb)(char* key,
char* value)); // might use this for parsing .desktop files too
struct config* parse_config(char* path);
#endif

View File

@@ -1,5 +1,5 @@
#ifndef _EFIELDH_
#define _EFIELDH_
#ifndef EFIELDH_
#define EFIELDH_
#include <stdbool.h>
#include <sys/types.h>
@@ -10,9 +10,9 @@ struct editable_field {
char content[255];
};
struct editable_field field_new(char*);
void field_trim(struct editable_field*, u_char);
void field_update(struct editable_field*, char*);
bool field_seek(struct editable_field*, char);
struct editable_field field_new(char* content);
void field_trim(struct editable_field* self, u_char pos);
void field_update(struct editable_field* self, char* update);
bool field_seek(struct editable_field* self, char seek);
#endif

View File

@@ -1,5 +1,5 @@
#ifndef _KEYSH_
#define _KEYSH_
#ifndef KEYSH_
#define KEYSH_
#include <stdlib.h>

View File

@@ -1,5 +1,5 @@
#ifndef _SESSIONSH_
#define _SESSIONSH_
#ifndef SESSIONSH_
#define SESSIONSH_
#include <sys/types.h>

View File

@@ -1,5 +1,5 @@
#ifndef _UIH_
#define _UIH_
#ifndef UIH_
#define UIH_
#include "config.h"
#include "util.h"

View File

@@ -1,5 +1,5 @@
#ifndef _USERSH_
#define _USERSH_
#ifndef USERSH_
#define USERSH_
#include <sys/types.h>

View File

@@ -1,5 +1,5 @@
#ifndef _UTILH_
#define _UTILH_
#ifndef UTILH_
#define UTILH_
#include <stdbool.h>
#include <stdint.h>