This file is indexed.

/usr/include/sigc++-1.2/sigc++/macros/signal.h.m4 is in libsigc++-1.2-dev 1.2.7-2.

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
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
// -*- c++ -*-
dnl  signal.h.m4 - signal class for sigc++
dnl 
//   Copyright 2000, Karl Einar Nelson
dnl
dnl  This library is free software; you can redistribute it and/or
dnl  modify it under the terms of the GNU Lesser General Public
dnl  License as published by the Free Software Foundation; either
dnl  version 2 of the License, or (at your option) any later version.
dnl
dnl  This library is distributed in the hope that it will be useful,
dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl  Lesser General Public License for more details.
dnl
dnl  You should have received a copy of the GNU Lesser General Public
dnl  License along with this library; if not, write to the Free Software
dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
dnl
include(template.macros.m4)
#ifndef __header__
#define __header__
#include <sigc++/slot.h>
#include <sigc++/connection.h>
#include <sigc++/marshal.h>

#ifdef SIGC_CXX_NAMESPACES
namespace SigC
{
#endif

/** @defgroup Signals
 * Use connect() with SigC::slot to connect a method or function with a Signal.
 *
 * @code
 * signal_clicked.connect( SigC::slot(*this, &MyWindow::on_clicked) );
 * @endcode
 *
 * When the signal is emitted your method will be called.
 *
 * connect() returns a Connection, which you can later use to disconnect your method.
 *
 * When Signals are copied they share the underlying information,
 * so you can have a protected/private SigC::Signal member and a public accessor method.
 */

class SignalConnectionNode;
class SignalExec_;

class LIBSIGC_API SignalNode : public SlotNode
  {
    public:
      int exec_count_; // atomic
      SignalConnectionNode *begin_,*end_;

      SignalNode();
      ~SignalNode();

      // must be inline to avoid emission slowdowns.
      void exec_reference()
        { 
          reference();
          exec_count_ += 1;
        }

      // must be inline to avoid emission slowdowns.
      void exec_unreference()
        {
          exec_count_ -= 1;

          if (defered_ && !exec_count_)
            cleanup();

          unreference();
        }

      SlotNode* create_slot(FuncPtr proxy); // nothrow
      ConnectionNode* push_front(const SlotBase& s);
      ConnectionNode* push_back(const SlotBase& s);

      virtual void remove(SignalConnectionNode* c);
      bool empty();
      void clear();
      void cleanup(); // nothrow
   private:
      void _remove(SignalConnectionNode* c);
  };

class LIBSIGC_API SignalBase
  {
      friend class SignalConnectionNode;
    private:
      SignalBase& operator= (const SignalBase&); // no copy

    protected:
      typedef SignalExec_ Exec;

      mutable SignalNode *impl_;

      SlotNode* create_slot(FuncPtr c) const
        { return impl()->create_slot(c); }

      ConnectionNode* push_front(const SlotBase& s)
        { return impl()->push_front(s); }

      ConnectionNode* push_back(const SlotBase& s)
        { return impl()->push_back(s); }

      SignalBase();
      SignalBase(const SignalBase& s);
      SignalBase(SignalNode* s);
      ~SignalBase();

    public:
      bool empty() const
        { return !impl_ || impl()->empty(); }

      void clear()
        {
          if(impl_)
            impl()->clear();
        }

      SignalNode* impl() const;
  };

class LIBSIGC_API SignalConnectionNode : public ConnectionNode
  {
    public:
      virtual void notify(bool from_child);

      virtual ~SignalConnectionNode();
      SignalConnectionNode(SlotNode*);
  
      SignalNode *parent_;
      SignalConnectionNode *next_,*prev_;
      
      SlotNode* dest() { return (SlotNode*)(slot().impl()); }
  };

// Exeception-safe class for tracking signals.
class LIBSIGC_API SignalExec_
  {
  public:
    SignalNode* signal_;

    SignalExec_(SignalNode* signal) :signal_(signal)
      { signal_->exec_reference(); }

