monotone

monotone Mtn Source Tree

Root/luaext_mkstemp.cc

1
2#include "lua.hh"
3#include "mkstemp.hh"
4
5#include <errno.h>
6#include <cstring>
7
8using std::string;
9using std::strerror;
10
11LUAEXT(mkstemp, )
12{
13 char const *filename = luaL_checkstring (L, 1);
14 string dup(filename);
15
16 if (!monotone_mkstemp(dup))
17 return 0;
18
19 lua_pushstring(L, dup.c_str());
20 return 1;
21}
22
23
24
25// Local Variables:
26// mode: C++
27// fill-column: 76
28// c-file-style: "gnu"
29// indent-tabs-mode: nil
30// End:
31// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:
32

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status