This file is indexed.

/usr/share/octave/packages/io-2.4.5/private/chk_jar_entries.m is in octave-io 2.4.5-1.

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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
## Copyright (C) 2012-2016 Philip Nienhuis
## 
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
## 
## 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.  See the
## GNU General Public License for more details.
## 
## You should have received a copy of the GNU General Public License
## along with Octave; see the file COPYING.  If not, see
## <http://www.gnu.org/licenses/>.

## chk_jar_entries - internal function finding Java .jar names in javaclasspath

## Author: Philip Nienhuis <prnienhuis@users.sf.net>
## Created: 2012-10-07

function [ retval, missing ] = chk_jar_entries (jcp, entries, dbug=0)

  retval = 0;
  missing = zeros (1, numel (entries));
  for jj=1:length (entries)
    found = 0;
    for ii=1:length (jcp)
      ## Get jar (or folder/map/subdir) name from java classpath entry
      jentry = strsplit (lower (jcp{ii}), filesep){end};
      kk = 0;
      while (++kk <= size (char (entries{jj}), 1) && ! found)
        if (! isempty (strfind (jentry, strtrim (lower (char (entries{jj})(kk, :))))))
          ++retval; 
          found = 1;
          if (dbug > 2)
            fprintf ("  - %s OK\n", jentry); 
          endif
        endif
      endwhile
    endfor
    if (! found)
      if (dbug > 2)
        if (iscellstr (entries{jj}))
          entrtxt = sprintf ("%s/", entries{jj}{:});
          entrtxt(end) = "";
        else
          entrtxt = entries{jj};
        endif
        printf ("  %s....jar missing\n", entrtxt);
      endif
      missing(jj) = 1;
    endif
  endfor

endfunction

## FIXME -- reinstate these tests one there if a way is found to test private
##          functions directly
##%!test
##%! entries = {"abc", {"def", "ghi"}, "jkl"};
##%! jcp1 = {"/usr/lib/java/abcx.jar", "/usr/lib/java/defz.jar", "/usr/lib/java/jkl3.jar"};
##%! jcp1 = strrep (jcp1, "/", filesep);
##%! assert (chk_jar_entries (jcp1, entries), 3);

##%!test
##%! entries = {"abc", {"def", "ghi"}, "xyz"};
##%! jcp2 = {"/usr/lib/java/abcy.jar", "/usr/lib/java/ghiw.jar", "/usr/lib/java/jkl6.jar"};
##%! jcp2 = strrep (jcp2, "/", filesep);
##%! [aaa, bbb] = chk_jar_entries (jcp2, entries);
##%! assert (aaa, 2);
##%! assert (bbb, [0 0 1]);