<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -19,6 +19,7 @@
 // Copyright (C) 2006 Kristian H&#248;gsberg &lt;krh@redhat.com&gt;
 // Copyright (C) 2008 Adam Batkin &lt;adam@batkin.net&gt;
 // Copyright (C) 2008 Hib Eris &lt;hib@hiberis.nl&gt;
+// Copyright (C) 2009 Albert Astals Cid &lt;aacid@kde.org&gt;
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -456,7 +457,7 @@ time_t getModTime(char *fileName) {
 #endif
 }
 
-GBool openTempFile(GooString **name, FILE **f, char *mode, char *ext) {
+GBool openTempFile(GooString **name, FILE **f, char *mode) {
 #if defined(WIN32)
   //---------- Win32 ----------
   char *tempDir;
@@ -479,9 +480,6 @@ GBool openTempFile(GooString **name, FILE **f, char *mode, char *ext) {
   for (i = 0; i &lt; 1000; ++i) {
     sprintf(buf, &quot;%d&quot;, t + i);
     s2 = s-&gt;copy()-&gt;append(buf);
-    if (ext) {
-      s2-&gt;append(ext);
-    }
     if (!(f2 = fopen(s2-&gt;getCString(), &quot;r&quot;))) {
       if (!(f2 = fopen(s2-&gt;getCString(), mode))) {
 	delete s2;
@@ -510,9 +508,6 @@ GBool openTempFile(GooString **name, FILE **f, char *mode, char *ext) {
     return gFalse;
   }
   *name = new GooString(s);
-  if (ext) {
-    (*name)-&gt;append(ext);
-  }
   if (!(*f = fopen((*name)-&gt;getCString(), mode))) {
     delete (*name);
     return gFalse;
@@ -523,48 +518,21 @@ GBool openTempFile(GooString **name, FILE **f, char *mode, char *ext) {
   char *s;
   int fd;
 
-  if (ext) {
-#if HAVE_MKSTEMPS
-    if ((s = getenv(&quot;TMPDIR&quot;))) {
-      *name = new GooString(s);
-    } else {
-      *name = new GooString(&quot;/tmp&quot;);
-    }
-    (*name)-&gt;append(&quot;/XXXXXX&quot;)-&gt;append(ext);
-    fd = mkstemps((*name)-&gt;getCString(), strlen(ext));
-#elif defined(HAVE_MKSTEMP)
-    if ((s = getenv(&quot;TMPDIR&quot;))) {
-      *name = new GooString(s);
-    } else {
-      *name = new GooString(&quot;/tmp&quot;);
-    }
-    (*name)-&gt;append(&quot;/XXXXXX&quot;)-&gt;append(ext);
-    fd = mkstemp((*name)-&gt;getCString());
-#else
-    if (!(s = tmpnam(NULL))) {
-      return gFalse;
-    }
+#if HAVE_MKSTEMP
+  if ((s = getenv(&quot;TMPDIR&quot;))) {
     *name = new GooString(s);
-    (*name)-&gt;append(ext);
-    fd = open((*name)-&gt;getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
-#endif
   } else {
-#if HAVE_MKSTEMP
-    if ((s = getenv(&quot;TMPDIR&quot;))) {
-      *name = new GooString(s);
-    } else {
-      *name = new GooString(&quot;/tmp&quot;);
-    }
-    (*name)-&gt;append(&quot;/XXXXXX&quot;);
-    fd = mkstemp((*name)-&gt;getCString());
+    *name = new GooString(&quot;/tmp&quot;);
+  }
+  (*name)-&gt;append(&quot;/XXXXXX&quot;);
+  fd = mkstemp((*name)-&gt;getCString());
 #else // HAVE_MKSTEMP
-    if (!(s = tmpnam(NULL))) {
-      return gFalse;
-    }
-    *name = new GooString(s);
-    fd = open((*name)-&gt;getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
-#endif // HAVE_MKSTEMP
+  if (!(s = tmpnam(NULL))) {
+    return gFalse;
   }
+  *name = new GooString(s);
+  fd = open((*name)-&gt;getCString(), O_WRONLY | O_CREAT | O_EXCL, 0600);
+#endif // HAVE_MKSTEMP
   if (fd &lt; 0 || !(*f = fdopen(fd, mode))) {
     delete *name;
     return gFalse;</diff>
      <filename>goo/gfile.cc</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2006 Kristian H&#248;gsberg &lt;krh@redhat.com&gt;
+// Copyright (C) 2009 Albert Astals Cid &lt;aacid@kde.org&gt;
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -99,7 +100,7 @@ extern time_t getModTime(char *fileName);
 // should be done to the returned file pointer; the file may be
 // reopened later for reading, but not for writing.  The &lt;mode&gt; string
 // should be &quot;w&quot; or &quot;wb&quot;.  Returns true on success.
-extern GBool openTempFile(GooString **name, FILE **f, char *mode, char *ext);
+extern GBool openTempFile(GooString **name, FILE **f, char *mode);
 
 // Execute &lt;command&gt;.  Returns true on success.
 extern GBool executeCommand(char *cmd);</diff>
      <filename>goo/gfile.h</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@
 // Copyright (C) 2005-2007 Jeff Muizelaar &lt;jeff@infidigm.net&gt;
 // Copyright (C) 2005, 2006 Kristian H&#248;gsberg &lt;krh@redhat.com&gt;
 // Copyright (C) 2005 Martin Kretzschmar &lt;martink@gnome.org&gt;
-// Copyright (C) 2005 Albert Astals Cid &lt;aacid@kde.org&gt;
+// Copyright (C) 2005, 2009 Albert Astals Cid &lt;aacid@kde.org&gt;
 // Copyright (C) 2006, 2007 Carlos Garcia Campos &lt;carlosgc@gnome.org&gt;
 // Copyright (C) 2007 Koji Otani &lt;sho@bbr.jp&gt;
 // Copyright (C) 2008 Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
@@ -392,7 +392,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
   tmpFileName = NULL;
 
   if (gfxFont-&gt;getEmbeddedFontID(&amp;embRef)) {
-    if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;, NULL)) {
+    if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;)) {
       error(-1, &quot;Couldn't create temporary font file&quot;);
       goto err2;
     }
@@ -489,7 +489,7 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref,
       codeToGID = ((Gfx8BitFont *)gfxFont)-&gt;getCodeToGIDMap(ff);
       codeToGIDLen = 256;
     }
-    if (!openTempFile(&amp;tmpFileName2, &amp;tmpFile, &quot;wb&quot;, NULL)) {
+    if (!openTempFile(&amp;tmpFileName2, &amp;tmpFile, &quot;wb&quot;)) {
       delete ff;
       error(-1, &quot;failed to open truetype tempfile\n&quot;);
       goto err2;</diff>
      <filename>poppler/CairoFontEngine.cc</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2006 Takashi Iwai &lt;tiwai@suse.de&gt;
+// Copyright (C) 2009 Albert Astals Cid &lt;aacid@kde.org&gt;
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -178,7 +179,7 @@ SplashFontFile *SplashFTFontEngine::loadTrueTypeFont(SplashFontFileID *idA,
     return NULL;
   }
   tmpFileName = NULL;
-  if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;, NULL)) {
+  if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;)) {
     delete ff;
     return NULL;
   }</diff>
      <filename>splash/SplashFTFontEngine.cc</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2006 Takashi Iwai &lt;tiwai@suse.de&gt;
+// Copyright (C) 2009 Albert Astals Cid &lt;aacid@kde.org&gt;
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -119,7 +120,7 @@ SplashFontFile *SplashT1FontEngine::loadType1CFont(SplashFontFileID *idA,
     return NULL;
 
   tmpFileName = NULL;
-  if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;, NULL)) {
+  if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;)) {
     delete ff;
     return NULL;
   }</diff>
      <filename>splash/SplashT1FontEngine.cc</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2006 Takashi Iwai &lt;tiwai@suse.de&gt;
+// Copyright (C) 2009 Albert Astals Cid &lt;aacid@kde.org&gt;
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -57,7 +58,7 @@ SplashFontFile *SplashT1FontFile::loadType1Font(SplashT1FontEngine *engineA,
   if (! src-&gt;isFile) {
     GooString *tmpFileName;
     FILE *tmpFile;
-    if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;, NULL))
+    if (!openTempFile(&amp;tmpFileName, &amp;tmpFile, &quot;wb&quot;))
       return NULL;
     fwrite(src-&gt;buf, 1, src-&gt;bufLen, tmpFile);
     fclose(tmpFile);</diff>
      <filename>splash/SplashT1FontFile.cc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e237d8b5c2ae8805487a0790d9fb218263686712</id>
    </parent>
  </parents>
  <author>
    <name>Albert Astals Cid</name>
    <email>aacid@kde.org</email>
  </author>
  <url>http://github.com/kou/poppler-test/commit/d1c0e8a6c63361304cd453bb4c51e84a1aab7efa</url>
  <id>d1c0e8a6c63361304cd453bb4c51e84a1aab7efa</id>
  <committed-date>2009-05-13T15:31:16-07:00</committed-date>
  <authored-date>2009-05-13T15:29:18-07:00</authored-date>
  <message>Kill support for specifying extension in openTmpFile

We don't use it and it would not work anyway, see bug #21713</message>
  <tree>47a3d9d817107b72203274000b2c57344fe04fc0</tree>
  <committer>
    <name>Albert Astals Cid</name>
    <email>aacid@kde.org</email>
  </committer>
</commit>
