This file is indexed.

/usr/share/octave/packages/io-2.4.5/private/__OTK_chk_sprt__.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
73
74
75
76
77
78
79
80
## Copyright (C) 2014-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 this program.  If not, see <http://www.gnu.org/licenses/>.

## -*- texinfo -*- 
## @deftypefn {Function File} {@var{retval} =} __OTK_chk_sprt__ (@var{varargin})
## Undocumented internal function
##
## @seealso{}
## @end deftypefn

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

function [chk, missing5] = __OTK_chk_sprt__ (jcp, dbug=0)

  chk = 0;
  if (dbug > 1)
    printf ("\nODF Toolkit (.ods) <odfdom> <xercesImpl>:\n");
  endif
  entries5 = {"odfdom", "xerces", {"xml-apis", "xml-commons-apis"}}; 
  [jpchk, missing5] = chk_jar_entries (jcp, entries5, dbug);
  missing5 = entries5 (find (missing5));
  ## Check xerces (version 2.9.1 = stand-alone, 2.10.+ needs xml-apis.jar)
  try
    xvsn = javaMethod ("getVersion", "org.apache.xerces.impl.Version");
    if (index (xvsn, "2.9.1") && strncmp (missing5, "xml", 3))
      jpchk++;
    endif
    if (dbug > 2)
      printf ("  xerces version:          %s\n", xvsn);
    endif
  catch
  end_try_catch
  if (jpchk >= numel (entries5))    
    ## Apparently all required classes present. Only now we can check for proper
    ## odfdom version (only 0.7.5 & 0.8.6-0.8.8 work OK).
    ## The odfdom team deemed it necessary to change the version call so we need this:
    odfvsn = " ";
    try
      ## New in 0.8.6
      odfvsn = javaMethod ("getOdfdomVersion", "org.odftoolkit.odfdom.JarManifest");
    catch
      ## Worked in 0.7.5
      odfvsn = javaMethod ("getApplicationVersion", "org.odftoolkit.odfdom.Version");
    end_try_catch
    if (dbug > 2)
      printf ("  odfdom version:          %s\n", odfvsn);
    endif
    ## For odfdom-incubator (= 0.8.8+), strip extra info after version
    odfvsn = regexp (odfvsn, '[0123456789]+\.[0123456789]+\.[01234567890]+', "match"){1};
    if (! (strcmp (odfvsn, "0.7.5") || (compare_versions (odfvsn, "0.8.6", ">=") ...
           && compare_versions (odfvsn, "0.8.8", "<="))))
      chk = -1;
      if (dbug > 1)
        printf ("  *** odfdom version (%s) is not supported - use v. 0.8.6 - 0.8.8\n", ...
                odfvsn);
      endif
    else
      chk = 1;
      if (dbug > 1)
        printf ("  => ODFtoolkit (OTK) OK.\n");
      endif
    endif
  elseif (dbug > 1)
    printf ("  => Not all required classes (.jar) in classpath for OTK\n");
  endif

endfunction