Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ttx2scilab.c
Go to the documentation of this file.
1
2
3
4#include <glib.h>
5
6
8 const gchar *element_name,
10 const gchar **attribute_values,
11 gpointer user_data,
12 GError **error);
14 const gchar *text,
16 gpointer user_data,
17 GError **error);
19 GError *error,
20 gpointer user_data);
21
22
23
24int main (int rgc, char** argv) {
25
28
30 GIOChannel *gioc = g_io_channel_new_file("b_bhi.xml", "r", &my_err);
31#define BUF_LEN 16384
32 gchar buf[BUF_LEN];
35
36 // g_message("read file %d", bytes_read);
37
39 g_message("error parsing xml");
40 return -1;
41 }
42 return 0;
43}
44
45
46
48 const gchar *element_name,
49 const gchar **attribute_names,
50 const gchar **attribute_values,
51 gpointer user_data,
52 GError **error) {
53 // g_message("on start element (%s)", element_name);
54 if (!strcmp(element_name, "pt")) {
55 // g_message("pt ", element_name);
56 int i = 0;
57 while (attribute_names[i]) {
58 // g_message("%s %s", attribute_names[i], attribute_values[i]);
59 printf("%s ", attribute_values[i]);
60 if (!strcmp(attribute_names[i], "on")) printf("\n");
61 i++;
62 }
63 }
64}
65
67 const gchar *text,
69 gpointer user_data,
70 GError **error) {
71 // g_message("on text (%s)", text);
72
73
74}
75
77 GError *error,
78 gpointer user_data) {
79
80 // g_message("on error");
81}
82
uint16_t foo
Definition main_demo5.c:58
int main(void)
Definition test_bswap.c:33
static void on_error(GMarkupParseContext *context, GError *error, gpointer user_data)
Definition ttx2scilab.c:76
static void on_text(GMarkupParseContext *context, const gchar *text, gsize text_len, gpointer user_data, GError **error)
Definition ttx2scilab.c:66
#define BUF_LEN
static void on_start_element(GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error)
Definition ttx2scilab.c:47