Remove trailing spaces

This commit is contained in:
Ray
2026-03-29 01:17:25 +01:00
parent fb0f83bc91
commit da93ec4a21
13 changed files with 76 additions and 76 deletions

View File

@ -28,20 +28,20 @@ jobs:
max-parallel: 1 max-parallel: 1
matrix: matrix:
ARCH: ["arm64", "x86_64"] ARCH: ["arm64", "x86_64"]
env: env:
RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }} RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@master uses: actions/checkout@master
- name: Setup Release Version - name: Setup Release Version
run: | run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV
shell: bash shell: bash
if: github.event_name == 'release' && github.event.action == 'published' if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Android NDK - name: Setup Android NDK
id: setup-ndk id: setup-ndk
uses: nttld/setup-ndk@v1 uses: nttld/setup-ndk@v1
@ -52,7 +52,7 @@ jobs:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Setup Environment - name: Setup Environment
run: | run: |
mkdir build mkdir build
cd build cd build
mkdir ${{ env.RELEASE_NAME }} mkdir ${{ env.RELEASE_NAME }}
@ -60,7 +60,7 @@ jobs:
mkdir include mkdir include
mkdir lib mkdir lib
cd ../.. cd ../..
# Generating static + shared library for 64bit arquitectures and API version 29 # Generating static + shared library for 64bit arquitectures and API version 29
- name: Build Library - name: Build Library
run: | run: |
@ -69,7 +69,7 @@ jobs:
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd .. cd ..
shell: cmd shell: cmd
- name: Generate Artifacts - name: Generate Artifacts
run: | run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
@ -80,7 +80,7 @@ jobs:
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }} tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@ -88,7 +88,7 @@ jobs:
path: | path: |
./build/${{ env.RELEASE_NAME }} ./build/${{ env.RELEASE_NAME }}
!./build/${{ env.RELEASE_NAME }}.tar.gz !./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release - name: Upload Artifact to Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:

View File

@ -23,18 +23,18 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Environment - name: Setup Environment
run: | run: |
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
- name: Build Library - name: Build Library
run: | run: |
cd src cd src
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC
cd .. cd ..
- name: Build Examples - name: Build Examples
run: | run: |
cd examples cd examples

View File

@ -13,7 +13,7 @@ on:
- 'src/**' - 'src/**'
- 'examples/**' - 'examples/**'
- '.github/workflows/windows_examples.yml' - '.github/workflows/windows_examples.yml'
permissions: permissions:
contents: read contents: read

View File

@ -42,23 +42,23 @@ jobs:
ARCH_NAME: "arm64" ARCH_NAME: "arm64"
COMPILER_PATH: "/usr/bin" COMPILER_PATH: "/usr/bin"
runner: "ubuntu-24.04-arm" runner: "ubuntu-24.04-arm"
runs-on: ${{ matrix.runner }} runs-on: ${{ matrix.runner }}
env: env:
RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }} RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@master uses: actions/checkout@master
- name: Setup Release Version - name: Setup Release Version
run: | run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV
shell: bash shell: bash
if: github.event_name == 'release' && github.event.action == 'published' if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment - name: Setup Environment
run: | run: |
sudo apt-get update -qq sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
mkdir build mkdir build
@ -74,7 +74,7 @@ jobs:
run : | run : |
sudo apt-get install gcc-multilib sudo apt-get install gcc-multilib
if: matrix.bits == 32 && matrix.ARCH == 'i386' if: matrix.bits == 32 && matrix.ARCH == 'i386'
# TODO: Support 32bit (i386) static/shared library building # TODO: Support 32bit (i386) static/shared library building
- name: Build Library (32-bit) - name: Build Library (32-bit)
run: | run: |
@ -91,7 +91,7 @@ jobs:
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd .. cd ..
if: matrix.bits == 64 && matrix.ARCH == 'x86_64' if: matrix.bits == 64 && matrix.ARCH == 'x86_64'
- name: Build Library (64-bit ARM) - name: Build Library (64-bit ARM)
run: | run: |
cd src cd src
@ -99,7 +99,7 @@ jobs:
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd .. cd ..
if: matrix.bits == 64 && matrix.ARCH == 'aarch64' if: matrix.bits == 64 && matrix.ARCH == 'aarch64'
- name: Generate Artifacts - name: Generate Artifacts
run: | run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
@ -110,7 +110,7 @@ jobs:
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }} tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@ -118,7 +118,7 @@ jobs:
path: | path: |
./build/${{ env.RELEASE_NAME }} ./build/${{ env.RELEASE_NAME }}
!./build/${{ env.RELEASE_NAME }}.tar.gz !./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release - name: Upload Artifact to Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:

