aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt13
-rw-r--r--Makefile.am3
-rw-r--r--Makefile.common10
-rw-r--r--Makefile.nmake6
-rw-r--r--epan/CMakeLists.txt13
-rw-r--r--epan/Makefile.am2
-rw-r--r--epan/Makefile.common9
-rw-r--r--epan/Makefile.nmake3
-rw-r--r--epan/print.c (renamed from print.c)8
-rw-r--r--epan/print.h (renamed from print.h)74
-rw-r--r--epan/print.ps (renamed from print.ps)0
-rw-r--r--epan/ps.h (renamed from ps.h)0
-rw-r--r--file.c5
-rw-r--r--file.h2
-rw-r--r--rawshark.c2
-rw-r--r--tshark.c4
-rw-r--r--ui/gtk/follow_stream.c6
-rw-r--r--ui/gtk/main.c2
-rw-r--r--ui/gtk/main_menubar.c3
-rw-r--r--ui/gtk/packet_win.c2
-rw-r--r--ui/gtk/prefs_dlg.c2
-rw-r--r--ui/gtk/print_dlg.c2
-rw-r--r--ui/qt/export_dissection_dialog.cpp2
-rw-r--r--ui/qt/export_dissection_dialog.h2
-rw-r--r--ui/qt/main.cpp2
-rw-r--r--ui/qt/print_dialog.cpp2
-rw-r--r--ui/win32/file_dlg_win32.c2
27 files changed, 90 insertions, 91 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8c8ede595..e19fb40348 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -612,17 +612,6 @@ ADD_CUSTOM_COMMAND(
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
)
-ADD_CUSTOM_COMMAND(
- OUTPUT ps.c
- COMMAND ${PYTHON_EXECUTABLE}
- ${CMAKE_CURRENT_SOURCE_DIR}/tools/rdps.py
- ${CMAKE_CURRENT_SOURCE_DIR}/print.ps
- ps.c
- DEPENDS
- ${CMAKE_CURRENT_SOURCE_DIR}/tools/rdps.py
- ${CMAKE_CURRENT_SOURCE_DIR}/print.ps
-)
-
if(UNIX)
set(PLATFORM_SRC
capture-pcap-util-unix.c
@@ -653,8 +642,6 @@ set(WIRESHARK_COMMON_SRC
cfutils.c
clopts_common.c
frame_tvbuff.c
- print.c
- ps.c
svnversion.h
sync_pipe_write.c
version_info.c
diff --git a/Makefile.am b/Makefile.am
index 15f3af0bbf..e1d6e0234f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -598,9 +598,6 @@ SUFFIXES = .sh
rm -f $@ $@.tmp
$(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
-ps.c: print.ps $(srcdir)/tools/rdps.py
- $(PYTHON) $(srcdir)/tools/rdps.py $(srcdir)/print.ps ps.c
-
services:
$(PERL) $(srcdir)/tools/make-services.pl
diff --git a/Makefile.common b/Makefile.common
index 6f89e69667..4f5cb333cc 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -27,8 +27,7 @@
BUILT_HEADER_FILES = \
svnversion.h
-BUILT_C_FILES = \
- ps.c
+BUILT_C_FILES =
BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
@@ -37,8 +36,7 @@ GENERATED_HEADER_FILES = \
$(BUILT_HEADER_FILES)
# C source files generated from source files.
-GENERATED_C_FILES = \
- $(BUILT_C_FILES)
+GENERATED_C_FILES =
# All the generated files.
GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
@@ -51,8 +49,6 @@ SHARK_COMMON_SRC = \
cfutils.c \
clopts_common.c \
frame_tvbuff.c \
- print.c \
- ps.c \
sync_pipe_write.c \
version_info.c
@@ -70,8 +66,6 @@ SHARK_COMMON_INCLUDES = \
fileset.h \
frame_tvbuff.h \
isprint.h \
- print.h \
- ps.h \
register.h \
version_info.h \
ws_symbol_export.h
diff --git a/Makefile.nmake b/Makefile.nmake
index 236f26dc11..8268ad3783 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -489,8 +489,6 @@ QMAKE_LFLAGS *= /LARGEADDRESSAWARE $(LDFLAGS)
<<KEEP
-ps.c: tools\rdps.py print.ps
- $(PYTHON) tools\rdps.py print.ps ps.c
#
# Build the version string
#
@@ -525,8 +523,8 @@ clean-local:
capinfos.obj capinfos.exp editcap.obj editcap.exp \
mergecap.obj text2pcap.obj \
reordercap.obj nio-ie5.obj update.obj \
- text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
- rdps.pdb rdps.exe rdps.ilk config.h ps.c $(LIBS_CHECK) \
+ text2pcap-scanner.obj text2pcap-scanner.c \
+ config.h ps.c $(LIBS_CHECK) \
dftest.obj dftest.exe randpkt.obj randpkt.exe \
doxygen.cfg \
$(RESOURCES) libwireshark.dll wiretap-$(WTAP_VERSION).dll \
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt
index 871f5e5a84..4720fc8eba 100644
--- a/epan/CMakeLists.txt
+++ b/epan/CMakeLists.txt
@@ -1410,6 +1410,17 @@ ADD_CUSTOM_COMMAND(
${CMAKE_SOURCE_DIR}/tools/make-sminmpec.pl
)
+ADD_CUSTOM_COMMAND(
+ OUTPUT ps.c
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${CMAKE_SOURCE_DIR}/tools/rdps.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/print.ps
+ ps.c
+ DEPENDS
+ ${CMAKE_SOURCE_DIR}/tools/rdps.py
+ ${CMAKE_CURRENT_SOURCE_DIR}/print.ps
+)
+
set(LIBWIRESHARK_FILES
addr_and_mask.c
addr_resolv.c
@@ -1459,8 +1470,10 @@ set(LIBWIRESHARK_FILES
packet-range.c
packet.c
plugins.c
+ print.c
prefs.c
proto.c
+ ps.c
range.c
reassemble.c
reedsolomon.c
diff --git a/epan/Makefile.am b/epan/Makefile.am
index 129c25eec8..1649cc7ca9 100644
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -192,6 +192,8 @@ tvbtest.o exntest.o: exceptions.h
sminmpec.c: enterprise-numbers ../tools/make-sminmpec.pl
$(PERL) $(srcdir)/../tools/make-sminmpec.pl $(srcdir)/enterprise-numbers sminmpec.c
+ps.c: print.ps $(top_srcdir)/tools/rdps.py
+ $(PYTHON) $(top_srcdir)/tools/rdps.py $(srcdir)/print.ps ps.c
if HAVE_PLUGINS
diff --git a/epan/Makefile.common b/epan/Makefile.common
index 49eca048dd..3bbad1e3d2 100644
--- a/epan/Makefile.common
+++ b/epan/Makefile.common
@@ -73,6 +73,7 @@ LIBWIRESHARK_SRC = \
packet.c \
plugins.c \
prefs.c \
+ print.c \
proto.c \
range.c \
reassemble.c \
@@ -103,11 +104,12 @@ LIBWIRESHARK_SRC = \
xdlc.c
#
-# We distribute Lemon with Wireshark, so we don't distribute the files
-# it produces.
+# We distribute Lemon and rdps.py with Wireshark, so we don't distribute the
+# files they produce.
#
NODIST_LIBWIRESHARK_GENERATED_C_FILES = \
- dtd_grammar.c
+ dtd_grammar.c \
+ ps.c
NODIST_LIBWIRESHARK_GENERATED_HEADER_FILES = \
dtd_grammar.h
@@ -219,6 +221,7 @@ LIBWIRESHARK_INCLUDES = \
pint.h \
plugins.h \
ppptypes.h \
+ print.h \
prefs.h \
prefs-int.h \
proto.h \
diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake
index 86ac70ff00..19d0e0c660 100644
--- a/epan/Makefile.nmake
+++ b/epan/Makefile.nmake
@@ -395,5 +395,8 @@ reassemble_test.obj: reassemble_test.c
tvbtest.obj: tvbtest.c
$(CC) $(TEST_CFLAGS) -Fd.\ -c $?
+ps.c: ..\tools\rdps.py print.ps
+ $(PYTHON) ..\tools\rdps.py print.ps ps.c
+
checkapi:
$(PERL) ../tools/checkAPIs.pl -g termoutput -build $(LIBWIRESHARK_SRC)
diff --git a/print.c b/epan/print.c
index e1e134cb7c..41fd7d9b17 100644
--- a/print.c
+++ b/epan/print.c
@@ -1061,9 +1061,9 @@ void ps_clean_string(char *out, const char *in, int outbuf_size)
/* Some formats need stuff at the beginning of the output */
gboolean
-print_preamble(print_stream_t *self, gchar *filename)
+print_preamble(print_stream_t *self, gchar *filename, const char *version_string)
{
- return self->ops->print_preamble ? (self->ops->print_preamble)(self, filename) : TRUE;
+ return self->ops->print_preamble ? (self->ops->print_preamble)(self, filename, version_string) : TRUE;
}
gboolean
@@ -1198,7 +1198,7 @@ typedef struct {
} output_ps;
static gboolean
-print_preamble_ps(print_stream_t *self, gchar *filename)
+print_preamble_ps(print_stream_t *self, gchar *filename, const char *version_string)
{
output_ps *output = (output_ps *)self->data;
char psbuffer[MAX_PS_LINE_LENGTH]; /* static sized buffer! */
@@ -1207,7 +1207,7 @@ print_preamble_ps(print_stream_t *self, gchar *filename)
fputs("%% the page title\n", output->fh);
ps_clean_string(psbuffer, filename, MAX_PS_LINE_LENGTH);
- fprintf(output->fh, "/ws_pagetitle (%s - Wireshark " VERSION "%s) def\n", psbuffer, wireshark_svnversion);
+ fprintf(output->fh, "/ws_pagetitle (%s - Wireshark " VERSION "%s) def\n", psbuffer, version_string);
fputs("\n", output->fh);
return !ferror(output->fh);
}
diff --git a/print.h b/epan/print.h
index 1667bdee93..e6c2ad8f43 100644
--- a/print.h
+++ b/epan/print.h
@@ -44,7 +44,7 @@ extern "C" {
struct print_stream;
typedef struct print_stream_ops {
- gboolean (*print_preamble)(struct print_stream *self, gchar *filename);
+ gboolean (*print_preamble)(struct print_stream *self, gchar *filename, const char *version_string);
gboolean (*print_line)(struct print_stream *self, int indent,
const char *line);
gboolean (*print_bookmark)(struct print_stream *self,
@@ -59,18 +59,18 @@ typedef struct print_stream {
void *data;
} print_stream_t;
-extern print_stream_t *print_stream_text_new(gboolean to_file, const char *dest);
-extern print_stream_t *print_stream_text_stdio_new(FILE *fh);
-extern print_stream_t *print_stream_ps_new(gboolean to_file, const char *dest);
-extern print_stream_t *print_stream_ps_stdio_new(FILE *fh);
+WS_DLL_PUBLIC print_stream_t *print_stream_text_new(gboolean to_file, const char *dest);
+WS_DLL_PUBLIC print_stream_t *print_stream_text_stdio_new(FILE *fh);
+WS_DLL_PUBLIC print_stream_t *print_stream_ps_new(gboolean to_file, const char *dest);
+WS_DLL_PUBLIC print_stream_t *print_stream_ps_stdio_new(FILE *fh);
-extern gboolean print_preamble(print_stream_t *self, gchar *filename);
-extern gboolean print_line(print_stream_t *self, int indent, const char *line);
-extern gboolean print_bookmark(print_stream_t *self, const gchar *name,
+WS_DLL_PUBLIC gboolean print_preamble(print_stream_t *self, gchar *filename, const char *version_string);
+WS_DLL_PUBLIC gboolean print_line(print_stream_t *self, int indent, const char *line);
+WS_DLL_PUBLIC gboolean print_bookmark(print_stream_t *self, const gchar *name,
const gchar *title);
-extern gboolean new_page(print_stream_t *self);
-extern gboolean print_finale(print_stream_t *self);
-extern gboolean destroy_print_stream(print_stream_t *self);
+WS_DLL_PUBLIC gboolean new_page(print_stream_t *self);
+WS_DLL_PUBLIC gboolean print_finale(print_stream_t *self);
+WS_DLL_PUBLIC gboolean destroy_print_stream(print_stream_t *self);
/* print output format */
typedef enum {
@@ -117,48 +117,48 @@ typedef struct {
struct _output_fields;
typedef struct _output_fields output_fields_t;
-extern output_fields_t* output_fields_new(void);
-extern void output_fields_free(output_fields_t* info);
-extern void output_fields_add(output_fields_t* info, const gchar* field);
-extern gsize output_fields_num_fields(output_fields_t* info);
-extern gboolean output_fields_set_option(output_fields_t* info, gchar* option);
-extern void output_fields_list_options(FILE *fh);
-extern gboolean output_fields_has_cols(output_fields_t* info);
+WS_DLL_PUBLIC output_fields_t* output_fields_new(void);
+WS_DLL_PUBLIC void output_fields_free(output_fields_t* info);
+WS_DLL_PUBLIC void output_fields_add(output_fields_t* info, const gchar* field);
+WS_DLL_PUBLIC gsize output_fields_num_fields(output_fields_t* info);
+WS_DLL_PUBLIC gboolean output_fields_set_option(output_fields_t* info, gchar* option);
+WS_DLL_PUBLIC void output_fields_list_options(FILE *fh);
+WS_DLL_PUBLIC gboolean output_fields_has_cols(output_fields_t* info);
/*
* Output only these protocols
*/
-extern GHashTable *output_only_tables;
+WS_DLL_PUBLIC GHashTable *output_only_tables;
/*
* Higher-level packet-printing code.
*/
-extern gboolean proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
+WS_DLL_PUBLIC gboolean proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
print_stream_t *stream);
-extern gboolean print_hex_data(print_stream_t *stream, epan_dissect_t *edt);
+WS_DLL_PUBLIC gboolean print_hex_data(print_stream_t *stream, epan_dissect_t *edt);
-extern void write_pdml_preamble(FILE *fh, const gchar* filename);
-extern void proto_tree_write_pdml(epan_dissect_t *edt, FILE *fh);
-extern void write_pdml_finale(FILE *fh);
+WS_DLL_PUBLIC void write_pdml_preamble(FILE *fh, const gchar* filename);
+WS_DLL_PUBLIC void proto_tree_write_pdml(epan_dissect_t *edt, FILE *fh);
+WS_DLL_PUBLIC void write_pdml_finale(FILE *fh);
-extern void write_psml_preamble(FILE *fh);
-extern void proto_tree_write_psml(epan_dissect_t *edt, FILE *fh);
-extern void write_psml_finale(FILE *fh);
+WS_DLL_PUBLIC void write_psml_preamble(FILE *fh);
+WS_DLL_PUBLIC void proto_tree_write_psml(epan_dissect_t *edt, FILE *fh);
+WS_DLL_PUBLIC void write_psml_finale(FILE *fh);
-extern void write_csv_preamble(FILE *fh);
-extern void proto_tree_write_csv(epan_dissect_t *edt, FILE *fh);
-extern void write_csv_finale(FILE *fh);
+WS_DLL_PUBLIC void write_csv_preamble(FILE *fh);
+WS_DLL_PUBLIC void proto_tree_write_csv(epan_dissect_t *edt, FILE *fh);
+WS_DLL_PUBLIC void write_csv_finale(FILE *fh);
-extern void write_carrays_preamble(FILE *fh);
-extern void proto_tree_write_carrays(guint32 num, FILE *fh, epan_dissect_t *edt);
-extern void write_carrays_finale(FILE *fh);
+WS_DLL_PUBLIC void write_carrays_preamble(FILE *fh);
+WS_DLL_PUBLIC void proto_tree_write_carrays(guint32 num, FILE *fh, epan_dissect_t *edt);
+WS_DLL_PUBLIC void write_carrays_finale(FILE *fh);
-extern void write_fields_preamble(output_fields_t* fields, FILE *fh);
-extern void proto_tree_write_fields(output_fields_t* fields, epan_dissect_t *edt, column_info *cinfo, FILE *fh);
-extern void write_fields_finale(output_fields_t* fields, FILE *fh);
+WS_DLL_PUBLIC void write_fields_preamble(output_fields_t* fields, FILE *fh);
+WS_DLL_PUBLIC void proto_tree_write_fields(output_fields_t* fields, epan_dissect_t *edt, column_info *cinfo, FILE *fh);
+WS_DLL_PUBLIC void write_fields_finale(output_fields_t* fields, FILE *fh);
-extern const gchar* get_node_field_value(field_info* fi, epan_dissect_t* edt);
+WS_DLL_PUBLIC const gchar* get_node_field_value(field_info* fi, epan_dissect_t* edt);
#ifdef __cplusplus
}
diff --git a/print.ps b/epan/print.ps
index 523abf6f87..523abf6f87 100644
--- a/print.ps
+++ b/epan/print.ps
diff --git a/ps.h b/epan/ps.h
index d1134405f7..d1134405f7 100644
--- a/ps.h
+++ b/epan/ps.h
diff --git a/file.c b/file.c
index 40308b307d..6a0d2ba86d 100644
--- a/file.c
+++ b/file.c
@@ -51,7 +51,6 @@
#include <epan/column.h>
#include <epan/packet.h>
#include <epan/column-utils.h>
-#include "print.h"
#include "file.h"
#include "fileset.h"
#include "frame_tvbuff.h"
@@ -76,6 +75,8 @@
#include "ui/progress_dlg.h"
#include "ui/ui_util.h"
+#include "version_info.h"
+
/* Needed for addrinfo */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -2540,7 +2541,7 @@ cf_print_packets(capture_file *cf, print_args_t *print_args)
callback_args.num_visible_cols = 0;
callback_args.visible_cols = NULL;
- if (!print_preamble(print_args->stream, cf->filename)) {
+ if (!print_preamble(print_args->stream, cf->filename, wireshark_svnversion)) {
destroy_print_stream(print_args->stream);
return CF_PRINT_WRITE_ERROR;
}
diff --git a/file.h b/file.h
index 2bd4c051d7..bfff9676ad 100644
--- a/file.h
+++ b/file.h
@@ -26,10 +26,10 @@
#define __FILE_H__
#include "wiretap/wtap.h"
-#include "print.h"
#include <errno.h>
#include <epan/epan.h>
+#include <epan/print.h>
#include <epan/packet-range.h>
#ifdef __cplusplus
diff --git a/rawshark.c b/rawshark.c
index 1fe5f31d23..cb1d70f26f 100644
--- a/rawshark.c
+++ b/rawshark.c
@@ -77,7 +77,7 @@
#include <epan/disabled_protos.h>
#include <epan/prefs.h>
#include <epan/column.h>
-#include "print.h"
+#include <epan/print.h>
#include <epan/addr_resolv.h>
#include "ui/util.h"
#include "clopts_common.h"
diff --git a/tshark.c b/tshark.c
index d1d6aa8d0b..17b84e088a 100644
--- a/tshark.c
+++ b/tshark.c
@@ -68,7 +68,7 @@
#include <epan/disabled_protos.h>
#include <epan/prefs.h>
#include <epan/column.h>
-#include "print.h"
+#include <epan/print.h>
#include <epan/addr_resolv.h>
#include "ui/util.h"
#include "clopts_common.h"
@@ -3319,7 +3319,7 @@ write_preamble(capture_file *cf)
switch (output_action) {
case WRITE_TEXT:
- return print_preamble(print_stream, cf ? cf->filename : NULL);
+ return print_preamble(print_stream, cf ? cf->filename : NULL, wireshark_svnversion);
case WRITE_XML:
if (print_details)
diff --git a/ui/gtk/follow_stream.c b/ui/gtk/follow_stream.c
index e08ae18420..f43fdaf7f5 100644
--- a/ui/gtk/follow_stream.c
+++ b/ui/gtk/follow_stream.c
@@ -40,7 +40,7 @@
#include <epan/charsets.h>
#include <../isprint.h>
-#include <../print.h>
+#include <epan/print.h>
#include <ui/alert_box.h>
#include <ui/last_open_dir.h>
@@ -64,6 +64,8 @@
#include "ui/win32/print_win32.h"
#endif
+#include "version_info.h"
+
/* static variable declarations to speed up the performance
* of follow_load_text and follow_add_to_gtk_text
*/
@@ -459,7 +461,7 @@ follow_print_stream(GtkWidget * w _U_, gpointer data)
return;
}
- if (!print_preamble(stream, cfile.filename))
+ if (!print_preamble(stream, cfile.filename, wireshark_svnversion))
goto print_error;
switch (follow_read_stream(follow_info, follow_print_text, stream)) {
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 30395d9c9c..812777b490 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -86,6 +86,7 @@
#include <epan/uat.h>
#include <epan/column.h>
#include <epan/disabled_protos.h>
+#include <epan/print.h>
/* general (not GTK specific) */
#include "../file.h"
@@ -94,7 +95,6 @@
#include "../filters.h"
#include "../color.h"
#include "../color_filters.h"
-#include "../print.h"
#include "../register.h"
#include "../ringbuffer.h"
#include "ui/util.h"
diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c
index a968920c62..e9b9081753 100644
--- a/ui/gtk/main_menubar.c
+++ b/ui/gtk/main_menubar.c
@@ -42,12 +42,11 @@
#include <epan/epan_dissect.h>
#include <epan/column.h>
#include <epan/stats_tree_priv.h>
-
#include <epan/filesystem.h>
+#include <epan/print.h>
#include "cfile.h"
#include "globals.h"
-#include "print.h"
#include "color_filters.h"
#include "stat_menu.h"
#include "u3.h"
diff --git a/ui/gtk/packet_win.c b/ui/gtk/packet_win.c
index 5cb45dfff8..541e9c1a68 100644
--- a/ui/gtk/packet_win.c
+++ b/ui/gtk/packet_win.c
@@ -51,9 +51,9 @@
#include <epan/epan_dissect.h>
#include <epan/strutil.h>
#include <epan/tvbuff-int.h>
+#include <epan/print.h>
#include "../file.h"
-#include "../print.h"
#include "../summary.h"
#include "ui/recent.h"
diff --git a/ui/gtk/prefs_dlg.c b/ui/gtk/prefs_dlg.c
index 54fbe51039..9bc073f72a 100644
--- a/ui/gtk/prefs_dlg.c
+++ b/ui/gtk/prefs_dlg.c
@@ -33,9 +33,9 @@
#include <epan/strutil.h>
#include <epan/prefs-int.h>
#include <epan/epan_dissect.h>
+#include <epan/print.h>
#include "../file.h"
-#include "../print.h"
#include "ui/preference_utils.h"
#include "ui/simple_dialog.h"
diff --git a/ui/gtk/print_dlg.c b/ui/gtk/print_dlg.c
index bfbb640eec..54036b3622 100644
--- a/ui/gtk/print_dlg.c
+++ b/ui/gtk/print_dlg.c
@@ -31,8 +31,8 @@
#include <epan/prefs.h>
#include <epan/epan_dissect.h>
#include <epan/filesystem.h>
+#include <epan/print.h>
-#include "print.h"
#include "ui/alert_box.h"
#include "ui/simple_dialog.h"
#include "ui/util.h"
diff --git a/ui/qt/export_dissection_dialog.cpp b/ui/qt/export_dissection_dialog.cpp
index 9fcc3df71e..80d10160cc 100644
--- a/ui/qt/export_dissection_dialog.cpp
+++ b/ui/qt/export_dissection_dialog.cpp
@@ -28,11 +28,11 @@
#include "epan/packet-range.h"
#include "ui/win32/file_dlg_win32.h"
#else // Q_OS_WIN
-#include "print.h"
#include "ui/alert_box.h"
#include "ui/help_url.h"
+#include <epan/print.h>
#include <epan/filesystem.h>
#include "qt_ui_utils.h"
diff --git a/ui/qt/export_dissection_dialog.h b/ui/qt/export_dissection_dialog.h
index 09a9e83a57..3dc2cfb1be 100644
--- a/ui/qt/export_dissection_dialog.h
+++ b/ui/qt/export_dissection_dialog.h
@@ -29,7 +29,7 @@
#include <glib.h>
#include "file.h"
-#include "print.h"
+#include "epan/print.h"
#include "ui/file_dialog.h"
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp
index 28033ecc71..5570e5965d 100644
--- a/ui/qt/main.cpp
+++ b/ui/qt/main.cpp
@@ -64,13 +64,13 @@
#include <epan/uat.h>
#include <epan/column.h>
#include <epan/disabled_protos.h>
+#include <epan/print.h>
/* general (not Qt specific) */
#include "file.h"
#include "summary.h"
#include "color.h"
#include "color_filters.h"
-#include "print.h"
#include "register.h"
#include "ringbuffer.h"
#include "ui/util.h"
diff --git a/ui/qt/print_dialog.cpp b/ui/qt/print_dialog.cpp
index 256fad86f3..be5a99e41e 100644
--- a/ui/qt/print_dialog.cpp
+++ b/ui/qt/print_dialog.cpp
@@ -38,7 +38,7 @@ extern "C" {
// Page element callbacks
static gboolean
-print_preamble_pd(print_stream_t *self, gchar *filename)
+print_preamble_pd(print_stream_t *self, gchar *filename, const char *version_string _U_)
{
Q_UNUSED(filename);
diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c
index 0f2a384467..d0d8c84d2f 100644
--- a/ui/win32/file_dlg_win32.c
+++ b/ui/win32/file_dlg_win32.c
@@ -43,11 +43,11 @@
#include "epan/filesystem.h"
#include "epan/addr_resolv.h"
#include "epan/prefs.h"
+#include "epan/print.h"
#include "wsutil/file_util.h"
#include "wsutil/unicode-utils.h"
#include "color.h"
-#include "print.h"
#include "color_filters.h"
#include "merge.h"