mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01:00
rwops: Rename everything from SDL_RWxxx to SDL_XxxRW.
This commit is contained in:
100
test/testfile.c
100
test/testfile.c
@@ -155,19 +155,19 @@ int main(int argc, char *argv[])
|
||||
if (!rwops) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWwrite(rwops, "1234567", 7)) {
|
||||
if (7 != SDL_WriteRW(rwops, "1234567", 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops); /* we are in write only mode */
|
||||
}
|
||||
|
||||
@@ -177,34 +177,34 @@ int main(int argc, char *argv[])
|
||||
if (!rwops) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (20 != SDL_RWseek(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
if (20 != SDL_SeekRW(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWread(rwops, test_buf, 7)) {
|
||||
if (7 != SDL_ReadRW(rwops, test_buf, 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1000)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1000)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
if (0 != SDL_SeekRW(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (27 != SDL_RWread(rwops, test_buf, 30)) {
|
||||
if (27 != SDL_ReadRW(rwops, test_buf, 30)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWwrite(rwops, test_buf, 1)) {
|
||||
if (0 != SDL_WriteRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops); /* readonly mode */
|
||||
}
|
||||
|
||||
@@ -215,44 +215,44 @@ int main(int argc, char *argv[])
|
||||
if (!rwops) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWwrite(rwops, "1234567", 7)) {
|
||||
if (7 != SDL_WriteRW(rwops, "1234567", 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (1 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (1 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops); /* we are in read/write mode */
|
||||
}
|
||||
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (20 != SDL_RWseek(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
if (20 != SDL_SeekRW(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWread(rwops, test_buf, 7)) {
|
||||
if (7 != SDL_ReadRW(rwops, test_buf, 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1000)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1000)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
if (0 != SDL_SeekRW(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (27 != SDL_RWread(rwops, test_buf, 30)) {
|
||||
if (27 != SDL_ReadRW(rwops, test_buf, 30)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) {
|
||||
@@ -266,44 +266,44 @@ int main(int argc, char *argv[])
|
||||
if (!rwops) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWwrite(rwops, "1234567", 7)) {
|
||||
if (7 != SDL_WriteRW(rwops, "1234567", 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (1 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (1 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops); /* we are in read/write mode */
|
||||
}
|
||||
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (20 != SDL_RWseek(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
if (20 != SDL_SeekRW(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWread(rwops, test_buf, 7)) {
|
||||
if (7 != SDL_ReadRW(rwops, test_buf, 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1000)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1000)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
if (0 != SDL_SeekRW(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (27 != SDL_RWread(rwops, test_buf, 30)) {
|
||||
if (27 != SDL_ReadRW(rwops, test_buf, 30)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "12345678901234567890", 20) != 0) {
|
||||
@@ -317,50 +317,50 @@ int main(int argc, char *argv[])
|
||||
if (!rwops) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (10 != SDL_RWwrite(rwops, "1234567890", 10)) {
|
||||
if (10 != SDL_WriteRW(rwops, "1234567890", 10)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWwrite(rwops, "1234567", 7)) {
|
||||
if (7 != SDL_WriteRW(rwops, "1234567", 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
|
||||
if (1 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (1 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
|
||||
if (20 + 27 != SDL_RWseek(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
if (20 + 27 != SDL_SeekRW(rwops, -7, SDL_RW_SEEK_END)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (7 != SDL_RWread(rwops, test_buf, 7)) {
|
||||
if (7 != SDL_ReadRW(rwops, test_buf, 7)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "1234567", 7) != 0) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (0 != SDL_RWread(rwops, test_buf, 1000)) {
|
||||
if (0 != SDL_ReadRW(rwops, test_buf, 1000)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
|
||||
if (27 != SDL_RWseek(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
if (27 != SDL_SeekRW(rwops, -27, SDL_RW_SEEK_CUR)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
|
||||
if (0 != SDL_RWseek(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
if (0 != SDL_SeekRW(rwops, 0L, SDL_RW_SEEK_SET)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (30 != SDL_RWread(rwops, test_buf, 30)) {
|
||||
if (30 != SDL_ReadRW(rwops, test_buf, 30)) {
|
||||
RWOP_ERR_QUIT(rwops);
|
||||
}
|
||||
if (SDL_memcmp(test_buf, "123456789012345678901234567123", 30) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user