added option parsing and more error checking
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@353 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -37,11 +37,23 @@ struct rf_driver {
|
||||
const unsigned char *rapdu, size_t len);
|
||||
};
|
||||
|
||||
extern int verbose, debug;
|
||||
extern int verbose;
|
||||
|
||||
extern struct rf_driver driver_openpicc;
|
||||
extern struct rf_driver driver_libnfc;
|
||||
|
||||
#define LEVEL_INFO 1
|
||||
#define LEVEL_DEBUG 2
|
||||
#define DEBUG(...) \
|
||||
{if (verbose >= LEVEL_DEBUG) \
|
||||
printf (__VA_ARGS__);}
|
||||
#define INFO(...) \
|
||||
{if (verbose >= LEVEL_INFO) \
|
||||
printf (__VA_ARGS__);}
|
||||
#define ERROR(...) \
|
||||
{if (verbose >= 0) \
|
||||
fprintf (stderr, __VA_ARGS__);}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user