Add clang-format and gitignore

This commit is contained in:
pedroediaz committed 2025-10-01 12:43:37 -06:00
1 parent 454c10bd99
commit 561652bc6a
4 files changed
+27 -10

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
# Tabs
UseTab: ForContinuationAndIndentation #ForIndentation
# Sized
TabWidth: 8
IndentWidth: 8
ContinuationIndentWidth: 8
# Column Limit
ColumnLimit: 80
# Functions
AllowAllArgumentsOnNextLine: false
# Allman
BreakBeforeBraces: Allman
+2
View File
@@ -0,0 +1,2 @@
cdplayer
cdplayer.o
+6
View File
@@ -9,3 +9,9 @@ CFLAGS = -Itinyalsa/include
$(BIN): $(OBJ)
$(CC) $(OBJ) -o $(BIN)
fmt:
clang-format -i cdplayer.c
clean:
rm $(BIN) $(OBJ)
+4 -10
View File
@@ -1,9 +1,9 @@
#include <fcntl.h>
#include <unistd.h>
#include <linux/cdrom.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
#include <tinyalsa/pcm.h>
#include <unistd.h>
#define FRAMES 1
@@ -13,15 +13,9 @@
struct cdrom_read_audio sr;
void forward( int signum )
{
sr.addr.lba+=3600;
}
void forward(int signum) { sr.addr.lba += 3600; }
void backward( int signum )
{
sr.addr.lba-=3600;
}
void backward(int signum) { sr.addr.lba -= 3600; }
void weite_err(char *s)
{