mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: crtlib: add quotation mark support for ParseFile, required for filesystem_stdio
This commit is contained in:
@@ -889,11 +889,14 @@ COM_ParseFile
|
||||
text parser
|
||||
==============
|
||||
*/
|
||||
char *_COM_ParseFileSafe( char *data, char *token, const int size, unsigned int flags, int *plen )
|
||||
char *COM_ParseFileSafe( char *data, char *token, const int size, unsigned int flags, int *plen, qboolean *quoted )
|
||||
{
|
||||
int c, len = 0;
|
||||
qboolean overflow = false;
|
||||
|
||||
if( quoted )
|
||||
*quoted = false;
|
||||
|
||||
if( !token || !size )
|
||||
{
|
||||
if( plen ) *plen = 0;
|
||||
@@ -927,6 +930,9 @@ skipwhite:
|
||||
// handle quoted strings specially
|
||||
if( c == '\"' )
|
||||
{
|
||||
if( quoted )
|
||||
*quoted = true;
|
||||
|
||||
data++;
|
||||
while( 1 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user