Jefferson González avatar Jefferson González committed 59fa6c8

Added os.host()

Comments (0)

Files changed (3)

src/host/os_host.c

+/**
+ * \file   os_host.c
+ * \brief  Retrieve the current working directory.
+ * \author Copyright (c) 2013 Jefferson González and the Premake project
+ */
+
+#include "premake.h"
+
+int os_host(lua_State* L)
+{
+	lua_pushstring(L, PLATFORM_STRING);
+	return 1;
+}
+
+

src/host/premake.c

 	{ "isdir",       os_isdir       },
 	{ "getcwd",      os_getcwd      },
 	{ "getversion",  os_getversion  },
+	{ "host",        os_host        },
 	{ "isfile",      os_isfile      },
 	{ "matchdone",   os_matchdone   },
 	{ "matchisfile", os_matchisfile },

src/host/premake.h

 int os_copyfile(lua_State* L);
 int os_getcwd(lua_State* L);
 int os_getversion(lua_State* L);
+int os_host(lua_State* L);
 int os_is64bit(lua_State* L);
 int os_isdir(lua_State* L);
 int os_isfile(lua_State* L);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.