diff --git a/ChangeLog b/ChangeLog index 06375ee..412c0df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,7 @@ Improvements: - Windows: logging via OutputDebugString(), ease debugging - nfc-mfclassic: use smaller files for cards < 4k - nfc-mfclassic: by defaut don't authorise wrong keyfile, use "f" to force + - quick_start_example1.c: remove err.h dependency, easier for Windowsians Changes: - Upon malloc error, nfc_init() doesn't force exit() anymore diff --git a/examples/doc/quick_start_example1.c b/examples/doc/quick_start_example1.c index 59cf06d..0c7b620 100644 --- a/examples/doc/quick_start_example1.c +++ b/examples/doc/quick_start_example1.c @@ -6,12 +6,7 @@ // To compile this simple example: // $ gcc -o quick_start_example1 quick_start_example1.c -lnfc -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif // HAVE_CONFIG_H - #include -#include #include static void @@ -37,7 +32,7 @@ main(int argc, const char *argv[]) // Initialize libnfc and set the nfc_context nfc_init(&context); if (context == NULL) { - warnx("Unable to init libnfc (malloc)\n"); + printf("Unable to init libnfc (malloc)\n"); exit(EXIT_FAILURE); } @@ -53,7 +48,7 @@ main(int argc, const char *argv[]) pnd = nfc_open(context, NULL); if (pnd == NULL) { - warnx("ERROR: %s", "Unable to open NFC device."); + printf("ERROR: %s", "Unable to open NFC device."); exit(EXIT_FAILURE); } // Set opened NFC device to initiator mode