Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* -*- buffer-read-only: t -*- vi: set ro: */ 00002 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 00003 /* Create a temporary file or directory. 00004 00005 Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. 00006 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 /* header written by Eric Blake */ 00021 00022 #ifndef GL_TEMPNAME_H 00023 # define GL_TEMPNAME_H 00024 00025 # include <stdio.h> 00026 00027 # ifdef __GT_FILE 00028 # define GT_FILE __GT_FILE 00029 # define GT_DIR __GT_DIR 00030 # define GT_NOCREATE __GT_NOCREATE 00031 # else 00032 # define GT_FILE 0 00033 # define GT_DIR 1 00034 # define GT_NOCREATE 2 00035 # endif 00036 00037 /* Generate a temporary file name based on TMPL. TMPL must match the 00038 rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). 00039 The name constructed does not exist at the time of the call to 00040 gen_tempname. TMPL is overwritten with the result. 00041 00042 KIND may be one of: 00043 GT_NOCREATE: simply verify that the name does not exist 00044 at the time of the call. 00045 GT_FILE: create a large file using open(O_CREAT|O_EXCL) 00046 and return a read-write fd. The file is mode 0600. 00047 GT_DIR: create a directory, which will be mode 0700. 00048 00049 We use a clever algorithm to get hard-to-predict names. */ 00050 extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); 00051 00052 #endif /* GL_TEMPNAME_H */