File: loadsourcefiles.pas

package info (click to toggle)
licenserecon 11.0
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 372 kB
  • sloc: pascal: 1,386; makefile: 33; perl: 31; xml: 9; sh: 2
file content (42 lines) | stat: -rw-r--r-- 875 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
// Reconcile DEP-5 debian/copyright to licensecheck
//
// Copyright : 2023-2025 P Blackman
// License   : BSD-2-clause
//

unit loadsourcefiles;
{$mode delphi}

interface

procedure LoadSource;


implementation uses Classes, Process, options, rstrings, support, filedata;

procedure LoadSource;
var OK          : Boolean;
    S1          : AnsiString;
    SourceList  : tStringList;
begin
    if not Option_Format then
    begin
        Writeln;
        Writeln (rsPST + '  ....'); // Parsing Source Tree
    end;

    OK := RunCommand('/usr/libexec/lrc-find', ['.'], S1,  [poUsePipes, poWaitOnExit]);

    if not OK then
        writeln (rsFps)  // Failed to parse source tree
    else
    begin
        MangleName (S1);
        SourceList := tStringList.Create;
        SourceList.text := S1;
        InitFileData (SourceList);
        SourceList.Free;
    end;
end;

end.