|
|
1.1 root 1: /* $Header: extnsionst.h,v 1.4 87/08/31 19:58:18 toddb 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 EXTENSIONSTRUCT_H
26: #define EXTENSIONSTRUCT_H
27: #include "extension.h"
28: typedef struct _ExtensionEntry {
29: int index;
30: void (* CloseDown)(); /* called at server shutdown */
31: char *name; /* extension name */
32: int base; /* base request number */
33: int eventBase;
34: int eventLast;
35: int errorBase;
36: int errorLast;
37: pointer extPrivate;
38: } ExtensionEntry;
39:
40: typedef void (* ExtensionLookupProc)();
41:
42: typedef struct _ProcEntry {
43: char *name;
44: ExtensionLookupProc proc;
45: } ProcEntryRec, *ProcEntryPtr;
46:
47: typedef struct _ScreenProcEntry {
48: int num;
49: ProcEntryPtr procList;
50: } ScreenProcEntry;
51:
52: #define InsertGCI(pGC, pGCI, order, pPrevGCI) \
53: order(pGC,pGCI,pPrevGCI)
54:
55: #define GCI_FIRST(pGC,pGCI,dummy)\
56: { \
57: pGCI->pNextGCInterest = pGC->pNextGCInterest;\
58: pGCI->pLastGCInterest = (GCInterestPtr)&pGC->pNextGCInterest; \
59: pGC->pNextGCInterest->pLastGCInterest = pGCI; \
60: pGC->pNextGCInterest=pGCI; \
61: }
62:
63: #define GCI_MIDDLE(pGC,pGCI,pPrevGCI)\
64: { \
65: pGCI->pNextGCInterest = pPrevGCI->pNextGCInterest;\
66: pGCI->pLastGCInterest = (GCInterestPtr)&pPrevGCI->pNextGCInterest; \
67: pPrevGCI->pNextGCInterest->pLastGCInterest = pGCI; \
68: pPrevGCI->pNextGCInterest=pGCI; \
69: }
70:
71: #define GCI_LAST(pGC,pGCI,dummy)\
72: { \
73: pGCI->pNextGCInterest = (GCInterestPtr)&pGC->pNextGCInterest;\
74: pGCI->pLastGCInterest = pGC->pLastGCInterest;\
75: pGC->pLastGCInterest->pNextGCInterest = pGCI;\
76: pGC->pLastGCInterest=pGCI; \
77: }
78:
79: #define RemoveGCI(pGCI) \
80: pGCI->pNextGCInterest->pLastGCInterest = pGCI->pLastGCInterest;\
81: pGCI->pLastGCInterest->pNextGCInterest = pGCI->pNextGCInterest;\
82: pGCI->pNextGCInterest = 0;\
83: pGCI->pLastGCInterest = 0;
84:
85: #define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
86: pGC->VectorElement = NewRoutineAddress;
87:
88: #define GetGCValue(pGC, GCElement) (pGC->GCElement)
89:
90: extern void InitExtensions();
91: extern int ProcQueryExtension();
92: extern int ProcListExtensions();
93: extern ExtensionEntry *AddExtension();
94: extern ExtensionLookupProc LookupProc();
95: extern void RegisterProc();
96: extern void RegisterScreenProc();
97:
98: /* List of extension procs go here */
99:
100: #endif /* EXTENSIONSTRUCT_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.