atari/mint fixed gcc warnings, compilation fix
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2037 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
62c3d09569
commit
390ad46b96
@ -360,6 +360,15 @@ void Read_list_of_files(T_Fileselector *list, byte selected_format)
|
||||
char * filter = "*"; // Extension demandée
|
||||
struct stat Infos_enreg;
|
||||
char * current_path;
|
||||
#if defined (__MINT__)
|
||||
char path[1024]={0};
|
||||
char path2[1024]={0};
|
||||
char currentDrive=0;
|
||||
T_Fileselector_item *item=0;
|
||||
bool bFound=false;
|
||||
path[0]='\0';
|
||||
path2[0]='\0';
|
||||
#endif
|
||||
|
||||
// Tout d'abord, on déduit du format demandé un filtre à utiliser:
|
||||
filter = Get_fileformat(selected_format)->Extensions;
|
||||
@ -371,12 +380,7 @@ void Read_list_of_files(T_Fileselector *list, byte selected_format)
|
||||
// On lit tous les répertoires:
|
||||
|
||||
#if defined (__MINT__)
|
||||
static char path[1024];
|
||||
static char path2[1024];
|
||||
path[0]='\0';
|
||||
path2[0]='\0';
|
||||
|
||||
char currentDrive='A';
|
||||
currentDrive='A';
|
||||
currentDrive=currentDrive+Dgetdrv();
|
||||
|
||||
Dgetpath(path,0);
|
||||
@ -472,12 +476,11 @@ void Read_list_of_files(T_Fileselector *list, byte selected_format)
|
||||
}
|
||||
|
||||
#elif defined (__MINT__)
|
||||
T_Fileselector_item *item=NULL;
|
||||
// check if ".." exists if not add it
|
||||
// FreeMinT lists ".." already, but this is not so for TOS
|
||||
// simply adding it will cause double PARENT_DIR under FreeMiNT
|
||||
|
||||
bool bFound= false;
|
||||
bFound= false;
|
||||
|
||||
for (item = list->First; (((item != NULL) && (bFound==false))); item = item->Next){
|
||||
if (item->Type == 1){
|
||||
@ -538,6 +541,12 @@ void bstrtostr( BSTR in, STRPTR out, TEXT max )
|
||||
// -- Lecture d'une liste de lecteurs / volumes -----------------------------
|
||||
void Read_list_of_drives(T_Fileselector *list, byte name_length)
|
||||
{
|
||||
#if defined(__MINT__)
|
||||
char drive_name[]="A:\\";
|
||||
unsigned long drive_bits=0;
|
||||
int drive_index=0;
|
||||
int bit_index=0;
|
||||
#endif
|
||||
|
||||
// Empty the current content of fileselector:
|
||||
Free_fileselector_list(list);
|
||||
@ -608,11 +617,8 @@ void Read_list_of_drives(T_Fileselector *list, byte name_length)
|
||||
}
|
||||
}
|
||||
#elif defined(__MINT__)
|
||||
char drive_name[]="A:\\";
|
||||
unsigned long drive_bits = Drvmap(); //get drive map bitfield
|
||||
int drive_index;
|
||||
int bit_index;
|
||||
drive_index = 0;
|
||||
drive_bits = Drvmap(); //get drive map bitfield
|
||||
|
||||
for (bit_index=0; bit_index<32; bit_index++)
|
||||
{
|
||||
if ( (1 << bit_index) & drive_bits )
|
||||
|
||||
16
src/help.c
16
src/help.c
@ -692,6 +692,11 @@ void Button_Stats(void)
|
||||
unsigned long long freeRam;
|
||||
qword mem_size = 0;
|
||||
int y;
|
||||
#if defined (__MINT__)
|
||||
_DISKINFO drvInfo;
|
||||
unsigned long STRAM=0,TTRAM=0;
|
||||
char helpBuf[64]={0};
|
||||
#endif
|
||||
|
||||
Open_window(310,174,"Statistics");
|
||||
|
||||
@ -718,9 +723,8 @@ void Button_Stats(void)
|
||||
#if defined (__MINT__)
|
||||
// Display free TT/ST RAM
|
||||
freeRam=0;
|
||||
char helpBuf[64];
|
||||
|
||||
unsigned long STRAM,TTRAM;
|
||||
|
||||
Atari_Memory_free(&STRAM,&TTRAM);
|
||||
freeRam=STRAM+TTRAM;
|
||||
buffer[0]='\0';
|
||||
@ -734,7 +738,7 @@ void Button_Stats(void)
|
||||
|
||||
strncat(buffer,helpBuf,sizeof(char)*37);
|
||||
|
||||
if(TTRAM > (100ULL*1024*1024*1024))
|
||||
if(TTRAM > (100UL*1024UL*1024UL*1024UL))
|
||||
sprintf(helpBuf,"TT:%u Gb",(unsigned int)(TTRAM/(1024*1024*1024)));
|
||||
else if(TTRAM > (100*1024*1024))
|
||||
sprintf(helpBuf,"TT:%u Mb",(unsigned int)(TTRAM/(1024*1024)));
|
||||
@ -799,17 +803,15 @@ void Button_Stats(void)
|
||||
mem_size=(qword) disk_info.f_bfree * (qword) disk_info.f_bsize;
|
||||
}
|
||||
#elif defined(__HAIKU__)
|
||||
mem_size = haiku_get_free_space(Main_selector.Directory);
|
||||
mem_size = haiku_get_free_space(Main_selector.Directory);
|
||||
#elif defined (__MINT__)
|
||||
_DISKINFO drvInfo;
|
||||
mem_size=0;
|
||||
Dfree(&drvInfo,0);
|
||||
//number of free clusters*sectors per cluster*bytes per sector;
|
||||
// reports current drive
|
||||
mem_size=drvInfo.b_free*drvInfo.b_clsiz*drvInfo.b_secsiz;
|
||||
|
||||
#else
|
||||
#define NODISKSPACESUPPORT
|
||||
#define NODISKSPACESUPPORT
|
||||
// Free disk space is only for shows. Other platforms can display 0.
|
||||
#warning "Missing code for your platform !!! Check and correct please :)"
|
||||
mem_size=0;
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#if defined(__AROS__) || defined(__linux__) || defined(__GLIBC__)
|
||||
#if defined(__AROS__) || defined(__linux__) || defined(__GLIBC__)|| defined(__MINT__)
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user