    ~SignalExec_()
      { signal_->exec_unreference(); }
  };
    

/********************************************************/

define([__SIGNAL__],[[Signal]eval(NUM($*)-2)<LIST($*)>])dnl
dnl
dnl  SIGNAL([P1..PN], R)
dnl
define([SIGNAL],[dnl
define([_R_],ifelse($2,void, void, R))
ifelse($2,void, [dnl
/// @ingroup Signals
template <LIST(ARG_CLASS($1), class Marsh)>
class __SIGNAL__(void, $1, Marsh) : public SignalBase
],[dnl
/// @ingroup Signals
template <LIST(class R,ARG_CLASS($1),class Marsh=Marshal<R>) >
class Signal[]NUM($1) : public SignalBase
])dnl
  {
    public:
      typedef Slot[]NUM($1)<LIST(_R_, [$1])> InSlotType;
ifelse($2,void, [dnl
      typedef InSlotType OutSlotType;
      typedef void OutType;
],[dnl
      typedef Slot[]NUM($1)<LIST(typename Marsh::OutType, [$1])> OutSlotType;
      typedef typename Trait<typename Marsh::OutType>::type OutType;
])dnl
 
    private:
      // Used for both emit and proxy.
      static OutType emit_(LIST(ARG_REF($1), void* data));

    public:
      OutSlotType slot() const
        { return create_slot((FuncPtr)(&emit_)); }

      operator OutSlotType() const
        { return create_slot((FuncPtr)(&emit_)); }

      /// You can call Connection::disconnect() later.
      Connection connect(const InSlotType& s)
        { return Connection(push_back(s)); }

      /// Call all the connected methods.
      OutType emit(ARG_REF($1))
        { ifelse($2,void, ,return) emit_(LIST(ARG_NAME($1), impl_)); }

      /// See emit()
      OutType operator()(ARG_REF($1))
        { ifelse($2,void, ,return) emit_(LIST(ARG_NAME($1), impl_)); }
 
      Signal[]NUM($1)() 
        : SignalBase() 
        {}

      Signal[]NUM($1)(const InSlotType& s)
        : SignalBase() 
        { connect(s); }

      ~Signal[]NUM($1)() {}
  };


// emit
ifelse($2,void, [dnl
template <LIST(ARG_CLASS($1),class Marsh)>
void __SIGNAL__(void, $1, Marsh)::emit_(LIST(ARG_REF($1), void* data))
  {
    SignalNode* impl = static_cast<SignalNode*>(data);

    if (!impl||!impl->begin_)
      return;

    Exec exec(impl);
    SlotNode* s = 0;
    for (SignalConnectionNode* i = impl->begin_; i; i = i->next_)
      {
        if (i->blocked())
          continue;

        s = i->dest();
        ((typename __SLOT__(void, $1)::Proxy)(s->proxy_))(LIST(ARG_NAME($1), s));
      }
    return;
  }
],[dnl
template <LIST(class R, ARG_CLASS($1), class Marsh)>
typename __SIGNAL__(_R_, $1, Marsh)::OutType
__SIGNAL__(_R_, $1, Marsh)::emit_(LIST(ARG_REF($1), void* data))
  {
    SignalNode* impl = static_cast<SignalNode*>(data);

    if (!impl || !impl->begin_)
      return Marsh::default_value();

    Exec exec(impl);
    Marsh rc;
    SlotNode* s = 0;

    for (SignalConnectionNode* i = impl->begin_; i; i=i->next_)
      {
        if (i->blocked()) continue;
        s = i->dest();
        if (rc.marshal(((typename __SLOT__(R,$1)::Proxy)(s->proxy_))(LIST(ARG_NAME($1), s))))
          return rc.value();
      }
    return rc.value();
  }
])dnl

])

SIGNAL(ARGS(P,0))
SIGNAL(ARGS(P,1))
SIGNAL(ARGS(P,2))
SIGNAL(ARGS(P,3))
SIGNAL(ARGS(P,4))
SIGNAL(ARGS(P,5))

#ifdef SIGC_CXX_PARTIAL_SPEC
SIGNAL(ARGS(P,0),void)
SIGNAL(ARGS(P,1),void)
SIGNAL(ARGS(P,2),void)
SIGNAL(ARGS(P,3),void)
SIGNAL(ARGS(P,4),void)
SIGNAL(ARGS(P,5),void)
#endif


#ifdef SIGC_CXX_NAMESPACES
}
#endif

#endif // __header__