diff options
author | Bruno Haible <bruno@clisp.org> | 2003-02-13 21:39:18 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:09:15 +0200 |
commit | 35c1fa9f453dc765e6b65817f2934023c2a79583 (patch) | |
tree | 0162f00f11be7cf3f20a6a5ade9abd9068b25934 /gettext-tools | |
parent | 079d081d2d4c328803dc67ee43c5d2aa490403a8 (diff) | |
download | external_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.h | 27 |
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); |