mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
reworked
This commit is contained in:
parent
bf2dbe7494
commit
4c45bac1ae
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,6 @@
|
|||||||
build/
|
build/
|
||||||
|
*~
|
||||||
|
*.[ao]
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
.directory
|
.directory
|
||||||
|
@ -10,7 +10,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|||||||
|
|
||||||
set (ZINT_VERSION_MAJOR 2)
|
set (ZINT_VERSION_MAJOR 2)
|
||||||
set (ZINT_VERSION_MINOR 4)
|
set (ZINT_VERSION_MINOR 4)
|
||||||
set (ZINT_VERSION_RELEASE 2)
|
set (ZINT_VERSION_RELEASE 3)
|
||||||
set (ZINT_VERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}.${ZINT_VERSION_RELEASE}" )
|
set (ZINT_VERSION "${ZINT_VERSION_MAJOR}.${ZINT_VERSION_MINOR}.${ZINT_VERSION_RELEASE}" )
|
||||||
|
|
||||||
add_definitions (-DZINT_VERSION=\"${ZINT_VERSION}\" -Wall)
|
add_definitions (-DZINT_VERSION=\"${ZINT_VERSION}\" -Wall)
|
||||||
|
11
INSTALL
11
INSTALL
@ -53,8 +53,9 @@ Studio is more involved! Full instructions are currently not ready for
|
|||||||
publication but will be placed on the project website as soon as possible.
|
publication but will be placed on the project website as soon as possible.
|
||||||
|
|
||||||
Mac OSX:
|
Mac OSX:
|
||||||
Efforts are currently under way to ease compiling on OSX using the CMake
|
It is possible to compile Zint using methods similar to those
|
||||||
method. It may be possible to compile Zint using methods similar to those
|
given above, but this has not been thoroughly tested yet. An install
|
||||||
given above, but this has not been thoroughly tested yet. If you have any
|
binary for OSX is also in development. As of feb 2012 the easiest way to
|
||||||
success with compiling Zint on OSX then please get in touch. An install
|
get zint install on Mac OSX is to use HomeBrew with:
|
||||||
binary for OSX is also in development.
|
|
||||||
|
brew install zint
|
||||||
|
17
README
17
README
@ -59,24 +59,20 @@ Visual Studio. Correct bug preventing compilation without PNG support.
|
|||||||
Version 2.4.2:
|
Version 2.4.2:
|
||||||
Fix bugs in batch processing - this now works from the command line.
|
Fix bugs in batch processing - this now works from the command line.
|
||||||
|
|
||||||
|
Version 2.4.3:
|
||||||
|
Some Windows-only fixes and changes
|
||||||
|
|
||||||
|
|
||||||
CONTACT ME
|
CONTACT ME
|
||||||
----------
|
----------
|
||||||
The home of libzint is:
|
The home of libzint is:
|
||||||
|
|
||||||
<http://www.sourceforge.net/projects/zint>
|
<http://www.sourceforge.net/projects/zint>
|
||||||
|
|
||||||
and the home for Zint documentation is:
|
|
||||||
|
|
||||||
<http://www.zint.org.uk>
|
|
||||||
|
|
||||||
For feature requests or bug reports please join the mailing list at
|
For feature requests or bug reports please join the mailing list at
|
||||||
|
|
||||||
<https://lists.sourceforge.net/lists/listinfo/zint-barcode>
|
<https://lists.sourceforge.net/lists/listinfo/zint-barcode>
|
||||||
|
|
||||||
or send an e-mail to
|
|
||||||
|
|
||||||
<zint-barcode@lists.sourceforge.net>
|
|
||||||
|
|
||||||
BEFORE POSTING TO THIS LIST
|
BEFORE POSTING TO THIS LIST
|
||||||
---------------------------
|
---------------------------
|
||||||
Please note the following points...
|
Please note the following points...
|
||||||
@ -97,8 +93,3 @@ Please note the following points...
|
|||||||
* Please remember that Zint is developed by volunteers - don't be surprised
|
* Please remember that Zint is developed by volunteers - don't be surprised
|
||||||
if we are unable to help you or if it takes a long time to answer your
|
if we are unable to help you or if it takes a long time to answer your
|
||||||
questions.
|
questions.
|
||||||
|
|
||||||
Thanks for your interest in libzint.
|
|
||||||
Happy encoding.
|
|
||||||
|
|
||||||
Robin.
|
|
||||||
|
@ -156,7 +156,6 @@ int aztec_text_process(unsigned char source[], const unsigned int src_len, char
|
|||||||
if(blockmap[0][0] & 8) { blockmap[0][0] = 8; }
|
if(blockmap[0][0] & 8) { blockmap[0][0] = 8; }
|
||||||
|
|
||||||
if(blocks > 1) {
|
if(blocks > 1) {
|
||||||
|
|
||||||
/* look for adjacent blocks which can use the same table (left to right search) */
|
/* look for adjacent blocks which can use the same table (left to right search) */
|
||||||
for(i = 1; i < blocks; i++) {
|
for(i = 1; i < blocks; i++) {
|
||||||
if(blockmap[0][i] & blockmap[0][i - 1]) {
|
if(blockmap[0][i] & blockmap[0][i - 1]) {
|
||||||
|
@ -291,6 +291,7 @@ int batch_process(struct zint_symbol *symbol, char *filename)
|
|||||||
error_number = ZBarcode_Encode_and_Print(symbol, buffer, posn, 0);
|
error_number = ZBarcode_Encode_and_Print(symbol, buffer, posn, 0);
|
||||||
if(error_number != 0) {
|
if(error_number != 0) {
|
||||||
fprintf(stderr, "On line %d: %s\n", line_count, symbol->errtxt);
|
fprintf(stderr, "On line %d: %s\n", line_count, symbol->errtxt);
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
ZBarcode_Clear(symbol);
|
ZBarcode_Clear(symbol);
|
||||||
memset(buffer, 0, sizeof(unsigned char) * 7100);
|
memset(buffer, 0, sizeof(unsigned char) * 7100);
|
||||||
@ -302,6 +303,7 @@ int batch_process(struct zint_symbol *symbol, char *filename)
|
|||||||
}
|
}
|
||||||
if(posn > 7090) {
|
if(posn > 7090) {
|
||||||
fprintf(stderr, "On line %d: Input data too long\n", line_count);
|
fprintf(stderr, "On line %d: Input data too long\n", line_count);
|
||||||
|
fflush(stderr);
|
||||||
do {
|
do {
|
||||||
character = fgetc(file);
|
character = fgetc(file);
|
||||||
} while((!feof(file)) && (character != '\n'));
|
} while((!feof(file)) && (character != '\n'));
|
||||||
@ -310,6 +312,7 @@ int batch_process(struct zint_symbol *symbol, char *filename)
|
|||||||
|
|
||||||
if(character != '\n') {
|
if(character != '\n') {
|
||||||
fprintf(stderr, "Warning: No newline at end of file\n");
|
fprintf(stderr, "Warning: No newline at end of file\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(file);
|
fclose(file);
|
||||||
@ -438,6 +441,7 @@ int main(int argc, char **argv)
|
|||||||
if(my_symbol->scale < 0.01) {
|
if(my_symbol->scale < 0.01) {
|
||||||
/* Zero and negative values are not permitted */
|
/* Zero and negative values are not permitted */
|
||||||
fprintf(stderr, "Invalid scale value\n");
|
fprintf(stderr, "Invalid scale value\n");
|
||||||
|
fflush(stderr);
|
||||||
my_symbol->scale = 1.0;
|
my_symbol->scale = 1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -451,6 +455,7 @@ int main(int argc, char **argv)
|
|||||||
my_symbol->border_width = atoi(optarg);
|
my_symbol->border_width = atoi(optarg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Border width out of range\n");
|
fprintf(stderr, "Border width out of range\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!strcmp(long_options[option_index].name, "height")) {
|
if(!strcmp(long_options[option_index].name, "height")) {
|
||||||
@ -463,6 +468,7 @@ int main(int argc, char **argv)
|
|||||||
my_symbol->height = atoi(optarg);
|
my_symbol->height = atoi(optarg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Symbol height out of range\n");
|
fprintf(stderr, "Symbol height out of range\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,6 +477,7 @@ int main(int argc, char **argv)
|
|||||||
my_symbol->option_2 = atoi(optarg);
|
my_symbol->option_2 = atoi(optarg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Number of columns out of range\n");
|
fprintf(stderr, "Number of columns out of range\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!strcmp(long_options[option_index].name, "vers")) {
|
if(!strcmp(long_options[option_index].name, "vers")) {
|
||||||
@ -478,6 +485,7 @@ int main(int argc, char **argv)
|
|||||||
my_symbol->option_2 = atoi(optarg);
|
my_symbol->option_2 = atoi(optarg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Invalid QR Code version\n");
|
fprintf(stderr, "Invalid QR Code version\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!strcmp(long_options[option_index].name, "secure")) {
|
if(!strcmp(long_options[option_index].name, "secure")) {
|
||||||
@ -485,6 +493,7 @@ int main(int argc, char **argv)
|
|||||||
my_symbol->option_1 = atoi(optarg);
|
my_symbol->option_1 = atoi(optarg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "ECC level out of range\n");
|
fprintf(stderr, "ECC level out of range\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!strcmp(long_options[option_index].name, "primary")) {
|
if(!strcmp(long_options[option_index].name, "primary")) {
|
||||||
@ -492,6 +501,7 @@ int main(int argc, char **argv)
|
|||||||
strcpy(my_symbol->primary, optarg);
|
strcpy(my_symbol->primary, optarg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Primary data string too long");
|
fprintf(stderr, "Primary data string too long");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!strcmp(long_options[option_index].name, "mode")) {
|
if(!strcmp(long_options[option_index].name, "mode")) {
|
||||||
@ -499,6 +509,7 @@ int main(int argc, char **argv)
|
|||||||
my_symbol->option_1 = optarg[0] - '0';
|
my_symbol->option_1 = optarg[0] - '0';
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Invalid mode\n");
|
fprintf(stderr, "Invalid mode\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!strcmp(long_options[option_index].name, "rotate")) {
|
if(!strcmp(long_options[option_index].name, "rotate")) {
|
||||||
@ -548,6 +559,7 @@ int main(int argc, char **argv)
|
|||||||
my_symbol->whitespace_width = atoi(optarg);
|
my_symbol->whitespace_width = atoi(optarg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Whitespace value out of range");
|
fprintf(stderr, "Whitespace value out of range");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -560,11 +572,13 @@ int main(int argc, char **argv)
|
|||||||
generated = 1;
|
generated = 1;
|
||||||
if(error_number != 0) {
|
if(error_number != 0) {
|
||||||
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
||||||
|
fflush(stderr);
|
||||||
ZBarcode_Delete(my_symbol);
|
ZBarcode_Delete(my_symbol);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Cannot define data in batch mode");
|
fprintf(stderr, "Cannot define data in batch mode");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -577,6 +591,7 @@ int main(int argc, char **argv)
|
|||||||
generated = 1;
|
generated = 1;
|
||||||
if(error_number != 0) {
|
if(error_number != 0) {
|
||||||
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
||||||
|
fflush(stderr);
|
||||||
ZBarcode_Delete(my_symbol);
|
ZBarcode_Delete(my_symbol);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -586,6 +601,7 @@ int main(int argc, char **argv)
|
|||||||
generated = 1;
|
generated = 1;
|
||||||
if(error_number != 0) {
|
if(error_number != 0) {
|
||||||
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
||||||
|
fflush(stderr);
|
||||||
ZBarcode_Delete(my_symbol);
|
ZBarcode_Delete(my_symbol);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -606,6 +622,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "?? getopt error 0%o\n", c);
|
fprintf(stderr, "?? getopt error 0%o\n", c);
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,10 +631,12 @@ int main(int argc, char **argv)
|
|||||||
while (optind < argc)
|
while (optind < argc)
|
||||||
fprintf(stderr, "%s", argv[optind++]);
|
fprintf(stderr, "%s", argv[optind++]);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(generated == 0) {
|
if(generated == 0) {
|
||||||
fprintf(stderr, "error: No data received, no symbol generated\n");
|
fprintf(stderr, "error: No data received, no symbol generated\n");
|
||||||
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZBarcode_Delete(my_symbol);
|
ZBarcode_Delete(my_symbol);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Name: zint
|
Name: zint
|
||||||
Version: 2.3.1
|
Version: 2.4.3
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A barcode generator and library
|
Summary: A barcode generator and library
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -114,7 +114,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc COPYING readme
|
%doc COPYING README
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_libdir}/libzint.so.*
|
%{_libdir}/libzint.so.*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user