~ubuntu-branches/debian/squeeze/nas/squeeze

« back to all changes in this revision

Viewing changes to server/include/extension.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve McIntyre
  • Date: 2008-10-08 01:18:19 UTC
  • mfrom: (4.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20081008011819-wmr4h2w0298k8t7z
Tags: 1.9.1-5
* Fix pending l10n issues. Debconf translations:
* Swedish. Closes: #491766 (thanks to brother@bsnet.se)
* Arabic. Closes: #500437 (thanks to Ossama Khayat)
* Basque. Closes: #500533 (thanks to Piarres Beobide)
* Brazilian Portuguese. Closes: #500973 (thanks to Felipe
  Augusto van de Wiel)
* Many thanks again to Christian Perrier for his i18n efforts,
  co-ordinating the above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XConsortium: extension.h,v 1.6 89/07/16 14:37:47 rws Exp $ */
2
 
/***********************************************************
3
 
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
4
 
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
5
 
 
6
 
                        All Rights Reserved
7
 
 
8
 
Permission to use, copy, modify, and distribute this software and its 
9
 
documentation for any purpose and without fee is hereby granted, 
10
 
provided that the above copyright notice appear in all copies and that
11
 
both that copyright notice and this permission notice appear in 
12
 
supporting documentation, and that the names of Digital or MIT not be
13
 
used in advertising or publicity pertaining to distribution of the
14
 
software without specific, written prior permission.  
15
 
 
16
 
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
17
 
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
18
 
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
19
 
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20
 
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
21
 
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
22
 
SOFTWARE.
23
 
 
24
 
******************************************************************/
25
 
#ifndef EXTENSION_H
26
 
#define EXTENSION_H 
27
 
 
28
 
#define GetGCAndDrawableAndValidate(gcID, pGC, drawID, pDraw, client)\
29
 
    if ((client->lastDrawableID != drawID) || (client->lastGCID != gcID))\
30
 
    {\
31
 
        if (client->lastDrawableID != drawID)\
32
 
            pDraw = (DrawablePtr)LookupIDByClass(drawID, RC_DRAWABLE);\
33
 
        else\
34
 
            pDraw = client->lastDrawable;\
35
 
        if (client->lastGCID != gcID)\
36
 
            pGC = (GC *)LookupIDByType(gcID, RT_GC);\
37
 
        else\
38
 
            pGC = client->lastGC;\
39
 
        if (pDraw && pGC)\
40
 
        {\
41
 
            if ((pDraw->type == UNDRAWABLE_WINDOW) ||\
42
 
                (pGC->depth != pDraw->depth) ||\
43
 
                (pGC->pScreen != pDraw->pScreen))\
44
 
                return (BadMatch);\
45
 
            client->lastDrawable = pDraw;\
46
 
            client->lastDrawableID = drawID;\
47
 
            client->lastGC = pGC;\
48
 
            client->lastGCID = gcID;\
49
 
        }\
50
 
    }\
51
 
    else\
52
 
    {\
53
 
        pGC = client->lastGC;\
54
 
        pDraw = client->lastDrawable;\
55
 
    }\
56
 
    if (!pDraw)\
57
 
    {\
58
 
        client->errorValue = drawID; \
59
 
        return (BadDrawable);\
60
 
    }\
61
 
    if (!pGC)\
62
 
    {\
63
 
        client->errorValue = gcID;\
64
 
        return (BadGC);\
65
 
    }\
66
 
    if (pGC->serialNumber != pDraw->serialNumber)\
67
 
        ValidateGC(pDraw, pGC);
68
 
#endif /* EXTENSION_H */