29#define DISABLE_DEBUGLOG
32#include "gwenhywfar/debug.h"
33#include "gwenhywfar/misc.h"
34#include "gwenhywfar/text.h"
35#include "gwenhywfar/stringlist.h"
66 unsigned int origflags;
74 while (*path && isspace((
int)*path))
79 while (*path && (*path==
'/' || *path==
'\\')) {
97 while (*path && !(*path==
'/' || *path==
'\\'))
104 while (*path && (*path==
'/' || *path==
'\\'))
189 if (elementFunction) {
216 unsigned int origflags;
224 while (*path && isspace((
int)*path))
229 while (*path && (*path==
'/' || *path==
'\\')) {
250 while (*path && !(*path==
'/' || *path==
'\\'))
271 if (sscanf(p,
"%d", &x)!=1) {
285 while (*path && (*path==
'/' || *path==
'\\'))
370 if (elementFunction) {
429 if (!(path1 && *path1)) {
430 if (path2 && *path2) {
440 if (!(path2 && *path2)) {
449 for (i=0; i<cnt; i++) {
479 for (i=0; i<count; i++) {
GWEN_BUFFER * GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take)
void GWEN_Buffer_SetStep(GWEN_BUFFER *bf, uint32_t step)
void GWEN_Buffer_Reset(GWEN_BUFFER *bf)
char * GWEN_Buffer_GetPosPointer(const GWEN_BUFFER *bf)
void GWEN_Buffer_free(GWEN_BUFFER *bf)
int GWEN_Buffer_AppendString(GWEN_BUFFER *bf, const char *buffer)
uint32_t GWEN_Buffer_GetUsedBytes(const GWEN_BUFFER *bf)
char * GWEN_Buffer_GetStart(const GWEN_BUFFER *bf)
int GWEN_Buffer_AllocRoom(GWEN_BUFFER *bf, uint32_t size)
int GWEN_Buffer_AppendByte(GWEN_BUFFER *bf, char c)
#define DBG_INFO(dbg_logger, format,...)
#define DBG_ERROR(dbg_logger, format,...)
#define DBG_DEBUG(dbg_logger, format,...)
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
static void _getPathBetween(const char *path1, const char *path2, GWEN_BUFFER *diffBuf)
void * GWEN_Path_HandleWithIdx(const char *path, void *data, uint32_t flags, GWEN_PATHIDXHANDLERPTR elementFunction)
static void * GWEN_Path_AppendPathElement(const char *entry, void *data, unsigned int flags)
int GWEN_Path_GetPathBetween(const char *path1, const char *path2, GWEN_BUFFER *diffBuf)
void * GWEN_Path_Handle(const char *path, void *data, uint32_t flags, GWEN_PATHHANDLERPTR elementFunction)
int GWEN_Path_Convert(const char *path, GWEN_BUFFER *buffer, uint32_t flags)
#define GWEN_PATH_FLAGS_UNESCAPE
#define GWEN_PATH_FLAGS_CHECKROOT
void *(* GWEN_PATHHANDLERPTR)(const char *entry, void *data, uint32_t flags)
#define GWEN_PATH_FLAGS_INTERNAL
#define GWEN_PATH_FLAGS_NO_IDX
#define GWEN_PATH_FLAGS_CONVERT_LAST
#define GWEN_PATH_FLAGS_LAST
#define GWEN_PATH_FLAGS_TOLERANT_ESCAPE
#define GWEN_PATH_FLAGS_VARIABLE
#define GWEN_PATH_FLAGS_ROOT
#define GWEN_PATH_FLAGS_ESCAPE
void *(* GWEN_PATHIDXHANDLERPTR)(const char *entry, void *data, int idx, uint32_t flags)
void GWEN_StringList_free(GWEN_STRINGLIST *sl)
GWEN_STRINGLIST * GWEN_StringList_fromString2(const char *str, const char *delimiters, int checkDouble, uint32_t flags)
const char * GWEN_StringListEntry_Data(const GWEN_STRINGLISTENTRY *se)
GWEN_STRINGLISTENTRY * GWEN_StringListEntry_Next(const GWEN_STRINGLISTENTRY *se)
unsigned int GWEN_StringList_Count(const GWEN_STRINGLIST *sl)
void GWEN_StringList_RemoveCommonFirstEntries(GWEN_STRINGLIST *sl1, GWEN_STRINGLIST *sl2)
GWEN_STRINGLISTENTRY * GWEN_StringList_FirstEntry(const GWEN_STRINGLIST *sl)
struct GWEN_STRINGLISTENTRYSTRUCT GWEN_STRINGLISTENTRY
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
int GWEN_Text_EscapeToBuffer(const char *src, GWEN_BUFFER *buf)
int GWEN_Text_EscapeToBufferTolerant(const char *src, GWEN_BUFFER *buf)
int GWEN_Text_UnescapeToBuffer(const char *src, GWEN_BUFFER *buf)
int GWEN_Text_UnescapeToBufferTolerant(const char *src, GWEN_BUFFER *buf)
#define GWEN_TEXT_FLAGS_DEL_QUOTES
#define GWEN_TEXT_FLAGS_CHECK_BACKSLASH