aboutsummaryrefslogtreecommitdiffstats
path: root/epan/print_stream.h
AgeCommit message (Collapse)AuthorFilesLines
2017-06-11print_stream: add a new print_line_color() methodDave Goodell1-0/+12
This new interface allows printing a line with specified foreground and background colors. The implementation avoids printing escape sequences if the output stream is not a TTY and note that escape sequences are ignored on Windows. This initial implementation relies on relatively modern 24-bit color support which is present in many terminal emulators but may not always display properly on older or simpler emulators. Windows coloring is handled with SetConsoleTextAttribute, which offers a "1-bit" color experience (but it's better than nothing) This commit is a precursor to adding additional coloring to tshark. Bug: 5158 Change-Id: Ib2b9d800095a065a4bb60abe0550862cda5539ec Reviewed-on: https://code.wireshark.org/review/21324 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-30Speed up print_line_text.Gerald Combs1-0/+2
isatty adds a small delay, at least on OS X. Call it only when we allocate a stream. Do the same for our codeset check. Change-Id: Id3a20059dbc9cf7d5db16d8d238d038b9de0ebf2 Reviewed-on: https://code.wireshark.org/review/16222 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-22Fix comments.Guy Harris1-2/+2
Change-Id: I3b7340939b8204102bfc7e2e7d83f4d978cf7bad Reviewed-on: https://code.wireshark.org/review/5437 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-22Split the low-level print stream code into a separate file.Guy Harris1-0/+73
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 <guy@alum.mit.edu>