headers & booting

This commit is contained in:
Vitor Santos Costa 2016-04-18 16:40:17 +01:00
parent 3ac1a285a9
commit 49699f52e9
2 changed files with 29 additions and 29 deletions

View File

@ -24,10 +24,6 @@
#define C_INTERFACE_C 1 #define C_INTERFACE_C 1
#include "Yap.h"
#include "attvar.h"
#include "clause.h"
#include "yapio.h"
#include <stdlib.h> #include <stdlib.h>
#if HAVE_UNISTD_H #if HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
@ -40,11 +36,15 @@
#if _MSC_VER || defined(__MINGW32__) #if _MSC_VER || defined(__MINGW32__)
#include <windows.h> #include <windows.h>
#endif #endif
#include "iopreds.h"
// we cannot consult YapInterface.h, that conflicts with what we declare, though // we cannot consult YapInterface.h, that conflicts with what we declare, though
// it shouldn't // it shouldn't
#include "Yap.h"
#include "YapInterface.h" #include "YapInterface.h"
#include "YapText.h" #include "YapText.h"
#include "attvar.h"
#include "clause.h"
#include "yapio.h"
#ifdef TABLING #ifdef TABLING
#include "tab.macros.h" #include "tab.macros.h"
#endif /* TABLING */ #endif /* TABLING */
@ -56,6 +56,7 @@
#if HAVE_MALLOC_H #if HAVE_MALLOC_H
#include <malloc.h> #include <malloc.h>
#endif #endif
#include "iopreds.h"
typedef void *atom_t; typedef void *atom_t;
typedef void *functor_t; typedef void *functor_t;
@ -2243,8 +2244,7 @@ static void do_bootfile(char *bootfilename USES_REGS) {
/* trust YAPSHAREDIR over YAP_PL_SRCDIR, and notice that the code is /* trust YAPSHAREDIR over YAP_PL_SRCDIR, and notice that the code is
* dependent. */ * dependent. */
static bool construct_init_file(char *boot_file, char *BootFile) static bool construct_init_file(char *boot_file, char *BootFile) {
{
#if HAVE_GETENV #if HAVE_GETENV
if (getenv("YAPSHAREDIR")) { if (getenv("YAPSHAREDIR")) {
strncpy(boot_file, getenv("YAPSHAREDIR"), 256); strncpy(boot_file, getenv("YAPSHAREDIR"), 256);
@ -2457,8 +2457,7 @@ Int YAP_Init(YAP_init_args *yap_init) {
if (yap_init->QuietMode) { if (yap_init->QuietMode) {
setVerbosity(TermSilent); setVerbosity(TermSilent);
} }
if (restore_result == DO_EVERYTHING || if (restore_result == DO_EVERYTHING || restore_result == DO_ONLY_CODE) {
restore_result == DO_ONLY_CODE) {
LOCAL_PrologMode &= ~BootMode; LOCAL_PrologMode &= ~BootMode;
if (restore_result == DO_ONLY_CODE) { if (restore_result == DO_ONLY_CODE) {
/* first, initialize the saved state */ /* first, initialize the saved state */

View File

@ -64,7 +64,8 @@
#define DEFAULT_SCHEDULERLOOP 10 #define DEFAULT_SCHEDULERLOOP 10
#define DEFAULT_DELAYEDRELEASELOAD 3 #define DEFAULT_DELAYEDRELEASELOAD 3
static void print_usage(void) { static void
print_usage(void) {
fprintf(stderr, "\n[ Valid switches for command line arguments: ]\n"); fprintf(stderr, "\n[ Valid switches for command line arguments: ]\n");
fprintf(stderr, " -? Shows this screen\n"); fprintf(stderr, " -? Shows this screen\n");
fprintf(stderr, " -b Boot file \n"); fprintf(stderr, " -b Boot file \n");