test/test_physfs.c
changeset 182 a47c39af46ad
parent 170 d826bf2c38c8
child 191 0b95b9fd25e3
equal deleted inserted replaced
181:b430920f6bd4 182:a47c39af46ad
   506     {
   506     {
   507         size_t bw = strlen(WRITESTR);
   507         size_t bw = strlen(WRITESTR);
   508         PHYSFS_sint64 rc = PHYSFS_write(f, WRITESTR, 1, bw);
   508         PHYSFS_sint64 rc = PHYSFS_write(f, WRITESTR, 1, bw);
   509         if (rc != bw)
   509         if (rc != bw)
   510         {
   510         {
   511             printf("Wrote (%d) of (%d) bytes. Reason: [%s].\n", rc, bw,
   511             printf("Wrote (%d) of (%d) bytes. Reason: [%s].\n",
   512                    PHYSFS_getLastError());
   512                    (int) rc, (int) bw, PHYSFS_getLastError());
   513         } /* if */
   513         } /* if */
   514         else
   514         else
   515         {
   515         {
   516             printf("Successful.\n");
   516             printf("Successful.\n");
   517         } /* else */
   517         } /* else */
   540     {
   540     {
   541         size_t bw = strlen(WRITESTR);
   541         size_t bw = strlen(WRITESTR);
   542         PHYSFS_sint64 rc = PHYSFS_write(f, WRITESTR, 1, bw);
   542         PHYSFS_sint64 rc = PHYSFS_write(f, WRITESTR, 1, bw);
   543         if (rc != bw)
   543         if (rc != bw)
   544         {
   544         {
   545             printf("Wrote (%d) of (%d) bytes. Reason: [%s].\n", rc, bw,
   545             printf("Wrote (%d) of (%d) bytes. Reason: [%s].\n",
   546                    PHYSFS_getLastError());
   546                    (int) rc, (int) bw, PHYSFS_getLastError());
   547         } /* if */
   547         } /* if */
   548         else
   548         else
   549         {
   549         {
   550             printf("Successful.\n");
   550             printf("Successful.\n");
   551         } /* else */
   551         } /* else */