From 4a2553c9835252af452a330d89ed65b9c2a702e5 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 11 Feb 2019 15:15:24 +0000 Subject: [PATCH] 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 --- .../lazbarcodes/packages/lazbarcodes.lpk | 10 +---- .../packages/lazbarcodes_runtimeonly.lpk | 39 +++++++++---------- .../packages/lazbarcodes_runtimeonly.pas | 2 +- components/lazbarcodes/src/lazbarcodes.pas | 6 +-- .../src/{uaztec.pas => lbc_aztec.pas} | 19 ++++----- .../src/{ubasic.pas => lbc_basic.pas} | 5 ++- .../{udatamatrix.pas => lbc_datamatrix.pas} | 7 ++-- .../src/{uhelper.pas => lbc_helper.pas} | 2 +- .../lazbarcodes/src/{uqr.pas => lbc_qr.pas} | 6 ++- .../{ureedsolomon.pas => lbc_reedsolomon.pas} | 2 +- .../src/{urender.pas => lbc_render.pas} | 5 ++- .../src/{usjis.pas => lbc_sjis.pas} | 2 +- components/lazbarcodes/src/ubarcodes.pas | 2 +- 13 files changed, 52 insertions(+), 55 deletions(-) rename components/lazbarcodes/src/{uaztec.pas => lbc_aztec.pas} (99%) rename components/lazbarcodes/src/{ubasic.pas => lbc_basic.pas} (97%) rename components/lazbarcodes/src/{udatamatrix.pas => lbc_datamatrix.pas} (99%) rename components/lazbarcodes/src/{uhelper.pas => lbc_helper.pas} (99%) rename components/lazbarcodes/src/{uqr.pas => lbc_qr.pas} (99%) rename components/lazbarcodes/src/{ureedsolomon.pas => lbc_reedsolomon.pas} (99%) rename components/lazbarcodes/src/{urender.pas => lbc_render.pas} (99%) rename components/lazbarcodes/src/{usjis.pas => lbc_sjis.pas} (99%) diff --git a/components/lazbarcodes/packages/lazbarcodes.lpk b/components/lazbarcodes/packages/lazbarcodes.lpk index 46bb2ee01..68d9b02bf 100644 --- a/components/lazbarcodes/packages/lazbarcodes.lpk +++ b/components/lazbarcodes/packages/lazbarcodes.lpk @@ -14,7 +14,7 @@ - + @@ -22,17 +22,11 @@ - + - - - - - - diff --git a/components/lazbarcodes/packages/lazbarcodes_runtimeonly.lpk b/components/lazbarcodes/packages/lazbarcodes_runtimeonly.lpk index 00b0169c7..c788e935f 100644 --- a/components/lazbarcodes/packages/lazbarcodes_runtimeonly.lpk +++ b/components/lazbarcodes/packages/lazbarcodes_runtimeonly.lpk @@ -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 this gives the possibility to include ZINT library in own products or link against it from own software."/> - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - - diff --git a/components/lazbarcodes/packages/lazbarcodes_runtimeonly.pas b/components/lazbarcodes/packages/lazbarcodes_runtimeonly.pas index 328515b36..c2e97ba36 100644 --- a/components/lazbarcodes/packages/lazbarcodes_runtimeonly.pas +++ b/components/lazbarcodes/packages/lazbarcodes_runtimeonly.pas @@ -8,7 +8,7 @@ unit lazbarcodes_runtimeonly; interface 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 diff --git a/components/lazbarcodes/src/lazbarcodes.pas b/components/lazbarcodes/src/lazbarcodes.pas index 839d8f04e..3516af1d7 100644 --- a/components/lazbarcodes/src/lazbarcodes.pas +++ b/components/lazbarcodes/src/lazbarcodes.pas @@ -7,8 +7,8 @@ unit lazbarcodes; interface uses - zint, uaztec, ubasic, udatamatrix, uhelper, uqr, ureedsolomon, urender, - usjis, ubarcodes, LazarusPackageIntf; + zint, lbc_aztec, lbc_basic, lbc_datamatrix, lbc_helper, lbc_qr, lbc_reedsolomon, + lbc_render, lbc_sjis, ubarcodes, LazarusPackageIntf; implementation @@ -18,5 +18,5 @@ begin end; initialization - RegisterPackage('lazbarcodes', @Register); + RegisterPackage('LazBarCodes', @Register); end. diff --git a/components/lazbarcodes/src/uaztec.pas b/components/lazbarcodes/src/lbc_aztec.pas similarity index 99% rename from components/lazbarcodes/src/uaztec.pas rename to components/lazbarcodes/src/lbc_aztec.pas index 0d7ee1789..0e10e11c3 100644 --- a/components/lazbarcodes/src/uaztec.pas +++ b/components/lazbarcodes/src/lbc_aztec.pas @@ -1,11 +1,12 @@ -unit uaztec; +unit lbc_aztec; {$mode objfpc}{$H+} interface 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_runes(symbol: PointerTo_zint_symbol; source: PBYTE; length: integer): Integer; @@ -1400,8 +1401,8 @@ begin {INITCODE} comp_loop := 4; SetLength(local_source,length+1); - FillByte (binary_string[0],20000,0); - FillByte (adjusted_string[0],20000,0); + FillByte ({%H-}binary_string[0],20000,0); + FillByte ({%H-}adjusted_string[0],20000,0); if symbol^.input_mode = GS1_MODE then begin gs1 := 1; @@ -2277,7 +2278,7 @@ begin rs_free; end; end; - FillChar (bit_pattern[0], 20045,'0'); + FillChar ({%H-}bit_pattern[0], 20045,'0'); total_bits := (data_blocks + ecc_blocks) * codeword_size; i := 0; while i < total_bits do @@ -2285,9 +2286,9 @@ begin bit_pattern[i] := adjusted_string[total_bits - i - 1]; Inc (i); end; - FillByte (desc_data, 4, 0); - FillByte (desc_ecc, 6, 0); - FillByte (descriptor, 42, 0); + FillByte (desc_data{%H-}, 4, 0); + FillByte (desc_ecc{%H-}, 6, 0); + FillByte (descriptor{%H-}, 42, 0); if IsTrue(compact) then begin if IsTrue((layers - 1) and $02) then @@ -2654,7 +2655,7 @@ begin strcpy (symbol^.errtxt, 'Input too large'); exit (ERROR_INVALID_DATA); end; - strcpy (binary_string, ''); + strcpy (binary_string{%H-}, ''); if IsTrue(input_value and $80) then begin concat (binary_string, '1'); diff --git a/components/lazbarcodes/src/ubasic.pas b/components/lazbarcodes/src/lbc_basic.pas similarity index 97% rename from components/lazbarcodes/src/ubasic.pas rename to components/lazbarcodes/src/lbc_basic.pas index 0899ce37f..a6ad0d780 100644 --- a/components/lazbarcodes/src/ubasic.pas +++ b/components/lazbarcodes/src/lbc_basic.pas @@ -1,11 +1,12 @@ -unit ubasic; +unit lbc_basic; {$mode objfpc}{$H+} interface uses - Classes, SysUtils,zint,uhelper; + Classes, SysUtils, + zint, lbc_helper; function ZBarcode_Create(): PointerTo_zint_symbol; procedure ZBarcode_Clear(symbol: PointerTo_zint_symbol); diff --git a/components/lazbarcodes/src/udatamatrix.pas b/components/lazbarcodes/src/lbc_datamatrix.pas similarity index 99% rename from components/lazbarcodes/src/udatamatrix.pas rename to components/lazbarcodes/src/lbc_datamatrix.pas index f846527c5..ee6a0be3d 100644 --- a/components/lazbarcodes/src/udatamatrix.pas +++ b/components/lazbarcodes/src/lbc_datamatrix.pas @@ -1,14 +1,15 @@ -unit udatamatrix; +unit lbc_datamatrix; {$mode objfpc}{$H+} interface uses - Classes, SysUtils,uhelper,ureedsolomon,zint; + Classes, SysUtils, + lbc_helper, lbc_reedsolomon, zint; const - MAXBARCODE=3116; + MAXBARCODE = 3116; function dmatrix(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer; diff --git a/components/lazbarcodes/src/uhelper.pas b/components/lazbarcodes/src/lbc_helper.pas similarity index 99% rename from components/lazbarcodes/src/uhelper.pas rename to components/lazbarcodes/src/lbc_helper.pas index fa7f13260..1371db88a 100644 --- a/components/lazbarcodes/src/uhelper.pas +++ b/components/lazbarcodes/src/lbc_helper.pas @@ -1,4 +1,4 @@ -unit uhelper; +unit lbc_helper; {$mode objfpc}{$H+} diff --git a/components/lazbarcodes/src/uqr.pas b/components/lazbarcodes/src/lbc_qr.pas similarity index 99% rename from components/lazbarcodes/src/uqr.pas rename to components/lazbarcodes/src/lbc_qr.pas index eb1c9b028..21b89a9fc 100644 --- a/components/lazbarcodes/src/uqr.pas +++ b/components/lazbarcodes/src/lbc_qr.pas @@ -1,10 +1,12 @@ -unit uqr; +unit lbc_qr; {$mode objfpc}{$H+} 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 microqr(symbol: PointerTo_zint_symbol; source: PBYTE; length: Integer): Integer; diff --git a/components/lazbarcodes/src/ureedsolomon.pas b/components/lazbarcodes/src/lbc_reedsolomon.pas similarity index 99% rename from components/lazbarcodes/src/ureedsolomon.pas rename to components/lazbarcodes/src/lbc_reedsolomon.pas index 98bb09183..6821394c0 100644 --- a/components/lazbarcodes/src/ureedsolomon.pas +++ b/components/lazbarcodes/src/lbc_reedsolomon.pas @@ -1,4 +1,4 @@ -unit ureedsolomon; +unit lbc_reedsolomon; {$mode objfpc}{$H+} diff --git a/components/lazbarcodes/src/urender.pas b/components/lazbarcodes/src/lbc_render.pas similarity index 99% rename from components/lazbarcodes/src/urender.pas rename to components/lazbarcodes/src/lbc_render.pas index a1d1cec4b..cb47548b0 100644 --- a/components/lazbarcodes/src/urender.pas +++ b/components/lazbarcodes/src/lbc_render.pas @@ -1,11 +1,12 @@ -unit urender; +unit lbc_render; {$mode objfpc}{$H+} interface 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_add_line(symbol: PointerTo_zint_symbol; line: PointerTo_zint_render_line; last_line: PointerTo_PointerTo_zint_render_line): Integer; diff --git a/components/lazbarcodes/src/usjis.pas b/components/lazbarcodes/src/lbc_sjis.pas similarity index 99% rename from components/lazbarcodes/src/usjis.pas rename to components/lazbarcodes/src/lbc_sjis.pas index 5351be148..df48459c5 100644 --- a/components/lazbarcodes/src/usjis.pas +++ b/components/lazbarcodes/src/lbc_sjis.pas @@ -1,4 +1,4 @@ -unit usjis; +unit lbc_sjis; {$mode objfpc}{$H+} diff --git a/components/lazbarcodes/src/ubarcodes.pas b/components/lazbarcodes/src/ubarcodes.pas index 91e2709be..9cd8cec1f 100644 --- a/components/lazbarcodes/src/ubarcodes.pas +++ b/components/lazbarcodes/src/ubarcodes.pas @@ -6,7 +6,7 @@ interface uses Classes, SysUtils, Controls, LResources, Graphics, - ubasic,uqr,zint,urender,uaztec,udatamatrix; + lbc_basic, lbc_datamatrix, lbc_render, lbc_qr, lbc_aztec, zint; type