Update raylib_parser.c

This commit is contained in:
Ray 2023-09-29 00:28:03 +02:00
parent 8d5a90ea3c
commit 411d0ee437

View file

@ -169,10 +169,12 @@ static FunctionInfo *funcs = NULL;
// Command line variables
static char apiDefine[32] = { 0 }; // Functions define (i.e. RLAPI for raylib.h, RMDEF for raymath.h, etc.)
static char truncAfter[32] = { 0 }; // Truncate marker (i.e. "RLGL IMPLEMENTATION" for rlgl.h)
static char inFileName[512] = { 0 }; // Input file name (required in case of provided through CLI)
static char outFileName[512] = { 0 }; // Output file name (required for file save/export)
static int outputFormat = DEFAULT;
// NOTE: Max length depends on OS, in Windows MAX_PATH = 256
static char inFileName[512] = { 0 }; // Input file name (required in case of drag & drop over executable)
static char outFileName[512] = { 0 }; // Output file name (required for file save/export)
//----------------------------------------------------------------------------------
// Module Functions Declaration
//----------------------------------------------------------------------------------
@ -499,7 +501,7 @@ int main(int argc, char* argv[])
(ch == '/') ||
(ch == ' ') ||
(ch == '\t')) continue;
// Read number operand
else if (isdigit(ch))
{
@ -534,7 +536,7 @@ int main(int argc, char* argv[])
int numberType;
if (isFloat) numberType = valuePtr[c - 1] == 'f' ? FLOAT_MATH : DOUBLE_MATH;
else numberType = valuePtr[c - 1] == 'L' ? LONG_MATH : INT_MATH;
if (numberType > largestType) largestType = numberType;
}
else
@ -654,7 +656,7 @@ int main(int argc, char* argv[])
{
if (structs[i].fieldName[originalIndex][c] == ',') additionalFields++;
}
if (additionalFields > 0)
{
int originalLength = -1;
@ -702,7 +704,7 @@ int main(int argc, char* argv[])
{
if (structs[i].fieldType[originalIndex][c] == ',') additionalFields++;
}
if (additionalFields > 0)
{
// Copy original name to last additional field