MCPcopy Create free account
hub / github.com/TankOs/SFGUI / ProcExtsFromExtString

Function ProcExtsFromExtString

src/SFGUI/GLLoader.cpp:1855–1887  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1853
1854
1855static void ProcExtsFromExtString(const char *strExtList)
1856{
1857 size_t iExtListLen = strlen(strExtList);
1858 const char *strExtListEnd = strExtList + iExtListLen;
1859 const char *strCurrPos = strExtList;
1860 char strWorkBuff[256];
1861
1862 while(*strCurrPos)
1863 {
1864 /*Get the extension at our position.*/
1865 int iStrLen = 0;
1866 const char *strEndStr = strchr(strCurrPos, ' ');
1867 int iStop = 0;
1868 if(strEndStr == NULL)
1869 {
1870 strEndStr = strExtListEnd;
1871 iStop = 1;
1872 }
1873
1874 iStrLen = (int)((ptrdiff_t)strEndStr - (ptrdiff_t)strCurrPos);
1875
1876 if(iStrLen > 255)
1877 return;
1878
1879 strncpy(strWorkBuff, strCurrPos, static_cast<size_t>(iStrLen));
1880 strWorkBuff[iStrLen] = '\0';
1881
1882 LoadExtByName(strWorkBuff);
1883
1884 strCurrPos = strEndStr + 1;
1885 if(iStop) break;
1886 }
1887}
1888
1889int sfgogl_LoadFunctions(void)
1890{

Callers 1

sfgogl_LoadFunctionsFunction · 0.85

Calls 1

LoadExtByNameFunction · 0.85

Tested by

no test coverage detected