home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fonts 1
/
freshfonts1.bin
/
programs
/
amiga
/
pastex
/
archives
/
bm2font.lha
/
bm2font
/
p2c.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-29
|
14KB
|
516 lines
#ifndef P2C_H
#define P2C_H
/* Header file for code generated by "p2c", the Pascal-to-C translator */
/* "p2c" Copyright (C) 1989, 1990, 1991 Free Software Foundation.
* By Dave Gillespie, daveg@csvax.cs.caltech.edu. Version 1.20.
* This file may be copied, modified, etc. in any way. It is not restricted
* by the licence agreement accompanying p2c itself.
*/
#include <stdio.h>
/* If the following heuristic fails, compile -DBSD=0 for non-BSD systems,
or -DBSD=1 for BSD systems. */
#ifdef M_XENIX
# define BSD 0
#endif
#ifdef vms
# define BSD 0
# ifndef __STDC__
# define __STDC__ 1
# endif
#endif
#ifdef __TURBOC__
# define MSDOS 1
#endif
#ifdef MSDOS
# define BSD 0
#endif
#ifdef FILE /* a #define in BSD, a typedef in SYSV (hp-ux, at least) */
# ifndef BSD /* (a convenient, but horrible kludge!) */
# define BSD 1
# endif
#endif
#ifdef BSD
# if !BSD
# undef BSD
# endif
#endif
#if (defined(__STDC__) && !defined(M_XENIX)) || defined(__TURBOC__)
#ifndef NOSTDDEF
# include <stddef.h>
#endif
# include <stdlib.h>
# define HAS_STDLIB
# if defined(vms) || defined(__TURBOC__)
# define __ID__(a)a
# endif
#else
# ifndef BSD
# ifndef __TURBOC__
# include <memory.h>
# endif
# endif
# ifdef hpux
# ifdef _INCLUDE__STDC__
# include <stddef.h>
# include <stdlib.h>
# endif
# endif
# include <sys/types.h>
# if !defined(MSDOS) || defined(__TURBOC__)
# define __ID__(a)a
# endif
#endif
#ifdef __ID__
# define __CAT__(a,b)__ID__(a)b
#else
# define __CAT__(a,b)a##b
#endif
#ifdef BSD
# include <strings.h>
# define memcpy(a,b,n) (bcopy(b,a,n),a)
# define memcmp(a,b,n) bcmp(a,b,n)
# define strchr(s,c) index(s,c)
# define strrchr(s,c) rindex(s,c)
#else
# include <string.h>
#endif
#include <ctype.h>
#include <math.h>
#include <setjmp.h>
#include <assert.h>
#ifndef NO_LACK
#ifdef vms
#define LACK_LABS
#define LACK_MEMMOVE
#define LACK_MEMCPY
#else
#define LACK_LABS /* Undefine these if your library has these */
#define LACK_MEMMOVE
#endif
#endif
typedef struct __p2c_jmp_buf {
struct __p2c_jmp_buf *next;
jmp_buf jbuf;
} __p2c_jmp_buf;
/* Warning: The following will not work if setjmp is used simultaneously.
This also violates the ANSI restriction about using vars after longjmp,
but a typical implementation of longjmp will get it right anyway. */
#ifndef FAKE_TRY
# define TRY(x) do { __p2c_jmp_buf __try_jb; \
__try_jb.next = __top_jb; \
if (!setjmp((__top_jb = &__try_jb)->jbuf)) {
# define RECOVER(x) __top_jb = __try_jb.next; } else {
# define RECOVER2(x,L) __top_jb = __try_jb.next; } else { \
if (0) { L: __top_jb = __try_jb.next; }
# define ENDTRY(x) } } while (0)
#else
# define TRY(x) if (1) {
# define RECOVER(x) } else do {
# define RECOVER2(x,L) } else do { L: ;
# define ENDTRY(x) } while (0)
#endif
#ifdef M_XENIX /* avoid compiler bug */
# define SHORT_MAX (32767)
# define SHORT_MIN (-32768)
#endif
/* The following definitions work only on twos-complement machines */
#ifndef SHORT_MAX
# define SHORT_MAX ((short)(((unsigned short) -1) >> 1))
# define SHORT_MIN (~SHORT_MAX)
#endif
#ifndef INT_MAX
# define INT_MAX ((int)(((unsigned int) -1) >> 1))
# define INT_MIN (~INT_MAX)
#endif
#ifndef LONG_MAX
# define LONG_MAX ((long)(((unsigned long) -1) >> 1))
# define LONG_MIN (~LONG_MAX)
#endif
#ifndef SEEK_SET
# define SEEK_SET 0
# define SEEK_CUR 1
# define SEEK_END 2
#endif
#ifndef EXIT_SUCCESS
# ifdef vms
# define EXIT_SUCCESS 1
# define EXIT_FAILURE (02000000000L)
# else
# define EXIT_SUCCESS 0
# define EXIT_FAILURE 1
# endif
#endif
#define SETBITS 32
#if defined(__STDC__) || defined(__TURBOC__)
# if !defined(vms) && !defined(M_LINT)
# define Signed signed
# else
# define Signed
# endif
# define Void void /* Void f() = procedure */
# ifndef Const
# define Const const
# endif
# ifndef Volatile
# define Volatile volatile
# endif
# ifdef M_LINT
# define PP(x) ()
# define PV() ()
typedef char *Anyptr;
# else
# define PP(x) x /* function prototype */
# define PV() (void) /* null function prototype */
typedef void *Anyptr;
# endif
#else
# define Signed
# define Void void
# ifndef Const
# define Const
# endif
# ifndef Volatile
# define Volatile
# endif
# define PP(x) ()
# define PV() ()
typedef char *Anyptr;
#endif
#ifdef __GNUC__
# define Inline inline
#else
# define Inline
#endif
#define Register register /* Register variables */
#define Char char /* Characters (not bytes) */
#ifndef Static
# define Static static /* Private global funcs and vars */
#endif
#ifndef Local
# define Local static /* Nested functions */
#endif
typedef Signed char schar;
#ifndef HAS_UCHAR
typedef unsigned char uchar;
#endif
typedef unsigned char boolean;
#ifndef true
# define true 1
# define false 0
#endif
#ifndef TRUE
# define TRUE 1
# define FALSE 0
#endif
typedef struct {
Anyptr proc, link;
} _PROCEDURE;
#ifndef _FNSIZE
# define _FNSIZE 120
#endif
extern Void PASCAL_MAIN PP( (int, Char **) );
extern Char **P_argv;
extern int P_argc;
extern short P_escapecode;
extern int P_ioresult;
extern __p2c_jmp_buf *__top_jb;
#ifdef P2C_H_PROTO /* if you have Ansi C but non-prototyped header files */
extern Char *strcat PP( (Char *, Const Char *) );
extern Char *strchr PP( (Const Char *, int) );
extern int strcmp PP( (Const Char *, Const Char *) );
extern Char *strcpy PP( (Char *, Const Char *) );
extern size_t strlen PP( (Const Char *) );
extern Char *strncat PP( (Char *, Const Char *, size_t) );
extern int strncmp PP( (Const Char *, Const Char *, size_t) );
extern Char *strncpy PP( (Char *, Const Char *, size_t) );
extern Char *strrchr PP( (Const Char *, int) );
extern Anyptr memchr PP( (Const Anyptr, int, size_t) );
extern Anyptr memmove PP( (Anyptr, Const Anyptr, size_t) );
extern Anyptr memset PP( (Anyptr, int, size_t) );
#ifndef memcpy
extern Anyptr memcpy PP( (Anyptr, Const Anyptr, size_t) );
extern int memcmp PP( (Const Anyptr, Const Anyptr, size_t) );
#endif
extern int atoi PP( (Const Char *) );
extern double atof PP( (Const Char *) );
extern long atol PP( (Const Char *) );
extern double strtod PP( (Const Char *, Char **) );
extern long strtol PP( (Const Char *, Char **, int) );
#endif /*P2C_H_PROTO*/
#ifndef HAS_STDLIB
extern Anyptr malloc PP( (size_t) );
extern Void free PP( (Anyptr) );
#endif
extern int _OutMem PV();
extern int _CaseCheck PV();
extern int _NilCheck PV();
extern int _Escape PP( (int) );
extern int _EscIO PP( (int) );
extern long ipow PP( (long, long) );
extern Char *strsub PP( (Char *, Char *, int, int) );
extern Char *strltrim PP( (Char *) );
extern Char *strrtrim PP( (Char *) );
extern Char *strrpt PP( (Char *, Char *, int) );
extern Char *strpad PP( (Char *, Char *, int, int) );
extern int strpos2 PP( (Char *, Char *, int) );
extern long memavail PV();
extern int P_peek PP( (FILE *) );
extern int P_eof PP( (FILE *) );
extern int P_eoln PP( (FILE *) );
extern Void P_readpaoc PP( (FILE *, Char *, int) );
extern Void P_readlnpaoc PP( (FILE *, Char *, int) );
extern long P_maxpos PP( (FILE *) );
extern Char *P_trimname PP( (Char *, int) );
extern long *P_setunion PP( (long *, long *, long *) );
extern long *P_setint PP( (long *, long *, long *) );
extern long *P_setdiff PP( (long *, long *, long *) );
extern long *P_setxor PP( (long *, long *, long *) );
extern int P_inset PP( (unsigned, long *) );
extern int P_setequal PP( (long *, long *) );
extern int P_subset PP( (long *, long *) );
extern long *P_addset PP( (long *, unsigned) );
extern long *P_addsetr PP( (long *, unsigned, unsigned) );
extern long *P_remset PP( (long *, unsigned) );
extern long *P_setcpy PP