mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
merge qr.c and no_qr.c
This commit is contained in:
parent
abd18ac7a1
commit
6306a97f22
14
backend/qr.c
14
backend/qr.c
@ -21,9 +21,11 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <qrencode.h> /* The assumption is that this is already installed */
|
||||
#include "common.h"
|
||||
|
||||
#ifdef WITH_QR
|
||||
#include <qrencode.h>
|
||||
|
||||
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 <qrencode> not available");
|
||||
return ERROR_INVALID_OPTION;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user