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
|
* \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 "premake.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "path_isabsolute.h"
|
||||||
|
|
||||||
#if PLATFORM_WINDOWS
|
#if PLATFORM_WINDOWS
|
||||||
#define strncasecmp _strnicmp
|
#define strncasecmp _strnicmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define JOIN_RELATIVE 0
|
|
||||||
#define JOIN_ABSOLUTE 1
|
|
||||||
#define JOIN_MAYBE_ABSOLUTE 2
|
|
||||||
|
|
||||||
int do_absolutetype(const char* path)
|
int do_absolutetype(const char* path)
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
@ -84,10 +74,8 @@ int do_absolutetype(const char* path)
|
|||||||
{
|
{
|
||||||
closing = strchr(path + 2, '}');
|
closing = strchr(path + 2, '}');
|
||||||
if (closing != NULL)
|
if (closing != NULL)
|
||||||
{
|
|
||||||
return JOIN_MAYBE_ABSOLUTE;
|
return JOIN_MAYBE_ABSOLUTE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// find the second closing %
|
// find the second closing %
|
||||||
path += 1;
|
path += 1;
|
||||||
closing = strchr(path, '%');
|
closing = strchr(path, '%');
|
||||||
|
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 "premake.h"
|
||||||
#include <string.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 '|'
|
#define DEFERRED_JOIN_DELIMITER '|'
|
||||||
|
|
||||||
char* path_join_single(char* buffer, char* ptr, const char* part, int allowDeferredJoin)
|
char* path_join_single(char* buffer, char* ptr, const char* part, int allowDeferredJoin)
|
||||||
|
Reference in New Issue
Block a user