View File

@ -23,14 +23,14 @@ jobs:
permissions: permissions:
contents: write # for actions/upload-release-asset to upload release asset contents: write # for actions/upload-release-asset to upload release asset
runs-on: macos-latest runs-on: macos-latest
env: env:
RELEASE_NAME: raylib-dev_macos RELEASE_NAME: raylib-dev_macos
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@master uses: actions/checkout@master
- name: Setup Release Version - name: Setup Release Version
run: | run: |
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
@ -38,7 +38,7 @@ jobs:
if: github.event_name == 'release' && github.event.action == 'published' if: github.event_name == 'release' && github.event.action == 'published'
- name: Setup Environment - name: Setup Environment
run: | run: |
mkdir build mkdir build
cd build cd build
mkdir ${{ env.RELEASE_NAME }} mkdir ${{ env.RELEASE_NAME }}
@ -46,47 +46,47 @@ jobs:
mkdir include mkdir include
mkdir lib mkdir lib
cd ../.. cd ../..
# Generating static + shared library, note that i386 architecture is deprecated # Generating static + shared library, note that i386 architecture is deprecated
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS # Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
- name: Build Library - name: Build Library
run: | run: |
cd src cd src
clang --version clang --version
# Extract version numbers from Makefile # Extract version numbers from Makefile
brew install grep brew install grep
RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile` RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile`
RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile` RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile`
# Build raylib x86_64 static # Build raylib x86_64 static
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
mv libraylib.a /tmp/libraylib_x86_64.a mv libraylib.a /tmp/libraylib_x86_64.a
make clean make clean
# Build raylib arm64 static # Build raylib arm64 static
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
mv libraylib.a /tmp/libraylib_arm64.a mv libraylib.a /tmp/libraylib_arm64.a
make clean make clean
# Join x86_64 and arm64 static # Join x86_64 and arm64 static
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a
# Build raylib x86_64 dynamic # Build raylib x86_64 dynamic
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib
make clean make clean
# Build raylib arm64 dynamic # Build raylib arm64 dynamic
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
# Join x86_64 and arm64 dynamic # Join x86_64 and arm64 dynamic
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib
cd .. cd ..
- name: Generate Artifacts - name: Generate Artifacts
run: | run: |
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
@ -97,7 +97,7 @@ jobs:
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
cd build cd build
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }} tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
@ -105,7 +105,7 @@ jobs:
path: | path: |
./build/${{ env.RELEASE_NAME }} ./build/${{ env.RELEASE_NAME }}
!./build/${{ env.RELEASE_NAME }}.tar.gz !./build/${{ env.RELEASE_NAME }}.tar.gz
- name: Upload Artifact to Release - name: Upload Artifact to Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:

View File

@ -12,11 +12,11 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup emsdk - name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14 uses: mymindstorm/setup-emsdk@v14
with: with:

View File

@ -34,7 +34,7 @@ int main()
DrawFPS(10, 10); DrawFPS(10, 10);
EndDrawing(); EndDrawing();
} }
CloseWindow(); CloseWindow();
return 0; return 0;
} }

View File

@ -19,7 +19,7 @@ int main()
int screenHeight = 450; int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window"); InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
SetTargetFPS(60); SetTargetFPS(60);
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -44,7 +44,7 @@ int main()
} }
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

