diff --git a/include/getaut.c b/include/getaut.c deleted file mode 100755 index 0d3e8cfe0..000000000 --- a/include/getaut.c +++ /dev/null @@ -1,72 +0,0 @@ - -#include "ccommon.h" -#include "libdefs.h" - -Word _int_tab0[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0x0000}; - -/* - @(#) CGetAut - - @(ID) - Restituisce l'autorizzazione ad utilizzare un modulo. Vedi il file modaut.h. - @(FD) - - */ - -BOOLEAN CGetAut(af) - int af; /* numero del modulo */ - -{ - int i; -#ifndef DOS - BOOLEAN ok; -#endif - if (!af) return(!af); - if (af > 48) return(FALSE); - /* @(!) 2.3.01.176 */ - if (demoflag) - { - /* @(!) 2.3.01.276 */ - if (formflag) - _int_tab0[0] = 0x019D; - else - _int_tab0[0] = 0x010D; - /* @(:) 2.3.01.276 */ - _int_tab0[1] = 0x0000; - _int_tab0[2] = 0x0000; - _int_tab0[3] = 0x0000; - af--; - return(CBITTEST(_int_tab0[af / 16], af % 16)); - } - /* @(:) 2.3.01.176 */ - if (!SerNo) return(!getser()); - /* @(!) 2.3.01.178 */ -#ifdef DOS - HL_READ(48, &_int_tab0[0]); - HL_READ(49, &_int_tab0[1]); - HL_READ(50, &_int_tab0[2]); - HL_READ(51, &_int_tab0[3]); - HL_CODE(EYECAST &_int_tab0[0], HLBLOCK); -#else - /* @(:) 2.3.01.178 */ - INT_OFF(); - HL_ON(Port, ModAd); - _int_tab0[0] = HL_RD(Port, 48); - _int_tab0[1] = HL_RD(Port, 49); - _int_tab0[2] = HL_RD(Port, 50); - _int_tab0[3] = HL_RD(Port, 51); - HL_OFF(Port); - INT_ON(); - INT_OFF(); - HL_ON(Port, ModAd); - ok = K_EYE(Port, EYECAST &_int_tab0[0], HLBLOCK); - HL_OFF(Port); - INT_ON(); - /* @(!) 2.3.01.178 */ -#endif - /* @(:) 2.3.01.178 */ - for (i = 0; i < 4; i++) _int_tab0[i] ^= SerNo; - if (_int_tab0[3]) return(FALSE); - af--; - return(CBITTEST(_int_tab0[af / 16], af % 16)); -} diff --git a/include/hlprot.c b/include/hlprot.c deleted file mode 100755 index 2560ead49..000000000 --- a/include/hlprot.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - @(SH) Funzioni per i controlli sulla chiave di protezione - -------------------------------------------------------------------------------- - @(H) 2.3.01.176 09/03/93 Bonazzi Implementazione demo e formazione - @(H) 2.3.01.178 09/03/93 Bonazzi Implementazione EYE-API in DOS - */ - -#include "ccommon.h" -#include "libdefs.h" - -Word ModAd = 26952, Port = 0, SerNo = -1; -/* @(!) 2.3.01.176 */ -BOOLEAN demoflag = FALSE, formflag = FALSE; -/* @(:) 2.3.01.176 */ - -/* - @(%) HL_Port LIBDEFS - - @(ID) - Ricerca la chiave di protezione. - @(FD) - - @(IN) - Restituisce l'indirizzo della porta parallela ove ha trovato la chiave di prot. - @(FN) - */ - -#ifndef DOS -Word Hl_Port(ModAd) - Word ModAd; /* indirizzo del modulo */ -{ - Byte Dummy[10]; - Word n, PortAdr[3]; - - PortAdr[0] = 0x3BC; - PortAdr[1] = 0x378; - PortAdr[2] = 0x278; - - INT_OFF(); - for(n = 0; n < 3; n++) - { - strcpy(Dummy, "HARDLOCK"); - HL_ON(PortAdr[n], ModAd); - if(K_EYE(PortAdr[n], EYECAST Dummy, HLBLOCK)) - if(K_EYE(PortAdr[n], EYECAST Dummy, HLBLOCK)) - if(!strncmp("HARDLOCK", Dummy, 8)) - { - HL_OFF(PortAdr[n]); - INT_ON(); - return(PortAdr[n]); - } - HL_OFF(PortAdr[n]); - } - INT_ON(); - return(0); -} -#endif - -/* - @(%) getser LIBDEFS - - @(ID) - Restituisce il numero di serie del cliente. - @(FD) - - @(IN) - Utilizza la chiave di protezione. - @(FN) - */ - -Word getser() - -{ - Word Val[4]; -#ifndef DOS - BOOLEAN ok; - int i; -#endif - SerNo = -1; - /* @(!) 2.3.01.178 */ -#ifdef DOS - if (HL_AVAIL() == STATUS_OK) -#else - /* @(:) 2.3.01.178 */ - if (Port = Hl_Port(ModAd)) - /* @(!) 2.3.01.178 */ -#endif - /* @(:) 2.3.01.178 */ - { - SerNo = 0; - /* @(!) 2.3.01.178 */ -#ifdef DOS - HL_READ(0, &Val[0]); - HL_READ(1, &Val[1]); - HL_READ(2, &Val[2]); - HL_READ(3, &Val[3]); - HL_CODE(EYECAST &Val[0], HLBLOCK); -#else - /* @(:) 2.3.01.178 */ - INT_OFF(); - HL_ON(Port, ModAd); - Val[0] = HL_RD(Port, 0); - Val[1] = HL_RD(Port, 1); - Val[2] = HL_RD(Port, 2); - Val[3] = HL_RD(Port, 3); - HL_OFF(Port); - INT_ON(); - INT_OFF(); - HL_ON(Port, ModAd); - ok = K_EYE(Port, EYECAST &Val[0], HLBLOCK); - HL_OFF(Port); - INT_ON(); - /* @(!) 2.3.01.178 */ -#endif - /* @(:) 2.3.01.178 */ - if (Val[0] == 0xFAE8) - { - SerNo = Val[1]; - return SerNo; - } - else - return 0; - } - else - /* @(!) 2.3.01.176 */ - { -#ifdef DOS - FILE *f = fopen("c:\\command.com", "r"); - char s[4]; - - if (f == NULL) return(-1); - if (fseek(f, 46500L, SEEK_SET) != 0) return(-1); - if (fread(s, 1, 1, f) == -1) return(-1); - fclose(f); - if (*s != 'm') return(-1); -#endif - SerNo = 0; - demoflag = TRUE; - return(0); - } - /* @(:) 2.3.01.176 */ -}