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:
Sam Lantinga
2024-08-22 10:30:45 -07:00
parent 658fc3db0f
commit 6501e90018
743 changed files with 11882 additions and 11882 deletions

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
/* convert the guid to a printable string */
// convert the guid to a printable string
void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID)
{
static const char k_rgchHexToASCII[] = "0123456789abcdef";
@@ -31,8 +31,8 @@ void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID)
}
for (i = 0; i < sizeof(guid.data) && i < (cbGUID - 1) / 2; i++) {
/* each input byte writes 2 ascii chars, and might write a null byte. */
/* If we don't have room for next input byte, stop */
// each input byte writes 2 ascii chars, and might write a null byte.
// If we don't have room for next input byte, stop
unsigned char c = guid.data[i];
*pszGUID++ = k_rgchHexToASCII[c >> 4];
@@ -60,12 +60,12 @@ static unsigned char nibble(unsigned char c)
return c - 'a' + 0x0a;
}
/* received an invalid character, and no real way to return an error */
/* AssertMsg1(false, "Q_nibble invalid hex character '%c' ", c); */
// received an invalid character, and no real way to return an error
// AssertMsg1(false, "Q_nibble invalid hex character '%c' ", c);
return 0;
}
/* convert the string version of a guid to the struct */
// convert the string version of a guid to the struct
SDL_GUID SDL_StringToGUID(const char *pchGUID)
{
SDL_GUID guid;
@@ -74,7 +74,7 @@ SDL_GUID SDL_StringToGUID(const char *pchGUID)
Uint8 *p;
size_t i;
/* Make sure it's even */
// Make sure it's even
len = (len) & ~0x1;
SDL_memset(&guid, 0x00, sizeof(guid));