Revert to last working version of libretro-db

This commit is contained in:
twinaphex 2015-09-17 06:12:57 +02:00
parent d65cc5fd2f
commit b32b17f4ae
11 changed files with 807 additions and 888 deletions

View file

@ -162,17 +162,42 @@ static struct rmsgpack_read_callbacks stub_callbacks = {
int main(void)
{
FILE *fp;
int fd;
/*
int fd = open("test.msgpack", O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
int rv = 0;
if (fd == -1)
{
printf("Could not open file: %s", strerror(errno));
return errno;
}
rmsgpack_write_map_header(fd, 2);
rmsgpack_write_string(fd, "compact", strlen("compact"));
rmsgpack_write_bool(fd, 1);
rmsgpack_write_string(fd, "schema", strlen("schema"));
rmsgpack_write_array_header(fd, 10);
rmsgpack_write_string(fd, "schema", strlen("schema"));
rmsgpack_write_uint(fd, 1<<17);
rmsgpack_write_int(fd, (1<<17) + 1);
rmsgpack_write_int(fd, 4);
rmsgpack_write_int(fd, -3);
rmsgpack_write_int(fd, -22);
rmsgpack_write_int(fd, -35);
rmsgpack_write_int(fd, -421421412);
rmsgpack_write_int(fd, 4214);
rmsgpack_write_int(fd, -4214);
rmsgpack_write_uint(fd, 1<<17);
close(fd);
*/
struct stub_state state;
state.i = 0;
state.stack[0] = 0;
fp = fopen("test.msgpack", "rb");
rmsgpack_read(fp, &stub_callbacks, &state);
fd = open("test.msgpack", O_RDONLY);
rmsgpack_read(fd, &stub_callbacks, &state);
printf("\n");
fclose(fp);
close(fd);
return 0;
}