summaryrefslogtreecommitdiff
path: root/Build/source/texk/bibtex8/utils.h
blob: 000901582f08518aa5fa3319163b485a3501b772 (plain)
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
/*-
******************************************************************************
******************************************************************************
**
**  MODULE
**
**      $RCSfile: utils.h,v $
**      $Revision: 3.71 $
**      $Date: 1996/08/18 20:37:06 $
**
**  DESCRIPTION
**
**      A 32-bit implementation of BibTeX v0.99c for MS-DOS, OS/2 2.x, 
**      Unix and VMS.  This C language implementation is based on the 
**      original WEB source but it has been enhanced to support 8-bit input
**      characters and a very large processing capacity.
**
**      For documentation describing how to use and build this program, 
**      see the 00README.TXT file that accompanies this distribution.
**
**  MODULE CONTENTS
**
**      This module declares (using ANSI function prototypes) all of the
**      new utility functions that will be used in the program.  The 
**      functions are declared in alphabetical order.
**
**  AUTHORS
**
**      Original WEB translation to C, conversion to "big" (32-bit) capacity,
**      addition of run-time selectable capacity and 8-bit support extensions
**      by:
**
**          Niel Kempson
**          Snowy Owl Systems Limited, Cheltenham, England
**          E-mail: kempson@snowyowl.co.uk
**      
**      8-bit support extensions also by:
**
**          Alejandro Aguilar-Sierra
**          Centro de Ciencias de la Atm\'osfera, 
**          Universidad Nacional Aut\'onoma de M\'exico, M\'exico
**          E-mail: asierra@servidor.unam.mx
**
**  COPYRIGHT
**
**      This implementation copyright (c) 1991-1995 by Niel Kempson
**           and copyright (c) 1995 by Alejandro Aguilar-Sierra.
**
**      This program is free software; you can redistribute it and/or
**      modify it under the terms of the GNU General Public License as
**      published by the Free Software Foundation; either version 1, or
**      (at your option) any later version.
**
**      This program 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
**      General Public License for more details.
**
**      You should have received a copy of the GNU General Public License
**      along with this program; if not, write to the Free Software
**      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**
**      In other words, you are welcome to use, share and improve this
**      program.  You are forbidden to forbid anyone else to use, share
**      and improve what you give them.  Help stamp out software-hoarding!
**
**  ACKNOWLEDGEMENT
**      
**      The original BibTeX was written by Oren Patashnik using Donald 
**      Knuth's WEB system.  This format produces a PASCAL program for 
**      execution and a TeX documented version of the source code. This 
**      program started as a (manual) translation of the WEB source into C.
**  
**  CHANGE LOG
**
**      $Log: utils.h,v $
**      Revision 3.71  1996/08/18  20:37:06  kempson
**      Official release 3.71 (see HISTORY file for details).
**
**      Revision 3.70  1996/04/08  10:08:40  kempson
**      Final documentation & cosmetic changes for official release 3.70.
**
**      Revision 3.5  1995/09/24  20:44:37  kempson
**      Many changes for final beta test version.
**
**      Revision 3.4  1995/04/09  22:15:46  kempson
**      Placed under RCS control
**
******************************************************************************
******************************************************************************
*/
#ifndef __UTILS_H__
#define __UTILS_H__                 1


#ifdef WIN32
#  define CDECL __cdecl
#else
#  define CDECL
#endif /* WIN32 */


/*
** Declaration of public functions defined in utils.c
*/
void                    allocate_arrays (void);
int                     checkdbg (char *str);
long                    checklong (char *str);
void                    close_file (const AlphaFile_T file_pointer);
void CDECL            debug_msg (const int status, char *printf_fmt, ...);
#ifndef KPATHSEA
int                     find_file (const char *envvar,
                                const char *fallback_path,
                                const char *filename, char *full_file_spec);
#endif
FILE                   *open_ip_file (Integer_T search_path);
FILE                   *open_op_file (void);
void                   *mymalloc (const unsigned long bytes_required,
				const char *var_name);
void                    parse_cmd_line (int argc, char **argv);
void                    report_bibtex_capacity (void);
void                    report_search_paths (void);
void		        set_array_sizes (void);
void CDECL            usage (char *printf_fmt, ...);
                                                              

#ifdef SUPPORT_8BIT
void                    c8initialise (void);
#endif                          /* SUPPORT_8BIT */


/*
** Debugging categories.
*/
#define DBG_ALL                 255
#define DBG_CSF                 1
#define DBG_IO                  2
#define DBG_MEM                 4
#define DBG_MISC                8
#define DBG_SRCH                16

#endif                          /* __UTILS_H__ */