This file is indexed.

/usr/include/osl/move_classifier/blockLongEffect.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
/* blockLongEffect.h
 */
#ifndef _MOVE_CLASSIFIER_BLOCK_LONG_EFFECT_H
#define _MOVE_CLASSIFIER_BLOCK_LONG_EFFECT_H

#include "osl/state/numEffectState.h"

namespace osl
{
  namespace move_classifier
  {
    /**
     * 長い利きをブロックする手の判定.
     * @param P - 動かす側のプレイヤー
     * @param T - ブロックする駒の種類(ROOK,BISHOP,LANCE)
     */
    template<Player P,Ptype T>
    struct BlockLongEffect
    {
      /**
       * 相手の長い駒をブロックする手.
       * もともとブロックしている場合も近づくならtrueにする
       * 盤端(相手の駒の前)でのブロックはブロックに入れない
       * 駒を取る手はブロックに入れない
       * 複数の駒をブロックする時は条件を満たすものを探すまで全部調べる
       * @param state - 動かす前の盤面
       * @param ptype - 動かす駒の移動後のptype
       * @param from - 動かす駒の移動前の位置
       * @param to - 動かす駒の移動後の位置
       */
      static bool
#ifdef __GNUC__
	__attribute__ ((pure))
#endif
      isMember(NumEffectState const& state,
	       Ptype /*ptype*/,Square /*from*/,Square to)
      {
	BOOST_STATIC_ASSERT((PtypeFuns<T>::hasLongMove));
	if(!state.pieceAt(to).isEmpty())return false;
	mask_t e1=state.piecesOnBoard(PlayerTraits<P>::opponent).getMask(PtypeFuns<T>::indexNum);
	mask_t e2=state.effectSetAt(to).getMask(PtypeFuns<T>::indexNum)>>8;
	mask_t e3=e1 & e2 & mask_t::makeDirect(PtypeFuns<T>::indexMask);
	while(!e3.none()){
	  int num=e3.takeOneBit()+((PtypeFuns<T>::indexNum)<<5);
	  Piece p=state.pieceOf(num);
	  assert(p.isPiece());
	  assert(p.owner()==PlayerTraits<P>::opponent);
	  assert(unpromote(p.ptype())==T);
	  Offset o=Board_Table.getShortOffset(Offset32(to,p.square()));
	  // EMPTY or Pのpiece or alt(P)のpiece
	  Piece p1=state.pieceAt(to+o);
	  if(! p1.isEdge())
	    return true;
	}
	return false;
      }
    };

    template<Player P>
    struct BlockLongAny
    {
      static bool isMember(const NumEffectState& state,
			   Ptype ptype,Square from,Square to) {
	return BlockLongEffect<P,ROOK>::isMember(state, ptype, from, to)
	  || BlockLongEffect<P,BISHOP>::isMember(state, ptype, from, to)
	  || BlockLongEffect<P,LANCE>::isMember(state, ptype, from, to);
      }
    };
  }
}
#endif /* _MOVE_CLASSIFIER_BLOCK_LONG_EFFECT_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: