From 6306a97f2277f0fa6201682ff6e2dc8fe5ec122c Mon Sep 17 00:00:00 2001 From: hooper114 Date: Tue, 2 Sep 2008 19:49:08 +0000 Subject: [PATCH] merge qr.c and no_qr.c --- backend/qr.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/qr.c b/backend/qr.c index e1a432dd..9ee523e2 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -21,9 +21,11 @@ */ #include -#include /* The assumption is that this is already installed */ #include "common.h" +#ifdef WITH_QR +#include + static int kanji = 0; static QRecLevel level = QR_ECLEVEL_L; @@ -92,3 +94,13 @@ int qr_code(struct zint_symbol *symbol, unsigned char source[]) return errno; } + +#else +/* Handler if no QR Encode library is available */ +int qr_code(struct zint_symbol *symbol, unsigned char source[]) +{ + strcpy(symbol->errtxt, "error: QR Code library not available"); + return ERROR_INVALID_OPTION; +} +#endif +