code style fixes for review of deferred join

This commit is contained in:
R. Blaine Whittle 2017-10-03 16:53:08 -07:00 committed by Tom van Dijck
parent 7a3d134d58
commit 3cdaed431e
3 changed files with 11 additions and 16 deletions

View File

@ -4,25 +4,15 @@
* \author Copyright (c) 2002-2016 Jason Perkins and the Premake project
*/
/**
* \file path_isabsolute.c
* \brief Determines if a path is absolute or relative.
* \author Copyright (c) 2002-2016 Jason Perkins and the Premake project
*/
#include "premake.h"
#include <ctype.h>
#include <string.h>
#include "path_isabsolute.h"
#if PLATFORM_WINDOWS
#define strncasecmp _strnicmp
#endif
#define JOIN_RELATIVE 0
#define JOIN_ABSOLUTE 1
#define JOIN_MAYBE_ABSOLUTE 2
int do_absolutetype(const char* path)
{
char c;
@ -84,9 +74,7 @@ int do_absolutetype(const char* path)
{
closing = strchr(path + 2, '}');
if (closing != NULL)
{
return JOIN_MAYBE_ABSOLUTE;
}
}
// find the second closing %
path += 1;

View File

@ -0,0 +1,9 @@
/**
* \file path_isabsolute.h
* \brief Determines if a path is absolute or relative.
* \author Copyright (c) 2002-2016 Jason Perkins and the Premake project
*/
#define JOIN_RELATIVE 0
#define JOIN_ABSOLUTE 1
#define JOIN_MAYBE_ABSOLUTE 2

View File

@ -6,10 +6,8 @@
#include "premake.h"
#include <string.h>
#include "path_isabsolute.h"
#define JOIN_RELATIVE 0
#define JOIN_ABSOLUTE 1
#define JOIN_MAYBE_ABSOLUTE 2
#define DEFERRED_JOIN_DELIMITER '|'
char* path_join_single(char* buffer, char* ptr, const char* part, int allowDeferredJoin)