summaryrefslogtreecommitdiffhomepage
path: root/parser
diff options
context:
space:
mode:
authorRay <[email protected]>2023-09-29 00:28:03 +0200
committerRay <[email protected]>2023-09-29 00:28:03 +0200
commit411d0ee4371831a90082907f881eb34c87fb4c51 (patch)
tree639edc4f95e9d806170e188c7ac052b1f1994a85 /parser
parent8d5a90ea3c41119df3ee0b52630463ee55463876 (diff)
downloadraylib-411d0ee4371831a90082907f881eb34c87fb4c51.tar.gz
raylib-411d0ee4371831a90082907f881eb34c87fb4c51.zip
Update raylib_parser.c
Diffstat (limited to 'parser')
-rw-r--r--parser/raylib_parser.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/parser/raylib_parser.c b/parser/raylib_parser.c
index 94ff9562..e1ff3791 100644
--- a/parser/raylib_parser.c
+++ b/parser/raylib_parser.c
@@ -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