1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

get rid of comp() macro - CMP is already in place

This commit is contained in:
serg@serg.mysql.com
2001-10-09 15:23:44 +02:00
parent 6b6b69c2f7
commit 9ec4ca9c4d
3 changed files with 3 additions and 5 deletions

View File

@@ -276,7 +276,7 @@ typedef unsigned int uint;
typedef unsigned short ushort; typedef unsigned short ushort;
#endif #endif
#define comp(a,b) (((a) < (b)) ? -1 : ((a) > (b)) ? 1 : 0) #define CMP(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0) #define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
#define swap(t,a,b) { register t dummy; dummy = a; a = b; b = dummy; } #define swap(t,a,b) { register t dummy; dummy = a; a = b; b = dummy; }
#define test(a) ((a) ? 1 : 0) #define test(a) ((a) ? 1 : 0)

View File

@@ -87,9 +87,9 @@ typedef struct st_ft_info {
int FTB_WORD_cmp(void *v, byte *a, byte *b) int FTB_WORD_cmp(void *v, byte *a, byte *b)
{ {
/* ORDER BY docid, ndepth DESC */ /* ORDER BY docid, ndepth DESC */
int i=comp(((FTB_WORD *)a)->docid, ((FTB_WORD *)b)->docid); int i=CMP(((FTB_WORD *)a)->docid, ((FTB_WORD *)b)->docid);
if (!i) if (!i)
i=comp(((FTB_WORD *)b)->ndepth,((FTB_WORD *)a)->ndepth); i=CMP(((FTB_WORD *)b)->ndepth,((FTB_WORD *)a)->ndepth);
return i; return i;
} }

View File

@@ -19,8 +19,6 @@
#include "fulltext.h" #include "fulltext.h"
#include "m_ctype.h" #include "m_ctype.h"
#define CMP(a,b) (a<b ? -1 : a == b ? 0 : 1)
static my_bool _mi_get_prev_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, static my_bool _mi_get_prev_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uchar *keypos, uchar *key, uchar *keypos,
uint *return_key_length); uint *return_key_length);