mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-16 16:14:36 -04:00
merge qr.c and no_qr.c
This commit is contained in:
parent
abd18ac7a1
commit
6306a97f22
1 changed files with 13 additions and 1 deletions
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…
Add table
Add a link
Reference in a new issue