This file is indexed.

/usr/share/yacas/include/stubs.h is in yacas 1.3.3-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
/** \file stubs.h interface to platform-dependent functions
 */

#ifndef __stubs_h__
#define __stubs_h__

#include "lisptype.h"

/** Simple function that determines if two strings are equal,
  should be defined in stubs.inl */
//inline LispInt StrEqual(const LispChar * ptr1, const LispChar * ptr2);

#ifdef NO_GLOBALS
  #define PlatAlloc malloc
  #define PlatReAlloc realloc
  #define PlatFree free
  #define NEW new
  #define CHECKPTR(ptr)
#else  // NO_GLOBALS -- goes almost to EOF
  void *PlatObAlloc(size_t nbytes);
  void PlatObFree(void *p);
  void *PlatObReAlloc(void *p, size_t nbytes);

#ifdef YACAS_DEBUG
  #include "debugmem.h"
  #define PlatAlloc(nr)        YacasMallocPrivate((size_t)nr,__FILE__,__LINE__)
  #define PlatReAlloc(orig,nr) YacasReAllocPrivate(orig,(size_t)nr,__FILE__,__LINE__)
  #define PlatFree(orig)       YacasFreePrivate(orig)
  #define NEW new (__FILE__,__LINE__)
  #define CHECKPTR(ptr) CheckPtr(ptr,__FILE__,__LINE__)
#else  // YACAS_DEBUG
  #define PlatAlloc(nr)        PlatObAlloc((size_t)nr)
  #define PlatReAlloc(orig,nr) PlatObReAlloc(orig,(size_t)nr)
  #define PlatFree(orig)       PlatObFree(orig)
  #define NEW new
  #define CHECKPTR(ptr)
#endif  // YACAS_DEBUG

template <class T>
inline T * PlatAllocN(LispInt aSize) { return (T*)PlatAlloc(aSize*sizeof(T)); }


#ifdef YACAS_DEBUG  // goes almost to EOF

/* Operators new and delete are only defined globally here in debug mode. This is because
 * the global new and delete operators should not be used. So the debug version makes sure
 * the executable crashes if one of these are called.
 */

#define NEW_THROWER throw ()//(std::bad_alloc)
#define DELETE_THROWER throw ()

// TODO: why doesn't MSC itself have this problem? Perhaps wrong signature of these new and delete operators?
#if defined(_MSC_VER) && _MSC_VER <= 1310  // getting C4290 warnings?  slowly increase number.
#pragma warning( disable : 4290 )  // C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
#endif

void* operator new(size_t size) NEW_THROWER;
void* operator new[](size_t size) NEW_THROWER;
void operator delete(void* object) DELETE_THROWER;
void operator delete[](void* object) DELETE_THROWER;

#endif  // YACAS_DEBUG

#endif  // NO_GLOBALS

#include "stubs.inl"

#endif  // __stubs_h__