This file is indexed.

/usr/include/wombat/wtable.h is in libmama-dev 2.2.2.1-11ubuntu1.

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
/* $Id$
 *
 * OpenMAMA: The open middleware agnostic messaging API
 * Copyright (C) 2011 NYSE Technologies, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA
 */

#ifndef _WOMBAT_WTABLE_H
#define _WOMBAT_WTABLE_H

#if defined(__cplusplus)
extern "C" {
#endif

#include "wincompat.h"
#include <sys/types.h>

typedef void* wtable_t;


/**
 * Callback typedef function for wtable_for_each() and
 * wtable_clear_for_each().
 */
typedef void (*wTableCallback) (
    wtable_t  t, void* data, const char* key, void* closure);

/**
 * Create an empty table.  
 */
COMMONExpDLL
wtable_t wtable_create (const char* name,    unsigned long size);

/**
 * Destroy a table.  Warning: this function does *not* clear the table
 * first because there are several ways to do this: wtable_free_all(),
 * wtable_clear_for_each(), and wtable_clear().
 */
COMMONExpDLL
void wtable_destroy (wtable_t table);

/**
 * Insert an item into the table.  The key is copied internally to the
 * table.
 */
COMMONExpDLL
int wtable_insert (wtable_t table,const char* key, void* data);

/**
 * Find an item in the table.
 */
COMMONExpDLL
void* wtable_lookup (wtable_t table,const char* key);

/**
 * Remove an item from the table.  The item is returned.
 */
COMMONExpDLL
void* wtable_remove (wtable_t table,const char* key);

/**
 * Iterates over all data in all buckets in the table and invokes
 * the callback function passed in for each one
 */
COMMONExpDLL
void wtable_for_each (wtable_t table, wTableCallback cb, void* closure);

/**
 * Clear the table, including a call to free() for every value in the
 * table.  Required to avoid memory leaks.  Do not use this on wtables
 * containing C++ objects!
 */
COMMONExpDLL
void wtable_free_all (wtable_t table);

/**
 * This function will free all the memory in a table except for the data
 * pointers. This is used whenever tables are merged by copying the pointers
 * instead of the memory.
 */
COMMONExpDLL
void wtable_free_all_xdata (wtable_t table);

/**
 * Clear the table, excluding data values. This function has the potential to
 * cause a memory leak.  Alternatively, use wtable_free_all() to automatically
 * free data items that were inserted after being allocated from the heap
 * (malloc/calloc/realloc) -- not from C++. Use wtable_clear_for_each() to
 * invoke a callback that iterates over each value (can be used from C++ to
 * delete objects).
 */
COMMONExpDLL
void wtable_clear (wtable_t table);

/**
 * Clear the table, invoking a callback for each data value.  Can be
 * used from C++ to delete objects.
 */
COMMONExpDLL
void wtable_clear_for_each (wtable_t table, wTableCallback cb, void* closure);

/**
 * Dump a table for debugging purposes.
 */
void dumptable (wtable_t table);

#if defined(__cplusplus)
}
#endif

#endif /* _WOMBAT_WTABLE_H */