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