code style fixes for review of deferred join
This commit is contained in:
parent
7a3d134d58
commit
3cdaed431e
@ -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;
|
||||
|
9
src/host/path_isabsolute.h
Normal file
9
src/host/path_isabsolute.h
Normal 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
|
@ -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)
|
||||
|
Reference in New Issue
Block a user