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:
@@ -24,13 +24,13 @@
|
||||
#include "SDL_sysstorage.h"
|
||||
#include "../filesystem/SDL_sysfilesystem.h"
|
||||
|
||||
/* Available title storage drivers */
|
||||
// Available title storage drivers
|
||||
static TitleStorageBootStrap *titlebootstrap[] = {
|
||||
&GENERIC_titlebootstrap,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Available user storage drivers */
|
||||
// Available user storage drivers
|
||||
static UserStorageBootStrap *userbootstrap[] = {
|
||||
#ifdef SDL_STORAGE_STEAM
|
||||
&STEAM_userbootstrap,
|
||||
@@ -61,7 +61,7 @@ SDL_Storage *SDL_OpenTitleStorage(const char *override, SDL_PropertiesID props)
|
||||
SDL_Storage *storage = NULL;
|
||||
int i = 0;
|
||||
|
||||
/* Select the proper storage driver */
|
||||
// Select the proper storage driver
|
||||
const char *driver_name = SDL_GetHint(SDL_HINT_STORAGE_TITLE_DRIVER);
|
||||
if (driver_name && *driver_name != 0) {
|
||||
const char *driver_attempt = driver_name;
|
||||
@@ -103,7 +103,7 @@ SDL_Storage *SDL_OpenUserStorage(const char *org, const char *app, SDL_Propertie
|
||||
SDL_Storage *storage = NULL;
|
||||
int i = 0;
|
||||
|
||||
/* Select the proper storage driver */
|
||||
// Select the proper storage driver
|
||||
const char *driver_name = SDL_GetHint(SDL_HINT_STORAGE_USER_DRIVER);
|
||||
if (driver_name && *driver_name != 0) {
|
||||
const char *driver_attempt = driver_name;
|
||||
|
||||
@@ -38,14 +38,14 @@ typedef struct UserStorageBootStrap
|
||||
SDL_Storage *(*create)(const char*, const char*, SDL_PropertiesID);
|
||||
} UserStorageBootStrap;
|
||||
|
||||
/* Not all of these are available in a given build. Use #ifdefs, etc. */
|
||||
// Not all of these are available in a given build. Use #ifdefs, etc.
|
||||
|
||||
extern TitleStorageBootStrap GENERIC_titlebootstrap;
|
||||
/* Steam does not have title storage APIs */
|
||||
// Steam does not have title storage APIs
|
||||
|
||||
extern UserStorageBootStrap GENERIC_userbootstrap;
|
||||
extern UserStorageBootStrap STEAM_userbootstrap;
|
||||
|
||||
extern SDL_Storage *GENERIC_OpenFileStorage(const char *path);
|
||||
|
||||
#endif /* SDL_sysstorage_h_ */
|
||||
#endif // SDL_sysstorage_h_
|
||||
|
||||
@@ -82,7 +82,7 @@ static int GENERIC_ReadStorageFile(void *userdata, const char *path, void *desti
|
||||
if (fullpath) {
|
||||
SDL_IOStream *stream = SDL_IOFromFile(fullpath, "rb");
|
||||
if (stream) {
|
||||
/* FIXME: Should SDL_ReadIO use u64 now...? */
|
||||
// FIXME: Should SDL_ReadIO use u64 now...?
|
||||
if (SDL_ReadIO(stream, destination, (size_t)length) == length) {
|
||||
result = 0;
|
||||
}
|
||||
@@ -95,7 +95,7 @@ static int GENERIC_ReadStorageFile(void *userdata, const char *path, void *desti
|
||||
|
||||
static int GENERIC_WriteStorageFile(void *userdata, const char *path, const void *source, Uint64 length)
|
||||
{
|
||||
/* TODO: Recursively create subdirectories with SDL_CreateDirectory */
|
||||
// TODO: Recursively create subdirectories with SDL_CreateDirectory
|
||||
int result = -1;
|
||||
|
||||
if (length > SDL_SIZE_MAX) {
|
||||
@@ -107,7 +107,7 @@ static int GENERIC_WriteStorageFile(void *userdata, const char *path, const void
|
||||
SDL_IOStream *stream = SDL_IOFromFile(fullpath, "wb");
|
||||
|
||||
if (stream) {
|
||||
/* FIXME: Should SDL_WriteIO use u64 now...? */
|
||||
// FIXME: Should SDL_WriteIO use u64 now...?
|
||||
if (SDL_WriteIO(stream, source, (size_t)length) == length) {
|
||||
result = 0;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ static int GENERIC_WriteStorageFile(void *userdata, const char *path, const void
|
||||
|
||||
static int GENERIC_CreateStorageDirectory(void *userdata, const char *path)
|
||||
{
|
||||
/* TODO: Recursively create subdirectories with SDL_CreateDirectory */
|
||||
// TODO: Recursively create subdirectories with SDL_CreateDirectory
|
||||
int result = -1;
|
||||
|
||||
char *fullpath = GENERIC_INTERNAL_CreateFullPath((char *)userdata, path);
|
||||
@@ -177,22 +177,22 @@ static int GENERIC_CopyStorageFile(void *userdata, const char *oldpath, const ch
|
||||
|
||||
static Uint64 GENERIC_GetStorageSpaceRemaining(void *userdata)
|
||||
{
|
||||
/* TODO: There's totally a way to query a folder root's quota... */
|
||||
// TODO: There's totally a way to query a folder root's quota...
|
||||
return SDL_MAX_UINT64;
|
||||
}
|
||||
|
||||
static const SDL_StorageInterface GENERIC_title_iface = {
|
||||
GENERIC_CloseStorage,
|
||||
NULL, /* ready */
|
||||
NULL, // ready
|
||||
GENERIC_EnumerateStorageDirectory,
|
||||
GENERIC_GetStoragePathInfo,
|
||||
GENERIC_ReadStorageFile,
|
||||
NULL, /* write_file */
|
||||
NULL, /* mkdir */
|
||||
NULL, /* remove */
|
||||
NULL, /* rename */
|
||||
NULL, /* copy */
|
||||
NULL /* space_remaining */
|
||||
NULL, // write_file
|
||||
NULL, // mkdir
|
||||
NULL, // remove
|
||||
NULL, // rename
|
||||
NULL, // copy
|
||||
NULL // space_remaining
|
||||
};
|
||||
|
||||
static SDL_Storage *GENERIC_Title_Create(const char *override, SDL_PropertiesID props)
|
||||
@@ -225,7 +225,7 @@ TitleStorageBootStrap GENERIC_titlebootstrap = {
|
||||
|
||||
static const SDL_StorageInterface GENERIC_user_iface = {
|
||||
GENERIC_CloseStorage,
|
||||
NULL, /* ready */
|
||||
NULL, // ready
|
||||
GENERIC_EnumerateStorageDirectory,
|
||||
GENERIC_GetStoragePathInfo,
|
||||
GENERIC_ReadStorageFile,
|
||||
@@ -260,7 +260,7 @@ UserStorageBootStrap GENERIC_userbootstrap = {
|
||||
|
||||
static const SDL_StorageInterface GENERIC_file_iface = {
|
||||
GENERIC_CloseStorage,
|
||||
NULL, /* ready */
|
||||
NULL, // ready
|
||||
GENERIC_EnumerateStorageDirectory,
|
||||
GENERIC_GetStoragePathInfo,
|
||||
GENERIC_ReadStorageFile,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "../SDL_sysstorage.h"
|
||||
|
||||
#include <stdbool.h> /* Needed by Steamworks */
|
||||
#include <stdbool.h> // Needed by Steamworks
|
||||
|
||||
// !!! FIXME: Async API can use SteamRemoteStorage_ReadFileAsync
|
||||
// !!! FIXME: Async API can use SteamRemoteStorage_WriteFileAsync
|
||||
@@ -133,14 +133,14 @@ static Uint64 STEAM_GetStorageSpaceRemaining(void *userdata)
|
||||
static const SDL_StorageInterface STEAM_user_iface = {
|
||||
STEAM_CloseStorage,
|
||||
STEAM_StorageReady,
|
||||
NULL, /* enumerate */
|
||||
NULL, // enumerate
|
||||
STEAM_GetStoragePathInfo,
|
||||
STEAM_ReadStorageFile,
|
||||
STEAM_WriteStorageFile,
|
||||
NULL, /* mkdir */
|
||||
NULL, /* remove */
|
||||
NULL, /* rename */
|
||||
NULL, /* copy */
|
||||
NULL, // mkdir
|
||||
NULL, // remove
|
||||
NULL, // rename
|
||||
NULL, // copy
|
||||
STEAM_GetStorageSpaceRemaining
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user