Version bump for last commit. Now at v2.0.16.
authorShamus Hammons <jlhamm@acm.org>
Sat, 4 Jul 2020 16:30:11 +0000 (11:30 -0500)
committerShamus Hammons <jlhamm@acm.org>
Sat, 4 Jul 2020 16:30:11 +0000 (11:30 -0500)
direct.c
version.h

index 9070a4165ea8d88e64978f3c10b360141ab3fdf5..e022398ca56d8b089bfcd16149097e84b3ca6b26 100644 (file)
--- a/direct.c
+++ b/direct.c
@@ -559,7 +559,7 @@ int d_noclear(void)
 
 
 //
-// Include binary file
+// Include binary file (can add addition size & position params, comma separated)
 //
 int d_incbin(void)
 {
@@ -586,6 +586,7 @@ int d_incbin(void)
        // failed) try list of include files passed in the enviroment string or by
        // the "-d" option.
        TOKEN filename = tok[1];
+
        if ((fd = open(string[filename], _OPEN_INC)) < 0)
        {
                for(i=0; nthpath("RMACPATH", i, buf1)!=0; i++)
@@ -608,6 +609,7 @@ int d_incbin(void)
 allright:
 
        tok += 2;
+
        if (*tok != EOL)
        {
                // Check size parameter (can be omitted)
@@ -637,6 +639,7 @@ allright:
                                                close(fd);
                                                return ERROR;
                                        }
+
                                        lseek(fd, pos, SEEK_SET);
                                        size -= pos;
                                }
@@ -658,6 +661,7 @@ allright:
                size = lseek(fd, 0L, SEEK_END);
                pos = lseek(fd, 0L, SEEK_SET);
        }
+
        chcheck(size);
 
        DEBUG { printf("INCBIN: File '%s' is %li bytes.\n", string[filename], size); }
index 084a0715fa2f94ba6ebf1f346fa0ff627208d556..452a86500e715c3619be9da314469def7505b511 100644 (file)
--- a/version.h
+++ b/version.h
@@ -15,7 +15,7 @@
 
 #define MAJOR   2              // Major version number
 #define MINOR   0              // Minor version number
-#define PATCH   15             // Patch release number
+#define PATCH   16             // Patch release number
 
 #endif // __VERSION_H__