SDL: test: patched to compile.

From 83559503c47e863237899990a58e2b71d3e57e0b Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 14 Dec 2022 23:24:56 -0500
Subject: [PATCH] test: patched to compile.

---
 test/testfile.c | 66 ++++++++++++++++++++++++-------------------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/test/testfile.c b/test/testfile.c
index 07da6e64b47d..ffef041b54fc 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -139,19 +139,19 @@ int main(int argc, char *argv[])
     if (rwops == NULL) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (1 != rwops->write(rwops, "1234567890", 10, 1)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (10 != rwops->write(rwops, "1234567890", 1, 10)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->write(rwops, "1234567", 1, 7)) {
+    if (7 != rwops->write(rwops, "1234567", 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (0 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops); /* we are in write only mode */
     }
 
@@ -167,28 +167,28 @@ int main(int argc, char *argv[])
     if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->read(rwops, test_buf, 1, 7)) {
+    if (7 != rwops->read(rwops, test_buf, 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (0 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 10, 100)) {
+    if (0 != rwops->read(rwops, test_buf, 1000)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (2 != rwops->read(rwops, test_buf, 10, 3)) {
+    if (2 != rwops->read(rwops, test_buf, 30)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->write(rwops, test_buf, 1, 1)) {
+    if (0 != rwops->write(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops); /* readonly mode */
     }
 
@@ -199,19 +199,19 @@ int main(int argc, char *argv[])
     if (rwops == NULL) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (1 != rwops->write(rwops, "1234567890", 10, 1)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (10 != rwops->write(rwops, "1234567890", 1, 10)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->write(rwops, "1234567", 1, 7)) {
+    if (7 != rwops->write(rwops, "1234567", 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (1 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (1 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops); /* we are in read/write mode */
     }
 
@@ -221,22 +221,22 @@ int main(int argc, char *argv[])
     if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->read(rwops, test_buf, 1, 7)) {
+    if (7 != rwops->read(rwops, test_buf, 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (0 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 10, 100)) {
+    if (0 != rwops->read(rwops, test_buf, 1000)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (2 != rwops->read(rwops, test_buf, 10, 3)) {
+    if (2 != rwops->read(rwops, test_buf, 30)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) {
@@ -250,19 +250,19 @@ int main(int argc, char *argv[])
     if (rwops == NULL) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (1 != rwops->write(rwops, "1234567890", 10, 1)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (10 != rwops->write(rwops, "1234567890", 1, 10)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->write(rwops, "1234567", 1, 7)) {
+    if (7 != rwops->write(rwops, "1234567", 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (1 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (1 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops); /* we are in read/write mode */
     }
 
@@ -272,22 +272,22 @@ int main(int argc, char *argv[])
     if (20 != rwops->seek(rwops, -7, RW_SEEK_END)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->read(rwops, test_buf, 1, 7)) {
+    if (7 != rwops->read(rwops, test_buf, 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (0 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 10, 100)) {
+    if (0 != rwops->read(rwops, test_buf, 1000)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, -27, RW_SEEK_CUR)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (2 != rwops->read(rwops, test_buf, 10, 3)) {
+    if (2 != rwops->read(rwops, test_buf, 30)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) {
@@ -301,20 +301,20 @@ int main(int argc, char *argv[])
     if (rwops == NULL) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (1 != rwops->write(rwops, "1234567890", 10, 1)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (10 != rwops->write(rwops, "1234567890", 1, 10)) {
+    if (10 != rwops->write(rwops, "1234567890", 10)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->write(rwops, "1234567", 1, 7)) {
+    if (7 != rwops->write(rwops, "1234567", 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) {
         RWOP_ERR_QUIT(rwops);
     }
 
-    if (1 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (1 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) {
@@ -324,16 +324,16 @@ int main(int argc, char *argv[])
     if (20 + 27 != rwops->seek(rwops, -7, RW_SEEK_END)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (7 != rwops->read(rwops, test_buf, 1, 7)) {
+    if (7 != rwops->read(rwops, test_buf, 7)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 1, 1)) {
+    if (0 != rwops->read(rwops, test_buf, 1)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (0 != rwops->read(rwops, test_buf, 10, 100)) {
+    if (0 != rwops->read(rwops, test_buf, 1000)) {
         RWOP_ERR_QUIT(rwops);
     }
 
@@ -344,7 +344,7 @@ int main(int argc, char *argv[])
     if (0 != rwops->seek(rwops, 0L, RW_SEEK_SET)) {
         RWOP_ERR_QUIT(rwops);
     }
-    if (3 != rwops->read(rwops, test_buf, 10, 3)) {
+    if (3 != rwops->read(rwops, test_buf, 30)) {
         RWOP_ERR_QUIT(rwops);
     }
     if (SDL_memcmp(test_buf, "123456789012345678901234567123", 30) != 0) {