change EPAIR_STRCMP semantics
This commit is contained in:
parent
cf98275ee4
commit
3409de2cb0
|
|
@ -574,7 +574,7 @@ bool ParseEntity( void ){
|
|||
if ( !GetToken( true ) ) {
|
||||
Error( "ParseEntity: EOF without closing brace" );
|
||||
}
|
||||
if ( !EPAIR_STRCMP( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
e = ParseEPair();
|
||||
|
|
@ -757,7 +757,7 @@ void SetKeyValue( entity_t *ent, const char *key, const char *value ){
|
|||
/* check for existing epair */
|
||||
for ( ep = ent->epairs; ep != NULL; ep = ep->next )
|
||||
{
|
||||
if ( !EPAIR_STRCMP( ep->key, key ) ) {
|
||||
if ( EPAIR_EQUAL( ep->key, key ) ) {
|
||||
free( ep->value );
|
||||
ep->value = copystring( value );
|
||||
return;
|
||||
|
|
@ -783,7 +783,7 @@ bool KeyExists( const entity_t *ent, const char *key ){
|
|||
/* walk epair list */
|
||||
for ( ep = ent->epairs; ep != NULL; ep = ep->next )
|
||||
{
|
||||
if ( !EPAIR_STRCMP( ep->key, key ) ) {
|
||||
if ( EPAIR_EQUAL( ep->key, key ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -809,7 +809,7 @@ const char *ValueForKey( const entity_t *ent, const char *key ){
|
|||
/* walk epair list */
|
||||
for ( ep = ent->epairs; ep != NULL; ep = ep->next )
|
||||
{
|
||||
if ( !EPAIR_STRCMP( ep->key, key ) ) {
|
||||
if ( EPAIR_EQUAL( ep->key, key ) ) {
|
||||
return ep->value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,9 +144,9 @@
|
|||
#define CASE_INSENSITIVE_EPAIRS 1
|
||||
|
||||
#if CASE_INSENSITIVE_EPAIRS
|
||||
#define EPAIR_STRCMP Q_stricmp
|
||||
#define EPAIR_EQUAL striEqual
|
||||
#else
|
||||
#define EPAIR_STRCMP strcmp
|
||||
#define EPAIR_EQUAL strEqual
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user