~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/include/DPS/dpsXuserpath.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * dpsXuserpath.h
 
3
 *
 
4
 * (c) Copyright 1990-1994 Adobe Systems Incorporated.
 
5
 * All rights reserved.
 
6
 * 
 
7
 * Permission to use, copy, modify, distribute, and sublicense this software
 
8
 * and its documentation for any purpose and without fee is hereby granted,
 
9
 * provided that the above copyright notices appear in all copies and that
 
10
 * both those copyright notices and this permission notice appear in
 
11
 * supporting documentation and that the name of Adobe Systems Incorporated
 
12
 * not be used in advertising or publicity pertaining to distribution of the
 
13
 * software without specific, written prior permission.  No trademark license
 
14
 * to use the Adobe trademarks is hereby granted.  If the Adobe trademark
 
15
 * "Display PostScript"(tm) is used to describe this software, its
 
16
 * functionality or for any other purpose, such use shall be limited to a
 
17
 * statement that this software works in conjunction with the Display
 
18
 * PostScript system.  Proper trademark attribution to reflect Adobe's
 
19
 * ownership of the trademark shall be given whenever any such reference to
 
20
 * the Display PostScript system is made.
 
21
 * 
 
22
 * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
 
23
 * ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
 
24
 * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 
25
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 
26
 * NON- INFRINGEMENT OF THIRD PARTY RIGHTS.  IN NO EVENT SHALL ADOBE BE LIABLE
 
27
 * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
 
28
 * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
 
29
 * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
 
30
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  ADOBE WILL NOT
 
31
 * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
 
32
 * 
 
33
 * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
 
34
 * Incorporated which may be registered in certain jurisdictions
 
35
 * 
 
36
 * Author:  Adobe Systems Incorporated
 
37
 */
 
38
/* $XFree86: xc/include/DPS/dpsXuserpath.h,v 1.2 2000/06/07 22:02:56 tsi Exp $ */
 
39
 
 
40
#ifndef DPS_X_DOUSERPATH_H
 
41
#define DPS_X_DOUSERPATH_H
 
42
 
 
43
#include <DPS/dpsXcommon.h>
 
44
#include <X11/Xlib.h>
 
45
#include <DPS/dpsconfig.h>
 
46
 
 
47
/* Should be 1 for high-order byte first, 0 for low-order byte first.  I can
 
48
   never rember which is big- and which is little-endian. */
 
49
 
 
50
typedef enum _DPSNumberFormat {
 
51
#if SWAPBITS == 1
 
52
    dps_float = 128+48,
 
53
    dps_long = 128,
 
54
    dps_short = 128+32
 
55
#else /* SWAPBITS */
 
56
    dps_float = 48,
 
57
    dps_long = 0,
 
58
    dps_short = 32
 
59
#endif /* SWAPBITS */
 
60
} DPSNumberFormat;
 
61
 
 
62
/* Constants for DPSDoUserPath describing what type of coordinates are
 
63
   being used.  Other legal values are:
 
64
 
 
65
   For 32-bit fixed point numbers, use dps_long plus the number of bits
 
66
   in the fractional part.
 
67
 
 
68
   For 16-bit fixed point numbers, use dps_short plus the number of bits
 
69
   in the fractional part.
 
70
*/
 
71
 
 
72
enum _DPSUserPathOp {
 
73
    dps_setbbox = 0,
 
74
    dps_moveto,
 
75
    dps_rmoveto,
 
76
    dps_lineto,
 
77
    dps_rlineto,
 
78
    dps_curveto,
 
79
    dps_rcurveto,
 
80
    dps_arc,
 
81
    dps_arcn,
 
82
    dps_arct,
 
83
    dps_closepath,
 
84
    dps_ucache
 
85
};
 
86
 
 
87
/* We count on the fact that this is a char, so can't put it in the above
 
88
   typedef. */
 
89
 
 
90
typedef char DPSUserPathOp;
 
91
 
 
92
typedef enum _DPSUserPathAction {
 
93
    dps_uappend = 176,
 
94
    dps_ufill = 179,
 
95
    dps_ueofill = 178,
 
96
    dps_ustroke = 183,
 
97
    dps_ustrokepath = 364,
 
98
    dps_inufill = 93,
 
99
    dps_inueofill = 92,
 
100
    dps_inustroke = 312,
 
101
    dps_infill = 90,
 
102
    dps_ineofill = 89,
 
103
    dps_instroke = 311,
 
104
    dps_def = 51,
 
105
    dps_put = 120,
 
106
    dps_send = 113      /* This is really the null operator */
 
107
} DPSUserPathAction;
 
108
 
 
109
#if defined(__cplusplus) || defined(c_plusplus)
 
110
extern "C" {
 
111
#endif
 
112
 
 
113
extern void PSDoUserPath(DPSPointer coords,
 
114
                         int numCoords,
 
115
                         DPSNumberFormat numType,
 
116
                         DPSUserPathOp *ops,
 
117
                         int numOp,
 
118
                         DPSPointer bbox,
 
119
                         DPSUserPathAction action);
 
120
 
 
121
extern void DPSDoUserPath(DPSContext ctx,
 
122
                          DPSPointer coords,
 
123
                          int numCoords,
 
124
                          DPSNumberFormat numType,
 
125
                          DPSUserPathOp *ops,
 
126
                          int numOp,
 
127
                          DPSPointer bbox,
 
128
                          DPSUserPathAction action);
 
129
 
 
130
extern Bool PSHitUserPath(double x, double y,
 
131
                          double radius,
 
132
 
 
133
                          DPSPointer coords,
 
134
                          int numCoords,
 
135
                          DPSNumberFormat numType,
 
136
                          DPSUserPathOp *ops,
 
137
                          int numOp,
 
138
                          DPSPointer bbox,
 
139
                          DPSUserPathAction action);
 
140
 
 
141
extern Bool DPSHitUserPath(DPSContext ctx,
 
142
                           double x, double y,
 
143
                           double radius,
 
144
 
 
145
                           DPSPointer coords,
 
146
                           int numCoords,
 
147
                           DPSNumberFormat numType,
 
148
                           DPSUserPathOp *ops,
 
149
                           int numOp,
 
150
                           DPSPointer bbox,
 
151
                           DPSUserPathAction action);
 
152
 
 
153
#if defined(__cplusplus) || defined(c_plusplus)
 
154
}
 
155
#endif
 
156
 
 
157
#endif /* DPS_X_DOUSERPATH_H */