X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=pdf%2Fgoo%2Fgfile.cc;h=b4fb616c0718553b0e69747d4f7256c98ff0afa6;hb=884f739665dc56e66f51e104350f2affd33f2dd8;hp=d6d2363e5134249d106ae815b8ebbaee477e30ac;hpb=2a393c134fe3fe8eb85bf818cb7ad6ae4396322a;p=evince.git diff --git a/pdf/goo/gfile.cc b/pdf/goo/gfile.cc index d6d2363e..b4fb616c 100644 --- a/pdf/goo/gfile.cc +++ b/pdf/goo/gfile.cc @@ -4,7 +4,7 @@ // // Miscellaneous file and directory name manipulation. // -// Copyright 1996-2002 Glyph & Cog, LLC +// Copyright 1996-2003 Glyph & Cog, LLC // //======================================================================== @@ -447,8 +447,6 @@ GBool openTempFile(GString **name, FILE **f, char *mode, char *ext) { #if defined(WIN32) //---------- Win32 ---------- char *s; - char buf[_MAX_PATH]; - char *fp; if (!(s = _tempnam(getenv("TEMP"), NULL))) { return gFalse; @@ -646,10 +644,8 @@ GDir::~GDir() { } GDirEntry *GDir::getNextEntry() { - struct dirent *ent; GDirEntry *e; - e = NULL; #if defined(WIN32) e = new GDirEntry(path->getCString(), ffd.cFileName, doStat); if (hnd && !FindNextFile(hnd, &ffd)) { @@ -658,24 +654,34 @@ GDirEntry *GDir::getNextEntry() { } #elif defined(ACORN) #elif defined(MACOS) -#else +#elif defined(VMS) + struct dirent *ent; + e = NULL; if (dir) { -#ifdef VMS if (needParent) { e = new GDirEntry(path->getCString(), "-", doStat); needParent = gFalse; return e; } -#endif ent = readdir(dir); -#ifndef VMS - if (ent && !strcmp(ent->d_name, ".")) + if (ent) { + e = new GDirEntry(path->getCString(), ent->d_name, doStat); + } + } +#else + struct dirent *ent; + e = NULL; + if (dir) { + ent = readdir(dir); + if (ent && !strcmp(ent->d_name, ".")) { ent = readdir(dir); -#endif - if (ent) + } + if (ent) { e = new GDirEntry(path->getCString(), ent->d_name, doStat); + } } #endif + return e; }