This commit is contained in:
oxygenic 2012-12-30 14:55:05 +01:00
parent bf2dbe7494
commit 4c45bac1ae
8 changed files with 211 additions and 199 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
build/
*~
*.[ao]
*.swp
*.swo
.directory

View File

@ -10,7 +10,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set (ZINT_VERSION_MAJOR 2)
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}" )
add_definitions (-DZINT_VERSION=\"${ZINT_VERSION}\" -Wall)

11
INSTALL
View File

@ -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.
Mac OSX:
Efforts are currently under way to ease compiling on OSX using the CMake
method. It may be possible to compile Zint using methods similar to those
given above, but this has not been thoroughly tested yet. If you have any
success with compiling Zint on OSX then please get in touch. An install
binary for OSX is also in development.
It is possible to compile Zint using methods similar to those
given above, but this has not been thoroughly tested yet. An install
binary for OSX is also in development. As of feb 2012 the easiest way to
get zint install on Mac OSX is to use HomeBrew with:
brew install zint

17
README
View File

@ -59,24 +59,20 @@ Visual Studio. Correct bug preventing compilation without PNG support.
Version 2.4.2:
Fix bugs in batch processing - this now works from the command line.
Version 2.4.3:
Some Windows-only fixes and changes
CONTACT ME
----------
The home of libzint is:
<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
<https://lists.sourceforge.net/lists/listinfo/zint-barcode>
or send an e-mail to
<zint-barcode@lists.sourceforge.net>
BEFORE POSTING TO THIS LIST
---------------------------
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
if we are unable to help you or if it takes a long time to answer your
questions.
Thanks for your interest in libzint.
Happy encoding.
Robin.

View File

@ -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(blocks > 1) {
/* look for adjacent blocks which can use the same table (left to right search) */
for(i = 1; i < blocks; i++) {
if(blockmap[0][i] & blockmap[0][i - 1]) {

View File

@ -291,6 +291,7 @@ int batch_process(struct zint_symbol *symbol, char *filename)
error_number = ZBarcode_Encode_and_Print(symbol, buffer, posn, 0);
if(error_number != 0) {
fprintf(stderr, "On line %d: %s\n", line_count, symbol->errtxt);
fflush(stderr);
}
ZBarcode_Clear(symbol);
memset(buffer, 0, sizeof(unsigned char) * 7100);
@ -302,6 +303,7 @@ int batch_process(struct zint_symbol *symbol, char *filename)
}
if(posn > 7090) {
fprintf(stderr, "On line %d: Input data too long\n", line_count);
fflush(stderr);
do {
character = fgetc(file);
} while((!feof(file)) && (character != '\n'));
@ -310,6 +312,7 @@ int batch_process(struct zint_symbol *symbol, char *filename)
if(character != '\n') {
fprintf(stderr, "Warning: No newline at end of file\n");
fflush(stderr);
}
fclose(file);
@ -438,6 +441,7 @@ int main(int argc, char **argv)
if(my_symbol->scale < 0.01) {
/* Zero and negative values are not permitted */
fprintf(stderr, "Invalid scale value\n");
fflush(stderr);
my_symbol->scale = 1.0;
}
}
@ -451,6 +455,7 @@ int main(int argc, char **argv)
my_symbol->border_width = atoi(optarg);
} else {
fprintf(stderr, "Border width out of range\n");
fflush(stderr);
}
}
if(!strcmp(long_options[option_index].name, "height")) {
@ -463,6 +468,7 @@ int main(int argc, char **argv)
my_symbol->height = atoi(optarg);
} else {
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);
} else {
fprintf(stderr, "Number of columns out of range\n");
fflush(stderr);
}
}
if(!strcmp(long_options[option_index].name, "vers")) {
@ -478,6 +485,7 @@ int main(int argc, char **argv)
my_symbol->option_2 = atoi(optarg);
} else {
fprintf(stderr, "Invalid QR Code version\n");
fflush(stderr);
}
}
if(!strcmp(long_options[option_index].name, "secure")) {
@ -485,6 +493,7 @@ int main(int argc, char **argv)
my_symbol->option_1 = atoi(optarg);
} else {
fprintf(stderr, "ECC level out of range\n");
fflush(stderr);
}
}
if(!strcmp(long_options[option_index].name, "primary")) {
@ -492,6 +501,7 @@ int main(int argc, char **argv)
strcpy(my_symbol->primary, optarg);
} else {
fprintf(stderr, "Primary data string too long");
fflush(stderr);
}
}
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';
} else {
fprintf(stderr, "Invalid mode\n");
fflush(stderr);
}
}
if(!strcmp(long_options[option_index].name, "rotate")) {
@ -548,6 +559,7 @@ int main(int argc, char **argv)
my_symbol->whitespace_width = atoi(optarg);
} else {
fprintf(stderr, "Whitespace value out of range");
fflush(stderr);
}
break;
@ -560,11 +572,13 @@ int main(int argc, char **argv)
generated = 1;
if(error_number != 0) {
fprintf(stderr, "%s\n", my_symbol->errtxt);
fflush(stderr);
ZBarcode_Delete(my_symbol);
return 1;
}
} else {
fprintf(stderr, "Cannot define data in batch mode");
fflush(stderr);
}
break;
@ -577,6 +591,7 @@ int main(int argc, char **argv)
generated = 1;
if(error_number != 0) {
fprintf(stderr, "%s\n", my_symbol->errtxt);
fflush(stderr);
ZBarcode_Delete(my_symbol);
return 1;
}
@ -586,6 +601,7 @@ int main(int argc, char **argv)
generated = 1;
if(error_number != 0) {
fprintf(stderr, "%s\n", my_symbol->errtxt);
fflush(stderr);
ZBarcode_Delete(my_symbol);
return 1;
}
@ -606,18 +622,21 @@ int main(int argc, char **argv)
default:
fprintf(stderr, "?? getopt error 0%o\n", c);
fflush(stderr);
}
}
if (optind < argc) {
if (optind < argc) {
fprintf(stderr, "Invalid option ");
while (optind < argc)
fprintf(stderr, "%s", argv[optind++]);
fprintf(stderr, "\n");
fflush(stderr);
}
if(generated == 0) {
fprintf(stderr, "error: No data received, no symbol generated\n");
fflush(stderr);
}
ZBarcode_Delete(my_symbol);

View File

@ -1,5 +1,5 @@
Name: zint
Version: 2.3.1
Version: 2.4.3
Release: 2%{?dist}
Summary: A barcode generator and library
License: GPLv3+
@ -114,7 +114,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc COPYING readme
%doc COPYING README
%{_bindir}/%{name}
%{_libdir}/libzint.so.*