fix: correct clang-format and other files

This commit is contained in:
2025-10-28 21:31:26 -04:00
parent 6af34bfd0d
commit c5881e15bf
17 changed files with 795 additions and 651 deletions

View File

@@ -39,35 +39,42 @@
#include "textc.h"
char *str_dup(char *s) {
char *new = xmalloc(strlen(s) + 1);
strcpy(new, s);
return new;
char *str_dup(char *s)
{
char *new = xmalloc(strlen(s) + 1);
strcpy(new, s);
return new;
}
char *tostrupr(char *s) {
char *new = str_dup(s);
for (int i = 0; new[i] != '\0'; ++i)
new[i] = toupper((unsigned char)new[i]);
return new;
char *tostrupr(char *s)
{
char *new = str_dup(s);
for (int i = 0; new[i] != '\0'; ++i)
new[i] = toupper((unsigned char)new[i]);
return new;
}
char *tostrlwr(char *s) {
char *new = str_dup(s);
for (int i = 0; new[i] != '\0'; ++i)
new[i] = tolower((unsigned char)new[i]);
return new;
char *tostrlwr(char *s)
{
char *new = str_dup(s);
for (int i = 0; new[i] != '\0'; ++i)
new[i] = tolower((unsigned char)new[i]);
return new;
}
char *textc_trim(char *s) { return NULL; }
char *textc_trim(char *s)
{
return NULL;
}
char *textc_pad_left(int count, char *s, char pad) {
char *buffer = xmalloc(strlen(s) + 1);
char *textc_pad_left(int count, char *s, char pad)
{
char *buffer = xmalloc(strlen(s) + 1);
free(buffer);
buffer = "NOT IMPLEMENTED";
free(buffer);
buffer = "NOT IMPLEMENTED";
return buffer;
return buffer;
}
/* end of file textc.c */