source: trunk/third/ispell/proto.h @ 10334

Revision 10334, 11.4 KB checked in by ghudson, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10333, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * $Id: proto.h,v 1.1.1.1 1997-09-03 21:08:10 ghudson Exp $
3 *
4 * Copyright 1992, 1993, Geoff Kuenning, Granada Hills, CA
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright
12 *    notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 *    notice, this list of conditions and the following disclaimer in the
15 *    documentation and/or other materials provided with the distribution.
16 * 3. All modifications to the source code must be clearly marked as
17 *    such.  Binary redistributions based on modified source code
18 *    must be clearly marked as modified versions in the documentation
19 *    and/or other materials provided with the distribution.
20 * 4. All advertising materials mentioning features or use of this software
21 *    must display the following acknowledgment:
22 *      This product includes software developed by Geoff Kuenning and
23 *      other unpaid contributors.
24 * 5. The name of Geoff Kuenning may not be used to endorse or promote
25 *    products derived from this software without specific prior
26 *    written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
29 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 * ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
32 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 * SUCH DAMAGE.
39 *
40 */
41
42/*
43 * $Log: not supported by cvs2svn $
44 * Revision 1.15  1994/10/25  05:46:38  geoff
45 * Protoize bzero the way 4.1.1 does it (which I hope is the standard).
46 *
47 * Revision 1.14  1994/05/24  06:23:10  geoff
48 * Make cap_ok a global routine.
49 *
50 * Revision 1.13  1994/05/17  06:44:20  geoff
51 * Add the new arguments to chk_aff, good, and compoundgood.
52 *
53 * Revision 1.12  1994/03/16  03:49:15  geoff
54 * Add an ifdef so that there won't be a conflict with the definition of
55 * free() on braindamaged Sun systems.
56 *
57 * Revision 1.11  1994/02/14  00:34:55  geoff
58 * Add new arguments to the prototype for correct().
59 *
60 * Revision 1.10  1994/02/08  05:45:34  geoff
61 * Don't undef P unless we're going to redefine it
62 *
63 * Revision 1.9  1994/02/07  08:10:47  geoff
64 * Add the GENERATE_LIBRARY_PROTOS option.  Put the definitions of
65 * index/rindex back the way they were, because that's what's needed on
66 * my system (sigh).
67 *
68 * Revision 1.8  1994/02/07  05:45:25  geoff
69 * Change the second parameter of index/rindex to be a char
70 *
71 * Revision 1.7  1994/01/25  07:12:05  geoff
72 * Get rid of all old RCS log lines in preparation for the 3.1 release.
73 *
74 */
75
76extern int      addvheader P ((struct dent * ent));
77extern void     askmode P ((void));
78extern void     backup P ((void));
79#ifndef NO_CAPITALIZATION_SUPPORT
80extern int      cap_ok P ((ichar_t * word, struct success * hit, int len));
81#endif /* NO_CAPITALIZATION_SUPPORT */
82extern int      casecmp P ((char * a, char * b, int canonical));
83extern void     chupcase P ((char * s));
84extern void     checkfile P ((void));
85extern void     checkline P ((FILE * ofile));
86extern void     chk_aff P ((ichar_t * word, ichar_t * ucword, int len,
87                  int ignoreflagbits, int allhits, int pfxopts, int sfxopts));
88extern int      combinecaps P ((struct dent * hdr, struct dent * newent));
89extern int      compoundgood P ((ichar_t * word, int pfxopts));
90extern void     copyout P ((char ** cc, int cnt));
91extern void     correct P ((char * ctok, int ctokl, ichar_t * itok, int itokl,
92                  char ** curchar));
93extern char *   do_regex_lookup P ((char * expr, int whence));
94extern SIGNAL_TYPE done P ((int));
95extern void     dumpmode P ((void));
96extern void     erase P ((void));
97extern int      expand_pre P ((char * croot, ichar_t * rootword,
98                  MASKTYPE mask[], int option, char *extra));
99extern int      expand_suf P ((char * croot, ichar_t * rootword,
100                  MASKTYPE mask[], int crossonly, int option, char * extra));
101extern int      findfiletype P ((char * name, int searchnames,
102                  int * deformatter));
103extern void     flagpr P ((ichar_t * word, int preflag, int prestrip,
104                  int preadd, int sufflag, int sufadd));
105extern void     givehelp P ((int interactive));
106extern int      good P ((ichar_t * word, int ignoreflagbits, int allhits,
107                  int pfxopts, int sfxopts));
108extern int      hash P ((ichar_t * word, int hashtablesize));
109#ifndef ICHAR_IS_CHAR
110extern int      icharcmp P ((ichar_t * s1, ichar_t * s2));
111extern ichar_t * icharcpy P ((ichar_t * out, ichar_t * in));
112extern int      icharlen P ((ichar_t * str));
113extern int      icharncmp P ((ichar_t * s1, ichar_t * s2, int n));
114#endif /* ICHAR_IS_CHAR */
115extern int      ichartostr P ((char * out, ichar_t * in, int outlen,
116                  int canonical));
117extern char *   ichartosstr P ((ichar_t * in, int canonical));
118extern int      ins_root_cap P ((ichar_t * word, ichar_t * pattern,
119                  int prestrip, int preadd, int sufstrip, int sufadd,
120                  struct dent * firstdent, struct flagent * pfxent,
121                  struct flagent * sufent));
122extern void     inverse P ((void));
123extern int      linit P ((void));
124extern struct dent * lookup P ((ichar_t * word, int dotree));
125extern void     lowcase P ((ichar_t * string));
126extern int      makedent P ((char * lbuf, int lbuflen, struct dent * d));
127extern void     makepossibilities P ((ichar_t * word));
128extern void     move P ((int row, int col));
129extern void     normal P ((void));
130extern char *   printichar P ((int in));
131#ifdef USESH
132extern int      shellescape P ((char * buf));
133extern void     shescape P ((char * buf));
134#else /* USESH */
135#ifndef REGEX_LOOKUP
136extern int      shellescape P ((char * buf));
137#endif /* REGEX_LOOKUP */
138#endif /* USESH */
139extern char *   skipoverword P ((char * bufp));
140extern void     stop P ((void));
141extern int      stringcharlen P ((char * bufp, int canonical));
142extern int      strtoichar P ((ichar_t * out, char * in, int outlen,
143                  int canonical));
144extern ichar_t * strtosichar P ((char * in, int canonical));
145extern void     terminit P ((void));
146extern void     toutent P ((FILE * outfile, struct dent * hent,
147                  int onlykeep));
148extern void     treeinit P ((char * persdict, char * LibDict));
149extern void     treeinsert P ((char * word, int wordlen, int keep));
150extern struct dent * treelookup P ((ichar_t * word));
151extern void     treeoutput P ((void));
152extern void     upcase P ((ichar_t * string));
153#ifndef NO_CAPITALIZATION_SUPPORT
154extern long     whatcap P ((ichar_t * word));
155#endif
156extern char *   xgets P ((char * string, int size, FILE * stream));
157extern void     yyinit P ((void));
158extern int      yyopen P ((char * file));
159extern int      yyparse P ((void));
160
161extern void     myfree P ((VOID * area));
162extern VOID *   mymalloc P ((unsigned int));
163extern VOID *   myrealloc P ((VOID * area, unsigned int size,
164                  unsigned int oldsize));
165
166/*
167 * C library functions.  If possible, we get these from stdlib.h.
168 *
169 * Even if stdlib.h doesn't exist, we don't generate proper prototypes
170 * on most systems.  This protects us against minor differences in
171 * declarations that break the compilation unnecessarily.
172 * GENERATE_LIBRARY_PROTOS is mostly for the benefit of the ispell
173 * developer.
174 */
175#ifndef GENERATE_LIBRARY_PROTOS
176#undef P
177#define P(x)    ()
178#endif /* GENERATE_LIBRARY_PROTOS */
179
180#ifdef NO_STDLIB_H
181extern int      access P ((const char * file, int mode));
182extern int      atoi P ((const char * string));
183#ifndef USG
184extern VOID *   bcopy P ((const VOID * src, VOID * dest, unsigned int size));
185extern void     bzero P ((VOID * dest, int size));
186#endif /* USG */
187extern VOID *   calloc P ((unsigned int nelems, unsigned int elemsize));
188#ifdef _POSIX_SOURCE
189extern int      chmod P ((const char * file, unsigned int mode));
190#else /* _POSIX_SOURCE */
191extern int      chmod P ((const char * file, unsigned long mode));
192#endif /* POSIX_SOURCE */
193extern int      close P ((int fd));
194extern int      creat P ((const char * file, int mode));
195extern int      execvp P ((const char * name, const char * argv[]));
196extern void     _exit P ((int status));
197extern void     exit P ((int status));
198extern char *   fgets P ((char * string, int size, FILE * stream));
199extern int      fork P ((void));
200#ifdef __STDC__
201/*
202 * Some flaming cretin at Sun decided that free() should be declared
203 * as returning an int in /usr/include/malloc.h, so the following
204 * declaration causes a conflict.  Fortunately, it doesn't really do a
205 * lot of harm to leave it undeclared, since (a) we always properly
206 * ignore the return value and (b) any machine that really needs
207 * special code to handle ignoring the return value is likely to also
208 * provide a correct declaration.
209 *
210 * (Why is this ifdef'ed on __STDC__?  Because I want it to be correct
211 * on my development machine, so I can catch lint problems.)
212 *
213 * A pox on those who violate long-established standards!
214 */
215extern void     free P ((VOID * area));
216#endif /* __STDC__ */
217extern char *   getenv P ((const char * varname));
218extern int      ioctl P ((int fd, int func, char * arg));
219extern int      kill P ((int pid, int sig));
220extern int      link P ((const char * existing, const char * new));
221extern long     lseek P ((int fd, long offset, int whence));
222extern VOID *   malloc P ((unsigned int size));
223#ifdef USG
224extern VOID *   memcpy P ((VOID * dest, const VOID * src));
225extern VOID *   memset P ((VOID * dest, int val, unsigned int len));
226#endif /* USG */
227extern char *   mktemp P ((char * prototype));
228extern int      open P ((const char * file, int mode));
229extern void     perror P ((const char * msg));
230extern void     qsort P ((VOID * array, unsigned int nelems,
231                  unsigned int elemsize,
232                  int (*cmp) (const VOID * a, const VOID * b)));
233extern int      read P ((int fd, VOID * buf, unsigned int n));
234extern VOID *   realloc P ((VOID * area, unsigned int size));
235extern unsigned int
236                sleep P ((unsigned int));
237extern char *   strcat P ((char * dest, const char * src));
238#ifdef USG
239extern char *   strchr P ((const char * string, int ch));
240#endif /* USG */
241extern int      strcmp P ((const char * s1, const char * s2));
242extern char *   strcpy P ((char * dest, const char * src));
243extern unsigned int
244                strlen P ((const char * str));
245extern int      strncmp P ((const char * s1, const char * s2,
246                  unsigned int len));
247#ifdef USG
248extern char *   strrchr P ((const char * string, int ch));
249#endif /* USG */
250extern int      system P ((const char * command));
251extern int      unlink P ((const char * file));
252extern int      wait P ((int * statusp));
253#else /* NO_STDLIB_H */
254#include <stdlib.h>
255#include <string.h>
256#endif /* NO_STDLIB_H */
257
258#ifndef USG
259extern char *   index P ((const char * string, int ch));
260extern char *   rindex P ((const char * string, int ch));
261#endif /* USG */
262#ifdef REGEX_LOOKUP
263#ifdef USG
264extern char *   regcmp P ((const char * expr, const char * terminator, ...));
265extern char *   regex P ((const char * pat, const char * subject, ...));
266#else /* USG */
267extern char *   re_comp P ((const char * expr));
268extern int *    re_exec P ((const char * pat));
269#endif /* USG */
270#endif /* REGEX_LOOKUP */
271extern int      tgetent P ((char * buf, const char * termname));
272extern int      tgetnum P ((const char * id));
273extern char *   tgetstr P ((const char * id, char ** area));
274extern char *   tgoto P ((const char * cm, int col, int row));
275extern char *   tputs P ((const char * str, int pad, int (*func) (int ch)));
276
277#ifndef GENERATE_LIBRARY_PROTOS
278#ifdef __STDC__
279#undef P
280#define P(x)    x
281#endif /* __STDC__ */
282#endif /* GENERATE_LIBRARY_PROTOS */
Note: See TracBrowser for help on using the repository browser.