~ubuntu-branches/ubuntu/jaunty/ghostscript/jaunty-updates

« back to all changes in this revision

Viewing changes to src/gdebug.h

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2009-01-20 16:40:45 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090120164045-lnfhi0n30o5lwhwa
Tags: 8.64.dfsg.1~svn9377-0ubuntu1
* New upstream release (SVN rev 9377)
   o Fixes many bugs concerning PDF rendering, to make the PDF printing
     workflow correctly working.
   o Fixes long-standing bugs in many drivers, like input paper tray and
     duplex options not working for the built-in PCL 4, 5, 5c, 5e, and
     6/XL drivers, PDF input not working for bjc600, bjc800, and cups
     output devices, several options not working and uninitialized
     memory with cups output device.
   o Merged nearly all patches of the Ubuntu and Debian packages upstream.
   o Fixes LP: #317810, LP: #314439, LP: #314018.
* debian/patches/03_libpaper_support.dpatch,
  debian/patches/11_gs-cjk_font_glyph_handling_fix.dpatch,
  debian/patches/12_gs-cjk_vertical_writing_metrics_fix.dpatch,
  debian/patches/13_gs-cjk_cjkps_examples.dpatch,
  debian/patches/20_bbox_segv_fix.dpatch,
  debian/patches/21_brother_7x0_gdi_fix.dpatch,
  debian/patches/22_epsn_margin_workaround.dpatch,
  debian/patches/24_gs_man_fix.dpatch,
  debian/patches/25_toolbin_insecure_tmp_usage_fix.dpatch,
  debian/patches/26_assorted_script_fixes.dpatch,
  debian/patches/29_gs_css_fix.dpatch,
  debian/patches/30_ps2pdf_man_improvement.dpatch,
  debian/patches/31_fix-gc-sigbus.dpatch,
  debian/patches/34_ftbfs-on-hurd-fix.dpatch,
  debian/patches/35_disable_libcairo.dpatch,
  debian/patches/38_pxl-duplex.dpatch,
  debian/patches/39_pxl-resolution.dpatch,
  debian/patches/42_gs-init-ps-delaybind-fix.dpatch,
  debian/patches/45_bjc600-bjc800-pdf-input.dpatch,
  debian/patches/48_cups-output-device-pdf-duplex-uninitialized-memory-fix.dpatch,
  debian/patches/50_lips4-floating-point-exception.dpatch,
  debian/patches/52_cups-device-logging.dpatch,
  debian/patches/55_pcl-input-slot-fix.dpatch,
  debian/patches/57_pxl-input-slot-fix.dpatch,
  debian/patches/60_pxl-cups-driver-pdf.dpatch,
  debian/patches/62_onebitcmyk-pdf.dpatch,
  debian/patches/65_too-big-temp-files-1.dpatch,
  debian/patches/67_too-big-temp-files-2.dpatch,
  debian/patches/70_take-into-account-data-in-stream-buffer-before-refill.dpatch:
  Removed, applied upstream.
* debian/patches/01_docdir_fix_for_debian.dpatch,
  debian/patches/02_gs_man_fix_debian.dpatch,
  debian/patches/01_docdir-fix-for-debian.dpatch,
  debian/patches/02_docdir-fix-for-debian.dpatch: Renamed patches to
  make merging with Debian easier.
* debian/patches/32_improve-handling-of-media-size-changes-from-gv.dpatch, 
  debian/patches/33_bad-params-to-xinitimage-on-large-bitmaps.dpatch:
  regenerated for new source directory structure.
* debian/rules: Corrected paths to remove cidfmap (it is in Resource/Init/
  in GS 8.64) and to install headers (source paths are psi/ and base/ now).
* debian/rules: Remove all fontmaps, as DeFoMa replaces them.
* debian/local/pdftoraster/pdftoraster.c,
  debian/local/pdftoraster/pdftoraster.convs, debian/rules: Removed
  added pdftoraster filter and use the one which comes with Ghostscript.
* debian/ghostscript.links: s/8.63/8.64/

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2001-2006 Artifex Software, Inc.
2
 
   All Rights Reserved.
3
 
  
4
 
   This software is provided AS-IS with no warranty, either express or
5
 
   implied.
6
 
 
7
 
   This software is distributed under license and may not be copied, modified
8
 
   or distributed except as expressly authorized under the terms of that
9
 
   license.  Refer to licensing information at http://www.artifex.com/
10
 
   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
11
 
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
 
*/
13
 
/* $Id: gdebug.h 8415 2007-11-29 01:42:16Z lpd $ */
14
 
/* Debugging machinery definitions */
15
 
 
16
 
#ifndef gdebug_INCLUDED
17
 
#  define gdebug_INCLUDED
18
 
 
19
 
