diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-04-16 18:17:48 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-04-16 18:17:48 +0000 |
commit | 8c42aa51f7274af0e326bba69b936e394641d6f3 (patch) | |
tree | 861d737930c8f4c8d484a64d14dc142f90174a85 /print.c | |
parent | 24275c3736af957127998565671e74e3382ab9ed (diff) | |
download | wireshark-8c42aa51f7274af0e326bba69b936e394641d6f3.tar.gz wireshark-8c42aa51f7274af0e326bba69b936e394641d6f3.tar.bz2 wireshark-8c42aa51f7274af0e326bba69b936e394641d6f3.zip |
make print dialog "Packet Format" options somewhat similar to the
Ethereal panes, thus better understandable
svn path=/trunk/; revision=10611
Diffstat (limited to 'print.c')
-rw-r--r-- | print.c | 37 |
1 files changed, 30 insertions, 7 deletions
@@ -1,7 +1,7 @@ /* print.c * Routines for printing packet analysis trees. * - * $Id: print.c,v 1.73 2004/04/15 19:56:15 ulfl Exp $ + * $Id: print.c,v 1.74 2004/04/16 18:17:47 ulfl Exp $ * * Gilbert Ramirez <gram@alumni.rice.edu> * @@ -187,8 +187,7 @@ void proto_tree_print_node(proto_node *node, gpointer data) proto_item_fill_label(fi, label_str); } - if (pdata->print_dissections != print_dissections_none) - print_line(pdata->fh, pdata->level, pdata->format, label_ptr); + print_line(pdata->fh, pdata->level, pdata->format, label_ptr); /* If it's uninterpreted data, dump it (unless our caller will be printing the entire packet in hex). */ @@ -334,6 +333,14 @@ proto_tree_print_node_pdml(proto_node *node, gpointer data) print_escaped_xml(pdata->fh, label_ptr); } +#if 0 + fputs("\" showname=\"", pdata->fh); + print_escaped_xml(pdata->fh, fi->hfinfo->name); + if(!fi->visible) { + fprintf(pdata->fh, "\" hide=\"yes"); + } +#endif + fprintf(pdata->fh, "\" size=\"%d", fi->length); fprintf(pdata->fh, "\" pos=\"%d", fi->start); /* fprintf(pdata->fh, "\" id=\"%d", fi->hfinfo->id);*/ @@ -654,12 +661,20 @@ void ps_clean_string(unsigned char *out, const unsigned char *in, void print_preamble(FILE *fh, gint format) { - if (format == PR_FMT_PS) + switch(format) { + case(PR_FMT_TEXT): + /* do nothing */ + break; + case(PR_FMT_PS): print_ps_preamble(fh); - else if (format == PR_FMT_PDML) { + break; + case(PR_FMT_PDML): fputs("<?xml version=\"1.0\"?>\n", fh); fputs("<pdml version=\"" PDML_VERSION "\" ", fh); fprintf(fh, "creator=\"%s/%s\">\n", PACKAGE, VERSION); + break; + default: + g_assert_not_reached(); } } @@ -667,10 +682,18 @@ print_preamble(FILE *fh, gint format) void print_finale(FILE *fh, gint format) { - if (format == PR_FMT_PS) + switch(format) { + case(PR_FMT_TEXT): + /* do nothing */ + break; + case(PR_FMT_PS): print_ps_finale(fh); - else if (format == PR_FMT_PDML) { + break; + case(PR_FMT_PDML): fputs("</pdml>\n", fh); + break; + default: + g_assert_not_reached(); } } |