path_isabsolute.c 356 B

123456789101112131415161718
  1. /**
  2. * \file path_isabsolute.c
  3. * \brief Determines if a path is absolute or relative.
  4. * \author Copyright (c) 2002-2009 Jason Perkins and the Premake project
  5. */
  6. #include "premake.h"
  7. int path_isabsolute(lua_State* L)
  8. {
  9. const char* path = luaL_checkstring(L, -1);
  10. if (is_absolute_path(path)) {
  11. lua_pushboolean(L, 1);
  12. return 1;
  13. }
  14. return 0;
  15. }