|
|
1.1 root 1: /*************************************************************/
2: /** **/
3: /** Microsoft RPC Examples **/
4: /** Dictionary Application **/
1.1.1.2 root 5: /** Copyright(c) Microsoft Corp. 1992 **/
1.1 root 6: /** **/
7: /*************************************************************/
8:
1.1.1.3 ! root 9: #include <rpc.h>
! 10:
1.1 root 11: /*************************************************************************/
12: /*** RecordNode / RecordTree free routines ***/
13: /*************************************************************************/
14:
15: void
16: RecordTreeNodeFree(
17: IN RecordTreeNode * node
18: );
19:
20: void
21: RecordTreeFree(
22: IN RecordTreeNode * node
23: );
24:
25: VDict_Status
26: RDict_Free_Dict(
27: IN OUT RDict * r_dict
28: );
29:
30: void
31: VDict_Print(
32: VDict * pvd,
33: int indent
34: );
35:
36: /*************************************************************************/
37: /*** State Allocate / Free routines ***/
38: /*************************************************************************/
39:
40: DictState * allocate_state(void);
41:
42: void free_state(DictState * state);
43:
44: /*************************************************************************/
45: /*** Rdict Duplicate utilities ***/
46: /*************************************************************************/
47:
48: RDict *
49: RDict_Duplicate(
50: IN RDict * src
51: );
52:
53: DictState *
54: DictState_Duplicate(
55: IN DictState * src
56: );
57:
58: TreeNode *
59: TreeNode_Duplicate(
60: IN TreeNode * src
61: );
62:
63: TreeNode *
64: Tree_Duplicate(
65: IN TreeNode * src
66: );
67:
68: /*************************************************************************/
69: /*** MIDL_user_allocate / MIDL_user_free ***/
70: /*************************************************************************/
71:
1.1.1.3 ! root 72: void __RPC_FAR * __RPC_API MIDL_user_allocate(size_t count);
1.1 root 73:
1.1.1.3 ! root 74: void __RPC_API MIDL_user_free(void __RPC_FAR * p);
1.1 root 75:
76: /*************************************************************************/
77: /*** Comparison and Printing routines ***/
78: /*************************************************************************/
79:
80: Record *
81: makeRecord(
82: short key,
83: char * name
84: );
85:
86: void
87: freeRecord(
88: Record * pr
89: );
90:
91: Record *
92: ItemDuplicate(
93: Record * item
94: );
95:
96: void
97: ItemCopy(
98: IN Record * src,
99: OUT Record * dest
100: );
101:
102:
103: int comp(void* x, void* y);
104:
105: void printRecord(void* rp);
106:
107: typedef void (*PrintFun) (void *);
108:
1.1.1.3 ! root 109: void prinTree(
! 110: int lmargin,
1.1 root 111: int indent,
112: TreeNode *np,
113: PrintFun print);
114:
115: void
116: Dict_Print( /* prints the binary tree (indented right subtree,
117: followed by the root, followed by the indented
118: right dubtree) */
119: Dictionary * dp,
120: int indent); /* number of spaces to indent subsequent levels */
121:
122: TreeNode*
123: makeNode(void * item);
124:
125: void
126: Init_dict(Dictionary * dp);
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.