View File

@ -15,9 +15,9 @@
<Param name="float alpha" /> <Param name="float alpha" />
</Overload> </Overload>
</KeyWord> </KeyWord>
NOTE: Generated XML text should be copied inside raylib\Notepad++\plugins\APIs\c.xml NOTE: Generated XML text should be copied inside raylib\Notepad++\plugins\APIs\c.xml
WARNING: Be careful with functions that split parameters into several lines, it breaks the process! WARNING: Be careful with functions that split parameters into several lines, it breaks the process!
LICENSE: zlib/libpng LICENSE: zlib/libpng
@ -42,13 +42,13 @@ int main(int argc, char *argv[])
{ {
FILE *rFile = fopen(argv[1], "rt"); FILE *rFile = fopen(argv[1], "rt");
FILE *rxmlFile = fopen("raylib_npp.xml", "wt"); FILE *rxmlFile = fopen("raylib_npp.xml", "wt");
if ((rFile == NULL) || (rxmlFile == NULL)) if ((rFile == NULL) || (rxmlFile == NULL))
{ {
printf("File could not be opened.\n"); printf("File could not be opened.\n");
return 0; return 0;
} }
char *buffer = (char *)calloc(MAX_BUFFER_SIZE, 1); char *buffer = (char *)calloc(MAX_BUFFER_SIZE, 1);
int count = 0; int count = 0;
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
{ {
// Read one full line // Read one full line
fgets(buffer, MAX_BUFFER_SIZE, rFile); fgets(buffer, MAX_BUFFER_SIZE, rFile);
if (buffer[0] == '/') fprintf(rxmlFile, " <!--%.*s -->\n", strlen(buffer) - 3, buffer + 2); if (buffer[0] == '/') fprintf(rxmlFile, " <!--%.*s -->\n", strlen(buffer) - 3, buffer + 2);
else if (buffer[0] == '\n') fprintf(rxmlFile, "%s", buffer); // Direct copy of code comments else if (buffer[0] == '\n') fprintf(rxmlFile, "%s", buffer); // Direct copy of code comments
else if (strncmp(buffer, "RLAPI", 5) == 0) // raylib function declaration else if (strncmp(buffer, "RLAPI", 5) == 0) // raylib function declaration
@ -65,33 +65,33 @@ int main(int argc, char *argv[])
char funcTypeAux[64]; char funcTypeAux[64];
char funcName[64]; char funcName[64];
char funcDesc[256]; char funcDesc[256];
char params[128]; char params[128];
char paramType[16][16]; char paramType[16][16];
char paramName[16][32]; char paramName[16][32];
int index = 0; int index = 0;
char *ptr = NULL; char *ptr = NULL;
sscanf(buffer, "RLAPI %s %[^(]s", funcType, funcName); sscanf(buffer, "RLAPI %s %[^(]s", funcType, funcName);
if (strcmp(funcType, "const") == 0) if (strcmp(funcType, "const") == 0)
{ {
sscanf(buffer, "RLAPI %s %s %[^(]s", funcType, funcTypeAux, funcName); sscanf(buffer, "RLAPI %s %s %[^(]s", funcType, funcTypeAux, funcName);
strcat(funcType, " "); strcat(funcType, " ");
strcat(funcType, funcTypeAux); strcat(funcType, funcTypeAux);
} }
ptr = strchr(buffer, '/'); ptr = strchr(buffer, '/');
index = (int)(ptr - buffer); index = (int)(ptr - buffer);
sscanf(buffer + index, "%[^\n]s", funcDesc); // Read function comment after declaration sscanf(buffer + index, "%[^\n]s", funcDesc); // Read function comment after declaration
ptr = strchr(buffer, '('); ptr = strchr(buffer, '(');
if (ptr != NULL) index = (int)(ptr - buffer); if (ptr != NULL) index = (int)(ptr - buffer);
else printf("Character not found!\n"); else printf("Character not found!\n");
sscanf(buffer + (index + 1), "%[^)]s", params); // Read what's inside '(' and ')' sscanf(buffer + (index + 1), "%[^)]s", params); // Read what's inside '(' and ')'
// Scan params string for number of func params, type and name // Scan params string for number of func params, type and name
@ -102,23 +102,23 @@ int main(int argc, char *argv[])
if ((funcName[0] == '*') && (funcName[1] == '*')) fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName + 2); if ((funcName[0] == '*') && (funcName[1] == '*')) fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName + 2);
else if (funcName[0] == '*') fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName + 1); else if (funcName[0] == '*') fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName + 1);
else fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName); else fprintf(rxmlFile, " <KeyWord name=\"%s\" func=\"yes\">\n", funcName);
fprintf(rxmlFile, " <Overload retVal=\"%s\" descr=\"%s\">", funcType, funcDesc + 3); fprintf(rxmlFile, " <Overload retVal=\"%s\" descr=\"%s\">", funcType, funcDesc + 3);
bool paramsVoid = false; bool paramsVoid = false;
char paramConst[8][16]; char paramConst[8][16];
while (paramPtr[paramsCount] != NULL) while (paramPtr[paramsCount] != NULL)
{ {
sscanf(paramPtr[paramsCount], "%s %s\n", paramType[paramsCount], paramName[paramsCount]); sscanf(paramPtr[paramsCount], "%s %s\n", paramType[paramsCount], paramName[paramsCount]);
if (strcmp(paramType[paramsCount], "void") == 0) if (strcmp(paramType[paramsCount], "void") == 0)
{ {
paramsVoid = true; paramsVoid = true;
break; break;
} }
if ((strcmp(paramType[paramsCount], "const") == 0) || (strcmp(paramType[paramsCount], "unsigned") == 0)) if ((strcmp(paramType[paramsCount], "const") == 0) || (strcmp(paramType[paramsCount], "unsigned") == 0))
{ {
sscanf(paramPtr[paramsCount], "%s %s %s\n", paramConst[paramsCount], paramType[paramsCount], paramName[paramsCount]); sscanf(paramPtr[paramsCount], "%s %s %s\n", paramConst[paramsCount], paramType[paramsCount], paramName[paramsCount]);
@ -130,17 +130,17 @@ int main(int argc, char *argv[])
paramsCount++; paramsCount++;
paramPtr[paramsCount] = strtok(NULL, ","); paramPtr[paramsCount] = strtok(NULL, ",");
} }
fprintf(rxmlFile, "%s</Overload>\n", paramsVoid ? "" : "\n "); fprintf(rxmlFile, "%s</Overload>\n", paramsVoid ? "" : "\n ");
fprintf(rxmlFile, " </KeyWord>\n"); fprintf(rxmlFile, " </KeyWord>\n");
count++; count++;
printf("Function processed %02i: %s\n", count, funcName); printf("Function processed %02i: %s\n", count, funcName);
memset(buffer, 0, MAX_BUFFER_SIZE); memset(buffer, 0, MAX_BUFFER_SIZE);
} }
} }
free(buffer); free(buffer);
fclose(rFile); fclose(rFile);
fclose(rxmlFile); fclose(rxmlFile);

