public: add COM_StringEmpty and COM_StringEmptyOrNULL macros (that eventually replace less obvious COM_CheckString and COM_CheckStringEmpty)

This commit is contained in:
Alibek Omarov
2026-02-20 23:35:40 +05:00
committed by a1batross
parent b2911e6d96
commit ae15886a14

View File

@@ -97,6 +97,10 @@ void COM_PathSlashFix( char *path );
// return 0 on empty or null string, 1 otherwise
#define COM_CheckString( string ) ( ( !string || !*string ) ? 0 : 1 )
#define COM_CheckStringEmpty( string ) ( ( !*string ) ? 0 : 1 )
#define COM_StringEmpty( string ) (( string )[0] ? false : true )
#define COM_StringEmptyOrNULL( string ) (( string ) && ( string )[0] ? false : true )
char *COM_ParseFileSafe( char *data, char *token, const int size, unsigned int flags, int *len, qboolean *quoted );
#define COM_ParseFile( data, token, size ) COM_ParseFileSafe( data, token, size, 0, NULL, NULL )
int matchpattern( const char *in, const char *pattern, qboolean caseinsensitive );