Browse code

core: add is_in_str macro to ut.h and remove all local definitions

Alex Hermann authored on 19/08/2011 09:40:57
Showing 5 changed files
... ...
@@ -47,7 +47,6 @@
47 47
 #include "../../lib/kcore/strcommon.h"
48 48
 #include "pv_trans.h"
49 49
 
50
-#define is_in_str(p, in) (p<in->s+in->len && *p)
51 50
 
52 51
 /*! transformation buffer size */
53 52
 #define TR_BUFFER_SIZE 65536
... ...
@@ -28,12 +28,11 @@
28 28
 #include "../../mem/mem.h"
29 29
 #include "../../dprint.h"
30 30
 #include "../../trim.h"
31
+#include "../../ut.h"
31 32
 #include "../../lib/kcore/strcommon.h"
32 33
 
33 34
 #include "sql_trans.h"
34 35
 
35
-#define is_in_str(p, in) (p<in->s+in->len && *p)
36
-
37 36
 #define TR_BUFFER_SIZE 2048
38 37
 
39 38
 
... ...
@@ -29,11 +29,10 @@
29 29
 #include "../../dprint.h"
30 30
 #include "../../trim.h"
31 31
 #include "../../re.h"
32
+#include "../../ut.h"
32 33
 
33 34
 #include "txt_var.h"
34 35
 
35
-#define is_in_str(p, in) (p<in->s+in->len && *p)
36
-
37 36
 int tr_txt_eval_re(struct sip_msg *msg, tr_param_t *tp, int subtype,
38 37
 		pv_value_t *val)
39 38
 {
... ...
@@ -40,8 +40,6 @@
40 40
 #include "pvapi.h"
41 41
 #include "pvar.h"
42 42
 
43
-#define is_in_str(p, in) (p<in->s+in->len && *p)
44
-
45 43
 #define PV_TABLE_SIZE	16 /*!< pseudo-variable table size */
46 44
 #define TR_TABLE_SIZE	4  /*!< PV transformation size */
47 45
 
... ...
@@ -158,6 +158,9 @@
158 158
 	*((_dest)++) = _c;
159 159
 
160 160
 
161
+#define is_in_str(p, in) (p < in->s + in->len && *p)
162
+
163
+
161 164
 /* links a value to a msgid */
162 165
 struct msgid_var{
163 166
 	union{