View File

@ -2184,14 +2184,14 @@ void UpdateAudioStream(AudioStream stream, const void *data, int frameCount)
bool IsAudioStreamProcessed(AudioStream stream) bool IsAudioStreamProcessed(AudioStream stream)
{ {
bool result = false; bool result = false;
if (stream.buffer != NULL) if (stream.buffer != NULL)
{ {
ma_mutex_lock(&AUDIO.System.lock); ma_mutex_lock(&AUDIO.System.lock);
result = stream.buffer->isSubBufferProcessed[0] || stream.buffer->isSubBufferProcessed[1]; result = stream.buffer->isSubBufferProcessed[0] || stream.buffer->isSubBufferProcessed[1];
ma_mutex_unlock(&AUDIO.System.lock); ma_mutex_unlock(&AUDIO.System.lock);
} }
return result; return result;
} }
@ -2885,7 +2885,7 @@ static unsigned char *LoadFileData(const char *fileName, int *dataSize)
static bool SaveFileData(const char *fileName, void *data, int dataSize) static bool SaveFileData(const char *fileName, void *data, int dataSize)
{ {
bool result = true; bool result = true;
if (fileName != NULL) if (fileName != NULL)
{ {
FILE *file = fopen(fileName, "wb"); FILE *file = fopen(fileName, "wb");
@ -2919,7 +2919,7 @@ static bool SaveFileData(const char *fileName, void *data, int dataSize)
static bool SaveFileText(const char *fileName, char *text) static bool SaveFileText(const char *fileName, char *text)
{ {
bool result = true; bool result = true;
if (fileName != NULL) if (fileName != NULL)
{ {
FILE *file = fopen(fileName, "wt"); FILE *file = fopen(fileName, "wt");

View File

@ -2440,7 +2440,7 @@ bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2
float dx2 = (p1.x - (dotProduct*(dx))) - center.x; float dx2 = (p1.x - (dotProduct*(dx))) - center.x;
float dy2 = (p1.y - (dotProduct*(dy))) - center.y; float dy2 = (p1.y - (dotProduct*(dy))) - center.y;
float distanceSQ = ((dx2*dx2) + (dy2*dy2)); float distanceSQ = ((dx2*dx2) + (dy2*dy2));
if (distanceSQ <= radius*radius) collision = true; if (distanceSQ <= radius*radius) collision = true;
} }

View File

@ -1785,7 +1785,7 @@ char *TextReplace(const char *text, const char *search, const char *replacement)
// Count the number of replacements needed // Count the number of replacements needed
insertPoint = (char *)text; insertPoint = (char *)text;
for (count = 0; (tempPtr = strstr(insertPoint, search)); count++) insertPoint = tempPtr + searchLen; for (count = 0; (tempPtr = strstr(insertPoint, search)); count++) insertPoint = tempPtr + searchLen;
if ((textLen + count*(replaceLen - searchLen)) < (MAX_TEXT_BUFFER_LENGTH - 1)) if ((textLen + count*(replaceLen - searchLen)) < (MAX_TEXT_BUFFER_LENGTH - 1))
{ {
// TODO: Allow copying data replaced up to maximum buffer size and stop // TODO: Allow copying data replaced up to maximum buffer size and stop
@ -1971,7 +1971,7 @@ char *TextInsert(const char *text, const char *insert, int position)
{ {
int textLen = TextLength(text); int textLen = TextLength(text);
int insertLen = TextLength(insert); int insertLen = TextLength(insert);
if ((textLen + insertLen) < (MAX_TEXT_BUFFER_LENGTH - 1)) if ((textLen + insertLen) < (MAX_TEXT_BUFFER_LENGTH - 1))
{ {
// TODO: Allow copying data inserted up to maximum buffer size and stop // TODO: Allow copying data inserted up to maximum buffer size and stop

View File

@ -9,10 +9,10 @@
- struct AliasInfo - struct AliasInfo
- struct EnumInfo - struct EnumInfo
- struct FunctionInfo - struct FunctionInfo
WARNING: This parser is specifically designed to work with raylib.h, and has some contraints WARNING: This parser is specifically designed to work with raylib.h, and has some contraints
in that regards. Still, it can also work with other header files that follow same file structure in that regards. Still, it can also work with other header files that follow same file structure
conventions as raylib.h: rlgl.h, raymath.h, raygui.h, reasings.h conventions as raylib.h: rlgl.h, raymath.h, raygui.h, reasings.h
CONSTRAINTS: CONSTRAINTS:
This parser is specifically designed to work with raylib.h, so, it has some constraints: This parser is specifically designed to work with raylib.h, so, it has some constraints: