lazbarcodes: Rename internally used units to avoid naming conflict with CodeTyphon package PL_APE

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6814 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-02-11 15:15:24 +00:00
parent a39f3e539c
commit 4a2553c983
13 changed files with 52 additions and 55 deletions

View File

@ -14,7 +14,7 @@
</SearchPaths> </SearchPaths>
</CompilerOptions> </CompilerOptions>
<Description Value="Provides barcode 1D and 2D generation based in the 'C' zint library."/> <Description Value="Provides barcode 1D and 2D generation based in the 'C' zint library."/>
<Version Major="1" Release="2"/> <Version Major="1" Release="3"/>
<Files Count="1"> <Files Count="1">
<Item1> <Item1>
<Filename Value="..\src\ubarcodes.pas"/> <Filename Value="..\src\ubarcodes.pas"/>
@ -22,17 +22,11 @@
<UnitName Value="ubarcodes"/> <UnitName Value="ubarcodes"/>
</Item1> </Item1>
</Files> </Files>
<RequiredPkgs Count="3"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="lazbarcodes_runtimeonly"/> <PackageName Value="lazbarcodes_runtimeonly"/>
<MinVersion Major="1" Valid="True"/> <MinVersion Major="1" Valid="True"/>
</Item1> </Item1>
<Item2>
<PackageName Value="LCLBase"/>
</Item2>
<Item3>
<PackageName Value="FCL"/>
</Item3>
</RequiredPkgs> </RequiredPkgs>
<UsageOptions> <UsageOptions>
<UnitPath Value="$(PkgOutDir)"/> <UnitPath Value="$(PkgOutDir)"/>

View File

@ -28,52 +28,49 @@ Change to BSD-license is done for backend and therefore for ZINT shared library
the frontends and Qt4-backend the GPL is still valid. Since BSD-license is GPL-compatible the frontends and Qt4-backend the GPL is still valid. Since BSD-license is GPL-compatible
this gives the possibility to include ZINT library in own products or link against it from this gives the possibility to include ZINT library in own products or link against it from
own software."/> own software."/>
<Version Major="1" Release="2"/> <Version Major="1" Release="3"/>
<Files Count="9"> <Files Count="9">
<Item1> <Item1>
<Filename Value="..\src\zint.pp"/> <Filename Value="..\src\zint.pp"/>
<UnitName Value="zint"/> <UnitName Value="zint"/>
</Item1> </Item1>
<Item2> <Item2>
<Filename Value="..\src\uaztec.pas"/> <Filename Value="..\src\lbc_aztec.pas"/>
<UnitName Value="uaztec"/> <UnitName Value="lbc_aztec"/>
</Item2> </Item2>
<Item3> <Item3>
<Filename Value="..\src\ubasic.pas"/> <Filename Value="..\src\lbc_basic.pas"/>
<UnitName Value="ubasic"/> <UnitName Value="lbc_basic"/>
</Item3> </Item3>
<Item4> <Item4>
<Filename Value="..\src\udatamatrix.pas"/> <Filename Value="..\src\lbc_datamatrix.pas"/>
<UnitName Value="udatamatrix"/> <UnitName Value="lbc_datamatrix"/>
</Item4> </Item4>
<Item5> <Item5>
<Filename Value="..\src\uhelper.pas"/> <Filename Value="..\src\lbc_helper.pas"/>
<UnitName Value="uhelper"/> <UnitName Value="lbc_helper"/>
</Item5> </Item5>
<Item6> <Item6>
<Filename Value="..\src\uqr.pas"/> <Filename Value="..\src\lbc_qr.pas"/>
<UnitName Value="uqr"/> <UnitName Value="lbc_qr"/>
</Item6> </Item6>
<Item7> <Item7>
<Filename Value="..\src\ureedsolomon.pas"/> <Filename Value="..\src\lbc_reedsolomon.pas"/>
<UnitName Value="ureedsolomon"/> <UnitName Value="lbc_reedsolomon"/>
</Item7> </Item7>
<Item8> <Item8>
<Filename Value="..\src\urender.pas"/> <Filename Value="..\src\lbc_render.pas"/>
<UnitName Value="urender"/> <UnitName Value="lbc_render"/>
</Item8> </Item8>
<Item9> <Item9>
<Filename Value="..\src\usjis.pas"/> <Filename Value="..\src\lbc_sjis.pas"/>
<UnitName Value="usjis"/> <UnitName Value="lbc_sjis"/>
</Item9> </Item9>
</Files> </Files>
<RequiredPkgs Count="2"> <RequiredPkgs Count="1">
<Item1> <Item1>
<PackageName Value="LCLBase"/> <PackageName Value="LCLBase"/>
</Item1> </Item1>
<Item2>
<PackageName Value="FCL"/>
</Item2>
</RequiredPkgs> </RequiredPkgs>
<UsageOptions> <UsageOptions>
<UnitPath Value="$(PkgOutDir)"/> <UnitPath Value="$(PkgOutDir)"/>

View File

@ -8,7 +8,7 @@ unit lazbarcodes_runtimeonly;
interface interface
uses uses
zint, uaztec, ubasic, udatamatrix, uhelper, uqr, ureedsolomon, urender, usjis; zint, lbc_aztec, lbc_basic, lbc_datamatrix, lbc_helper, lbc_qr, lbc_reedsolomon, lbc_render, lbc_sjis;
implementation implementation

View File

@ -7,8 +7,8 @@ unit lazbarcodes;
interface interface
uses uses
zint, uaztec, ubasic, udatamatrix, uhelper, uqr, ureedsolomon, urender, zint, lbc_aztec, lbc_basic, lbc_datamatrix, lbc_helper, lbc_qr, lbc_reedsolomon,
usjis, ubarcodes, LazarusPackageIntf; lbc_render, lbc_sjis, ubarcodes, LazarusPackageIntf;
implementation implementation
@ -18,5 +18,5 @@ begin
end; end;
initialization initialization
RegisterPackage('lazbarcodes', @Register); RegisterPackage('LazBarCodes', @Register);
end. end.

View File

@ -1,11 +1,12 @@
unit uaztec; unit lbc_aztec;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils,uhelper,zint,ureedsolomon; Classes, SysUtils,
lbc_helper, lbc_reedsolomon, zint;
function aztec(symbol: PointerTo_zint_symbol; source: PBYTE; length: integer): Integer; function aztec(symbol: PointerTo_zint_symbol; source: PBYTE; length: integer): Integer;
function aztec_runes(symbol: PointerTo_zint_symbol; source: PBYTE; length: integer): Integer; function aztec_runes(symbol: PointerTo_zint_symbol; source: PBYTE; length: integer): Integer;
@ -1400,8 +1401,8 @@ begin
{INITCODE} comp_loop := 4; {INITCODE} comp_loop := 4;
SetLength(local_source,length+1); SetLength(local_source,length+1);
FillByte (binary_string[0],20000,0); FillByte ({%H-}binary_string[0],20000,0);
FillByte (adjusted_string[0],20000,0); FillByte ({%H-}adjusted_string[0],20000,0);
if symbol^.input_mode = GS1_MODE then if symbol^.input_mode = GS1_MODE then
begin begin
gs1 := 1; gs1 := 1;
@ -2277,7 +2278,7 @@ begin
rs_free; rs_free;
end; end;
end; end;
FillChar (bit_pattern[0], 20045,'0'); FillChar ({%H-}bit_pattern[0], 20045,'0');
total_bits := (data_blocks + ecc_blocks) * codeword_size; total_bits := (data_blocks + ecc_blocks) * codeword_size;
i := 0; i := 0;
while i < total_bits do while i < total_bits do
@ -2285,9 +2286,9 @@ begin
bit_pattern[i] := adjusted_string[total_bits - i - 1]; bit_pattern[i] := adjusted_string[total_bits - i - 1];
Inc (i); Inc (i);
end; end;
FillByte (desc_data, 4, 0); FillByte (desc_data{%H-}, 4, 0);
FillByte (desc_ecc, 6, 0); FillByte (desc_ecc{%H-}, 6, 0);
FillByte (descriptor, 42, 0); FillByte (descriptor{%H-}, 42, 0);
if IsTrue(compact) then if IsTrue(compact) then
begin begin
if IsTrue((layers - 1) and $02) then if IsTrue((layers - 1) and $02) then
@ -2654,7 +2655,7 @@ begin
strcpy (symbol^.errtxt, 'Input too large'); strcpy (symbol^.errtxt, 'Input too large');
exit (ERROR_INVALID_DATA); exit (ERROR_INVALID_DATA);
end; end;
strcpy (binary_string, ''); strcpy (binary_string{%H-}, '');
if IsTrue(input_value and $80) then if IsTrue(input_value and $80) then
begin begin
concat (binary_string, '1'); concat (binary_string, '1');

View File

@ -1,11 +1,12 @@
unit ubasic; unit lbc_basic;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils,zint,uhelper; Classes, SysUtils,
zint, lbc_helper;
function ZBarcode_Create(): PointerTo_zint_symbol; function ZBarcode_Create(): PointerTo_zint_symbol;
procedure ZBarcode_Clear(symbol: PointerTo_zint_symbol); procedure ZBarcode_Clear(symbol: PointerTo_zint_symbol);

View File

@ -1,14 +1,15 @@
unit udatamatrix; unit lbc_datamatrix;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils,uhelper,ureedsolomon,zint; Classes, SysUtils,
lbc_helper, lbc_reedsolomon, zint;
const const
MAXBARCODE=3116; MAXBARCODE = 3116;
function dmatrix(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer; function dmatrix(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer;

View File

@ -1,4 +1,4 @@
unit uhelper; unit lbc_helper;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}

View File

@ -1,10 +1,12 @@
unit uqr; unit lbc_qr;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses sysutils,ureedsolomon,uhelper,zint,usjis; uses
sysutils,
lbc_helper, lbc_reedsolomon, lbc_sjis, zint;
function qr_code(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer; function qr_code(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer;
function microqr(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer; function microqr(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer;

View File

@ -1,4 +1,4 @@
unit ureedsolomon; unit lbc_reedsolomon;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}

View File

@ -1,11 +1,12 @@
unit urender; unit lbc_render;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
uses uses
Classes, SysUtils,zint,uhelper; Classes, SysUtils,
zint, lbc_helper;
function render_plot_create_line(x: Single; y: Single; width: Single; length: Single): PointerTo_zint_render_line; function render_plot_create_line(x: Single; y: Single; width: Single; length: Single): PointerTo_zint_render_line;
function render_plot_add_line(symbol: PointerTo_zint_symbol; line: PointerTo_zint_render_line; last_line: PointerTo_PointerTo_zint_render_line): Integer; function render_plot_add_line(symbol: PointerTo_zint_symbol; line: PointerTo_zint_render_line; last_line: PointerTo_PointerTo_zint_render_line): Integer;

View File

@ -1,4 +1,4 @@
unit usjis; unit lbc_sjis;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, Controls, LResources, Graphics, Classes, SysUtils, Controls, LResources, Graphics,
ubasic,uqr,zint,urender,uaztec,udatamatrix; lbc_basic, lbc_datamatrix, lbc_render, lbc_qr, lbc_aztec, zint;
type type