29 # define _WIN32_IE 0x0501
48 static bool BLI_path_is_abs(
const char *name);
58 uint nums = 0, nume = 0;
60 bool found_digit =
false;
62 const uint string_len = strlen(
string);
63 const uint lslash_len = lslash !=
NULL ? (int)(lslash -
string) : 0;
64 uint name_end = string_len;
66 while (name_end > lslash_len &&
string[--name_end] !=
'.') {
69 if (name_end == lslash_len &&
string[name_end] !=
'.') {
70 name_end = string_len;
73 for (i = name_end - 1; i >= (int)lslash_len; i--) {
74 if (isdigit(
string[i])) {
92 const long long int ret = strtoll(&(
string[nums]),
NULL, 10);
93 if (
ret >= INT_MIN &&
ret <= INT_MAX) {
95 strcpy(tail, &
string[nume + 1]);
102 *r_digits_len = nume - nums + 1;
109 strcpy(tail,
string + name_end);
124 char *
string,
const char *head,
const char *tail,
unsigned short numlen,
int pic)
126 sprintf(
string,
"%s%.*d%s", head, numlen,
MAX2(0, pic), tail);
139 if (path[0] ==
'/' && path[1] ==
'/') {
140 if (path[2] ==
'\0') {
156 while ((start = strstr(path,
"\\..\\"))) {
157 eind = start + strlen(
"\\..\\") - 1;
158 a = start - path - 1;
160 if (path[
a] ==
'\\') {
169 memmove(path +
a, eind, strlen(eind) + 1);
173 while ((start = strstr(path,
"\\.\\"))) {
174 eind = start + strlen(
"\\.\\") - 1;
175 memmove(start, eind, strlen(eind) + 1);
181 eind = start + strlen(
"\\\\") - 1;
182 memmove(start, eind, strlen(eind) + 1);
185 while ((start = strstr(path,
"/../"))) {
186 a = start - path - 1;
189 eind = start + (4 - 1) ;
190 while (
a > 0 && path[
a] !=
'/') {
193 memmove(path +
a, eind, strlen(eind) + 1);
205 memmove(path, path + 3, strlen(path + 3) + 1);
209 while ((start = strstr(path,
"/./"))) {
210 eind = start + (3 - 1) ;
211 memmove(start, eind, strlen(eind) + 1);
214 while ((start = strstr(path,
"//"))) {
215 eind = start + (2 - 1) ;
216 memmove(start, eind, strlen(eind) + 1);
224 if (dir[0] ==
'\0') {
234 #define INVALID_CHARS \
235 "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" \
236 "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" \
238 #define INVALID_TOKENS "<>"
243 #undef INVALID_TOKENS
246 bool changed =
false;
248 if (*fname ==
'\0') {
252 for (fn = fname; *fn && (fn = strpbrk(fn, invalid)); fn++) {
258 for (fn = fname; *fn ==
'.'; fn++) {
268 const size_t len = strlen(fname);
269 const char *invalid_names[] = {
270 "con",
"prn",
"aux",
"null",
"com1",
"com2",
"com3",
"com4",
271 "com5",
"com6",
"com7",
"com8",
"com9",
"lpt1",
"lpt2",
"lpt3",
272 "lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
NULL,
278 if (fname[
len - 1] ==
'.') {
279 fname[
len - 1] =
'_';
287 for (iname = invalid_names; *iname; iname++) {
288 if (strstr(lower_fname, *iname) == lower_fname) {
289 const size_t iname_len = strlen(*iname);
294 if ((iname_len ==
len) || (lower_fname[iname_len] ==
'.')) {
318 char *curr_slash, *curr_path = path;
319 bool changed =
false;
320 bool skip_first =
false;
323 if (BLI_path_is_abs(path)) {
331 const char backup = *curr_slash;
337 curr_path = curr_slash + 1;
349 return path[0] ==
'/' && path[1] ==
'/';
354 return name[0] ==
'\\' && name[1] ==
'\\';
366 if ((path[2] ==
'?') && (path[3] ==
'\\')) {
383 static bool BLI_path_is_abs(
const char *name)
388 static wchar_t *next_slash(
wchar_t *path)
390 wchar_t *slash = path;
391 while (*slash && *slash !=
L'\\') {
398 static void BLI_path_add_slash_to_share(
wchar_t *uncpath)
400 wchar_t *slash_after_server = next_slash(uncpath + 2);
401 if (*slash_after_server) {
402 wchar_t *slash_after_share = next_slash(slash_after_server + 1);
403 if (!(*slash_after_share)) {
404 slash_after_share[0] =
L'\\';
405 slash_after_share[1] =
L'\0';
410 static void BLI_path_unc_to_short(
wchar_t *unc)
414 int len = wcslen(unc);
419 if ((
len > 3) && (unc[0] ==
L'\\') && (unc[1] ==
L'\\') && (unc[2] ==
L'?') &&
420 ELEM(unc[3],
L'\\',
L'/')) {
421 if ((
len > 5) && (unc[5] ==
L':')) {
422 wcsncpy(tmp, unc + 4,
len - 4);
423 tmp[
len - 4] =
L'\0';
426 else if ((
len > 7) && (wcsncmp(&unc[4],
L"UNC", 3) == 0) &&
ELEM(unc[7],
L'\\',
L'/')) {
429 wcsncpy(tmp + 2, unc + 8,
len - 8);
430 tmp[
len - 6] =
L'\0';
436 void BLI_path_normalize_unc(
char *path,
int maxlen)
439 BLI_path_normalize_unc_16(tmp_16);
443 void BLI_path_normalize_unc_16(
wchar_t *path_16)
445 BLI_path_unc_to_short(path_16);
446 BLI_path_add_slash_to_share(path_16);
462 if (relfile[0] ==
'\0') {
467 if (
BLI_strnlen(relfile, 3) > 2 && !BLI_path_is_abs(relfile)) {
473 if (!
ELEM(relfile[0],
'\\',
'/')) {
494 for (off = 0; temp[off] && slash < 4; off++) {
495 if (temp[off] !=
file[off]) {
499 if (temp[off] ==
'\\') {
504 else if ((temp[1] ==
':' &&
file[1] ==
':') && (tolower(temp[0]) != tolower(
file[0]))) {
525 const char *p = temp;
526 const char *q =
file;
530 while (tolower(*p) == tolower(*q))
540 if ((*p ==
'\0') || (*q ==
'\0')) {
549 while ((q >=
file) && (*q !=
'/')) {
554 else if (*p !=
'/') {
555 while ((p >= temp) && (*p !=
'/')) {
571 while (p && p < lslash) {
588 bool BLI_path_suffix(
char *
string,
size_t maxlen,
const char *suffix,
const char *sep)
591 memset(
string, 0xff,
sizeof(*
string) * maxlen);
593 const size_t string_len = strlen(
string);
594 const size_t suffix_len = strlen(suffix);
595 const size_t sep_len = strlen(sep);
598 bool has_extension =
false;
600 if (string_len + sep_len + suffix_len >= maxlen) {
604 for (
a = string_len - 1;
a >= 0;
a--) {
605 if (
string[
a] ==
'.') {
606 has_extension =
true;
609 if (
ELEM(
string[
a],
'/',
'\\')) {
614 if (!has_extension) {
619 sprintf(
string +
a,
"%s%s%s", sep, suffix, extension);
625 const char parent_dir[] = {
'.',
'.',
SEP,
'\0'};
641 bool valid_path =
true;
647 return (valid_path && dir[0]);
657 uint ch_sta, ch_end, i;
660 for (i = 0; path[i] !=
'\0'; i++) {
661 if (
ELEM(path[i],
'\\',
'/')) {
664 else if (path[i] ==
'#') {
667 while (path[ch_end] ==
'#') {
677 *char_start = ch_sta;
720 tmp,
sizeof(tmp),
"%.*s%.*d%s", ch_sta, path, ch_end - ch_sta, frame, path + ch_end);
760 digits_len = *r_digits_len = 0;
772 while (--
c !=
file) {
780 while (
c != (
file - 1) && isdigit(*
c)) {
789 prevchar =
c[digits_len];
794 c[digits_len] = prevchar;
796 *r_digits_len = digits_len;
827 while (--
c !=
file) {
837 while (
c != (
file - 1) && isdigit(*
c)) {
847 while (digits_len--) {
862 int strip_offset = 0;
863 while (
ELEM(name[strip_offset],
'_',
' ')) {
867 BLI_strncpy(display_name, name + strip_offset, maxlen);
876 bool all_lower =
true;
877 for (
int i = 0; display_name[i]; i++) {
878 if (isupper(display_name[i])) {
886 bool prevspace =
true;
887 for (
int i = 0; display_name[i]; i++) {
889 display_name[i] = toupper(display_name[i]);
892 prevspace = isspace(display_name[i]);
913 if (!wasrelative && !BLI_path_is_abs(path)) {
917 while (
ELEM(*p,
'\\',
'/')) {
935 if (isalpha(tmp[0]) && (tmp[1] ==
':') &&
ELEM(tmp[2],
'\\',
'/')) {
936 tmp[1] = tolower(tmp[0]);
967 const int baselen = (int)(lslash - base) + 1;
971 memcpy(tmp, base, baselen);
972 BLI_strncpy(tmp + baselen, path,
sizeof(tmp) - baselen);
1000 bool is_abs =
false;
1004 if ((path_len_clamp >= 3 && BLI_path_is_abs(path)) ||
BLI_path_is_unc(path)) {
1008 if (path_len_clamp >= 2 && path[0] ==
'/') {
1017 #ifdef DEBUG_STRSIZE
1018 memset(path, 0xff,
sizeof(*path) * maxlen);
1030 printf(
"Could not get the current working directory - $PWD for an unknown reason.\n");
1044 bool BLI_path_program_extensions_add_win32(
char *name,
const size_t maxlen)
1046 bool retval =
false;
1052 const int ext_max = 12;
1055 const int name_len = strlen(name);
1056 char *filename = alloca(name_len + ext_max);
1058 const char *ext_next;
1061 memcpy(filename, name, name_len);
1062 filename_ext = filename + name_len;
1066 ext_next = strchr(ext,
';');
1067 ext_len = ext_next ? ((ext_next++) - ext) : strlen(ext);
1069 if (
LIKELY(ext_len < ext_max)) {
1070 memcpy(filename_ext, ext, ext_len);
1071 filename_ext[ext_len] =
'\0';
1080 }
while ((ext = ext_next));
1093 #ifdef DEBUG_STRSIZE
1094 memset(fullname, 0xff,
sizeof(*fullname) * maxlen);
1097 bool retval =
false;
1100 const char separator =
';';
1102 const char separator =
':';
1111 temp = strchr(path, separator);
1113 memcpy(filename, path, temp - path);
1114 filename[temp - path] = 0;
1124 BLI_path_program_extensions_add_win32(filename, maxlen)
1136 if (retval ==
false) {
1147 #if (defined(_WIN32) || defined(_WIN64))
1153 setenv(env, val, 1);
1174 static wchar_t buffer[32768];
1181 if (strlen(res_utf8) + 1 <
sizeof(
buffer)) {
1184 memcpy(
buffer, res_utf8, strlen(res_utf8) + 1);
1223 if (relabase && dir[0] ==
'/' && dir[1] ==
'/') {
1227 strcpy(
string, relabase);
1247 if (relabase &&
BLI_strnlen(relabase, 3) >= 2 && relabase[1] ==
':') {
1257 while (
ELEM(*dir,
'/',
'\\')) {
1264 strcat(
string, dir);
1268 sl = strlen(
string);
1269 while ((sl > 0) &&
ELEM(
string[sl - 1],
'/',
'\\')) {
1270 string[sl - 1] =
'\0';
1274 strcat(
string,
"/");
1281 strcat(
string,
file);
1288 const size_t str_len,
1290 const size_t ext_len)
1295 return (((str_len == 0 || ext_len == 0 || ext_len >= str_len) == 0) &&
1306 const size_t str_len = strlen(
str);
1312 va_start(args,
str);
1314 while ((ext = (
const char *)va_arg(args,
void *))) {
1328 const size_t str_len = strlen(
str);
1331 while (ext_array[i]) {
1343 const char *ext_step = ext_fnmatch;
1346 while (ext_step[0]) {
1347 const char *ext_next;
1350 if ((ext_next = strchr(ext_step,
';'))) {
1351 len_ext = ext_next - ext_step + 1;
1352 BLI_strncpy(pattern, ext_step, (len_ext >
sizeof(pattern)) ?
sizeof(pattern) : len_ext);
1358 if (fnmatch(pattern,
str, FNM_CASEFOLD) == 0) {
1361 ext_step += len_ext;
1369 bool only_wildcards =
false;
1371 for (
size_t i = strlen(ext_fnmatch); i-- > 0;) {
1372 if (ext_fnmatch[i] ==
';') {
1375 if (only_wildcards) {
1376 ext_fnmatch[i] =
'\0';
1381 if (!
ELEM(ext_fnmatch[i],
'?',
'*')) {
1386 only_wildcards =
true;
1395 #ifdef DEBUG_STRSIZE
1396 memset(path, 0xff,
sizeof(*path) * maxlen);
1398 const size_t path_len = strlen(path);
1399 const size_t ext_len = strlen(ext);
1402 for (
a = path_len - 1;
a >= 0;
a--) {
1403 if (
ELEM(path[
a],
'.',
'/',
'\\')) {
1408 if ((
a < 0) || (path[
a] !=
'.')) {
1412 if (
a + ext_len >= maxlen) {
1416 memcpy(path +
a, ext, ext_len + 1);
1422 #ifdef DEBUG_STRSIZE
1423 memset(path, 0xff,
sizeof(*path) * maxlen);
1425 const size_t path_len = strlen(path);
1426 const size_t ext_len = strlen(ext);
1430 if ((ext_len <= path_len) && (
STREQ(path + (path_len - ext_len), ext))) {
1434 for (
a = path_len - 1;
a >= 0;
a--) {
1435 if (path[
a] ==
'.') {
1444 if (
a + ext_len >= maxlen) {
1448 memcpy(path +
a, ext, ext_len + 1);
1454 #ifdef DEBUG_STRSIZE
1455 memset(filepath, 0xff,
sizeof(*filepath) * maxlen);
1458 if (!
c || ((
c - filepath) < maxlen - (strlen(filename) + 1))) {
1459 strcpy(
c ? &
c[1] : filepath, filename);
1466 const char *
string,
char *dir,
char *
file,
const size_t dirlen,
const size_t filelen)
1468 #ifdef DEBUG_STRSIZE
1469 memset(dir, 0xff,
sizeof(*dir) * dirlen);
1470 memset(
file, 0xff,
sizeof(*
file) * filelen);
1473 const size_t lslash = lslash_str ? (size_t)(lslash_str -
string) + 1 : 0;
1502 const char *extension = strrchr(filepath,
'.');
1503 if (extension ==
NULL) {
1519 if ((dirlen > 0) && (dst[dirlen - 1] !=
SEP)) {
1520 dst[dirlen++] =
SEP;
1524 if (dirlen >= maxlen) {
1532 const size_t maxlen,
1533 const char *__restrict dir,
1534 const char *__restrict
file)
1536 #ifdef DEBUG_STRSIZE
1537 memset(dst, 0xff,
sizeof(*dst) * maxlen);
1548 if (dirlen == maxlen) {
1549 memcpy(dst, dir, dirlen);
1550 dst[dirlen - 1] =
'\0';
1554 memcpy(dst, dir, dirlen + 1);
1556 if (dirlen + 1 >= maxlen) {
1562 dst[dirlen++] =
SEP;
1566 if (dirlen >= maxlen) {
1573 size_t BLI_path_join(
char *__restrict dst,
const size_t dst_len,
const char *path, ...)
1575 #ifdef DEBUG_STRSIZE
1576 memset(dst, 0xff,
sizeof(*dst) * dst_len);
1581 const size_t dst_last = dst_len - 1;
1584 if (ofs == dst_last) {
1590 bool has_trailing_slash =
false;
1599 has_trailing_slash = (path[
len] !=
'\0');
1603 va_start(args, path);
1604 while ((path = (
const char *)va_arg(args,
const char *))) {
1605 has_trailing_slash =
false;
1610 size_t len = strlen(path);
1620 if (ofs == dst_last) {
1624 has_trailing_slash = (path[
len] !=
'\0');
1625 if (ofs +
len >= dst_last) {
1626 len = dst_last - ofs;
1628 memcpy(&dst[ofs], path,
len);
1630 if (ofs == dst_last) {
1636 has_trailing_slash = (
path_init != path);
1641 if (has_trailing_slash) {
1642 if ((ofs != dst_last) && (ofs != 0) && (
ELEM(dst[ofs - 1],
SEP,
ALTSEP) == 0)) {
1656 return filename ? filename + 1 : path;
1661 int *__restrict r_offset,
1662 int *__restrict r_len)
1669 const char c = path[i];
1671 if (
prev + 1 != i) {
1673 if (index_step == index) {
1692 int index_step = -1;
1693 int prev = strlen(path);
1696 const char c = i >= 0 ? path[i] :
'\0';
1698 if (
prev - 1 != i) {
1700 if (index_step == index) {
1738 if (
STREQ(container_native, containee_native)) {
1752 const char *
const ffslash = strchr(
string,
'/');
1753 const char *
const fbslash = strchr(
string,
'\\');
1762 return (ffslash < fbslash) ? ffslash : fbslash;
1767 const char *
const lfslash = strrchr(
string,
'/');
1768 const char *
const lbslash = strrchr(
string,
'\\');
1777 return (lfslash > lbslash) ? lfslash : lbslash;
1782 int len = strlen(
string);
1783 if (
len == 0 ||
string[
len - 1] !=
SEP) {
1785 string[
len + 1] =
'\0';
1793 int len = strlen(
string);
1795 if (
string[
len - 1] ==
SEP) {
1796 string[
len - 1] =
'\0';
#define BLI_assert_msg(a, msg)
File and directory operations.
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
char * BLI_current_working_dir(char *dir, size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool BLI_dir_create_recursive(const char *dir) ATTR_NONNULL()
int BLI_access(const char *filepath, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_kdtree_nd_() free(KDTree *tree)
void BLI_str_replace_char(char *str, char src, char dst) ATTR_NONNULL()
bool BLI_str_startswith(const char *__restrict str, const char *__restrict start) ATTR_NONNULL()
size_t BLI_strncpy_rlen(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
size_t BLI_strnlen(const char *str, size_t maxlen) ATTR_WARN_UNUSED_RESULT 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()
void BLI_str_tolower_ascii(char *str, size_t len) ATTR_NONNULL()
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
Compatibility-like things for windows.
void BLI_windows_get_default_root_dir(char root_dir[4])
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.
ccl_global float * buffer
void(* MEM_freeN)(void *vmemh)
SymEdge< T > * prev(const SymEdge< T > *se)
void path_init(const string &path, const string &user_path)
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_path_is_abs_from_cwd(const char *path)
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_filename_make_safe_ex(char *fname, bool allow_tokens)
int BLI_path_cmp_normalized(const char *p1, const char *p2)
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)
bool BLI_path_contains(const char *container_path, const char *containee_path)
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)
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_frame_strip(char *path, char *r_ext, const size_t ext_maxlen)
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)
int BLI_path_sequence_decode(const char *string, char *head, char *tail, ushort *r_digits_len)
bool BLI_path_frame_get(char *path, int *r_frame, int *r_digits_len)
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)