Blender V4.3
GHOST_PathUtils.cc File Reference
#include <cassert>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include "GHOST_Debug.hh"
#include "GHOST_PathUtils.hh"
#include "GHOST_Types.h"

Go to the source code of this file.

Typedefs

using DecodeState_e
 

Functions

void GHOST_URL_decode (char *buf_dst, int buf_dst_size, const char *buf_src, const int buf_src_len)
 
char * GHOST_URL_decode_alloc (const char *buf_src, const int buf_src_len)
 

Typedef Documentation

◆ DecodeState_e

Initial value:
STATE_SEARCH = 0,
STATE_CONVERTING
}
enum DecodeState_e { STATE_SEARCH=0, STATE_CONVERTING } DecodeState_e

Definition at line 21 of file GHOST_PathUtils.cc.

Function Documentation

◆ GHOST_URL_decode()

void GHOST_URL_decode ( char * buf_dst,
int buf_dst_size,
const char * buf_src,
int buf_src_len )

Decode URL (i.e. converts file:///a%20b/test to file:///a b/test)

Parameters
buf_dstBuffer for decoded URL.
buf_dst_maxlenSize of output buffer.
buf_srcInput encoded buffer to be decoded.
buf_src_lenThe length of buf_src to use.

Definition at line 28 of file GHOST_PathUtils.cc.

References GHOST_ASSERT, and state.

Referenced by GHOST_URL_decode_alloc().

◆ GHOST_URL_decode_alloc()

char * GHOST_URL_decode_alloc ( const char * buf_src,
int buf_src_len )

A version of GHOST_URL_decode that allocates the string & returns it.

Parameters
buf_srcInput encoded buffer to be decoded.
Returns
The decoded output buffer.

Definition at line 90 of file GHOST_PathUtils.cc.

References free(), and GHOST_URL_decode().

Referenced by data_device_handle_drop().