path_getabsolute.c 320 B

123456789101112131415
  1. /**
  2. * \file path_getabsolute.c
  3. * \brief Calculate the absolute path from a relative path
  4. */
  5. #include "premake.h"
  6. int path_getabsolute(lua_State *L)
  7. {
  8. const char *path = luaL_checkstring(L, -1);
  9. char buffer[PATH_BUFSIZE];
  10. get_absolute_path(path, buffer, PATH_BUFSIZE);
  11. lua_pushstring(L, buffer);
  12. return 1;
  13. }