comparison simtool/main.c @ 46:e2ef4b8e4136

main tools: display spenh info when serial back end is used
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 21 Mar 2021 02:08:02 +0000
parents 7c26eac6ab00
children 3fe1954f5dec
comparison
equal deleted inserted replaced
45:9eb5460f51a6 46:e2ef4b8e4136
2 #include <stdlib.h> 2 #include <stdlib.h>
3 #include <unistd.h> 3 #include <unistd.h>
4 4
5 extern char be_reader_name[]; 5 extern char be_reader_name[];
6 extern char be_atr_string[]; 6 extern char be_atr_string[];
7 extern char be_extra_info[];
7 8
8 main(argc, argv) 9 main(argc, argv)
9 char **argv; 10 char **argv;
10 { 11 {
11 extern int optind; 12 extern int optind;
24 } 25 }
25 if (be_reader_name[0]) 26 if (be_reader_name[0])
26 printf("Card reader name: %s\n", be_reader_name); 27 printf("Card reader name: %s\n", be_reader_name);
27 if (be_atr_string[0]) 28 if (be_atr_string[0])
28 printf("ATR: %s\n", be_atr_string); 29 printf("ATR: %s\n", be_atr_string);
30 if (be_extra_info[0])
31 puts(be_extra_info);
29 for (;;) { 32 for (;;) {
30 if (isatty(0)) { 33 if (isatty(0)) {
31 fputs("simtool> ", stdout); 34 fputs("simtool> ", stdout);
32 fflush(stdout); 35 fflush(stdout);
33 } 36 }