This file is indexed.

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

#include "osl/move_classifier/classifierTraits.h"
#include "osl/state/numEffectState.h"
#include "osl/player.h"
#include "osl/ptype.h"

namespace osl
{
  namespace move_classifier
  {
    /**
     * Pの王をopen checkにする手でないことをチェック.
     * - P==move playerの時は自殺手かどうかのチェックに使う.
     *      王が動く場合には呼べない
     * - P!=move playerの時は通常のopen checkかどうかに使う.
     * - DropMoveの時には呼べない
     */
    template <Player P>
    struct KingOpenMove
    {
      /**
       * king が59
       * rookが51->61の時,差は
       * OFFSET -8 -> U
       * OFFSET +8 -> D
       * とはなるので,一直線のような気がする.ただし,そもとも,
       * 59 - 51はpinにはならないし,今は U -> DはopenではないとしているのでOK
       */
      static bool isMember(const NumEffectState& state, 
			   Ptype /*ptype*/,Square from,Square to)
      {
	int num=state.pieceAt(from).number();
	assert(Piece::isPieceNum(num));
	if(!state.pinOrOpen(P).test(num)) return false;
	// from to kingが一直線に並べば false
	Square king=state.kingSquare<P>();
	return Board_Table.getShort8Unsafe<P>(king,to)
	  != Board_Table.getShort8<P>(king,from);
      }
      /**
       * @param exceptFor ここからの利きは除外
       */
      static bool isMember(const NumEffectState& state, 
			   Ptype ptype,Square from,Square to,
			   Square exceptFor)
      {
	return isMemberMain<true>(state, ptype, from, to, exceptFor);
      }
    private:
      template <bool hasException>
      static bool
#ifdef __GNUC__
	__attribute__ ((pure))
#endif
      isMemberMain(const NumEffectState& state, 
		   Ptype ptype,Square from,Square to,
		   Square exceptFor);
    };

    template <Player P> struct ClassifierTraits<KingOpenMove<P> >
    {
      static const bool drop_suitable = false;
      static const bool result_if_drop = false;
    };
    
  } // namespace move_classifier
} // namespace osl
#endif /* OSL_MOVE_CLASSIFIER_NOT_KING_OPEN_MOVE_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: