This file is indexed.

/usr/lib/perl5/KinoSearch1/Index/TermInfo.pm is in libkinosearch1-perl 1.00-1build3.

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
package KinoSearch1::Index::TermInfo;
use strict;
use warnings;
use KinoSearch1::Util::ToolSet;
use base qw( KinoSearch1::Util::CClass );

1;

__END__
__XS__

MODULE = KinoSearch1   PACKAGE = KinoSearch1::Index::TermInfo

TermInfo*
new( class_sv, doc_freq, frq_fileptr, prx_fileptr, skip_offset, index_fileptr )
    SV        *class_sv;
    I32        doc_freq;
    double     frq_fileptr;
    double     prx_fileptr;
    I32        skip_offset;
    double     index_fileptr;
PREINIT:
    TermInfo *tinfo;
CODE:
    class_sv = NULL; /* suppress "unused variable" warning */
    Kino1_New(0, tinfo, 1, TermInfo);
    tinfo->doc_freq      = doc_freq;
    tinfo->frq_fileptr   = frq_fileptr;
    tinfo->prx_fileptr   = prx_fileptr;
    tinfo->skip_offset   = skip_offset;
    tinfo->index_fileptr = index_fileptr;
    RETVAL = tinfo;
OUTPUT: RETVAL


=begin comment

Duplicate a TermInfo object.

=end comment
=cut

TermInfo*
clone(tinfo)
    TermInfo *tinfo;
CODE:
    RETVAL = Kino1_TInfo_dupe(tinfo);
OUTPUT: RETVAL

=for comment
Zero out the TermInfo object.

=cut

void
reset(tinfo)
    TermInfo *tinfo;
PPCODE:
    Kino1_TInfo_reset(tinfo);


=begin comment

Setters and getters.

=end comment
=cut

SV*
_set_or_get(tinfo, ...)
    TermInfo *tinfo;
ALIAS:
    set_doc_freq      = 1
    get_doc_freq      = 2
    set_frq_fileptr   = 3
    get_frq_fileptr   = 4
    set_prx_fileptr   = 5
    get_prx_fileptr   = 6
    set_skip_offset   = 7
    get_skip_offset   = 8
    set_index_fileptr = 9
    get_index_fileptr = 10
CODE:
{
    KINO_START_SET_OR_GET_SWITCH

    case 1:  tinfo->doc_freq = SvIV(ST(1));
             /* fall through */
    case 2:  RETVAL = newSViv(tinfo->doc_freq);
             break;

    case 3:  tinfo->frq_fileptr = SvNV(ST(1));
             /* fall through */
    case 4:  RETVAL = newSVnv(tinfo->frq_fileptr);
             break;

    case 5:  tinfo->prx_fileptr = SvNV(ST(1));
             /* fall through */
    case 6:  RETVAL = newSVnv(tinfo->prx_fileptr);
             break;

    case 7:  tinfo->skip_offset = SvIV(ST(1));
             /* fall through */
    case 8:  RETVAL = newSViv(tinfo->skip_offset);
             break;

    case 9:  tinfo->index_fileptr = SvNV(ST(1));
             /* fall through */
    case 10: RETVAL = newSVnv(tinfo->index_fileptr);
             break;
        
    KINO_END_SET_OR_GET_SWITCH
}
    OUTPUT: RETVAL

void
DESTROY(tinfo)
    TermInfo* tinfo;
CODE: 
    Kino1_Safefree(tinfo);

__H__

#ifndef H_KINOSEARCH_INDEX_TERM_INFO
#define H_KINOSEARCH_INDEX_TERM_INFO 1

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include "KinoSearch1UtilMemManager.h"

typedef struct terminfo {
    I32      doc_freq;
    double   frq_fileptr;
    double   prx_fileptr;
    I32      skip_offset;
    double   index_fileptr;
} TermInfo;

TermInfo* Kino1_TInfo_new();
TermInfo* Kino1_TInfo_dupe(TermInfo*);
void      Kino1_TInfo_reset(TermInfo*);
void      Kino1_TInfo_destroy(TermInfo*);

#endif /* include guard */


__C__

#include "KinoSearch1IndexTermInfo.h"

TermInfo*
Kino1_TInfo_new() {
    TermInfo* tinfo;
    Kino1_New(0, tinfo, 1, TermInfo);
    Kino1_TInfo_reset(tinfo);
    return tinfo;
}

/* Allocate and return a copy of the supplied TermInfo.  */
TermInfo*
Kino1_TInfo_dupe(TermInfo *tinfo) {
    TermInfo* new_tinfo;
    
    Kino1_New(0, new_tinfo, 1, TermInfo);
    new_tinfo->doc_freq      = tinfo->doc_freq;
    new_tinfo->frq_fileptr   = tinfo->frq_fileptr;
    new_tinfo->prx_fileptr   = tinfo->prx_fileptr;
    new_tinfo->skip_offset   = tinfo->skip_offset;
    new_tinfo->index_fileptr = tinfo->index_fileptr;

    return new_tinfo;
}

void
Kino1_TInfo_reset(TermInfo *tinfo) {
    tinfo->doc_freq      = 0;
    tinfo->frq_fileptr   = 0.0;
    tinfo->prx_fileptr   = 0.0;
    tinfo->skip_offset   = 0;
    tinfo->index_fileptr = 0.0;
}

void 
Kino1_TInfo_destroy(TermInfo *tinfo) {
    Kino1_Safefree(tinfo);
}

__POD__

=begin devdocs

=head1 NAME

KinoSearch1::Index::TermInfo - filepointer/statistical data for a Term

=head1 SYNOPSIS

    my $tinfo = KinoSearch1::Index::TermInfo->new(
        $doc_freq,
        $frq_fileptr,
        $prx_fileptr,
        $skip_offset,
        $index_fileptr
    );

=head1 DESCRIPTION

The TermInfo contains pointer data indicating where a term can be found in
various files, plus the document frequency of the term.

The index_fileptr member variable is only used if the TermInfo is part of the
.tii stream; it is a filepointer to a locations in the main .tis file.

=head1 METHODS

=head2 new

Constructor.  All 5 arguments are required.

=head1 COPYRIGHT

Copyright 2005-2010 Marvin Humphrey

=head1 LICENSE, DISCLAIMER, BUGS, etc.

See L<KinoSearch1> version 1.00.

=end devdocs
=cut