#include #include #include #include #include static int casesensitive = 1; static int version = 0; static QRecLevel level = QR_ECLEVEL_L; static QRencodeMode hint = QR_MODE_8; #define MAX_DATA_SIZE (7090 * 16) /* from the specification */ static int writetext(QRcode *qrcode) { unsigned char *p, bytes[1000]; int x, y, bit = 0, count=0; printf("width: %d\n",qrcode->width); p = qrcode->data; for(y=0; ywidth; y++) { for(x=0; xwidth; x++) { if(bit == 0) { bytes[count++] = 0; bit = 8; } bytes[count-1] *= 2; bytes[count-1] += (*p & 1); bit--; p++; } } for(x=0;x