1 | /**************************************************************************
|
---|
2 | *
|
---|
3 | * locallib.h -- Misc functions
|
---|
4 | * Copyright (C) 1994 Gary Eddy, Alistair Moffat and Neil Sharman
|
---|
5 | *
|
---|
6 | * This program is free software; you can redistribute it and/or modify
|
---|
7 | * it under the terms of the GNU General Public License as published by
|
---|
8 | * the Free Software Foundation; either version 2 of the License, or
|
---|
9 | * (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This program is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
14 | * GNU General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU General Public License
|
---|
17 | * along with this program; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
19 | *
|
---|
20 | **************************************************************************/
|
---|
21 |
|
---|
22 | #ifndef LOCALLIB_H
|
---|
23 | #define LOCALLIB_H
|
---|
24 |
|
---|
25 | #include "sysfuncs.h"
|
---|
26 |
|
---|
27 | #include "text.h"
|
---|
28 |
|
---|
29 | #define NUMOF(a) (sizeof(a)/sizeof((a)[0]))
|
---|
30 |
|
---|
31 | int vecentropy (int *A, int n);
|
---|
32 |
|
---|
33 | int huffcodebits (unsigned long *A, int n);
|
---|
34 |
|
---|
35 | int modelbits (unsigned long *A, int n);
|
---|
36 |
|
---|
37 | int prime (int p);
|
---|
38 |
|
---|
39 |
|
---|
40 | int Read_cdh (FILE * f, compression_dict_header * cdh, u_long * mem, u_long * disk);
|
---|
41 |
|
---|
42 | int Read_cfh (FILE * f, comp_frags_header * cfh, u_long * mem, u_long * disk);
|
---|
43 |
|
---|
44 |
|
---|
45 | #endif
|
---|