aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2007-02-11 16:09:21 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2007-02-11 16:09:21 +0000
commit5db20059932328ceba61b2ff4e1f94d2a1fa7f4f (patch)
tree6c634a46c49144edd8f9651c077f0a9ff39e4c78 /epan
parent28e897a1fc2e9fbd11b74ce966b6dfbbb6fa55c7 (diff)
Have Aply, Cancel and OK buttons instead of the save and ok button.
Have these buttons reloading the capture file if needed. Some rearrangement of the window (the editor is still missing "ornaments" and tooltips) svn path=/trunk/; revision=20788
Diffstat (limited to 'epan')
-rw-r--r--epan/uat-int.h2
-rw-r--r--epan/uat.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/epan/uat-int.h b/epan/uat-int.h
index b3907ea5f9..5bf22be9dc 100644
--- a/epan/uat-int.h
+++ b/epan/uat-int.h
@@ -79,6 +79,8 @@ void uat_remove_record_idx(uat_t*, guint rec_idx);
void uat_destroy(uat_t*);
+void uat_clear(uat_t*);
+
gboolean uat_save(uat_t* , char** );
gboolean uat_load(uat_t* , char** );
diff --git a/epan/uat.c b/epan/uat.c
index 38541272ca..fcf01eb038 100644
--- a/epan/uat.c
+++ b/epan/uat.c
@@ -255,6 +255,21 @@ void uat_destroy(uat_t* uat) {
}
+void uat_clear(uat_t* uat) {
+ guint i;
+
+ for ( i = 0 ; i < uat->user_data->len ; i++ ) {
+ if (uat->free_cb) {
+ uat->free_cb(UAT_INDEX_PTR(uat,i));
+ }
+ }
+
+ g_array_set_size(uat->user_data,0);
+
+ *((uat)->user_ptr) = NULL;
+ *((uat)->nrows_p) = 0;
+}
+
void* uat_dup(uat_t* uat, guint* len_p) {
guint size = (uat->record_size * uat->user_data->len);
*len_p = size;