Sélectionner une révision Git
discordcommandhandler.ts
-
Christian Paul a rédigéChristian Paul a rédigé
p2c.h 6,98 Kio
#ifndef P2C_H
#define P2C_H
#include <stdio.h>
# include <stddef.h>
# include <stdlib.h>
#include <string.h>
#ifdef __linux__
#include <unistd.h>
#endif
#include <ctype.h>
#include <math.h>
#include <setjmp.h>
#include <assert.h>
#include <stdbool.h>
# define log1p(X) log(1+(X))
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
#define SETBITS 32
typedef signed char schar;
typedef unsigned char uchar;
typedef struct {
void* proc;
void* link;
} _PROCEDURE;
#ifndef _FNSIZE
# define _FNSIZE 120
#endif
extern void PASCAL_MAIN (int, char **);
extern char **P_argv;
extern int P_argc;
extern short P_escapecode;
extern int P_ioresult;
extern __p2c_jmp_buf *__top_jb;
extern int bigendian;