Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I cleaned up your code for you! #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Numerous always-ignore extensions
###################
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~

*.sass-cache
# Folders to ignore
###################
.hg
.svn
.CVS
# OS or Editor folders
###################
.DS_Store
Icon?
Thumbs.db
ehthumbs.db
nbproject
.cache
.project
.settings
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
# Dreamweaver added files
###################
_notes
dwsync.xml
# Komodo
###################
*.komodoproject
.komodotools
4 changes: 2 additions & 2 deletions psl1ght/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

-include Makefile.base
-include ../Makefile.base

TARGET := libpsl1ght
BUILD := build
SOURCE := source
INCLUDE := include
DATA := data
LIBS :=
LIBS :=

CFLAGS += -g -O2 -Wall

Expand Down
6 changes: 3 additions & 3 deletions psl1ght/include/psl1ght/lv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ typedef u32 lv2_size_t;
#define LV2_INLINE static inline __attribute__((unused))
#define LV2_SYSCALL LV2_INLINE s32

#define __lv2syscallarg0
#define __lv2syscallarg0
#define __lv2syscallarg1 __lv2syscallarg0, u64 a1
#define __lv2syscallarg2 __lv2syscallarg1, u64 a2
#define __lv2syscallarg3 __lv2syscallarg2, u64 a3
Expand All @@ -21,7 +21,7 @@ typedef u32 lv2_size_t;
#define __lv2syscallarg6 __lv2syscallarg5, u64 a6
#define __lv2syscallarg7 __lv2syscallarg6, u64 a7
#define __lv2syscallarg8 __lv2syscallarg7, u64 a8
#define __lv2syscallargt0
#define __lv2syscallargt0
#define __lv2syscallargt1 u64
#define __lv2syscallargt2 __lv2syscallargt1, u64
#define __lv2syscallargt3 __lv2syscallargt2, u64
Expand All @@ -30,7 +30,7 @@ typedef u32 lv2_size_t;
#define __lv2syscallargt6 __lv2syscallargt5, u64
#define __lv2syscallargt7 __lv2syscallargt6, u64
#define __lv2syscallargt8 __lv2syscallargt7, u64
#define __lv2syscall0
#define __lv2syscall0
#define __lv2syscall1 a1
#define __lv2syscall2 __lv2syscall1, a2
#define __lv2syscall3 __lv2syscall2, a3
Expand Down
2 changes: 1 addition & 1 deletion psl1ght/include/psl1ght/lv2/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ typedef s32 Lv2FsFile;
#define LV2_O_APPEND 002000
#define LV2_O_MSELF 010000

typedef struct {
typedef struct {
Lv2FsMode st_mode;
s32 st_uid;
s32 st_gid;
Expand Down
2 changes: 1 addition & 1 deletion psl1ght/libc-glue-ppu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BUILD := build
SOURCE := source
INCLUDE := ../include
DATA := data
LIBS :=
LIBS :=

CFLAGS := -g -O2 -Wall -fno-exceptions

Expand Down
4 changes: 2 additions & 2 deletions psl1ght/libc-glue-ppu/source/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ ssize_t read(int fd, void* buffer, size_t size)
{
u64 bytes;
int ret;

if (fd == stdin->_file) {
ret = lv2TtyRead(fd, buffer, size, (u32*)(void*)&bytes);
bytes >>= 32;
} else
ret = lv2FsRead(fd, buffer, size, &bytes);

if (ret)
return lv2Errno(ret);
return bytes;
Expand Down
4 changes: 2 additions & 2 deletions psl1ght/stub/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
sldi reg, reg, 0x20; \
oris reg, reg, (sym)@h; \
ori reg, reg, (sym)@l \


.global ._start
._start:
Expand All @@ -26,7 +26,7 @@
.section ".bss","aw"
.global __libc_stack_end
__libc_stack_end:
.quad 0
.quad 0

.section ".opd","aw"
.global _start
Expand Down
4 changes: 2 additions & 2 deletions psl1ght/tools/raw2h/raw2h.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#include <stdio.h>
#include <string.h>

static const char header[] =
static const char header[] =
"#pragma once\n\n" \
"#include <stdint.h>\n\n" \
"const uint8_t %s[] = {\n";

static const char footer[] = "\n};\n";

int main(int argc, char **argv)
{
char buf[256];
Expand Down
2 changes: 1 addition & 1 deletion samples/network/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BUILD := build
SOURCE := source
INCLUDE := include
DATA := data
LIBS :=
LIBS :=

CFLAGS += -g -O2 -Wall --std=gnu99
CXXFLAGS += -g -O2 -Wall
Expand Down
2 changes: 1 addition & 1 deletion template/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BUILD := build
SOURCE := source
INCLUDE := include
DATA := data
LIBS :=
LIBS :=

CFLAGS += -g -O2 -Wall --std=gnu99
CXXFLAGS += -g -O2 -Wall
Expand Down