Use C++ style comments consistently in SDL source code
Implemented using this script:
find . -type f -exec sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' {} \;
git checkout \
core/linux/SDL_evdev_kbd_default_keymap.h \
events/imKStoUCS.* \
hidapi \
joystick/controller_type.c \
joystick/controller_type.h \
joystick/hidapi/steam/controller_constants.h \
joystick/hidapi/steam/controller_structs.h \
joystick/SDL_gamepad_db.h \
libm \
render/*/*Shader*.h \
render/vitagxm/SDL_render_vita_gxm_shaders.h \
render/metal/SDL_shaders_metal_*.h \
stdlib/SDL_malloc.c \
stdlib/SDL_qsort.c \
stdlib/SDL_strtokr.c \
test/ \
video/directx/SDL_d3d12_xbox_cmacros.h \
video/directx/d3d12.h \
video/directx/d3d12sdklayers.h \
video/khronos \
video/x11/edid-parse.c \
video/x11/xsettings-client.* \
video/yuv2rgb
sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' hidapi/SDL_hidapi.c
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#ifdef SDL_THREAD_PS2
|
||||
|
||||
/* Semaphore functions for the PS2. */
|
||||
// Semaphore functions for the PS2.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -35,7 +35,7 @@ struct SDL_Semaphore
|
||||
s32 semid;
|
||||
};
|
||||
|
||||
/* Create a semaphore */
|
||||
// Create a semaphore
|
||||
SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
|
||||
{
|
||||
SDL_Semaphore *sem;
|
||||
@@ -43,7 +43,7 @@ SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
|
||||
|
||||
sem = (SDL_Semaphore *)SDL_malloc(sizeof(*sem));
|
||||
if (sem) {
|
||||
/* TODO: Figure out the limit on the maximum value. */
|
||||
// TODO: Figure out the limit on the maximum value.
|
||||
sema.init_count = initial_value;
|
||||
sema.max_count = 255;
|
||||
sema.option = 0;
|
||||
@@ -59,7 +59,7 @@ SDL_Semaphore *SDL_CreateSemaphore(Uint32 initial_value)
|
||||
return sem;
|
||||
}
|
||||
|
||||
/* Free the semaphore */
|
||||
// Free the semaphore
|
||||
void SDL_DestroySemaphore(SDL_Semaphore *sem)
|
||||
{
|
||||
if (sem) {
|
||||
@@ -104,7 +104,7 @@ int SDL_WaitSemaphoreTimeoutNS(SDL_Semaphore *sem, Sint64 timeoutNS)
|
||||
return 0; // Wait condition satisfied.
|
||||
}
|
||||
|
||||
/* Returns the current count of the semaphore */
|
||||
// Returns the current count of the semaphore
|
||||
Uint32 SDL_GetSemaphoreValue(SDL_Semaphore *sem)
|
||||
{
|
||||
ee_sema_t info;
|
||||
@@ -137,4 +137,4 @@ int SDL_SignalSemaphore(SDL_Semaphore *sem)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SDL_THREAD_PS2 */
|
||||
#endif // SDL_THREAD_PS2
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#ifdef SDL_THREAD_PS2
|
||||
|
||||
/* PS2 thread management routines for SDL */
|
||||
// PS2 thread management routines for SDL
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -64,7 +64,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread,
|
||||
size_t stack_size;
|
||||
int priority = 32;
|
||||
|
||||
/* Set priority of new thread to the same as the current thread */
|
||||
// Set priority of new thread to the same as the current thread
|
||||
// status.size = sizeof(ee_thread_t);
|
||||
if (ReferThreadStatus(GetThreadId(), &status) == 0) {
|
||||
priority = status.current_priority;
|
||||
@@ -72,7 +72,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread,
|
||||
|
||||
stack_size = thread->stacksize ? ((int)thread->stacksize) : 0x1800;
|
||||
|
||||
/* Create EE Thread */
|
||||
// Create EE Thread
|
||||
eethread.attr = 0;
|
||||
eethread.option = 0;
|
||||
eethread.func = &childThread;
|
||||
@@ -97,7 +97,7 @@ int SDL_SYS_CreateThread(SDL_Thread *thread,
|
||||
|
||||
void SDL_SYS_SetupThread(const char *name)
|
||||
{
|
||||
/* Do nothing. */
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
SDL_ThreadID SDL_GetCurrentThreadID(void)
|
||||
@@ -114,7 +114,7 @@ void SDL_SYS_WaitThread(SDL_Thread *thread)
|
||||
|
||||
void SDL_SYS_DetachThread(SDL_Thread *thread)
|
||||
{
|
||||
/* Do nothing. */
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
|
||||
@@ -134,4 +134,4 @@ int SDL_SYS_SetThreadPriority(SDL_ThreadPriority priority)
|
||||
return ChangeThreadPriority(GetThreadId(), value);
|
||||
}
|
||||
|
||||
#endif /* SDL_THREAD_PS2 */
|
||||
#endif // SDL_THREAD_PS2
|
||||
|
||||
Reference in New Issue
Block a user