indenting
This commit is contained in:
parent
ac71ba72b5
commit
562ac0251d
@ -18,9 +18,9 @@
|
||||
|
||||
#define _YAPDEFS_H 1
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#ifdef YAP_H
|
||||
|
||||
@ -103,7 +103,7 @@ typedef bool YAP_Bool;
|
||||
/* Type definitions */
|
||||
|
||||
#if _WIN64
|
||||
typedef unsigned long long YAP_CELL;
|
||||
typedef unsigned long long YAP_CELL;
|
||||
#else
|
||||
typedef uintptr_t YAP_CELL;
|
||||
#endif
|
||||
@ -142,18 +142,16 @@ typedef YAP_Int YAP_handle_t;
|
||||
|
||||
typedef struct YAP_pred_entry *YAP_PredEntryPtr;
|
||||
|
||||
typedef YAP_Bool (* YAP_UserCPred)(void);
|
||||
typedef YAP_Bool (*YAP_UserCPred)(void);
|
||||
|
||||
typedef int (*YAP_agc_hook)(void *_Atom);
|
||||
|
||||
#include "YapError.h"
|
||||
|
||||
#include <../os/encoding.h>
|
||||
#include "../os/encoding.h"
|
||||
|
||||
typedef encoding_t YAP_encoding_t;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct YAP_thread_attr_struct {
|
||||
@ -232,7 +230,7 @@ typedef struct yap_boot_params {
|
||||
/* if NON-NULL, name for a Prolog file to use when booting */
|
||||
char *YapPrologBootFile;
|
||||
/* if NON-NULL, name for a Prolog file to use when initializing */
|
||||
char *YapPrologInitFile;
|
||||
char *YapPrologInitGoal;
|
||||
/* if NON-NULL, name for a Prolog file to consult before entering top-level */
|
||||
char *YapPrologRCFile;
|
||||
/* if NON-NULL, a goal to run before top-level */
|
||||
@ -291,7 +289,7 @@ typedef struct yap_boot_params {
|
||||
} YAP_init_args;
|
||||
|
||||
#ifdef YAP_H
|
||||
Int Yap_InitDefaults( YAP_init_args *init_args, char saved_state[] );
|
||||
Int Yap_InitDefaults(YAP_init_args *init_args, char saved_state[]);
|
||||
#endif
|
||||
|
||||
/* this should be opaque to the user */
|
||||
@ -303,7 +301,6 @@ typedef struct {
|
||||
struct yami *cp; //> Continuation PC at entry
|
||||
} YAP_dogoalinfo;
|
||||
|
||||
|
||||
// query manipulation support
|
||||
|
||||
typedef struct open_query_struct {
|
||||
@ -323,9 +320,12 @@ typedef void (*YAP_halt_hook)(int exit_code, void *closure);
|
||||
typedef YAP_Int YAP_opaque_tag_t;
|
||||
|
||||
typedef YAP_Bool (*YAP_Opaque_CallOnFail)(void *);
|
||||
typedef YAP_Bool (*YAP_Opaque_CallOnWrite)(FILE *, YAP_opaque_tag_t, void *, int);
|
||||
typedef YAP_Int (*YAP_Opaque_CallOnGCMark)(YAP_opaque_tag_t, void *, YAP_Term *, YAP_Int);
|
||||
typedef YAP_Bool (*YAP_Opaque_CallOnGCRelocate)(YAP_opaque_tag_t, void *, YAP_Term *, YAP_Int);
|
||||
typedef YAP_Bool (*YAP_Opaque_CallOnWrite)(FILE *, YAP_opaque_tag_t, void *,
|
||||
int);
|
||||
typedef YAP_Int (*YAP_Opaque_CallOnGCMark)(YAP_opaque_tag_t, void *, YAP_Term *,
|
||||
YAP_Int);
|
||||
typedef YAP_Bool (*YAP_Opaque_CallOnGCRelocate)(YAP_opaque_tag_t, void *,
|
||||
YAP_Term *, YAP_Int);
|
||||
|
||||
typedef struct YAP_opaque_handler_struct {
|
||||
YAP_Opaque_CallOnFail fail_handler;
|
||||
@ -336,14 +336,13 @@ typedef struct YAP_opaque_handler_struct {
|
||||
|
||||
/********* execution mode ***********************/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
YAPC_INTERPRETED, /* interpreted */
|
||||
YAPC_MIXED_MODE_USER, /* mixed mode only for user predicates */
|
||||
YAPC_MIXED_MODE_ALL, /* mixed mode for all predicates */
|
||||
YAPC_COMPILE_USER, /* compile all user predicates*/
|
||||
YAPC_COMPILE_ALL /* compile all predicates */
|
||||
} yapc_exec_mode;
|
||||
} yapc_exec_mode;
|
||||
|
||||
/** Stream Modes: */
|
||||
typedef enum stream_f {
|
||||
@ -356,42 +355,45 @@ typedef enum stream_f {
|
||||
Tty_Stream_f = 0x000040, /**< Stream is a terminal */
|
||||
Socket_Stream_f = 0x000080, /**< Socket Stream */
|
||||
Binary_Stream_f = 0x000100, /**< Stream is not eof */
|
||||
Eof_Error_Stream_f = 0x000200, /**< Stream should generate error on trying to read after EOF */
|
||||
Reset_Eof_Stream_f = 0x000400, /**< Stream should be reset on findind an EO (C-D and console.*/
|
||||
Eof_Error_Stream_f =
|
||||
0x000200, /**< Stream should generate error on trying to read after EOF */
|
||||
Reset_Eof_Stream_f =
|
||||
0x000400, /**< Stream should be reset on findind an EO (C-D and console.*/
|
||||
Past_Eof_Stream_f = 0x000800, /**< Read EOF from stream */
|
||||
Push_Eof_Stream_f = 0x001000, /**< keep on sending EOFs */
|
||||
Seekable_Stream_f = 0x002000, /**< we can jump around the stream (std regular files) */
|
||||
Seekable_Stream_f =
|
||||
0x002000, /**< we can jump around the stream (std regular files) */
|
||||
Promptable_Stream_f = 0x004000, /**< Interactive line-by-line stream */
|
||||
Client_Socket_Stream_f= 0x008000, /**< socket in client mode */
|
||||
Server_Socket_Stream_f= 0x010000, /**< socket in server mode */
|
||||
Client_Socket_Stream_f = 0x008000, /**< socket in client mode */
|
||||
Server_Socket_Stream_f = 0x010000, /**< socket in server mode */
|
||||
InMemory_Stream_f = 0x020000, /**< buffer */
|
||||
Pipe_Stream_f = 0x040000, /**< FIFO buffer */
|
||||
Popen_Stream_f = 0x080000, /**< popen open, pipes mosylyn */
|
||||
User_Stream_f = 0x100000, /**< usually user_ipiy */
|
||||
HAS_BOM_f = 0x200000, /**< media for streamhas a BOM mar. */
|
||||
RepError_Prolog_f = 0x400000, /**< handle representation error as Prolog terms */
|
||||
RepError_Prolog_f =
|
||||
0x400000, /**< handle representation error as Prolog terms */
|
||||
RepError_Xml_f = 0x800000, /**< handle representation error as XML objects */
|
||||
DoNotCloseOnAbort_Stream_f= 0x1000000, /**< do not close the stream after an abort event */
|
||||
Readline_Stream_f= 0x2000000, /**< the stream is a readline stream */
|
||||
FreeOnClose_Stream_f= 0x4000000 /**< the stream buffer should be releaed on close */
|
||||
DoNotCloseOnAbort_Stream_f =
|
||||
0x1000000, /**< do not close the stream after an abort event */
|
||||
Readline_Stream_f = 0x2000000, /**< the stream is a readline stream */
|
||||
FreeOnClose_Stream_f =
|
||||
0x4000000 /**< the stream buffer should be releaed on close */
|
||||
} estream_f;
|
||||
|
||||
typedef uint64_t stream_flags_t;
|
||||
|
||||
|
||||
/********* YAP C-Flags ***********************/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
YAPC_ENABLE_GC, /* enable or disable garbage collection */
|
||||
YAPC_ENABLE_AGC /* enable or disable atom garbage collection */
|
||||
} yap_flag_gc_t;
|
||||
} yap_flag_gc_t;
|
||||
|
||||
typedef enum yap_enum_reset_t {
|
||||
YAP_EXEC_ABSMI = 0,
|
||||
YAP_FULL_RESET = 1,
|
||||
YAP_RESET_FROM_RESTORE = 3
|
||||
} yap_reset_t;
|
||||
\
|
||||
|
||||
#endif /* _YAPDEFS_H */
|
||||
|
Reference in New Issue
Block a user