From 377fc430a995e867aef701c9eca417103a1bfbcf Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 13 Feb 1998 13:50:39 +0000 Subject: [PATCH] extcdecl.h Tolti riferimenti ed inclusioni hardlock extctype.h Tolti riferimenti ed inclusioni hardlock libdefs.h Tolti riferimenti ed inclusioni hardlock isamrpc.* Cambiato il protocollo di richiesta moduli attivi in rete git-svn-id: svn://10.65.10.50/trunk@6185 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/extcdecl.h | 10 ++++------ include/extctype.h | 7 +++---- include/isamrpc.cpp | 24 +++++++++++++++++++----- include/isamrpc.h | 6 +++++- include/libdefs.h | 27 +++++++++++++++------------ 5 files changed, 46 insertions(+), 28 deletions(-) diff --git a/include/extcdecl.h b/include/extcdecl.h index 188e3d40a..85c73207b 100755 --- a/include/extcdecl.h +++ b/include/extcdecl.h @@ -4,11 +4,7 @@ #ifndef __EXTCTYPE_H #include #endif -#if XVT_OS == XVT_OS_SCOUNIX -#include "keye.h" -#else -#include "hlapi_c.h" -#endif + /* @(:) 2.3.01.178 */ #define MAXCKEY 5 #define MAXCLEN 10 @@ -19,6 +15,8 @@ /* @(:) 2.3.01.temp */ #define MAXDISPCOLS 4 #define CONFFILE "conf.gen" + +/* #if XVT_OS == XVT_OS_SCOUNIX #include "keye.h" #define HLBLOCK 2 @@ -28,7 +26,7 @@ #define REFKEY "CAMPOKEY" #define VERKEY "ìpÙˆ¬cê<" #endif - +*/ /* @DES Funzioni C esterne. Sorgenti in /disk1/p.uno */ diff --git a/include/extctype.h b/include/extctype.h index 94c21a9ed..f994d6332 100755 --- a/include/extctype.h +++ b/include/extctype.h @@ -1,6 +1,9 @@ #ifndef __EXTCTYPE_H #define __EXTCTYPE_H +#if !defined(__STDIO_H) && !defined(_INC_STDIO) +#include +#endif #ifndef __STDTTYPES_H #include @@ -36,10 +39,6 @@ #define MOSTMEM 51200 #define LEASTMEM 10240 -#if !defined(__STDIO_H) && !defined(_INC_STDIO) -#include -#endif - /* @END */ /* @T */ diff --git a/include/isamrpc.cpp b/include/isamrpc.cpp index 3111db3f6..f0fe006b0 100755 --- a/include/isamrpc.cpp +++ b/include/isamrpc.cpp @@ -177,13 +177,27 @@ bool rpc_DongleHasModule(word af) return BoolCallInt("DongleHasModule", af); } -bool rpc_DongleModules(word* int_tab0) +bool rpc_DongleModules(TBit_array& ba) { DWORD size; - real time; - char* buff = rpc_Request("DongleModules()", size, time); - if (buff) - memcpy(int_tab0, buff, (size_t)size); + real time; + + word* buff = (word*)rpc_Request("DongleModules()", size, time); + if (buff && size > 0) + { + ba.reset(); ba.set(0, TRUE); + const int words = int(size/2); + int module = 1; + for (int i = 0; i < words; i++) + { + for (int b = 0; b < 16; b++) + { + if (buff[i] & (1 << b)) + ba.set(module, TRUE); + module++; + } + } + } return size > 0; } diff --git a/include/isamrpc.h b/include/isamrpc.h index 0de4418dc..f0ecdd060 100755 --- a/include/isamrpc.h +++ b/include/isamrpc.h @@ -1,6 +1,10 @@ #ifndef __ISAMRPC_H #define __ISAMRPC_H +#ifndef __ARRAY_H +#include +#endif + #ifndef __REAL_H #include #endif @@ -9,7 +13,7 @@ bool rpc_Call(const char* cmd); char* rpc_Request(const char* cmd, unsigned long& size, real& time); bool rpc_DongleHasModule(word af); -bool rpc_DongleModules(word* int_tab0); +bool rpc_DongleModules(TBit_array& ba); word rpc_DongleNumber(); word rpc_DongleYear(); diff --git a/include/libdefs.h b/include/libdefs.h index 31238194f..4b5aa01a2 100755 --- a/include/libdefs.h +++ b/include/libdefs.h @@ -1,9 +1,20 @@ + /* @(!) 2.3.01.178 */ -#ifdef DOS +/* + +#ifdef DOS #include "hlapi_c.h" +#define HLBLOCK 1 +/* @(!) 2.3.01.178 */ +#define REFKEY "CAMPOKEY" +#define VERKEY "ìpÙˆ¬cê<" +/* @(:) 2.3.01.178 */ #else #include "keye.h" +#define HLBLOCK 2 #endif +*/ + /* @(:) 2.3.01.178 */ #define MAXCKEY 5 #define MAXCLEN 10 @@ -14,15 +25,6 @@ /* @(:) 2.3.01.temp */ #define MAXDISPCOLS 4 #define CONFFILE "conf.gen" -#ifdef DOS -#define HLBLOCK 1 -/* @(!) 2.3.01.178 */ -#define REFKEY "CAMPOKEY" -#define VERKEY "ìpÙˆ¬cê<" -/* @(:) 2.3.01.178 */ -#else -#define HLBLOCK 2 -#endif /* @(H) 2.3.00.10 24/09/91 Bonazzi Dichiarato numero di versione globale @@ -110,5 +112,6 @@ int gettdef ( char *, uchar *); /* @(:) 2.3.01.130 */ void initctab(struct capentry *); void createaut (struct capentry *); -Word Hl_Port(Word); -Word getser(void); + +// Word Hl_Port(Word); +// Word getser(void);