This file is indexed.

/usr/share/doc/fp-compiler/2.6.4/morphos/getvolumes.pas is in fp-compiler-2.6.4 2.6.4+dfsg-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
    Getting list of DOS volumes and assigns
    Free Pascal for MorphOS example

    Copyright (C) 2005 by Karoly Balogh

    See the file COPYING.FPC, included in this distribution,
    for details about the copyright.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 **********************************************************************}

{ * 2005.01.10 * }
{ * Needs MorphOS RTL 2005.01.10 or later! * }

program getvolumes;

uses doslib;


{ * this function converts a BCPL-style string pointer to * }
{ * normal PChar type. * }
function BStr2PChar(bstr: DWord): PChar;
begin
  BStr2PChar:=Pointer((bstr shl 2)+1);
end;


procedure dosList(flags: DWord);
var
  dosList: PDosList;
begin
  { * fetch a list of volumes * }
  dosList:=LockDosList(flags or LDF_READ);
  { * parse the volumes * }
  repeat
    dosList:=NextDosEntry(dosList,flags);
    if dosList<>NIL then
      writeln(BStr2PChar(dosList^.dol_Name));
  until dosList=NIL;
  UnLockDosList(flags or LDF_READ);
end;


begin
  { * dos.library is opened by the RTL startup code, * }
  { * so we don't need to open it by ourselves. * }

  writeln('Current Volumes: ==========');
  dosList(LDF_VOLUMES);
  writeln('Current Assigns: ==========');
  dosList(LDF_ASSIGNS);
end.