#define DUMP 0
#define CHECK 1
#define FIRST_MATCH 2
-#define VERSION "1.02"
+#define VERSION "1.1"
static unsigned indent_width = 2;
static int module_name_limit = -1;
};
typedef struct _Box_Size {
- int height;
- int width;
+ char *height;
+ char *width;
} Box_Size;
char *_strdup(const char *c)
if (box_size == NULL)
return NULL;
- box_size->width = -1;
- box_size->height = -1;
+ char *width = NULL;
+ char *height = NULL;
+
+ _combine_strings(&width, "_");
+ _combine_strings(&height, "_");
+
+ box_size->width = width;
+ box_size->height = height;
AtspiComponent *component = atspi_accessible_get_component_iface(node);
if (extent == NULL)
return box_size;
- box_size->width = extent->width;
- box_size->height = extent->height;
+ *width = '\0';
+ *height = '\0';
+
+ char temp_buff[NUMBER_WIDTH];
+
+ snprintf(temp_buff, NUMBER_WIDTH, "%d", extent->width);
+ _combine_strings(&width, temp_buff);
+
+ snprintf(temp_buff, NUMBER_WIDTH, "%d", extent->height);
+ _combine_strings(&height, temp_buff);
g_object_unref(component);
g_free(extent);
+ box_size->width = width;
+ box_size->height = height;
+
return box_size;
}
_truncate_string(states, length_limit);
char result[SAFE_BUFFER_SIZE];
- int ret = snprintf(result, SAFE_BUFFER_SIZE, "[[%s],[%s],[%d,%d],[%s],[%s]]",
+ int ret = snprintf(result, SAFE_BUFFER_SIZE, "[[%s],[%s],[%s,%s],[%s],[%s]]",
node_role_name,
attributes,
box_size->width,
free(node_name);
free(node_role_name);
free(attributes);
- free(box_size);
+ if (box_size) {
+ free(box_size->width);
+ free(box_size->height);
+ free(box_size);
+ }
free(states);
return _strdup(result);