Skip to content

Commit 2d9c170

Browse files
authored
Merge pull request #806 from uyjulian/add_names_to_callbacks
Variable and argument name additions
2 parents a80d2e5 + 041b22b commit 2d9c170

73 files changed

Lines changed: 500 additions & 438 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

common/include/libcdvd-common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,10 +916,10 @@ extern int sceCdStSeekF(unsigned int lsn);
916916
* SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY
917917
*
918918
* @param func pointer of callback function to be called when power-off processing is activated
919-
* @param addr an argument which will be passed to the callback function
919+
* @param userdata an argument which will be passed to the callback function
920920
* returns: a pointer to the previous handler function, or a null pointer if nothing has been set eariler
921921
*/
922-
extern void *sceCdPOffCallback(void (*func)(void *), void *addr);
922+
extern void *sceCdPOffCallback(void (*func)(void *userdata), void *userdata);
923923

924924
/** Sets the timeout lengths for the certain CDVDMAN's operations.
925925
* SUPPORTED IN NEWER CDVDMAN MODULES INCLUDED WITHIN NEWER IOPRP ONLY

common/include/libsd-common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ typedef struct
144144
int feedback;
145145
} sceSdEffectAttr;
146146

147-
typedef int (*sceSdSpu2IntrHandler)(int, void *);
148-
typedef int (*sceSdTransIntrHandler)(int, void *);
147+
typedef int (*sceSdSpu2IntrHandler)(int core_bit, void *arg);
148+
typedef int (*sceSdTransIntrHandler)(int core, void *arg);
149149
typedef int (*SdIntrCallback)(void *data);
150150
typedef int (*sceSdBlockTransHandler)(int channel, void *userdata, void **addr, int *size);
151151

common/sbus/src/ee_sbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void _SetIntcHandler(int irq, void *handler)
104104
i_state = DI();
105105
u_state = (ee_kmode_enter() >> 3) & 3;
106106

107-
((void (*)(int, void *))(0x80000700))(irq, handler);
107+
((void (*)(int irq, void *handler))(0x80000700))(irq, handler);
108108

109109
if (u_state) {
110110
ee_kmode_exit();

ee/graph/include/graph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ extern void graph_set_bgcolor(unsigned char r, unsigned char g, unsigned char b)
132132
extern void graph_set_output(int rc1, int rc2, int alpha_select, int alpha_output, int blend_method, unsigned char alpha);
133133

134134
/** Add a vsync interrupt handler */
135-
extern int graph_add_vsync_handler(int (*vsync_callback)(int));
135+
extern int graph_add_vsync_handler(int (*vsync_callback)(int cause));
136136

137137
/** Remove a vsync interrupt handler */
138138
extern void graph_remove_vsync_handler(int callback_id);

ee/graph/src/graph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int graph_initialize(int fbp, int width, int height, int psm, int x, int y)
2626

2727
}
2828

29-
int graph_add_vsync_handler(int (*vsync_callback)(int))
29+
int graph_add_vsync_handler(int (*vsync_callback)(int cause))
3030
{
3131

3232
int callback_id;

ee/iopreboot/src/imgdrv/src/imgdrv.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ static int imgdrv_lseek(iop_file_t *f, int offset, int whence);
2929
but the structure in the original was this short (probably to save space). */
3030
typedef struct _iop_device_ops_short
3131
{
32-
int (*init)(iop_device_t *);
33-
int (*deinit)(iop_device_t *);
34-
int (*format)(iop_file_t *);
35-
int (*open)(iop_file_t *, const char *, int);
36-
int (*close)(iop_file_t *);
37-
int (*read)(iop_file_t *, void *, int);
38-
int (*write)(iop_file_t *, void *, int);
39-
int (*lseek)(iop_file_t *, int, int);
32+
int (*init)(iop_device_t *device);
33+
int (*deinit)(iop_device_t *device);
34+
int (*format)(iop_file_t *f);
35+
int (*open)(iop_file_t *f, const char *name, int flags);
36+
int (*close)(iop_file_t *f);
37+
int (*read)(iop_file_t *f, void *ptr, int size);
38+
int (*write)(iop_file_t *f, void *ptr, int size);
39+
int (*lseek)(iop_file_t *f, int offset, int mode);
4040
} iop_device_ops_short_t;
4141

4242
IOMAN_RETURN_VALUE_IMPL(0);

ee/kernel/src/debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void InitDebug(void)
2626
if ((jalPrintf & 0xFC000000) == 0xC000000)
2727
{
2828
// Get the call target which is the address of printf.
29-
krnl_print = (void(*)(const char*, ...))(0x80000000 + ((jalPrintf & 0x3FFFFFF) << 2));
29+
krnl_print = (void(*)(const char* format, ...))(0x80000000 + ((jalPrintf & 0x3FFFFFF) << 2));
3030
break;
3131
}
3232
}

ee/kernel/src/osdsrc/src/ExecPS2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct TCB
4848
struct TCB *next; //+00
4949
struct TCB *prev; //+04
5050
int status; //+08
51-
void (*entry)(void *); //+0C
51+
void (*entry)(void *d); //+0C
5252
void *stack_res; //+10 initial $sp
5353
void *gpReg; //+14
5454
short currentPriority; //+18
@@ -58,7 +58,7 @@ struct TCB
5858
wakeupCount, //+24
5959
attr, //+28
6060
option; //+2C
61-
void (*entry_)(void *); //+30
61+
void (*entry_)(void *d);//+30
6262
int argc; //+34
6363
char *argstring; //+38
6464
void *stack; //+3C

ee/libcglue/src/glue.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ int rmdir(const char *path) {
566566

567567
#ifdef F__link
568568
// Called from newlib linkr.c
569-
int _link(const char *old, const char *new) {
569+
int _link(const char *old, const char *new_) {
570570
errno = ENOSYS;
571571
return -1; /* not supported */
572572
}
@@ -593,7 +593,7 @@ int _unlink(const char *path) {
593593

594594
#ifdef F__rename
595595
// Called from newlib renamer.c
596-
int _rename(const char *old, const char *new) {
596+
int _rename(const char *old, const char *new_) {
597597
char oldname[MAXNAMLEN + 1];
598598
char newname[MAXNAMLEN + 1];
599599

@@ -602,7 +602,7 @@ int _rename(const char *old, const char *new) {
602602
return -1;
603603
}
604604

605-
if(__path_absolute(new, newname, MAXNAMLEN) < 0) {
605+
if(__path_absolute(new_, newname, MAXNAMLEN) < 0) {
606606
errno = ENAMETOOLONG;
607607
return -1;
608608
}

ee/libcglue/src/timezone.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define OSD_CONFIG_NO_LIBCDVD
2525
#include "osd_config.h"
2626

27-
#define posixIODriver { open, close, (int (*)(int, void *, int))read, O_RDONLY }
27+
#define posixIODriver { open, close, (int (*)(int fd, void *buf, int nbyte))read, O_RDONLY }
2828

2929
#ifdef F__libcglue_timezone_update_impl
3030
void _libcglue_timezone_update_impl()

0 commit comments

Comments
 (0)