home *** CD-ROM | disk | FTP | other *** search
- /* Permuted index, with keywords in their context.
- Copyright (C) 1990 Free Software Foundation, Inc.
- Francois Pinard <pinard@iro.umontreal.ca>, 1988.
-
- $Id$
- */
-
-
- /* Some system dependant declarations. */
-
- #ifdef appolo
- /* Appolo C compiler knows about standard library prototypes, and this
- knowledge conflicts with my declarations. */
- #define STDLIB_PROTO_ALREADY
- #endif
-
- #ifdef sparc
- /* Sparc machines require word alignment for each OCCURS structure. */
- #define OCCURS_ALIGNMENT 4
- #endif
-
-
- /* Prototype macros. */
-
- #ifdef __STDC__
- #define PROTO(x) x
- #ifndef __GNUC__
- #define volatile
- #endif /* not __GNUC__ */
- #else /* not __STDC__ */
- #define PROTO(x) ()
- #define const
- #define volatile
- #endif /* not __STDC__ */
-
-
- /* Standard library prototypes. */
-
- #ifndef STDLIB_PROTO_ALREADY
-
- #include <assert.h>
-
- #ifdef MSDOS
-
- #include <stdlib.h>
- #include <io.h>
- int getopt (int, char **, const char *);
-
- #else /* not MSDOS */
-
- #ifdef BUFSIZ /* stdio dependant -- how ugly! */
- int _filbuf PROTO ((FILE *));
- int _flsbuf PROTO ((unsigned char, FILE *));
- #endif /* BUFSIZ */
- void volatile abort PROTO ((void));
- int atoi PROTO ((const char *));
- void close PROTO ((int));
- void volatile exit PROTO ((int));
- void free PROTO ((void *));
- int fstat PROTO ((int, struct stat *));
- int getopt PROTO ((int, char **, const char *));
- int open PROTO ((const char *, int));
- void perror PROTO ((const char *));
- void qsort PROTO ((void *, int, int, int ()));
- int read PROTO ((int, void *, unsigned));
-
- #endif /* not MSDOS */
-
- #endif /* not STDLIB_PROTO_ALREADY */
-
-
- /* GNU library prototypes. */
-
- void * xmalloc PROTO ((int));
- void * xrealloc PROTO ((void *, int));
-
- /* Local prototypes. */
-
- void print_copyright PROTO ((void));
- void print_version PROTO ((void));
-
- /* Teach MS-DOS to handel long files */
-
- #ifdef MSDOS
-
- #if defined (_MSC_VER) && (_MSC_VER >= 600)
- #define HUGE _huge
- #else
- #define HUGE huge
- #endif
- #define LONG long
-
- void HUGE *xhalloc (long size);
- void HUGE *xhrealloc (void HUGE *ptr, long new_size, long old_size);
- long hread (int fd, void HUGE *buffer, long bytes);
-
- #if defined (M_I86CM) || defined (M_I86LM)
-
- #define L_PDIFF(ptr1,ptr2) \
- ((long)((char HUGE *)(ptr1) - (char HUGE *)(ptr2)))
-
- #define I_PDIFF(ptr1,ptr2) \
- (assert ((long)((char HUGE *)(ptr1) - (char HUGE *)(ptr2)) < (1L << 15)), \
- ((int)(long)((char HUGE *)(ptr1) - (char HUGE *)(ptr2))))
-
- extern int re_hsearch (struct re_pattern_buffer *pbufp, char HUGE *string,
- long size, long startpos, long range,
- struct re_registers *regs);
- extern int re_hmatch (struct re_pattern_buffer *pbufp, char HUGE *string,
- long size, long pos, struct re_registers *regs);
-
- /* We must mask re_search () and re_match () *after* the prototypes
- in regex.h! */
-
- #include <regex.h>
-
- #define re_search re_hsearch
- #define re_match re_hmatch
-
- #define ZERO 0L
-
- #else /* not M_I86CM and not M_I86LM */
-
- #define L_PDIFF(ptr1,ptr2) ((ptr1) - (ptr2))
- #define I_PDIFF(ptr1,ptr2) ((ptr1) - (ptr2))
-
- #define ZERO 0
-
- #endif /* not M_I86CM and not M_I86LM */
-
- #else /* not MSDOS */
-
- #define HUGE
- #define LONG int
-
- #define L_PDIFF(ptr1,ptr2) ((ptr1) - (ptr2))
- #define I_PDIFF(ptr1,ptr2) ((ptr1) - (ptr2))
-
- #define ZERO 0
-
- #endif /* not MSDOS */
-
-
-