Shellminator
V1.2.0
Simple Terminal
|
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "qrcodegen.h"
Go to the source code of this file.
Macros | |
#define | testable static |
#define | qrcodegen_REED_SOLOMON_DEGREE_MAX 30 |
Functions | |
testable void | appendBitsToBuffer (unsigned int val, int numBits, uint8_t buffer[], int *bitLen) |
testable void | addEccAndInterleave (uint8_t data[], int version, enum qrcodegen_Ecc ecl, uint8_t result[]) |
testable int | getNumDataCodewords (int version, enum qrcodegen_Ecc ecl) |
testable int | getNumRawDataModules (int ver) |
testable void | reedSolomonComputeDivisor (int degree, uint8_t result[]) |
testable void | reedSolomonComputeRemainder (const uint8_t data[], int dataLen, const uint8_t generator[], int degree, uint8_t result[]) |
testable uint8_t | reedSolomonMultiply (uint8_t x, uint8_t y) |
testable void | initializeFunctionModules (int version, uint8_t qrcode[]) |
testable int | getAlignmentPatternPositions (int version, uint8_t result[7]) |
testable bool | getModuleBounded (const uint8_t qrcode[], int x, int y) |
testable void | setModuleBounded (uint8_t qrcode[], int x, int y, bool isDark) |
testable void | setModuleUnbounded (uint8_t qrcode[], int x, int y, bool isDark) |
testable int | calcSegmentBitLength (enum qrcodegen_Mode mode, size_t numChars) |
testable int | getTotalBits (const struct qrcodegen_Segment segs[], size_t len, int version) |
bool | qrcodegen_encodeText (const char *text, uint8_t tempBuffer[], uint8_t qrcode[], enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl) |
bool | qrcodegen_encodeBinary (uint8_t dataAndTemp[], size_t dataLen, uint8_t qrcode[], enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl) |
bool | qrcodegen_encodeSegments (const struct qrcodegen_Segment segs[], size_t len, enum qrcodegen_Ecc ecl, uint8_t tempBuffer[], uint8_t qrcode[]) |
bool | qrcodegen_encodeSegmentsAdvanced (const struct qrcodegen_Segment segs[], size_t len, enum qrcodegen_Ecc ecl, int minVersion, int maxVersion, enum qrcodegen_Mask mask, bool boostEcl, uint8_t tempBuffer[], uint8_t qrcode[]) |
int | qrcodegen_getSize (const uint8_t qrcode[]) |
bool | qrcodegen_getModule (const uint8_t qrcode[], int x, int y) |
bool | qrcodegen_isNumeric (const char *text) |
bool | qrcodegen_isAlphanumeric (const char *text) |
size_t | qrcodegen_calcSegmentBufferSize (enum qrcodegen_Mode mode, size_t numChars) |
struct qrcodegen_Segment | qrcodegen_makeBytes (const uint8_t data[], size_t len, uint8_t buf[]) |
struct qrcodegen_Segment | qrcodegen_makeNumeric (const char *digits, uint8_t buf[]) |
struct qrcodegen_Segment | qrcodegen_makeAlphanumeric (const char *text, uint8_t buf[]) |
struct qrcodegen_Segment | qrcodegen_makeEci (long assignVal, uint8_t buf[]) |
Variables | |
testable const int8_t | ECC_CODEWORDS_PER_BLOCK [4][41] |
testable const int8_t | NUM_ERROR_CORRECTION_BLOCKS [4][41] |
#define qrcodegen_REED_SOLOMON_DEGREE_MAX 30 |
Definition at line 106 of file qrcodegen.c.
#define testable static |
Definition at line 31 of file qrcodegen.c.
testable void addEccAndInterleave | ( | uint8_t | data[], |
int | version, | ||
enum qrcodegen_Ecc | ecl, | ||
uint8_t | result[] | ||
) |
Definition at line 294 of file qrcodegen.c.
testable void appendBitsToBuffer | ( | unsigned int | val, |
int | numBits, | ||
uint8_t | buffer[], | ||
int * | bitLen | ||
) |
testable int calcSegmentBitLength | ( | enum qrcodegen_Mode | mode, |
size_t | numChars | ||
) |
testable int getAlignmentPatternPositions | ( | int | version, |
uint8_t | result[7] | ||
) |
testable bool getModuleBounded | ( | const uint8_t | qrcode[], |
int | x, | ||
int | y | ||
) |
testable int getNumDataCodewords | ( | int | version, |
enum qrcodegen_Ecc | ecl | ||
) |
Definition at line 327 of file qrcodegen.c.
testable int getNumRawDataModules | ( | int | ver | ) |
testable int getTotalBits | ( | const struct qrcodegen_Segment | segs[], |
size_t | len, | ||
int | version | ||
) |
testable void initializeFunctionModules | ( | int | version, |
uint8_t | qrcode[] | ||
) |
Definition at line 418 of file qrcodegen.c.
size_t qrcodegen_calcSegmentBufferSize | ( | enum qrcodegen_Mode | mode, |
size_t | numChars | ||
) |
Definition at line 832 of file qrcodegen.c.
bool qrcodegen_encodeBinary | ( | uint8_t | dataAndTemp[], |
size_t | dataLen, | ||
uint8_t | qrcode[], | ||
enum qrcodegen_Ecc | ecl, | ||
int | minVersion, | ||
int | maxVersion, | ||
enum qrcodegen_Mask | mask, | ||
bool | boostEcl | ||
) |
bool qrcodegen_encodeSegments | ( | const struct qrcodegen_Segment | segs[], |
size_t | len, | ||
enum qrcodegen_Ecc | ecl, | ||
uint8_t | tempBuffer[], | ||
uint8_t | qrcode[] | ||
) |
bool qrcodegen_encodeSegmentsAdvanced | ( | const struct qrcodegen_Segment | segs[], |
size_t | len, | ||
enum qrcodegen_Ecc | ecl, | ||
int | minVersion, | ||
int | maxVersion, | ||
enum qrcodegen_Mask | mask, | ||
bool | boostEcl, | ||
uint8_t | tempBuffer[], | ||
uint8_t | qrcode[] | ||
) |
Definition at line 204 of file qrcodegen.c.
bool qrcodegen_encodeText | ( | const char * | text, |
uint8_t | tempBuffer[], | ||
uint8_t | qrcode[], | ||
enum qrcodegen_Ecc | ecl, | ||
int | minVersion, | ||
int | maxVersion, | ||
enum qrcodegen_Mask | mask, | ||
bool | boostEcl | ||
) |
Definition at line 129 of file qrcodegen.c.
bool qrcodegen_getModule | ( | const uint8_t | qrcode[], |
int | x, | ||
int | y | ||
) |
Definition at line 762 of file qrcodegen.c.
int qrcodegen_getSize | ( | const uint8_t | qrcode[] | ) |
bool qrcodegen_isAlphanumeric | ( | const char * | text | ) |
bool qrcodegen_isNumeric | ( | const char * | text | ) |
struct qrcodegen_Segment qrcodegen_makeAlphanumeric | ( | const char * | text, |
uint8_t | buf[] | ||
) |
Definition at line 925 of file qrcodegen.c.
struct qrcodegen_Segment qrcodegen_makeBytes | ( | const uint8_t | data[], |
size_t | len, | ||
uint8_t | buf[] | ||
) |
struct qrcodegen_Segment qrcodegen_makeEci | ( | long | assignVal, |
uint8_t | buf[] | ||
) |
struct qrcodegen_Segment qrcodegen_makeNumeric | ( | const char * | digits, |
uint8_t | buf[] | ||
) |
Definition at line 891 of file qrcodegen.c.
testable void reedSolomonComputeDivisor | ( | int | degree, |
uint8_t | result[] | ||
) |
Definition at line 358 of file qrcodegen.c.
testable void reedSolomonComputeRemainder | ( | const uint8_t | data[], |
int | dataLen, | ||
const uint8_t | generator[], | ||
int | degree, | ||
uint8_t | result[] | ||
) |
Definition at line 384 of file qrcodegen.c.
testable uint8_t reedSolomonMultiply | ( | uint8_t | x, |
uint8_t | y | ||
) |
testable void setModuleBounded | ( | uint8_t | qrcode[], |
int | x, | ||
int | y, | ||
bool | isDark | ||
) |
testable void setModuleUnbounded | ( | uint8_t | qrcode[], |
int | x, | ||
int | y, | ||
bool | isDark | ||
) |
testable const int8_t ECC_CODEWORDS_PER_BLOCK[4][41] |
Definition at line 97 of file qrcodegen.c.
testable const int8_t NUM_ERROR_CORRECTION_BLOCKS[4][41] |
Definition at line 109 of file qrcodegen.c.