|
|
@ -1,5 +1,5 @@ |
|
|
|
//
|
|
|
|
//
|
|
|
|
// "$Id: Fl_File_Icon.cxx,v 1.1.2.12 2002/05/25 13:38:24 easysw Exp $"
|
|
|
|
// "$Id: Fl_File_Icon.cxx,v 1.1.2.13 2002/06/13 18:18:33 easysw Exp $"
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Fl_File_Icon routines.
|
|
|
|
// Fl_File_Icon routines.
|
|
|
|
//
|
|
|
|
//
|
|
|
@ -190,24 +190,35 @@ Fl_File_Icon::find(const char *filename,// I - Name of file */ |
|
|
|
|
|
|
|
|
|
|
|
// Get file information if needed...
|
|
|
|
// Get file information if needed...
|
|
|
|
if (filetype == ANY) |
|
|
|
if (filetype == ANY) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
#ifdef WIN32 |
|
|
|
|
|
|
|
if (fl_filename_isdir(filename)) |
|
|
|
|
|
|
|
filetype = DIRECTORY; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
filetype = PLAIN; |
|
|
|
|
|
|
|
#else |
|
|
|
if (!stat(filename, &fileinfo)) |
|
|
|
if (!stat(filename, &fileinfo)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (S_ISDIR(fileinfo.st_mode)) |
|
|
|
if (S_ISDIR(fileinfo.st_mode)) |
|
|
|
filetype = DIRECTORY; |
|
|
|
filetype = DIRECTORY; |
|
|
|
#ifdef S_IFIFO |
|
|
|
# ifdef S_IFIFO |
|
|
|
else if (S_ISFIFO(fileinfo.st_mode)) |
|
|
|
else if (S_ISFIFO(fileinfo.st_mode)) |
|
|
|
filetype = FIFO; |
|
|
|
filetype = FIFO; |
|
|
|
#endif // S_IFIFO
|
|
|
|
# endif // S_IFIFO
|
|
|
|
#if defined(S_ICHR) && defined(S_IBLK) |
|
|
|
# if defined(S_ICHR) && defined(S_IBLK) |
|
|
|
else if (S_ISCHR(fileinfo.st_mode) || S_ISBLK(fileinfo.st_mode)) |
|
|
|
else if (S_ISCHR(fileinfo.st_mode) || S_ISBLK(fileinfo.st_mode)) |
|
|
|
filetype = DEVICE; |
|
|
|
filetype = DEVICE; |
|
|
|
#endif // S_ICHR && S_IBLK
|
|
|
|
# endif // S_ICHR && S_IBLK
|
|
|
|
#ifdef S_ILNK |
|
|
|
# ifdef S_ILNK |
|
|
|
else if (S_ISLNK(fileinfo.st_mode)) |
|
|
|
else if (S_ISLNK(fileinfo.st_mode)) |
|
|
|
filetype = LINK; |
|
|
|
filetype = LINK; |
|
|
|
#endif // S_ILNK
|
|
|
|
# endif // S_ILNK
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
filetype = PLAIN; |
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
filetype = PLAIN; |
|
|
|
filetype = PLAIN; |
|
|
|
|
|
|
|
#endif // WIN32
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Look at the base name in the filename
|
|
|
|
// Look at the base name in the filename
|
|
|
@ -464,5 +475,5 @@ Fl_File_Icon::labeltype(const Fl_Label *o, // I - Label data |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.12 2002/05/25 13:38:24 easysw Exp $".
|
|
|
|
// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.13 2002/06/13 18:18:33 easysw Exp $".
|
|
|
|
//
|
|
|
|
//
|
|
|
|