Skip to content

Commit 041b22b

Browse files
committed
cleanup: add function arguments names to callbacks
1 parent efd7632 commit 041b22b

64 files changed

Lines changed: 452 additions & 390 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/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()

ee/mpeg/include/libmpeg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ typedef struct MPEGSequenceInfo {
5757
extern "C" {
5858
#endif
5959

60-
extern void MPEG_Initialize ( int ( * ) ( void* ), void*, void* ( * ) ( void*, MPEGSequenceInfo* ), void*, s64* );
60+
extern void MPEG_Initialize(int (*apDataCB)(void *userdata), void *apDataCBParam, void *(*apInitCB)(void *userdata, MPEGSequenceInfo *si), void *apInitCBParam, s64 *apCurPTS);
6161
extern void MPEG_Destroy ( void );
62-
extern int ( *MPEG_Picture ) ( void*, s64* );
62+
extern int ( *MPEG_Picture ) ( void *apData, s64 *apPTS );
6363

6464
#ifdef __cplusplus
6565
}

0 commit comments

Comments
 (0)