--- mstools/samples/rpc/dict/util0.h 2018/08/09 18:20:57 1.1.1.2 +++ mstools/samples/rpc/dict/util0.h 2018/08/09 18:24:21 1.1.1.3 @@ -6,6 +6,8 @@ /** **/ /*************************************************************/ +#include + /*************************************************************************/ /*** RecordNode / RecordTree free routines ***/ /*************************************************************************/ @@ -67,35 +69,14 @@ Tree_Duplicate( /*** MIDL_user_allocate / MIDL_user_free ***/ /*************************************************************************/ -void * -MIDL_user_allocate(size_t count); +void __RPC_FAR * __RPC_API MIDL_user_allocate(size_t count); -void -MIDL_user_free(void * p); +void __RPC_API MIDL_user_free(void __RPC_FAR * p); /*************************************************************************/ /*** Comparison and Printing routines ***/ /*************************************************************************/ -/* -Record definition - moved to imported file util1.idl: - -typedef struct _Record { - short key; - char* name; -} Record; -*/ - - -#define DICT_SUCCESS 0 -#define DICT_ITEM_ALREADY_PRESENT 1 -#define DICT_ITEM_NOT_FOUND 2 -#define DICT_FIRST_ITEM 3 -#define DICT_LAST_ITEM 4 -#define DICT_EMPTY_DICTIONARY 5 -#define DICT_NULL_ITEM 6 - - Record * makeRecord( short key, @@ -118,9 +99,6 @@ ItemCopy( OUT Record * dest ); -// void TestLoop( Dictionary * pdict ); - -// void TestLoopOld(Dictionary * dp); int comp(void* x, void* y); @@ -128,7 +106,8 @@ void printRecord(void* rp); typedef void (*PrintFun) (void *); -void prinTree(int lmargin, +void prinTree( + int lmargin, int indent, TreeNode *np, PrintFun print);