/*************************************************************************************************************************************/ /* */ /* " A N T I - D U M P H E X A - D E C I M A L " : */ /* */ /* */ /* Author of '$xcg/anti_dumpX$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 1996??????????). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N T E R F A C E ' listG ' : */ /* */ /* */ /* :Debut_listG: */ /* :Fin_listG: */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D I R E C T I V E S S P E C I F I Q U E S D E C O M P I L A T I O N : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* F I C H I E R S D ' I N C L U D E S : */ /* */ /*************************************************************************************************************************************/ #include INCLUDES_MINI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* P A R A M E T R E S : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* " A N T I - D U M P H E X A - D E C I M A L " : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(Char,INIT(caractere_courant,K_UNDEF)); /* Caractere courant. */ DEFV(Positive,INIT(nombre_de_chiffres_hexadecimaux,NHXOC)); /* Afin de n'emettre qu'un coup sur deux... */ DEFV(Int,INIT(cumul_courant,ZERO)); /* Cumul courant. */ /*..............................................................................................................................*/ GET_ARGUMENTS_(nombre_d_arguments ,BLOC(VIDE; ) ); Tant(GetcharT(caractere_courant)) Bblock /* Le caractere courant de l'entree courante est recupere ; et on boucle */ /* sur cette recuperation tant que l'on n'est pas au bout du fichier. */ Test(IFNE(caractere_courant,K_LF)) Bblock CALS(est_ce_alpha_numerique(caractere_courant)); /* Cet appel est destine juste a evaluer 'est_ce_alpha_numerique_____valeur_numerique'... */ Test(IFNE(est_ce_alpha_numerique_____valeur_numerique,VALEUR_NUMERIQUE_D_UN_CARACTERE_NON_HEXADECIMAL)) Bblock EGAL(cumul_courant,AXPB(cumul_courant,BASE16,est_ce_alpha_numerique_____valeur_numerique)); /* Cumul du caractere courant lorsqu'il s'agit d'un chiffre hexa-decimal... */ Eblock ATes Bblock PRINT_ERREUR("le fichier a 'anti-dumper' contient des codes non-hexadecimaux"); Eblock ETes DECR(nombre_de_chiffres_hexadecimaux,I); /* Decomptage des chiffres hexa-decimaux... */ Test(IZEQ(nombre_de_chiffres_hexadecimaux)) Bblock CALS(Putchar(CARA(cumul_courant))); /* On transmet l'octet courant... */ CLIR(cumul_courant); /* Pour le prochain cumul... */ EGAL(nombre_de_chiffres_hexadecimaux,NHXOC); /* Pour le prochain comptage... */ Eblock ATes Bblock Eblock ETes Eblock ATes Bblock /* Les changements de lignes sont ignores... */ Eblock ETes Eblock ETan Test(IFNE(nombre_de_chiffres_hexadecimaux,NHXOC)) Bblock PRINT_ERREUR("le fichier a 'anti-dumper' est incomplet"); Eblock ATes Bblock Eblock ETes RETU_Commande; Eblock ECommande