45 # define _WIN32_IE 0x0501
64 static bool BLI_path_is_abs(
const char *name);
85 uint nums = 0, nume = 0;
87 bool found_digit =
false;
89 const uint string_len = strlen(
string);
90 const uint lslash_len = lslash !=
NULL ? (int)(lslash -
string) : 0;
91 uint name_end = string_len;
93 while (name_end > lslash_len &&
string[--name_end] !=
'.') {
96 if (name_end == lslash_len &&
string[name_end] !=
'.') {
97 name_end = string_len;
100 for (i = name_end - 1; i >= (int)lslash_len; i--) {
101 if (isdigit(
string[i])) {
119 const long long int ret = strtoll(&(
string[nums]),
NULL, 10);
120 if (
ret >= INT_MIN &&
ret <= INT_MAX) {
122 strcpy(tail, &
string[nume + 1]);
125 strcpy(head,
string);
129 *r_num_len = nume - nums + 1;
136 strcpy(tail,
string + name_end);
155 char *
string,
const char *head,
const char *tail,
unsigned short numlen,
int pic)
157 sprintf(
string,
"%s%.*d%s", head, numlen,
MAX2(0, pic), tail);
181 if (path[0] ==
'/' && path[1] ==
'/') {
182 if (path[2] ==
'\0') {
198 while ((start = strstr(path,
"\\..\\"))) {
199 eind = start + strlen(
"\\..\\") - 1;
200 a = start - path - 1;
202 if (path[
a] ==
'\\') {
211 memmove(path +
a, eind, strlen(eind) + 1);
215 while ((start = strstr(path,
"\\.\\"))) {
216 eind = start + strlen(
"\\.\\") - 1;
217 memmove(start, eind, strlen(eind) + 1);
223 eind = start + strlen(
"\\\\") - 1;
224 memmove(start, eind, strlen(eind) + 1);
227 while ((start = strstr(path,
"/../"))) {
228 a = start - path - 1;
231 eind = start + (4 - 1) ;
232 while (
a > 0 && path[
a] !=
'/') {
235 memmove(path +
a, eind, strlen(eind) + 1);
247 memmove(path, path + 3, strlen(path + 3) + 1);
251 while ((start = strstr(path,
"/./"))) {
252 eind = start + (3 - 1) ;
253 memmove(start, eind, strlen(eind) + 1);
256 while ((start = strstr(path,
"//"))) {
257 eind = start + (2 - 1) ;
258 memmove(start, eind, strlen(eind) + 1);
269 if (dir[0] ==
'\0') {
301 const char *invalid =
302 "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
303 "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
306 bool changed =
false;
308 if (*fname ==
'\0') {
312 for (fn = fname; *fn && (fn = strpbrk(fn, invalid)); fn++) {
318 for (fn = fname; *fn ==
'.'; fn++) {
328 const size_t len = strlen(fname);
329 const char *invalid_names[] = {
330 "con",
"prn",
"aux",
"null",
"com1",
"com2",
"com3",
"com4",
331 "com5",
"com6",
"com7",
"com8",
"com9",
"lpt1",
"lpt2",
"lpt3",
332 "lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
NULL,
338 if (fname[
len - 1] ==
'.') {
339 fname[
len - 1] =
'_';
347 for (iname = invalid_names; *iname; iname++) {
348 if (strstr(lower_fname, *iname) == lower_fname) {
349 const size_t iname_len = strlen(*iname);
354 if ((iname_len ==
len) || (lower_fname[iname_len] ==
'.')) {
378 char *curr_slash, *curr_path = path;
379 bool changed =
false;
380 bool skip_first =
false;
383 if (BLI_path_is_abs(path)) {
391 const char backup = *curr_slash;
397 curr_path = curr_slash + 1;
413 return path[0] ==
'/' && path[1] ==
'/';
419 return name[0] ==
'\\' && name[1] ==
'\\';
431 if ((path[2] ==
'?') && (path[3] ==
'\\')) {
448 static bool BLI_path_is_abs(
const char *name)
453 static wchar_t *next_slash(
wchar_t *path)
455 wchar_t *slash = path;
456 while (*slash && *slash !=
L'\\') {
463 static void BLI_path_add_slash_to_share(
wchar_t *uncpath)
465 wchar_t *slash_after_server = next_slash(uncpath + 2);
466 if (*slash_after_server) {
467 wchar_t *slash_after_share = next_slash(slash_after_server + 1);
468 if (!(*slash_after_share)) {
469 slash_after_share[0] =
L'\\';
470 slash_after_share[1] =
L'\0';
475 static void BLI_path_unc_to_short(
wchar_t *unc)
479 int len = wcslen(unc);
484 if ((
len > 3) && (unc[0] ==
L'\\') && (unc[1] ==
L'\\') && (unc[2] ==
L'?') &&
485 ELEM(unc[3],
L'\\',
L'/')) {
486 if ((
len > 5) && (unc[5] ==
L':')) {
487 wcsncpy(tmp, unc + 4,
len - 4);
488 tmp[
len - 4] =
L'\0';
491 else if ((
len > 7) && (wcsncmp(&unc[4],
L"UNC", 3) == 0) &&
ELEM(unc[7],
L'\\',
L'/')) {
494 wcsncpy(tmp + 2, unc + 8,
len - 8);
495 tmp[
len - 6] =
L'\0';
501 void BLI_path_normalize_unc(
char *path,
int maxlen)
504 BLI_path_normalize_unc_16(tmp_16);
508 void BLI_path_normalize_unc_16(
wchar_t *path_16)
510 BLI_path_unc_to_short(path_16);
511 BLI_path_add_slash_to_share(path_16);
531 if (relfile[0] ==
'\0') {
536 if (
BLI_strnlen(relfile, 3) > 2 && !BLI_path_is_abs(relfile)) {
542 if (relfile[0] !=
'\\' && relfile[0] !=
'/') {
563 for (off = 0; temp[off] && slash < 4; off++) {
564 if (temp[off] !=
file[off]) {
568 if (temp[off] ==
'\\') {
573 else if ((temp[1] ==
':' &&
file[1] ==
':') && (tolower(temp[0]) != tolower(
file[0]))) {
594 const char *p = temp;
595 const char *q =
file;
599 while (tolower(*p) == tolower(*q))
609 if ((*p ==
'\0') || (*q ==
'\0')) {
618 while ((q >=
file) && (*q !=
'/')) {
623 else if (*p !=
'/') {
624 while ((p >= temp) && (*p !=
'/')) {
640 while (p && p < lslash) {
669 bool BLI_path_suffix(
char *
string,
size_t maxlen,
const char *suffix,
const char *sep)
672 memset(
string, 0xff,
sizeof(*
string) * maxlen);
674 const size_t string_len = strlen(
string);
675 const size_t suffix_len = strlen(suffix);
676 const size_t sep_len = strlen(sep);
679 bool has_extension =
false;
681 if (string_len + sep_len + suffix_len >= maxlen) {
685 for (
a = string_len - 1;
a >= 0;
a--) {
686 if (
string[
a] ==
'.') {
687 has_extension =
true;
690 if (
ELEM(
string[
a],
'/',
'\\')) {
695 if (!has_extension) {
700 sprintf(
string +
a,
"%s%s%s", sep, suffix, extension);
710 const char parent_dir[] = {
'.',
'.',
SEP,
'\0'};
730 bool valid_path =
true;
736 return (valid_path && dir[0]);
746 uint ch_sta, ch_end, i;
749 for (i = 0; path[i] !=
'\0'; i++) {
750 if (
ELEM(path[i],
'\\',
'/')) {
753 else if (path[i] ==
'#') {
756 while (path[ch_end] ==
'#') {
766 *char_start = ch_sta;
813 tmp,
sizeof(tmp),
"%.*s%.*d%s", ch_sta, path, ch_end - ch_sta, frame, path + ch_end);
861 numdigits = *r_numdigits = 0;
873 while (--
c !=
file) {
881 while (
c != (
file - 1) && isdigit(*
c)) {
890 prevchar =
c[numdigits];
895 c[numdigits] = prevchar;
897 *r_numdigits = numdigits;
928 while (--
c !=
file) {
938 while (
c != (
file - 1) && isdigit(*
c)) {
945 int suffix_length =
len - (suffix -
file);
949 while (numdigits--) {
971 int strip_offset = 0;
972 while (
ELEM(name[strip_offset],
'_',
' ')) {
976 BLI_strncpy(display_name, name + strip_offset, maxlen);
985 bool all_lower =
true;
986 for (
int i = 0; display_name[i]; i++) {
987 if (isupper(display_name[i])) {
995 bool prevspace =
true;
996 for (
int i = 0; display_name[i]; i++) {
998 display_name[i] = toupper(display_name[i]);
1001 prevspace = isspace(display_name[i]);
1024 if (*path ==
'\0') {
1032 if (!wasrelative && !BLI_path_is_abs(path)) {
1036 while (
ELEM(*p,
'\\',
'/')) {
1054 if (isalpha(tmp[0]) && (tmp[1] ==
':') &&
ELEM(tmp[2],
'\\',
'/')) {
1055 tmp[1] = tolower(tmp[0]);
1086 const int baselen = (int)(lslash - base) + 1;
1090 memcpy(tmp, base, baselen);
1091 BLI_strncpy(tmp + baselen, path,
sizeof(tmp) - baselen);
1130 #ifdef DEBUG_STRSIZE
1131 memset(path, 0xff,
sizeof(*path) * maxlen);
1133 bool wasrelative =
true;
1134 const int filelen = strlen(path);
1137 if ((filelen >= 3 && BLI_path_is_abs(path)) ||
BLI_path_is_unc(path)) {
1138 wasrelative =
false;
1141 if (filelen >= 2 && path[0] ==
'/') {
1142 wasrelative =
false;
1155 printf(
"Could not get the current working directory - $PWD for an unknown reason.\n");
1168 bool BLI_path_program_extensions_add_win32(
char *name,
const size_t maxlen)
1170 bool retval =
false;
1176 const int ext_max = 12;
1179 const int name_len = strlen(name);
1180 char *filename = alloca(name_len + ext_max);
1182 const char *ext_next;
1185 memcpy(filename, name, name_len);
1186 filename_ext = filename + name_len;
1190 ext_next = strchr(ext,
';');
1191 ext_len = ext_next ? ((ext_next++) - ext) : strlen(ext);
1193 if (
LIKELY(ext_len < ext_max)) {
1194 memcpy(filename_ext, ext, ext_len);
1195 filename_ext[ext_len] =
'\0';
1204 }
while ((ext = ext_next));
1220 #ifdef DEBUG_STRSIZE
1221 memset(fullname, 0xff,
sizeof(*fullname) * maxlen);
1224 bool retval =
false;
1227 const char separator =
';';
1229 const char separator =
':';
1238 temp = strchr(path, separator);
1240 memcpy(filename, path, temp - path);
1241 filename[temp - path] = 0;
1251 BLI_path_program_extensions_add_win32(filename, maxlen)
1263 if (retval ==
false) {
1278 #if (defined(WIN32) || defined(WIN64))
1284 setenv(env, val, 1);
1319 static wchar_t buffer[32768];
1326 if (strlen(res_utf8) + 1 <
sizeof(
buffer)) {
1329 memcpy(
buffer, res_utf8, strlen(res_utf8) + 1);
1382 if (relabase && dir[0] ==
'/' && dir[1] ==
'/') {
1386 strcpy(
string, relabase);
1406 if (relabase &&
BLI_strnlen(relabase, 3) >= 2 && relabase[1] ==
':') {
1416 while (
ELEM(*dir,
'/',
'\\')) {
1423 strcat(
string, dir);
1427 sl = strlen(
string);
1428 while ((sl > 0) &&
ELEM(
string[sl - 1],
'/',
'\\')) {
1429 string[sl - 1] =
'\0';
1433 strcat(
string,
"/");
1440 strcat(
string,
file);
1447 const size_t str_len,
1449 const size_t ext_len)
1454 return (((str_len == 0 || ext_len == 0 || ext_len >= str_len) == 0) &&
1466 const size_t str_len = strlen(
str);
1472 va_start(args,
str);
1474 while ((ext = (
const char *)va_arg(args,
void *))) {
1489 const size_t str_len = strlen(
str);
1492 while (ext_array[i]) {
1508 const char *ext_step = ext_fnmatch;
1511 while (ext_step[0]) {
1512 const char *ext_next;
1515 if ((ext_next = strchr(ext_step,
';'))) {
1516 len_ext = ext_next - ext_step + 1;
1517 BLI_strncpy(pattern, ext_step, (len_ext >
sizeof(pattern)) ?
sizeof(pattern) : len_ext);
1523 if (fnmatch(pattern,
str, FNM_CASEFOLD) == 0) {
1526 ext_step += len_ext;
1543 bool only_wildcards =
false;
1545 for (
size_t i = strlen(ext_fnmatch); i-- > 0;) {
1546 if (ext_fnmatch[i] ==
';') {
1549 if (only_wildcards) {
1550 ext_fnmatch[i] =
'\0';
1555 if (!
ELEM(ext_fnmatch[i],
'?',
'*')) {
1560 only_wildcards =
true;
1573 #ifdef DEBUG_STRSIZE
1574 memset(path, 0xff,
sizeof(*path) * maxlen);
1576 const size_t path_len = strlen(path);
1577 const size_t ext_len = strlen(ext);
1580 for (
a = path_len - 1;
a >= 0;
a--) {
1581 if (
ELEM(path[
a],
'.',
'/',
'\\')) {
1586 if ((
a < 0) || (path[
a] !=
'.')) {
1590 if (
a + ext_len >= maxlen) {
1594 memcpy(path +
a, ext, ext_len + 1);
1603 #ifdef DEBUG_STRSIZE
1604 memset(path, 0xff,
sizeof(*path) * maxlen);
1606 const size_t path_len = strlen(path);
1607 const size_t ext_len = strlen(ext);
1611 if ((ext_len <= path_len) && (
STREQ(path + (path_len - ext_len), ext))) {
1615 for (
a = path_len - 1;
a >= 0;
a--) {
1616 if (path[
a] ==
'.') {
1625 if (
a + ext_len >= maxlen) {
1629 memcpy(path +
a, ext, ext_len + 1);
1635 #ifdef DEBUG_STRSIZE
1636 memset(filepath, 0xff,
sizeof(*filepath) * maxlen);
1639 if (!
c || ((
c - filepath) < maxlen - (strlen(filename) + 1))) {
1640 strcpy(
c ? &
c[1] : filepath, filename);
1655 const char *
string,
char *dir,
char *
file,
const size_t dirlen,
const size_t filelen)
1657 #ifdef DEBUG_STRSIZE
1658 memset(dir, 0xff,
sizeof(*dir) * dirlen);
1659 memset(
file, 0xff,
sizeof(*
file) * filelen);
1662 const size_t lslash = lslash_str ? (size_t)(lslash_str -
string) + 1 : 0;
1701 const char *extension = strrchr(filepath,
'.');
1702 if (extension ==
NULL) {
1721 if ((dirlen > 0) && (dst[dirlen - 1] !=
SEP)) {
1722 dst[dirlen++] =
SEP;
1726 if (dirlen >= maxlen) {
1738 const size_t maxlen,
1739 const char *__restrict dir,
1740 const char *__restrict
file)
1742 #ifdef DEBUG_STRSIZE
1743 memset(dst, 0xff,
sizeof(*dst) * maxlen);
1750 if (dirlen == maxlen) {
1751 memcpy(dst, dir, dirlen);
1752 dst[dirlen - 1] =
'\0';
1756 memcpy(dst, dir, dirlen + 1);
1758 if (dirlen + 1 >= maxlen) {
1764 dst[dirlen++] =
SEP;
1768 if (dirlen >= maxlen) {
1782 size_t BLI_path_join(
char *__restrict dst,
const size_t dst_len,
const char *path, ...)
1784 #ifdef DEBUG_STRSIZE
1785 memset(dst, 0xff,
sizeof(*dst) * dst_len);
1790 const size_t dst_last = dst_len - 1;
1793 if (ofs == dst_last) {
1799 bool has_trailing_slash =
false;
1808 has_trailing_slash = (path[
len] !=
'\0');
1812 va_start(args, path);
1813 while ((path = (
const char *)va_arg(args,
const char *))) {
1814 has_trailing_slash =
false;
1819 size_t len = strlen(path);
1829 if (ofs == dst_last) {
1833 has_trailing_slash = (path[
len] !=
'\0');
1834 if (ofs +
len >= dst_last) {
1835 len = dst_last - ofs;
1837 memcpy(&dst[ofs], path,
len);
1839 if (ofs == dst_last) {
1845 has_trailing_slash = (
path_init != path);
1850 if (has_trailing_slash) {
1851 if ((ofs != dst_last) && (ofs != 0) && (
ELEM(dst[ofs - 1],
SEP,
ALTSEP) == 0)) {
1871 return filename ? filename + 1 : path;
1885 int *__restrict r_offset,
1886 int *__restrict r_len)
1893 const char c = path[i];
1895 if (prev + 1 != i) {
1897 if (index_step == index) {
1916 int index_step = -1;
1917 int prev = strlen(path);
1920 const char c = i >= 0 ? path[i] :
'\0';
1922 if (prev - 1 != i) {
1924 if (index_step == index) {
1946 const char *
const ffslash = strchr(
string,
'/');
1947 const char *
const fbslash = strchr(
string,
'\\');
1956 return (ffslash < fbslash) ? ffslash : fbslash;
1964 const char *
const lfslash = strrchr(
string,
'/');
1965 const char *
const lbslash = strrchr(
string,
'\\');
1974 return (lfslash > lbslash) ? lfslash : lbslash;
1983 int len = strlen(
string);
1984 if (
len == 0 ||
string[
len - 1] !=
SEP) {
1986 string[
len + 1] =
'\0';
1997 int len = strlen(
string);
1999 if (
string[
len - 1] ==
SEP) {
2000 string[
len - 1] =
'\0';
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
int BLI_access(const char *filename, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_dir_create_recursive(const char *dir) ATTR_NONNULL()
char * BLI_current_working_dir(char *dir, const size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_kdtree_nd_() free(KDTree *tree)
void BLI_str_tolower_ascii(char *str, const size_t len) ATTR_NONNULL()
int BLI_strcasecmp(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
size_t BLI_strcpy_rlen(char *__restrict dst, const char *__restrict src) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
size_t BLI_strnlen(const char *str, const size_t maxlen) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_str_replace_char(char *string, char src, char dst) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Compatibility-like things for windows.
void BLI_windows_get_default_root_dir(char *root_dir)
These structs are the foundation for all linked lists in the library system.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble GLdouble r _GL_VOID_RET _GL_VOID GLfloat GLfloat r _GL_VOID_RET _GL_VOID GLint GLint r _GL_VOID_RET _GL_VOID GLshort GLshort r _GL_VOID_RET _GL_VOID GLdouble GLdouble r
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
void(* MEM_freeN)(void *vmemh)
const char * BLI_path_slash_rfind(const char *string)
static bool stringframe_chars(const char *path, int *char_start, int *char_end)
bool BLI_path_make_safe(char *path)
bool BLI_path_abs(char *path, const char *basepath)
bool BLI_path_parent_dir_until_exists(char *dir)
bool BLI_filename_make_safe(char *fname)
size_t BLI_path_join(char *__restrict dst, const size_t dst_len, const char *path,...)
void BLI_path_normalize_dir(const char *relabase, char *dir)
void BLI_path_slash_native(char *path)
void BLI_split_dir_part(const char *string, char *dir, const size_t dirlen)
const char * BLI_path_extension(const char *filepath)
bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext)
void BLI_path_normalize(const char *relabase, char *path)
bool BLI_path_parent_dir(char *path)
static bool path_extension_check_ex(const char *str, const size_t str_len, const char *ext, const size_t ext_len)
bool BLI_make_existing_file(const char *name)
bool BLI_path_program_search(char *fullname, const size_t maxlen, const char *name)
bool BLI_path_extension_ensure(char *path, size_t maxlen, const char *ext)
bool BLI_path_suffix(char *string, size_t maxlen, const char *suffix, const char *sep)
bool BLI_path_extension_check_glob(const char *str, const char *ext_fnmatch)
bool BLI_path_extension_check_array(const char *str, const char **ext_array)
const char * BLI_path_slash_find(const char *string)
bool BLI_path_filename_ensure(char *filepath, size_t maxlen, const char *filename)
void BLI_make_file_string(const char *relabase, char *string, const char *dir, const char *file)
bool BLI_path_extension_check_n(const char *str,...)
bool BLI_path_extension_check(const char *str, const char *ext)
int BLI_path_sequence_decode(const char *string, char *head, char *tail, ushort *r_num_len)
void BLI_path_rel(char *file, const char *relfile)
void BLI_path_slash_rstrip(char *string)
void BLI_path_sequence_encode(char *string, const char *head, const char *tail, unsigned short numlen, int pic)
void BLI_path_append(char *__restrict dst, const size_t maxlen, const char *__restrict file)
bool BLI_path_frame_range(char *path, int sta, int end, int digits)
bool BLI_path_frame_check_chars(const char *path)
bool BLI_path_abs_from_cwd(char *path, const size_t maxlen)
bool BLI_path_extension_glob_validate(char *ext_fnmatch)
const char * BLI_getenv(const char *env)
static void ensure_digits(char *path, int digits)
bool BLI_path_is_rel(const char *path)
void BLI_path_frame_strip(char *path, char *r_ext)
static int BLI_path_unc_prefix_len(const char *path)
bool BLI_path_is_unc(const char *name)
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file)
void BLI_setenv(const char *env, const char *val)
int BLI_path_slash_ensure(char *string)
void BLI_path_to_display_name(char *display_name, int maxlen, const char *name)
void BLI_setenv_if_new(const char *env, const char *val)
bool BLI_path_name_at_index(const char *__restrict path, const int index, int *__restrict r_offset, int *__restrict r_len)
bool BLI_path_frame(char *path, int frame, int digits)
void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen)
const char * BLI_path_basename(const char *path)
void BLI_split_file_part(const char *string, char *file, const size_t filelen)
bool BLI_path_frame_get(char *path, int *r_frame, int *r_numdigits)
int uputenv(const char *name, const char *value)
wchar_t * alloc_utf16_from_8(const char *in8, size_t add)
char * alloc_utf_8_from_16(const wchar_t *in16, size_t add)
int conv_utf_16_to_8(const wchar_t *in16, char *out8, size_t size8)
void path_init(const string &path, const string &user_path)