mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-15 23:54:34 -04:00
Update version to 2.3.2
This commit is contained in:
parent
f8b6fb20aa
commit
545ff663d3
11 changed files with 26 additions and 23 deletions
|
@ -38,17 +38,6 @@
|
|||
#include "common.h"
|
||||
#include "dm200.h"
|
||||
|
||||
// simple checked response malloc
|
||||
static void *safemalloc(int n)
|
||||
{
|
||||
void *p = malloc(n);
|
||||
if (!p) {
|
||||
fprintf(stderr, "Malloc(%d) failed\n", n);
|
||||
exit(1);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
// Annex M placement alorithm low level
|
||||
static void ecc200placementbit(int *array, int NR, int NC, int r, int c, int p, char b)
|
||||
{
|
||||
|
@ -847,9 +836,9 @@ int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], int leng
|
|||
int x, y, NC, NR, *places;
|
||||
NC = W - 2 * (W / FW);
|
||||
NR = H - 2 * (H / FH);
|
||||
places = (int*)safemalloc(NC * NR * sizeof(int));
|
||||
places = (int*)malloc(NC * NR * sizeof(int));
|
||||
ecc200placement(places, NR, NC);
|
||||
grid = (unsigned char*)safemalloc(W * H);
|
||||
grid = (unsigned char*)malloc(W * H);
|
||||
memset(grid, 0, W * H);
|
||||
for (y = 0; y < H; y += FH) {
|
||||
for (x = 0; x < W; x++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue