diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-03-26 19:20:51 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-03-27 02:21:19 +0000 |
commit | dd6a74894f5cac1c3b2a3706e1e2e219b3440c0c (patch) | |
tree | bb20249371caaccdd3ff6c1de0490c777c59ad03 /ui/text_import.c | |
parent | f0ada20a91b2f8aeb785dfd121060af0442dd307 (diff) | |
download | wireshark-dd6a74894f5cac1c3b2a3706e1e2e219b3440c0c.tar.gz |
Pull the invocation of the Lex scanner into common code.
Instead of text_import_setup() and text_import_cleanup() routines, and
the actual scanner invocation being done in the dialog box, have a
text_import() routine that does all the work.
Change-Id: Ifd8a999618dbb411d613e6596484e4c2e013431d
Reviewed-on: https://code.wireshark.org/review/14647
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/text_import.c')
-rw-r--r-- | ui/text_import.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/ui/text_import.c b/ui/text_import.c index f320eb5e42..9928ddbc1f 100644 --- a/ui/text_import.c +++ b/ui/text_import.c @@ -900,10 +900,10 @@ parse_token (token_t token, char *str) } /*---------------------------------------------------------------------- - * take in the import config information + * Import a text file. */ void -text_import_setup(text_import_info_t *info) +text_import(text_import_info_t *info) { packet_buf = (guint8 *)g_malloc(sizeof(HDR_ETHERNET) + sizeof(HDR_IP) + sizeof(HDR_SCTP) + sizeof(HDR_DATA_CHUNK) + @@ -1013,14 +1013,11 @@ text_import_setup(text_import_info_t *info) } max_offset = info->max_frame_length; -} -/*---------------------------------------------------------------------- - * Clean up after text import - */ -void -text_import_cleanup(void) -{ + text_importin = info->import_text_file; + + text_importlex(); + g_free(packet_buf); } |