monotone

monotone Mtn Source Tree

Root/luaext_mkstemp.cc

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

Archive Download this file

Branches

Tags

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