summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2011-05-19 14:22:20 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2011-05-19 14:22:20 +0200
commitd1751088e7cffcc686e51665f1c4f5e4f454bbb2 (patch)
treed1df35c669c0b22753204df872a9026fb64d318e /src
parent809f48821a861f49b691d9ca05b5022dddab739f (diff)
downloadabrt-d1751088e7cffcc686e51665f1c4f5e4f454bbb2.tar.gz
abrt-d1751088e7cffcc686e51665f1c4f5e4f454bbb2.tar.xz
abrt-d1751088e7cffcc686e51665f1c4f5e4f454bbb2.zip
move vector of pd's cod to cli, its only user
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/cli/cli.c23
-rw-r--r--src/gui-wizard-gtk/wizard.c2
-rw-r--r--src/include/report/problem_data.h18
-rw-r--r--src/lib/problem_data.c8
4 files changed, 25 insertions, 26 deletions
diff --git a/src/cli/cli.c b/src/cli/cli.c
index 3981c1bc..0e4ce98c 100644
--- a/src/cli/cli.c
+++ b/src/cli/cli.c
@@ -23,6 +23,29 @@
#include "abrt_dbus.h"
#include "report.h"
+
+/* Vector of problems: */
+/* problem_data_vector[i] = { "name" = { "content", CD_FLAG_foo_bits } } */
+
+typedef GPtrArray vector_of_problem_data_t;
+
+static inline problem_data_t *get_problem_data(vector_of_problem_data_t *vector, unsigned i)
+{
+ return (problem_data_t *)g_ptr_array_index(vector, i);
+}
+
+static void free_vector_of_problem_data(vector_of_problem_data_t *vector)
+{
+ if (vector)
+ g_ptr_array_free(vector, TRUE);
+}
+
+static vector_of_problem_data_t *new_vector_of_problem_data(void)
+{
+ return g_ptr_array_new_with_free_func((void (*)(void*)) &free_problem_data);
+}
+
+
static problem_data_t *FillCrashInfo(const char *dump_dir_name)
{
int sv_logmode = logmode;
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index cc93df7e..e5e78e8a 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -609,7 +609,7 @@ static void append_item_to_ls_details(gpointer name, gpointer value, gpointer da
gtk_list_store_append(g_ls_details, &iter);
stats->filecount++;
- //FIXME: use the value representation here
+ //FIXME: use the human-readable format_problem_item(item) instead of item->content.
/* If text and not multiline... */
if (item->flags & CD_FLAG_TXT)
{
diff --git a/src/include/report/problem_data.h b/src/include/report/problem_data.h
index 1481654f..0f38a789 100644
--- a/src/include/report/problem_data.h
+++ b/src/include/report/problem_data.h
@@ -45,6 +45,7 @@ typedef struct problem_item problem_item;
char *format_problem_item(struct problem_item *item);
+
/* In-memory problem data structure and accessors */
typedef GHashTable problem_data_t;
@@ -75,23 +76,6 @@ const char *get_problem_item_content_or_NULL(problem_data_t *problem_data, const
const char *get_problem_item_content_or_die(problem_data_t *problem_data, const char *key);
-/* Vector of these structures */
-
-typedef GPtrArray vector_of_problem_data_t;
-
-static inline problem_data_t *get_problem_data(vector_of_problem_data_t *vector, unsigned i)
-{
- return (problem_data_t *)g_ptr_array_index(vector, i);
-}
-
-vector_of_problem_data_t *new_vector_of_problem_data(void);
-static inline void free_vector_of_problem_data(vector_of_problem_data_t *vector)
-{
- if (vector)
- g_ptr_array_free(vector, TRUE);
-}
-
-
/* Conversions between in-memory and on-disk formats */
void load_problem_data_from_dump_dir(problem_data_t *problem_data, struct dump_dir *dd);
diff --git a/src/lib/problem_data.c b/src/lib/problem_data.c
index 42dc770d..c8de9147 100644
--- a/src/lib/problem_data.c
+++ b/src/lib/problem_data.c
@@ -97,14 +97,6 @@ const char *get_problem_item_content_or_NULL(problem_data_t *problem_data, const
}
-/* problem_data_vector[i] = { "name" = { "content", CD_FLAG_foo_bits } } */
-
-vector_of_problem_data_t *new_vector_of_problem_data(void)
-{
- return g_ptr_array_new_with_free_func((void (*)(void*)) &free_problem_data);
-}
-
-
/* Miscellaneous helpers */
static const char *const editable_files[] = {