From 7d7fc47a2a2ce31a3726e422b1c35c9a213add61 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 21 Nov 2014 19:22:54 -0800 Subject: Split the low-level print stream code into a separate file. Put the low-level print stream code from epan/print.c into epan/print_stream.c, leaving the higher-level stuff in print.c Change-Id: Iae961f168ec655a29f434257b1af0937fca9f025 Reviewed-on: https://code.wireshark.org/review/5436 Reviewed-by: Guy Harris --- epan/print.h | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'epan/print.h') diff --git a/epan/print.h b/epan/print.h index 9832d575a4..816c401660 100644 --- a/epan/print.h +++ b/epan/print.h @@ -30,47 +30,16 @@ #include #include +#include + #include +#include "ws_symbol_export.h" + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ -/* - * Print stream code; this provides a "print stream" class with subclasses - * of various sorts. Additional subclasses might be implemented elsewhere. - */ -struct print_stream; - -typedef struct print_stream_ops { - 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, - const gchar *name, const gchar *title); - gboolean (*new_page)(struct print_stream *self); - gboolean (*print_finale)(struct print_stream *self); - gboolean (*destroy)(struct print_stream *self); -} print_stream_ops_t; - -typedef struct print_stream { - const print_stream_ops_t *ops; - void *data; -} print_stream_t; - -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); - -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); -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 { PR_FMT_TEXT, /* plain text */ -- cgit v1.2.3