26 #include <X11/Xfuncproto.h>
53 typedef double VDouble;
60 typedef signed char VSByte;
65 typedef unsigned char VUByte;
69 #define VBitConst(c) (c)
70 #define VUByteConst(c) (c)
71 #define VSByteConst(c) (c)
72 #define VShortConst(c) (c)
73 #define VLongConst(c) (c ## l)
75 #define VFloatConst(c) (c ## f)
76 #define VDoubleConst(c) (c)
78 #define VFloatConst(c) ((VFloat) c)
79 #define VDoubleConst(c) ((VDouble) c)
84 typedef char VBoolean;
85 #if __STDC__ || defined(__cplusplus) || defined(c_plusplus)
86 typedef void *VPointer;
87 typedef const char *VStringConst;
89 typedef char *VPointer;
90 typedef char *VStringConst;
92 typedef char *VString;
96 typedef int VBitPromoted;
97 typedef int VBooleanPromoted;
98 typedef double VDoublePromoted;
99 typedef double VFloatPromoted;
100 typedef long VLongPromoted;
101 typedef int VSBytePromoted;
102 typedef int VShortPromoted;
103 typedef unsigned int VUBytePromoted;
106 typedef struct V_EdgesRec *VEdges;
107 typedef struct V_ImageRec *VImage;
108 typedef struct V_VolumesRec *
Volumes;
149 typedef struct V_AttrRec {
150 struct V_AttrRec *next;
151 struct V_AttrRec *prev;
158 typedef VAttrRec *VAttrList;
161 #define VAttrListEmpty(l) ((l) == NULL || (l)->next == NULL)
166 struct V_AttrRec *ptr;
170 #define VFirstAttr(l,p) ((void) ((p)->list = (l), (p)->ptr = (l)->next))
171 #define VLastAttr(l,p) ((void) ((p)->list = (l), (p)->ptr = (l)->prev))
172 #define VAttrExists(p) ((p)->ptr != NULL)
173 #define VNextAttr(p) ((void) ((p)->ptr = (p)->ptr ? (p)->ptr->next : NULL))
174 #define VPrevAttr(p) ((void) ((p)->ptr = (p)->ptr ? (p)->ptr->prev : NULL))
177 #define VGetAttrName(p) ((p)->ptr->name)
178 #define VGetAttrRepn(p) ((p)->ptr->repn)
188 #define VCommentAttr "comment"
189 #define VDataAttr "data"
190 #define VHistoryAttr "history"
191 #define VLengthAttr "length"
192 #define VNameAttr "name"
193 #define VNColumnsAttr "ncolumns"
194 #define VNRowsAttr "nrows"
195 #define VRepnAttr "repn"
203 } VBundleRec, *VBundle;
211 typedef VPointer VCopyMethod (
212 #
if NeedFunctionPrototypes
218 typedef void VDestroyMethod (
219 #
if NeedFunctionPrototypes
225 typedef VPointer VDecodeMethod (
226 #
if NeedFunctionPrototypes
233 typedef VAttrList VEncodeAttrMethod (
234 #
if NeedFunctionPrototypes
241 typedef VPointer VEncodeDataMethod (
242 #
if NeedFunctionPrototypes
253 VDestroyMethod *destroy;
254 VDecodeMethod *decode;
255 VEncodeAttrMethod *encode_attr;
256 VEncodeDataMethod *encode_data;
266 VTypeMethods *methods;
270 extern VRepnInfoRec *VRepnInfo;
273 #define VRepnSize(repn) (VRepnInfo[repn].size)
274 #define VRepnPrecision(repn) (VRepnInfo[repn].precision)
275 #define VRepnName(repn) (VRepnInfo[repn].name)
276 #define VRepnMinValue(repn) (VRepnInfo[repn].min_value)
277 #define VRepnMaxValue(repn) (VRepnInfo[repn].max_value)
278 #define VRepnMethods(repn) (VRepnInfo[repn].methods)
280 #define VIsIntegerRepn(repn) ((repn) >= VBitRepn && (repn) <= VLongRepn)
281 #define VIsFloatPtRepn(repn) ((repn) == VFloatRepn || (repn) == VDoubleRepn)
292 VStringConst keyword;
303 extern VDictEntry VBooleanDict[];
304 extern VDictEntry VNumericRepnDict[];
312 typedef enum { VLsbFirst, VMsbFirst } VPackOrder;
321 extern VPointer VCalloc (
322 #
if NeedFunctionPrototypes
329 #
if NeedFunctionPrototypes
334 extern VPointer VMalloc (
335 #
if NeedFunctionPrototypes
340 extern VPointer VRealloc (
341 #
if NeedFunctionPrototypes
349 extern void VAppendAttr (
350 #
if NeedVarargsPrototypes
359 extern VAttrList VCopyAttrList (
360 #
if NeedFunctionPrototypes
365 extern VAttrList VCreateAttrList (
366 #
if NeedFunctionPrototypes
371 extern VBundle VCreateBundle (
372 #
if NeedFunctionPrototypes
380 extern VBoolean VDecodeAttrValue (
381 #
if NeedFunctionPrototypes
389 extern void VDeleteAttr (
390 #
if NeedFunctionPrototypes
395 extern void VDestroyAttrList (
396 #
if NeedFunctionPrototypes
401 extern void VDestroyBundle (
402 #
if NeedFunctionPrototypes
407 extern VStringConst VEncodeAttrValue (
408 #
if NeedVarargsPrototypes
415 extern VBoolean VExtractAttr (
416 #
if NeedFunctionPrototypes
426 extern VGetAttrResult VGetAttr (
427 #
if NeedFunctionPrototypes
436 extern VBoolean VGetAttrValue (
437 #
if NeedFunctionPrototypes
445 extern void VInsertAttr (
446 #
if NeedVarargsPrototypes
456 extern VBoolean VLookupAttr (
457 #
if NeedFunctionPrototypes
464 extern void VPrependAttr (
465 #
if NeedVarargsPrototypes
474 extern void VSetAttr (
475 #
if NeedVarargsPrototypes
484 extern void VSetAttrValue (
485 #
if NeedVarargsPrototypes
495 extern VDictEntry *VLookupDictKeyword (
496 #
if NeedFunctionPrototypes
502 extern VDictEntry *VLookupDictValue (
503 #
if NeedVarargsPrototypes
512 typedef void VErrorHandler (
513 #
if NeedFunctionPrototypes
518 typedef void VWarningHandler (
519 #
if NeedFunctionPrototypes
524 extern void VSetErrorHandler (
525 #
if NeedFunctionPrototypes
530 extern void VSetWarningHandler (
531 #
if NeedFunctionPrototypes
536 extern void VSetProgramName (
537 #
if NeedFunctionPrototypes
543 #
if NeedVarargsPrototypes
549 extern void VWarning (
550 #
if NeedVarargsPrototypes
556 extern void VSystemError (
557 #
if NeedVarargsPrototypes
563 extern void VSystemWarning (
564 #
if NeedVarargsPrototypes
570 extern void VDefaultError (
571 #
if NeedFunctionPrototypes
576 extern void VDefaultWarning (
577 #
if NeedFunctionPrototypes
585 #
if NeedFunctionPrototypes
596 VBoolean VUnpackData (
597 #
if NeedFunctionPrototypes
609 #
if NeedFunctionPrototypes
618 #
if NeedFunctionPrototypes
628 VRepnKind VRegisterType (
629 #
if NeedFunctionPrototypes
635 VRepnKind VLookupType (
636 #
if NeedFunctionPrototypes