From 11396509489c86a65851ddd3f77cad480f6b3e87 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 10 Oct 2021 12:31:03 +0200 Subject: [PATCH] atr_scrap_eftlab.py producing atrs.h compatible with make style --- client/atr_scrap_eftlab.py | 22 +++++++++++----------- client/src/atrs.h | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/client/atr_scrap_eftlab.py b/client/atr_scrap_eftlab.py index 93b044451..9b780fd7b 100755 --- a/client/atr_scrap_eftlab.py +++ b/client/atr_scrap_eftlab.py @@ -37,26 +37,26 @@ def main(): print( """#ifndef ATRS_H__ - #define ATRS_H__ +#define ATRS_H__ - #include +#include - typedef struct atr_s { - const char *bytes; - const char *desc; - } atr_t; +typedef struct atr_s { + const char *bytes; + const char *desc; +} atr_t; - const char *getAtrInfo(const char *atr_str); +const char *getAtrInfo(const char *atr_str); - // atr_t array are expected to be NULL terminated - const static atr_t AtrTable[] = {""") +// atr_t array are expected to be NULL terminated +const static atr_t AtrTable[] = {""") print_atr(df) print(""" {NULL, "no ATR info available"} - }; +}; - #endif""") +#endif""") if __name__ == "__main__": main() diff --git a/client/src/atrs.h b/client/src/atrs.h index 9309cbc0c..045bb9dde 100644 --- a/client/src/atrs.h +++ b/client/src/atrs.h @@ -1,18 +1,18 @@ #ifndef ATRS_H__ - - #define ATRS_H__ - #include +#define ATRS_H__ - typedef struct atr_s { - const char *bytes; - const char *desc; - } atr_t; +#include - const char *getAtrInfo(const char *atr_str); +typedef struct atr_s { + const char *bytes; + const char *desc; +} atr_t; - // atr_t array are expected to be NULL terminated - const static atr_t AtrTable[] = { +const char *getAtrInfo(const char *atr_str); + +// atr_t array are expected to be NULL terminated +const static atr_t AtrTable[] = { { "3B021450", "Schlumberger Multiflex 3k" }, { "3B025301", "Gemplus GemClub Memo SuperShop clubcard" }, { "3B0400000000", "Laundromat payment card Spanish ID (“DNIe: Documento Nacional de Identidad electrónico). http://www.dnie.es/" }, @@ -1619,6 +1619,6 @@ { "3FFF9500FF918171FF4700444E4153505330312044736836303916", "PayTV card for DishNetwork Sat receiver http://www.dishnetwork.com/ Cards were obsoleted in nationwide system update in 2009." }, { "3FFF9500FF918171FF470054494745523030332052657632353064", "Tivu’ Sat (Italy) CAM card www.tivu.tv" }, {NULL, "no ATR info available"} - }; +}; - #endif +#endif