-// gdcmDirList.cxx
-//-----------------------------------------------------------------------------
+/*=========================================================================
+
+ Program: gdcm
+ Module: $RCSfile: gdcmDirList.cxx,v $
+ Language: C++
+ Date: $Date: 2004/06/20 18:08:47 $
+ Version: $Revision: 1.16 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+
#include "gdcmDirList.h"
#include "gdcmUtil.h"
}
#else
- // None of these functions is in POSIX. The functions scandir() and
- // alphasort() are from BSD 4.3, and have been available under Linux since
- // libc4. Libc4 and libc5 use the more precise prototype
-
struct dirent **namelist;
int n=scandir(dirName.c_str(), &namelist, 0, alphasort);
- //if n < 0 should raise error
-
for (int i= 0;i < n; i++)
{
fileName=namelist[i]->d_name;
{
this->push_back(dirName+fileName);
}
- free(namelist[i]);
}
- free(namelist);
#endif
}