Skip to content
Myr

Merge branch 'splitpath_raw_fix' of https://github.com/bcollins526/stb into work2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents aad77ec, d5d052c · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:stb.h+4 added-4 removed
196 unmodified lines
197 Tim Sjostrand198 github:infatum199 Dave Butler (Croepha)200 Ethan Lee (flibitijibibo)201 Brian Collins202*/203204#include <stdarg.h>205
1800 unmodified lines
20062007char *stb_strncpy(char *s, char *t, int n)2008{2009 stb_p_strncpy_s(s,n+1,t,n);2009 s[n-1] = 0;2010 s[n] = 0;2011 return s;2012}20132014char *stb_substr(char *t, int n)
422 unmodified lines
2437 x = f1;2438 } else {2439 x = f2;2440 if (flag & STB_EXT_NO_PERIOD)2440 if (buffer[x] == '.')2441 if (path[x] == '.')2442 ++x;2443 }24442445 if (flag & STB_EXT)
8 unmodified lines
2454 if (!buffer) return NULL;2455 }24562457 if (len) { stb_p_strcpy_s(buffer, sizeof(buffer), "./"); return buffer; }2457 stb_p_strncpy_s(buffer, sizeof(buffer),path+x, y-x);2458 buffer[y-x] = 0;2458 stb_strncpy(buffer, path+int(x), int(y-x));2459 return buffer;2460}24612462char *stb_splitpath(char *output, char *src, int flag)
11992 unmodified lines