1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
// Reconcile DEP-5 debian/copyright to licensecheck
//
// Copyright : 2025 P Blackman
// License : BSD-2-clause
//
// Allow 'or' in d/copyright to match with 'and/or' in dual licensing
// (and/or is very unlikely to be corect)
unit andor;
{$mode delphi}
interface
function CheckANDOR (Dep5, Actual: String) : Boolean;
implementation uses StrUtils;
// Return true if Actual has 'and/or' and Dep5 has 'or'
// and that is only difference
function CheckANDOR (Dep5, Actual: String) : Boolean;
begin
if (length (Actual) - length (Dep5) = 4)
and (Dep5 = ReplaceStr (Actual, 'and/or', 'or')) then
result := true
else
result := false;
end;
end.
|