/*
20
 
 * The compile-time DEBUG symbol determines whether debugging/tracing
21
 
 * code is included in the compiled code.  DEBUG may be set or not set
22
 
 * independently for every compilation; however, a small amount of support
23
 
 * machinery in gsmisc.c is always included in the executable, just
24
 
 * in case *some* file was compiled with DEBUG set.
25
 
 *
26
 
 * When DEBUG is set, it does not cause debugging/tracing printout to occur.
27
 
 * Rather, it includes code that produces such printout *if* (a) given
28
 
 * one(s) of 128 debugging flags is set.  In this way, one can selectively
29
 
 * turn printout on and off during debugging.  (In fact, we even provide a
30
 
 * PostScript operator, .setdebug, that does this.)
31
 
 *
32
 
 * The debugging flags are normally indexed by character code.  This is more
33
 
 * than a convention: gs_debug_c, which tests whether a given flag is set,
34
 
 * considers that if a flag named by a given upper-case letter is set, the
35
 
 * flag named by the corresponding lower-case letter is also set.
36
 
 *
37
 
 * If the output selected by a given flag can be printed by a single
38
 
 * printf, the conventional way to produce the output is
39
 
 *      if_debugN('x', "...format...", v1, ..., vN);
40
 
 * Usually the flag appears in the output explicitly:
41
 
 *      if_debugN('x', "[x]...format...", v1, ..., vN);
42
 
 * If the output is more complex, the conventional way to produce the
43
 
 * output is
44
 
 *      if ( gs_debug_c('x') ) {
45
 
 *        ... start each line with dlprintfN(...)
46
 
 *        ... produce additional output within a line with dprintfN(...)
47
 
 * } */
48
 
 
49
 
/* Define the array of debugging flags, indexed by character code. */
50
 
extern char gs_debug[128];
51
 
bool gs_debug_c(int /*char */ );
52
 
 
53
 
/*
54
 
 * Define an alias for a specialized debugging flag
55
 
 * that used to be a separate variable.
56
 
 */
57
 
#define gs_log_errors gs_debug['#']
58
 
 
59
 
/* If debugging, direct all error output to gs_debug_out. */
60
 
extern FILE *gs_debug_out;
61
 
 
62
 
/* Debugging printout macros. */
63
 
#ifdef DEBUG
64
 
#  define if_debug0(c,s)\
65
 
    BEGIN if (gs_debug_c(c)) dlprintf(s); END
66
 
#  define if_debug1(c,s,a1)\
67
 
    BEGIN if (gs_debug_c(c)) dlprintf1(s,a1); END
68
 
#  define if_debug2(c,s,a1,a2)\
69
 
    BEGIN if (gs_debug_c(c)) dlprintf2(s,a1,a2); END
70
 
#  define if_debug3(c,s,a1,a2,a3)\
71
 
    BEGIN if (gs_debug_c(c)) dlprintf3(s,a1,a2,a3); END
72
 
#  define if_debug4(c,s,a1,a2,a3,a4)\
73
 
    BEGIN if (gs_debug_c(c)) dlprintf4(s,a1,a2,a3,a4); END
74
 
#  define if_debug5(c,s,a1,a2,a3,a4,a5)\
75
 
    BEGIN if (gs_debug_c(c)) dlprintf5(s,a1,a2,a3,a4,a5); END
76
 
#  define if_debug6(c,s,a1,a2,a3,a4,a5,a6)\
77
 
    BEGIN if (gs_debug_c(c)) dlprintf6(s,a1,a2,a3,a4,a5,a6); END
78
 
#  define if_debug7(c,s,a1,a2,a3,a4,a5,a6,a7)\
79
 
    BEGIN if (gs_debug_c(c)) dlprintf7(s,a1,a2,a3,a4,a5,a6,a7); END
80
 
#  define if_debug8(c,s,a1,a2,a3,a4,a5,a6,a7,a8)\
81
 
    BEGIN if (gs_debug_c(c)) dlprintf8(s,a1,a2,a3,a4,a5,a6,a7,a8); END
82
 
#  define if_debug9(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9)\
83
 
    BEGIN if (gs_debug_c(c)) dlprintf9(s,a1,a2,a3,a4,a5,a6,a7,a8,a9); END
84
 
#  define if_debug10(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)\
85
 
    BEGIN if (gs_debug_c(c)) dlprintf10(s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10); END
86
 
#  define if_debug11(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)\
87
 
    BEGIN if (gs_debug_c(c)) dlprintf11(s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11); END
88
 
#  define if_debug12(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)\
89
 
    BEGIN if (gs_debug_c(c)) dlprintf12(s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12); END
90
 
#else
91
 
#  define if_debug0(c,s) DO_NOTHING
92
 
#  define if_debug1(c,s,a1) DO_NOTHING
93
 
#  define if_debug2(c,s,a1,a2) DO_NOTHING
94
 
#  define if_debug3(c,s,a1,a2,a3) DO_NOTHING
95
 
#  define if_debug4(c,s,a1,a2,a3,a4) DO_NOTHING
96
 
#  define if_debug5(c,s,a1,a2,a3,a4,a5) DO_NOTHING
97
 
#  define if_debug6(c,s,a1,a2,a3,a4,a5,a6) DO_NOTHING
98
 
#  define if_debug7(c,s,a1,a2,a3,a4,a5,a6,a7) DO_NOTHING
99
 
#  define if_debug8(c,s,a1,a2,a3,a4,a5,a6,a7,a8) DO_NOTHING
100
 
#  define if_debug9(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9) DO_NOTHING
101
 
#  define if_debug10(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) DO_NOTHING
102
 
#  define if_debug11(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) DO_NOTHING
103
 
#  define if_debug12(c,s,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) DO_NOTHING
104
 
#endif
105
 
 
106
 
/* Debugging support procedures in gsmisc.c */
107
 
void debug_dump_bytes(const byte * from, const byte * to,
108
 
                      const char *msg);
109
 
void debug_dump_bitmap(const byte * from, uint raster, uint height,
110
 
                       const char *msg);
111
 
void debug_print_string(const byte * str, uint len);
112
 
void debug_print_string_hex(const byte * str, uint len);
113
 
 
114
 
#endif /* gdebug_INCLUDED */