MCPcopy Create free account
hub / github.com/diasurgical/devilution / BaseHttp_ExtractServerName

Function BaseHttp_ExtractServerName

3rdParty/StormLib/src/FileStream.cpp:600–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598// Local functions - base HTTP file support
599
600static const TCHAR * BaseHttp_ExtractServerName(const TCHAR * szFileName, TCHAR * szServerName)
601{
602 // Check for HTTP
603 if(!_tcsnicmp(szFileName, _T("http://"), 7))
604 szFileName += 7;
605
606 // Cut off the server name
607 if(szServerName != NULL)
608 {
609 while(szFileName[0] != 0 && szFileName[0] != _T('/'))
610 *szServerName++ = *szFileName++;
611 *szServerName = 0;
612 }
613 else
614 {
615 while(szFileName[0] != 0 && szFileName[0] != _T('/'))
616 szFileName++;
617 }
618
619 // Return the remainder
620 return szFileName;
621}
622
623static bool BaseHttp_Open(TFileStream * pStream, const TCHAR * szFileName, DWORD dwStreamFlags)
624{

Callers 2

BaseHttp_OpenFunction · 0.85
BaseHttp_ReadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected