aboutsummaryrefslogtreecommitdiffstats
path: root/epan/print_stream.h
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-06-29 14:50:52 -0700
committerGuy Harris <gharris@sonic.net>2023-06-29 14:50:52 -0700
commit2ea65ec89f9e28d5a4ca16fbaa8b2d051e3d0d1a (patch)
treedf264b33f0c86225daf0d2f3abcbadac15c70eef /epan/print_stream.h
parent9640e926146549f3471a0eca5c90bfbde5f9554c (diff)
In print_stream_ops_t, put print_line_color right aftr print_line.
It's weird having it at the end. Add comments indicating the return values of various functions.
Diffstat (limited to 'epan/print_stream.h')
-rw-r--r--epan/print_stream.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/epan/print_stream.h b/epan/print_stream.h
index 63c73efb62..3fafa5561e 100644
--- a/epan/print_stream.h
+++ b/epan/print_stream.h
@@ -32,12 +32,12 @@ 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_line_color)(struct print_stream *self, int indent, const char *line, const color_t *fg, const color_t *bg);
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);
- gboolean (*print_line_color)(struct print_stream *self, int indent, const char *line, const color_t *fg, const color_t *bg);
} print_stream_ops_t;
typedef struct print_stream {
@@ -45,27 +45,31 @@ typedef struct print_stream {
void *data;
} print_stream_t;
+/*
+ * These return a print_stream_t * on success and NULL on failure.
+ */
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);
+/*
+ * These return TRUE if the print was successful, FALSE otherwise.
+ */
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);
/*
* equivalent to print_line(), but if the stream supports text coloring then
* the output text will also be colored with the given foreground and
* background
- *
- * returns TRUE if the print was successful, FALSE otherwise
*/
WS_DLL_PUBLIC gboolean print_line_color(print_stream_t *self, int indent, const char *line, const color_t *fg, const color_t *bg);
+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);
#ifdef __cplusplus
}