From c53c754acf3c53904dd9ce9b797f1bdd578f06c9 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Sat, 6 Nov 2021 05:31:06 +0000 Subject: [PATCH] Added/tweaked comments in C code to correspond to the other language ports. --- c/qrcodegen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c/qrcodegen.c b/c/qrcodegen.c index 8b1b721..1c06546 100644 --- a/c/qrcodegen.c +++ b/c/qrcodegen.c @@ -255,14 +255,14 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz for (uint8_t padByte = 0xEC; bitLen < dataCapacityBits; padByte ^= 0xEC ^ 0x11) appendBitsToBuffer(padByte, 8, qrcode, &bitLen); - // Draw function and data codeword modules + // Compute ECC, draw modules addEccAndInterleave(qrcode, version, ecl, tempBuffer); initializeFunctionModules(version, qrcode); drawCodewords(tempBuffer, getNumRawDataModules(version) / 8, qrcode); drawLightFunctionModules(qrcode, version); initializeFunctionModules(version, tempBuffer); - // Handle masking + // Do masking if (mask == qrcodegen_Mask_AUTO) { // Automatically choose best mask long minPenalty = LONG_MAX; for (int i = 0; i < 8; i++) { @@ -278,8 +278,8 @@ bool qrcodegen_encodeSegmentsAdvanced(const struct qrcodegen_Segment segs[], siz } } assert(0 <= (int)mask && (int)mask <= 7); - applyMask(tempBuffer, qrcode, mask); - drawFormatBits(ecl, mask, qrcode); + applyMask(tempBuffer, qrcode, mask); // Apply the final choice of mask + drawFormatBits(ecl, mask, qrcode); // Overwrite old format bits return true; }