summaryrefslogtreecommitdiffstats
path: root/gettext-tools
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-02-13 21:39:18 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:09:15 +0200
commit35c1fa9f453dc765e6b65817f2934023c2a79583 (patch)
tree0162f00f11be7cf3f20a6a5ade9abd9068b25934 /gettext-tools
parent079d081d2d4c328803dc67ee43c5d2aa490403a8 (diff)
downloadexternal_gettext-35c1fa9f453dc765e6b65817f2934023c2a79583.zip
external_gettext-35c1fa9f453dc765e6b65817f2934023c2a79583.tar.gz
external_gettext-35c1fa9f453dc765e6b65817f2934023c2a79583.tar.bz2
Move lib/tmpdir.h to gettext-tools/lib/tmpdir.h.
Diffstat (limited to 'gettext-tools')
-rw-r--r--gettext-tools/lib/tmpdir.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/gettext-tools/lib/tmpdir.h b/gettext-tools/lib/tmpdir.h
new file mode 100644
index 0000000..2c80681
--- /dev/null
+++ b/gettext-tools/lib/tmpdir.h
@@ -0,0 +1,27 @@
+/* Determine a temporary directory.
+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include <stdbool.h>
+#include <stddef.h>
+
+/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
+ non-null and exists, uses it; otherwise uses the first of $TMPDIR,
+ P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
+ for use with mk[s]temp. Will fail (-1) if DIR is non-null and
+ doesn't exist, none of the searched dirs exists, or there's not
+ enough space in TMPL. */
+extern int path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, bool try_tmpdir);