Browse code

pike: renamed common name structs and globals to have module prefix

Daniel-Constantin Mierla authored on 24/03/2020 15:39:54
Showing 1 changed files
... ...
@@ -25,10 +25,10 @@
25 25
 #define _PIKE_TIMER_H
26 26
 
27 27
 
28
-struct list_link {
29
-	struct list_link *next;
30
-	struct list_link *prev;
31
-};
28
+typedef struct pike_list_link {
29
+	struct pike_list_link *next;
30
+	struct pike_list_link *prev;
31
+} pike_list_link_t;
32 32
 
33 33
 
34 34
 #define has_timer_set(_ll) \
... ...
@@ -37,19 +37,19 @@ struct list_link {
37 37
 #define is_list_empty(_head) \
38 38
 	((_head)->next == (_head))
39 39
 
40
-#define update_in_timer( _head, _ll) \
40
+#define update_in_timer(_head, _ll) \
41 41
 	do { \
42
-		remove_from_timer( _head, _ll);\
43
-		append_to_timer( _head, _ll); \
42
+		remove_from_timer(_head, _ll);\
43
+		append_to_timer(_head, _ll); \
44 44
 	}while(0)
45 45
 
46 46
 
47
-void append_to_timer(struct list_link *head, struct list_link *ll );
47
+void append_to_timer(pike_list_link_t *head, pike_list_link_t *ll);
48 48
 
49
-void remove_from_timer(struct list_link *head, struct list_link *ll);
49
+void remove_from_timer(pike_list_link_t *head, pike_list_link_t *ll);
50 50
 
51
-void check_and_split_timer(struct list_link *head, unsigned int time,
52
-		struct list_link *split, unsigned char *mask);
51
+void check_and_split_timer(pike_list_link_t *head, unsigned int time,
52
+		pike_list_link_t *split, unsigned char *mask);
53 53
 
54 54
 
55 55
 #endif
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,56 @@
1
+/*
2
+ * Copyright (C) 2001-2003 FhG Fokus
3
+ *
4
+ * This file is part of Kamailio, a free SIP server.
5
+ *
6
+ * Kamailio is free software; you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation; either version 2 of the License, or
9
+ * (at your option) any later version
10
+ *
11
+ * Kamailio is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19
+ *
20
+ *
21
+ */
22
+
23
+
24
+#ifndef _PIKE_TIMER_H
25
+#define _PIKE_TIMER_H
26
+
27
+
28
+struct list_link {
29
+	struct list_link *next;
30
+	struct list_link *prev;
31
+};
32
+
33
+
34
+#define has_timer_set(_ll) \
35
+	((_ll)->prev || (_ll)->next)
36
+
37
+#define is_list_empty(_head) \
38
+	((_head)->next == (_head))
39
+
40
+#define update_in_timer( _head, _ll) \
41
+	do { \
42
+		remove_from_timer( _head, _ll);\
43
+		append_to_timer( _head, _ll); \
44
+	}while(0)
45
+
46
+
47
+void append_to_timer(struct list_link *head, struct list_link *ll );
48
+
49
+void remove_from_timer(struct list_link *head, struct list_link *ll);
50
+
51
+void check_and_split_timer(struct list_link *head, unsigned int time,
52
+		struct list_link *split, unsigned char *mask);
53
+
54
+
55
+#endif
56
+