Skip to content
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
59 changes: 0 additions & 59 deletions include/errno.h

This file was deleted.

25 changes: 0 additions & 25 deletions include/fcntl.h

This file was deleted.

33 changes: 0 additions & 33 deletions include/file.h

This file was deleted.

4 changes: 0 additions & 4 deletions include/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ struct iob {
};
#endif /* LANGUAGE_C */

#ifndef NULL
#define NULL 0
#endif

/* Request codes */
#define READ 1
#define WRITE 2
Expand Down
44 changes: 0 additions & 44 deletions include/ioctl.h

This file was deleted.

9 changes: 0 additions & 9 deletions include/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
/*
* $PSLibId: Run-time Library Release 4.7$
*/
#ifndef _R3000_H
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this file, r3000.h, is even needed here.

#include <r3000.h>
#endif

#ifndef _ASM_H
#include <asm.h>
#endif

/* don't change these macros and structures which is refereced in kernel code */

Expand Down Expand Up @@ -156,10 +151,6 @@ extern struct ToT SysToT[32];

extern long SysClearRCnt[];

#ifndef NULL
#define NULL (0)
#endif

#if defined(_LANGUAGE_C)||defined(LANGUAGE_C)
#define delete erase
#endif /* LANGUAGE_C */
Expand Down
2 changes: 0 additions & 2 deletions include/libapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
* $PSLibId: Run-time Library Release 4.7$
*/

#ifndef _KERNEL_H
#include "kernel.h"
#endif

/* don't change these macros and structures which is referred in controler code */

Expand Down
5 changes: 1 addition & 4 deletions include/libgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@
*/

#include <libgpu.h>
#include <stddef.h>
#include <types.h>

#ifndef NULL
#define NULL 0
#endif

/*** packet peripheral pointer ***/
typedef unsigned char PACKET;

Expand Down
14 changes: 0 additions & 14 deletions include/libmcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@

/* don't change these macros and structures which is referred in mcx code */

#ifndef TRUE
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so I think these TRUE/FALSE/ERROR are actually used for the return values of the functions in here.

#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef ERROR
#define ERROR (-1)
#endif


#define McxFuncGetApl 1
#define McxFuncExecApl 2
#define McxFuncGetTime 3
Expand Down
11 changes: 0 additions & 11 deletions include/libpad.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@

/* don't change these macros and structures which is referred in controler code */

#ifndef TRUE
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. So we may want to keep these TRUE/FALSE/ERROR blocks, or move them to a new header by itself, like sys/return_values.h, and include it from these two files, as the values are basically implicitly needed to evaluate the return values of the functions. Could also probably do with an enum instead, but that's probably too big of a change.

#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif


#define PadStateDiscon 0
#define PadStateFindPad 1
#define PadStateFindCTP1 2
Expand Down
3 changes: 0 additions & 3 deletions include/libsnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
#define SND_ADDR 16
#define SND_PITCH 32

#ifndef NULL
#define NULL 0
#endif


/*
Expand Down
8 changes: 1 addition & 7 deletions include/malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@
#ifndef _MALLOC_H
#define _MALLOC_H

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif
#ifndef NULL
#define NULL 0 /* null pointer constant */
#endif
#include <stddef.h>

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
Expand Down
9 changes: 0 additions & 9 deletions include/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
#ifndef _MEMORY_H
#define _MEMORY_H

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif

#ifndef NULL
#define NULL 0 /* null pointer constant */
#endif

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
#endif
Expand Down
9 changes: 1 addition & 8 deletions include/qsort.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@
#ifndef _QSORT_H
#define _QSORT_H

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif

#ifndef NULL
#define NULL 0 /* null pointer constant */
#endif
#include <stddef.h>

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
Expand Down
50 changes: 0 additions & 50 deletions include/stddef.h

This file was deleted.

5 changes: 0 additions & 5 deletions include/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@
#define SEEK_END 2
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif

/* under constraction now */

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
Expand Down
9 changes: 0 additions & 9 deletions include/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@

#define LMAX 256

#ifndef NULL
#define NULL 0 /* null pointer constant */
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later in this file (as I can't comment somewhere as low), we may want to change this line:

#define strdup(p)	( strcpy(malloc(strlen(p)+1),p); )

to

#define strdup(p)	do { strcpy(malloc(strlen(p)+1),p); } while(0)


#include <memory.h>

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
Expand Down
Loading