more code cleanup to prepare translation
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@676 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
103
init.c
103
init.c
@@ -74,110 +74,7 @@
|
||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
||||
void bstrtostr( BSTR in, STRPTR out, TEXT max );
|
||||
#endif
|
||||
/*
|
||||
void Rechercher_drives(void)
|
||||
{
|
||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
||||
struct DosList *dl;
|
||||
char tmp[256];
|
||||
|
||||
dl = LockDosList( LDF_VOLUMES | LDF_READ );
|
||||
if( dl )
|
||||
{
|
||||
while( ( dl = NextDosEntry( dl, LDF_VOLUMES | LDF_READ ) ) )
|
||||
{
|
||||
bstrtostr( dl->dol_Name, tmp, 254 );
|
||||
strcat( tmp, ":" );
|
||||
Ajouter_lecteur(':',LECTEUR_HDD,tmp);
|
||||
}
|
||||
UnLockDosList( LDF_VOLUMES | LDF_READ );
|
||||
}
|
||||
|
||||
#elif defined (__WIN32__)
|
||||
|
||||
char NomLecteur[]="A:\\";
|
||||
int DriveBits = GetLogicalDrives();
|
||||
int IndiceLecteur;
|
||||
int IndiceBit;
|
||||
// Sous Windows, on a la totale, presque aussi bien que sous DOS:
|
||||
IndiceLecteur = 0;
|
||||
for (IndiceBit=0; IndiceBit<26 && IndiceLecteur<23; IndiceBit++)
|
||||
{
|
||||
if ( (1 << IndiceBit) & DriveBits )
|
||||
{
|
||||
// On a ce lecteur, il faut maintenant déterminer son type "physique".
|
||||
// pour profiter des jolies icones de X-man.
|
||||
int TypeLecteur;
|
||||
char CheminLecteur[]="A:\\";
|
||||
// Cette API Windows est étrange, je dois m'y faire...
|
||||
CheminLecteur[0]='A'+IndiceBit;
|
||||
switch (GetDriveType(CheminLecteur))
|
||||
{
|
||||
case DRIVE_CDROM:
|
||||
TypeLecteur=LECTEUR_CDROM;
|
||||
break;
|
||||
case DRIVE_REMOTE:
|
||||
TypeLecteur=LECTEUR_NETWORK;
|
||||
break;
|
||||
case DRIVE_REMOVABLE:
|
||||
TypeLecteur=LECTEUR_FLOPPY_3_5;
|
||||
break;
|
||||
case DRIVE_FIXED:
|
||||
TypeLecteur=LECTEUR_HDD;
|
||||
break;
|
||||
default:
|
||||
TypeLecteur=LECTEUR_NETWORK;
|
||||
break;
|
||||
}
|
||||
NomLecteur[0]='A'+IndiceBit;
|
||||
Ajouter_lecteur(NomLecteur[0], TypeLecteur,NomLecteur);
|
||||
IndiceLecteur++;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
//Sous les différents unix, on va mettre
|
||||
// un disque dur qui pointera vers la racine,
|
||||
// et un autre vers le home directory de l'utilisateur.
|
||||
|
||||
// Ensuite on utilise read_file_system_list pour compléter
|
||||
|
||||
struct mount_entry* Liste_points_montage;
|
||||
struct mount_entry* next;
|
||||
char lettre = 'A';
|
||||
|
||||
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
char * Home = getenv("$HOME");
|
||||
#else
|
||||
char * Home = getenv("HOME");
|
||||
#endif
|
||||
Ajouter_lecteur('/', LECTEUR_HDD, "/");
|
||||
if(Home)
|
||||
Ajouter_lecteur('~', LECTEUR_HDD, Home);
|
||||
|
||||
Liste_points_montage = read_file_system_list(false);
|
||||
|
||||
while(Liste_points_montage != NULL)
|
||||
{
|
||||
if(Liste_points_montage->me_dummy == 0 && strcmp(Liste_points_montage->me_mountdir,"/") && strcmp(Liste_points_montage->me_mountdir,"/home"))
|
||||
{
|
||||
Ajouter_lecteur(lettre++,
|
||||
Liste_points_montage->me_remote==1?LECTEUR_NETWORK:LECTEUR_HDD,
|
||||
Liste_points_montage->me_mountdir);
|
||||
}
|
||||
next = Liste_points_montage -> me_next;
|
||||
#if !(defined(__macosx__) || defined(__FreeBSD__))
|
||||
free(Liste_points_montage -> me_type);
|
||||
#endif
|
||||
free(Liste_points_montage -> me_devname);
|
||||
free(Liste_points_montage -> me_mountdir);
|
||||
free(Liste_points_montage);
|
||||
Liste_points_montage = next;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
*/
|
||||
// Fonctions de lecture dans la skin de l'interface graphique
|
||||
void Chercher_bas(SDL_Surface *GUI, int *Debut_X, int *Debut_Y, byte Couleur_neutre,char * Section)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user