Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/07/22)20180723 
sebras am I right in understanding that in a non-debug build there are only one level of messages output by gs and that is errors?16:42.26 
  the concept of warning/info/debug/trace/whatever does not apply..?16:42.43 
  but for debug-builds if_debug3m() may be used and then the first argument is some kind of debug level.16:43.19 
chrisl We do emit warnings....16:44.14 
sebras chrisl: but encoders/decoders do not?16:44.40 
chrisl Not third part ones, no16:45.00 
sebras chrisl: is jbig2dec a third part one?16:45.13 
chrisl Sort of, yes16:45.41 
  Although we own it, it's built/treated as third party - much like mupdf does16:46.21 
sebras chrisl: ok, so then warnings for that should only be printed in debug mode and that requires me to enable messages of class 'w' some how? is this how it is supposed to work?16:46.22 
chrisl sebras: Do you mean warning, or do you mean debug info?16:46.52 
sebras chrisl: jbig2dec prints warnings when a file is out of spec, but it able to cope with it. the output might not be the expected one.16:47.35 
  chrisl: in my opinion this is a warning that ought to be printed on the output, and a normal output is also generated.16:48.08 
chrisl Okay, I would just protect that with a pre-processor define - DEBUG probably16:48.39 
  I don't believe jbig2dec has a nice way to pass error/warning/info messages back to the caller16:49.18 
sebras chrisl: it has an error callback that differentiates between the levels, is that nice enough? :)16:51.17 
chrisl Ah, did not know that.... 16:52.03 
sebras chrisl: base/sjbig2.c implements that callback but only prints something if jbig2dec emits fatal.16:52.45 
  warnings seem to be passed to if_debug3m('w', ...')16:53.00 
  but I'm not quite sure how to get those printed, even in a debug build.16:53.10 
chrisl -Zw in a debug build16:53.26 
  sebras: If you want to rejig s_jbig2decode_error() to also print JBIG2_SEVERITY_WARNING messages on a non-debug build, I certainly wouldn't complain16:55.25 
sebras chrisl: jbig2dec now prints a fatal error and a series of warnings so it is easy to spot where the error originated.16:56.57 
  chrisl: and if there is a problem it can cope with that is also a warning (but no error)16:57.15 
  chrisl: seems sane..?16:57.22 
  just for context, this is an example of a file where jbig2dec recovers:16:59.11 
  https://pastebin.com/raw/ZmdNArFm16:59.12 
chrisl That looks fine to me17:02.03 
  It is generally our preference to tell people there's a problem, even if it is a problem we can continue from17:02.43 
  Okay, heading off......17:07.49 
sebras chrisl: np, thanks for the help.17:08.04 
 Forward 1 day (to 2018/07/24)>>> 
ghostscript.com #mupdf
Search: