Add clang-format and gitignore
This commit is contained in:
15
.clang-format
Normal file
15
.clang-format
Normal 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
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
cdplayer
|
||||
cdplayer.o
|
||||
6
Makefile
6
Makefile
@@ -9,3 +9,9 @@ CFLAGS = -Itinyalsa/include
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
$(CC) $(OBJ) -o $(BIN)
|
||||
|
||||
fmt:
|
||||
clang-format -i cdplayer.c
|
||||
|
||||
clean:
|
||||
rm $(BIN) $(OBJ)
|
||||
|
||||
14
cdplayer.c
14
cdplayer.c
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user