~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/gdevxini.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: gdevxini.c 8056 2007-06-18 06:37:58Z ray $ */
 
14
/* $Id: gdevxini.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* X Windows driver initialization/finalization */
16
16
#include "memory_.h"
17
17
#include "x_.h"
45
45
/* ---------------- Opening/initialization ---------------- */
46
46
 
47
47
/* Forward references */
48
 
private void gdev_x_setup_fontmap(gx_device_X *);
 
48
static void gdev_x_setup_fontmap(gx_device_X *);
49
49
 
50
50
/* Catch the alloc error when there is not enough resources for the
51
51
 * backing pixmap.  Automatically shut off backing pixmap and let the
55
55
 * these variables must be allocated statically.  We do not see how this
56
56
 * code can work reliably in the presence of multi-threading.
57
57
 */
58
 
private struct xv_ {
 
58
static struct xv_ {
59
59
    Boolean alloc_error;
60
60
    XErrorHandler orighandler;
61
61
    XErrorHandler oldhandler;
62
62
} x_error_handler;
63
63
 
64
 
private int
 
64
static int
65
65
x_catch_alloc(Display * dpy, XErrorEvent * err)
66
66
{
67
67
    if (err->error_code == BadAlloc)
499
499
}
500
500
 
501
501
/* Set up or take down buffering in a RAM image. */
502
 
private int
 
502
static int
503
503
x_set_buffer(gx_device_X * xdev)
504
504
{
505
505
    /*
684
684
/* ------ Initialize font mapping ------ */
685
685
 
686
686
/* Extract the PostScript font name from the font map resource. */
687
 
private const char *
 
687
static const char *
688
688
get_ps_name(const char **cpp, int *len)
689
689
{
690
690
    const char *ret;
709
709
}
710
710
 
711
711
/* Extract the X11 font name from the font map resource. */
712
 
private const char *
 
712
static const char *
713
713
get_x11_name(const char **cpp, int *len)
714
714
{
715
715
    const char *ret;
742
742
}
743
743
 
744
744
/* Scan one resource and build font map records. */
745
 
private void
 
745
static void
746
746
scan_font_resource(const char *resource, x11fontmap **pmaps, gs_memory_t *mem)
747
747
{
748
748
    const char *ps_name;
790
790
}
791
791
 
792
792
/* Scan all the font resources and set up the maps. */
793
 
private void
 
793
static void
794
794
gdev_x_setup_fontmap(gx_device_X * xdev)
795
795
{
796
796
    if (!xdev->useXFonts)
971
971
/* ---------------- Closing/finalization ---------------- */
972
972
 
973
973
/* Free fonts when closing the device. */
974
 
private void
 
974
static void
975
975
free_x_fontmaps(x11fontmap **pmaps, gs_memory_t *mem)
976
976
{
977
977
    while (*pmaps) {