mirror of
https://github.com/libretro/RetroArch
synced 2025-04-17 20:43:10 +00:00
Rename STRING_REP_ULONG to STRING_REP_USIZE
This commit is contained in:
parent
9c89b3e546
commit
b97853a536
@ -2125,7 +2125,7 @@ static uint64_t frontend_unix_get_mem_total(void)
|
|||||||
|
|
||||||
while (fgets(line, sizeof(line), data))
|
while (fgets(line, sizeof(line), data))
|
||||||
{
|
{
|
||||||
if (sscanf(line, "MemTotal: " STRING_REP_ULONG " kB", (size_t*)&total) == 1)
|
if (sscanf(line, "MemTotal: " STRING_REP_USIZE " kB", (size_t*)&total) == 1)
|
||||||
{
|
{
|
||||||
fclose(data);
|
fclose(data);
|
||||||
total *= 1024;
|
total *= 1024;
|
||||||
@ -2150,13 +2150,13 @@ static uint64_t frontend_unix_get_mem_used(void)
|
|||||||
|
|
||||||
while (fgets(line, sizeof(line), data))
|
while (fgets(line, sizeof(line), data))
|
||||||
{
|
{
|
||||||
if (sscanf(line, "MemTotal: " STRING_REP_ULONG " kB", (size_t*)&total) == 1)
|
if (sscanf(line, "MemTotal: " STRING_REP_USIZE " kB", (size_t*)&total) == 1)
|
||||||
total *= 1024;
|
total *= 1024;
|
||||||
if (sscanf(line, "MemFree: " STRING_REP_ULONG " kB", (size_t*)&freemem) == 1)
|
if (sscanf(line, "MemFree: " STRING_REP_USIZE " kB", (size_t*)&freemem) == 1)
|
||||||
freemem *= 1024;
|
freemem *= 1024;
|
||||||
if (sscanf(line, "Buffers: " STRING_REP_ULONG " kB", (size_t*)&buffers) == 1)
|
if (sscanf(line, "Buffers: " STRING_REP_USIZE " kB", (size_t*)&buffers) == 1)
|
||||||
buffers *= 1024;
|
buffers *= 1024;
|
||||||
if (sscanf(line, "Cached: " STRING_REP_ULONG " kB", (size_t*)&cached) == 1)
|
if (sscanf(line, "Cached: " STRING_REP_USIZE " kB", (size_t*)&cached) == 1)
|
||||||
cached *= 1024;
|
cached *= 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include <compat/strl.h>
|
#include <compat/strl.h>
|
||||||
#include <retro_common_api.h>
|
#include <retro_common_api.h>
|
||||||
|
@ -78,15 +78,15 @@ typedef int ssize_t;
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define STRING_REP_INT64 "%I64u"
|
#define STRING_REP_INT64 "%I64u"
|
||||||
#define STRING_REP_UINT64 "%I64u"
|
#define STRING_REP_UINT64 "%I64u"
|
||||||
#define STRING_REP_ULONG "%Iu"
|
#define STRING_REP_USIZE "%Iu"
|
||||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA) && !defined(WIIU)
|
#elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA) && !defined(WIIU)
|
||||||
#define STRING_REP_INT64 "%llu"
|
#define STRING_REP_INT64 "%llu"
|
||||||
#define STRING_REP_UINT64 "%llu"
|
#define STRING_REP_UINT64 "%llu"
|
||||||
#define STRING_REP_ULONG "%zu"
|
#define STRING_REP_USIZE "%zu"
|
||||||
#else
|
#else
|
||||||
#define STRING_REP_INT64 "%llu"
|
#define STRING_REP_INT64 "%llu"
|
||||||
#define STRING_REP_UINT64 "%llu"
|
#define STRING_REP_UINT64 "%llu"
|
||||||
#define STRING_REP_ULONG "%lu"
|
#define STRING_REP_USIZE "%lu"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -523,10 +523,10 @@ static int httpserver_handle_get_mmap(struct mg_connection* conn, void* cbdata)
|
|||||||
mg_printf(conn, "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n");
|
mg_printf(conn, "HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n\r\n");
|
||||||
mg_printf(conn,
|
mg_printf(conn,
|
||||||
"{"
|
"{"
|
||||||
"\"start\":" STRING_REP_ULONG ","
|
"\"start\":" STRING_REP_USIZE ","
|
||||||
"\"length\":" STRING_REP_ULONG ","
|
"\"length\":" STRING_REP_USIZE ","
|
||||||
"\"compression\":\"deflate\","
|
"\"compression\":\"deflate\","
|
||||||
"\"compressedLength\":" STRING_REP_ULONG ","
|
"\"compressedLength\":" STRING_REP_USIZE ","
|
||||||
"\"encoding\":\"Z85\","
|
"\"encoding\":\"Z85\","
|
||||||
"\"data\":\"%s\""
|
"\"data\":\"%s\""
|
||||||
"}",
|
"}",
|
||||||
|
@ -217,14 +217,9 @@ static int task_database_iterate_start(database_info_handle_t *db,
|
|||||||
msg[0] = msg[510] = '\0';
|
msg[0] = msg[510] = '\0';
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg),
|
snprintf(msg, sizeof(msg),
|
||||||
STRING_REP_ULONG "/" STRING_REP_ULONG ": %s %s...\n",
|
STRING_REP_USIZE "/" STRING_REP_USIZE ": %s %s...\n",
|
||||||
#if defined(_WIN32) || defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L && !defined(VITA) &&!defined(WIIU)
|
(size_t)db->list_ptr,
|
||||||
db->list_ptr,
|
(size_t)db->list->size,
|
||||||
db->list->size,
|
|
||||||
#else
|
|
||||||
(unsigned long)db->list_ptr,
|
|
||||||
(unsigned long)db->list->size,
|
|
||||||
#endif
|
|
||||||
msg_hash_to_str(MSG_SCANNING),
|
msg_hash_to_str(MSG_SCANNING),
|
||||||
name);
|
name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user