Sync-to-go: update copyright for 2015
[s-roff.git] / src / lib-roff / mksdir.cpp
blobbdc7100747b6547a62bf035fa0b8eccba2d23a9c
1 /*@ FIXME consider to replace the temporary name creation with homebrew
2 * Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
4 * Copyright (C) 2001 Free Software Foundation, Inc.
5 * Written by Werner Lemberg (wl@gnu.org)
7 * This is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2, or (at your option) any later
10 * version.
12 * This is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with groff; see the file COPYING. If not, write to the Free Software
19 * Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
22 /* This file is heavily based on the file mkstemp.c which is part of the
23 fileutils package. */
25 extern int gen_tempname(char *, int = 0); // FIXME
27 /* Generate a unique temporary directory name from TEMPLATE.
28 The last six characters of TEMPLATE must be "XXXXXX";
29 they are replaced with a string that makes the filename unique.
30 Then open the directory and return a fd. */
31 int mksdir(char *tmpl)
33 return gen_tempname(tmpl, 1);
36 // s-it2-mode