This file is indexed.

/usr/include/osl/progress/effect5x3d.h is in libosl-dev 0.4.2-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
81
82
83
84
85
86
87
/* effect5x3.h
 */
#ifndef PROGRESS_EFFECT5X3D_H
#define PROGRESS_EFFECT5X3D_H

#include "osl/progress/progress16.h"
#include "osl/state/numEffectState.h"
#include "osl/centering5x3.h"
#include "osl/misc/carray.h"
#include <algorithm>
namespace osl
{
  namespace progress
  {
    /**
     * 玉の周囲5x3の領域の利きの数ら計算した自玉のまわりの利きの数。
     * 5x3領域は盤面内になるように補正する.
     * 黒と白の両方の進行度を持つ.
     * Effect5x3 との違い持駒の重みなし
     */
    struct Effect5x3d
    {
      /**
       * 王の位置を指定したprogressの計算.
       * @param defense - こちらの玉に注目したprogress
       * @param state - 盤面
       * @param king - 玉の位置がここにあるとする.
       * 一般には,盤面から玉の位置は特定できるが,差分計算の途中では
       * 一致しないとして呼び出すことがある.
       */
      static int makeProgress(Player defense, const NumEffectState& state,
			      Square king);
      static int makeProgress(Player defense, const NumEffectState& state){
	return makeProgress(defense,state,state.kingSquare(defense));
      }
      static int makeProgress(const NumEffectState& state)
      {
	return makeProgress(BLACK, state) + makeProgress(WHITE, state);
      }
      /**
       * 0-15 の値を返す
       */
      static const Progress16 progress16(int progress)
      {
	assert(progress >= 0);
	const int rank = progress / 8 - 16; // 適当
	return Progress16(std::max(std::min(rank, 15), 0));
      }
      /**
       * 0-15 の値を返す.
       * プレイヤ個人毎
       */
      static const Progress16 progress16each(int progress)
      {
	assert(progress >= 0);
	const int rank = progress / 8 - 8; // 調整中
	return Progress16(std::max(std::min(rank, 15), 0));
      }
    private:
      CArray<int,2> progresses;
    public:
      explicit Effect5x3d(const NumEffectState& state) 
      {
	progresses[BLACK]=makeProgress(BLACK, state);
	progresses[WHITE]=makeProgress(WHITE, state);
      }
      void changeTurn() {}
      int progress(Player p) const { return progresses[p]; }
      const Progress16 progress16() const
      {
	return progress16(progresses[0] + progresses[1]);
      }
      const Progress16 progress16(Player p) const
      {
	return progress16each(progress(p));
      }
      // 必要なもの
      void update(const NumEffectState& new_state, Move last_move);
    };
  } // namespace progress
} // namespace osl

#endif /* PROGRESS_EFFECT5X3D_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: