- Started to convert debug points to use glib log API
- Moved common stuff to common/ git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4239 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
AM_CFLAGS = \
|
||||
@ADD_CFLAGS@ \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/common \
|
||||
-I$(top_srcdir)/libparser \
|
||||
-I$(top_srcdir)/libbuffers
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../rc.h"
|
||||
#include <glib.h>
|
||||
|
||||
#include "rc.h"
|
||||
|
||||
#include "types.h"
|
||||
#include "locate_root.h"
|
||||
@@ -13,15 +15,15 @@ int locate_root(const char *root_name, types_t *head, types_t **root) {
|
||||
* This element is the entry for other sub-types.
|
||||
*/
|
||||
if (!root_name || (strlen (root_name) == 0)) {
|
||||
printf ("FATAL: no root element name provided\n");
|
||||
g_warning("FATAL: no root element name provided");
|
||||
return -1;
|
||||
}
|
||||
if (!head) {
|
||||
printf ("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return -1;
|
||||
}
|
||||
if (!root) {
|
||||
printf ("NULL root reference\n");
|
||||
g_warning("NULL root reference");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -44,11 +46,11 @@ int locate_type(const char *type_name, types_t *head, types_t **type) {
|
||||
* This element is the entry for other sub-types.
|
||||
*/
|
||||
if (!type_name) {
|
||||
printf ("FATAL: no root element name provided\n");
|
||||
g_warning("FATAL: no root element name provided");
|
||||
return RC_BAD_PARAM;
|
||||
}
|
||||
if (!head) {
|
||||
printf ("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RC_BAD_PARAM;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
int resolve_typedefs(types_t **head)
|
||||
{
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (next_type = head; next_type; next_type = next_type->next)
|
||||
{
|
||||
/* Only resolve typedef */
|
||||
if (next_type->type != TYPE_TYPEDEF)
|
||||
continue;
|
||||
|
||||
printf("Trying to resolve typedef %s\n", next_type->name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "types.h"
|
||||
#include "resolvers.h"
|
||||
|
||||
@@ -17,7 +19,7 @@ int search_id(types_t *head, types_t **found, int id)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -37,7 +39,7 @@ int search_file(types_t *head, types_t **found, int file_id)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -59,7 +61,7 @@ int resolve_typedefs(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -86,7 +88,7 @@ int resolve_struct(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -144,7 +146,7 @@ int resolve_union(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -194,7 +196,7 @@ int resolve_pointer_type(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -221,7 +223,7 @@ int resolve_reference(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -248,7 +250,7 @@ int resolve_field(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -275,7 +277,7 @@ int resolve_array(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
@@ -302,7 +304,7 @@ int resolve_file(types_t **head)
|
||||
types_t *next_type;
|
||||
|
||||
if (!head) {
|
||||
printf("Empty list detected\n");
|
||||
g_warning("Empty list detected");
|
||||
return RESOLV_LIST_EMPTY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user