This file is indexed.

/usr/include/libcob/numeric.h is in libcob1-dev 1.1-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
/*
 * Copyright (C) 2002-2009 Keisuke Nishida
 * Copyright (C) 2007-2009 Roger While
 *
 * 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,
 * 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; see the file COPYING.LIB.  If
 * not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor
 * Boston, MA 02110-1301 USA
 */

#ifndef COB_NUMERIC_H
#define COB_NUMERIC_H

#include <gmp.h>
#include <libcob/common.h>

#define COB_STORE_ROUND			0x01
#define COB_STORE_KEEP_ON_OVERFLOW	0x02
#define COB_STORE_TRUNC_ON_OVERFLOW	0x04

/*
 * Internal representation of decimal numbers.
 *
 *   n = value / 10^scale
 */
typedef struct {
	mpz_t	value;
	int	scale;
} cob_decimal;

extern void	cob_decimal_init	(cob_decimal *);
extern void	cob_decimal_set_field	(cob_decimal *, cob_field *);
extern int	cob_decimal_get_field	(cob_decimal *, cob_field *, const int);
extern void	cob_decimal_add		(cob_decimal *, cob_decimal *);
extern void	cob_decimal_sub		(cob_decimal *, cob_decimal *);
extern void	cob_decimal_mul		(cob_decimal *, cob_decimal *);
extern void	cob_decimal_div		(cob_decimal *, cob_decimal *);
extern void	cob_decimal_pow		(cob_decimal *, cob_decimal *);
extern int	cob_decimal_cmp		(cob_decimal *, cob_decimal *);

extern int	cob_add			(cob_field *, cob_field *, const int);
extern int	cob_sub			(cob_field *, cob_field *, const int);
extern int	cob_add_int		(cob_field *, const int);
extern int	cob_sub_int		(cob_field *, const int);
extern int	cob_div_quotient	(cob_field *, cob_field *,
					 cob_field *, const int);
extern int	cob_div_remainder	(cob_field *, const int);

extern int	cob_cmp_int		(cob_field *, const int);
extern int	cob_cmp_uint		(cob_field *, const unsigned int);
extern int	cob_cmp_packed		(cob_field *, int);
extern int	cob_cmp_numdisp		(const unsigned char *,
					 const size_t, const int);
extern int	cob_cmp_sign_numdisp	(const unsigned char *,
					 const size_t, const int);
extern int	cob_cmp_long_numdisp	(const unsigned char *,
					 const size_t, const int);
extern void	cob_set_packed_zero	(cob_field *);
extern void	cob_set_packed_int	(cob_field *, const int);

extern int	cob_cmp_long_sign_numdisp	(const unsigned char *,
						 const size_t, const int);

#endif /* COB_NUMERIC_H */