summaryrefslogtreecommitdiff
path: root/source/ui_demos.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-04-02 23:03:09 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-04-02 23:03:09 +0000
commit7ec50f12252b4dfb97f3249ccf05a771b98785c1 (patch)
tree279e4e8bd7b940368331a43869c165de9637ae99 /source/ui_demos.c
parent80e48417564f1ce50a39a7c552ad95e651362c1f (diff)
Use size_t instead of int where possible.
Added initial support for Win64 port.
Diffstat (limited to 'source/ui_demos.c')
-rw-r--r--source/ui_demos.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/ui_demos.c b/source/ui_demos.c
index f9b2065..e6905f9 100644
--- a/source/ui_demos.c
+++ b/source/ui_demos.c
@@ -87,9 +87,9 @@ static void Demos_BuildName( fsFileInfo_t *info, char **cache ) {
if( info->size >= 1000000 ) {
sprintf( buffer, "%2.1fM", ( float )info->size / 1000000 );
} else if( info->size >= 1000 ) {
- sprintf( buffer, "%3dK", info->size / 1000 );
+ sprintf( buffer, "%3"PRIz"K", info->size / 1000 );
} else {
- sprintf( buffer, "%3db", info->size );
+ sprintf( buffer, "%3"PRIz"b", info->size );
}
e = UI_FormatColumns( DEMO_EXTRASIZE,
@@ -114,7 +114,8 @@ static void Demos_BuildDir( const char *name, int type ) {
static char *Demos_LoadCache( void **list ) {
char buffer[MAX_OSPATH], *cache;
- int i, len;
+ int i;
+ size_t len;
uint8_t hash[16];
Q_concat( buffer, sizeof( buffer ), uis.m_demos_browse, "/" COM_DEMOCACHE_NAME, NULL );
@@ -182,7 +183,7 @@ static void Demos_WriteCache( void ) {
static void Demos_CalcHash( void **list ) {
struct mdfour md;
fsFileInfo_t *info;
- int len;
+ size_t len;
mdfour_begin( &md );
while( *list ) {
@@ -315,7 +316,7 @@ static void Demos_LeaveDirectory( void ) {
static int Demos_Action( void ) {
// char buffer[MAX_OSPTH];
- int len, baselen;
+ size_t len, baselen;
demoEntry_t *e = m_demos.list.items[m_demos.list.curvalue];
switch( e->type ) {