mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-30 00:07:07 +00:00
general: prefix all INTERNAL funcs/tables with zint_, except
those in "backend/common.h", which are prefixed by `z_` - makes symbol clashes more unlikely when zint is statically linked (ticket #337, props Ulrich Becker) DOTCODE: fix padding allowance (10 -> 52 - probable max 35) to cover cases with large no. of columns requested and little data, to prevent `codeword_array` buffer overflow AZTEC/CODEONE: some code fiddling general_field: prefix defines with `GF_`, shorten static funcs prefix `general_field_` -> `gf_`
This commit is contained in:
@@ -174,7 +174,7 @@ static void test_print(const testCtx *const p_ctx) {
|
||||
testFinish();
|
||||
}
|
||||
|
||||
INTERNAL int pcx_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf);
|
||||
INTERNAL int zint_pcx_pixel_plot(struct zint_symbol *symbol, unsigned char *pixelbuf);
|
||||
|
||||
static void test_outfile(const testCtx *const p_ctx) {
|
||||
int ret;
|
||||
@@ -200,13 +200,13 @@ static void test_outfile(const testCtx *const p_ctx) {
|
||||
|
||||
(void) testUtilRmROFile(symbol.outfile); /* In case lying around from previous fail */
|
||||
assert_nonzero(testUtilCreateROFile(symbol.outfile),
|
||||
"pcx_pixel_plot testUtilCreateROFile(%s) fail (%d: %s)\n",
|
||||
"zint_pcx_pixel_plot testUtilCreateROFile(%s) fail (%d: %s)\n",
|
||||
symbol.outfile, errno, strerror(errno));
|
||||
|
||||
ret = pcx_pixel_plot(&symbol, data);
|
||||
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "pcx_pixel_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n",
|
||||
ret = zint_pcx_pixel_plot(&symbol, data);
|
||||
assert_equal(ret, ZINT_ERROR_FILE_ACCESS, "zint_pcx_pixel_plot ret %d != ZINT_ERROR_FILE_ACCESS (%d) (%s)\n",
|
||||
ret, ZINT_ERROR_FILE_ACCESS, symbol.errtxt);
|
||||
assert_zero(testUtilRmROFile(symbol.outfile), "pcx_pixel_plot testUtilRmROFile(%s) != 0 (%d: %s)\n",
|
||||
assert_zero(testUtilRmROFile(symbol.outfile), "zint_pcx_pixel_plot testUtilRmROFile(%s) != 0 (%d: %s)\n",
|
||||
symbol.outfile, errno, strerror(errno));
|
||||
assert_zero(strncmp(symbol.errtxt, expected_errtxt, sizeof(expected_errtxt) - 1), "strncmp(%s, %s) != 0\n",
|
||||
symbol.errtxt, expected_errtxt);
|
||||
@@ -214,9 +214,9 @@ static void test_outfile(const testCtx *const p_ctx) {
|
||||
|
||||
symbol.output_options |= BARCODE_STDOUT;
|
||||
|
||||
ret = pcx_pixel_plot(&symbol, data);
|
||||
ret = zint_pcx_pixel_plot(&symbol, data);
|
||||
printf(" - ignore (PCX to stdout)\n"); fflush(stdout);
|
||||
assert_zero(ret, "pcx_pixel_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
|
||||
assert_zero(ret, "zint_pcx_pixel_plot ret %d != 0 (%s)\n", ret, symbol.errtxt);
|
||||
|
||||
testFinish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user