Save/Load: Fixed backspace, limit 255 characters, various fixes for long filenames,

(linux) drive '~' uses $HOME environment variable.
Fixed some more struct packing issues (ex: GIF saving)

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@163 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2008-09-25 16:37:50 +00:00
parent 2a66650568
commit ca8be4e399
7 changed files with 86 additions and 43 deletions

13
init.c
View File

@@ -140,6 +140,19 @@ void Rechercher_drives(void)
// Renvoie 0 si ok, -1 si problème.
int ActiverLecteur(int NumeroLecteur)
{
// Cas particulier du lecteur ~
if (Drive[NumeroLecteur].Lettre == '~')
{
char * Home = getenv("HOME");
if (! Home)
return -1;
#ifdef __linux__
return chdir(Home);
#else
return ! SetCurrentDirectory(Home);
#endif
}
#ifdef __linux__
char NomLecteur[]=" ";
NomLecteur[0]=Drive[NumeroLecteur].Lettre;