add -f option

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@329 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-01-27 20:40:10 +00:00
parent 81d38acbc9
commit 6e18479ee2
5 changed files with 18 additions and 5 deletions

View File

@ -665,6 +665,7 @@ YapInit(yap_init_args *yap_init)
} else { } else {
restore_result = FAIL_RESTORE; restore_result = FAIL_RESTORE;
} }
yap_flags[FAST_BOOT_FLAG] = yap_init->FastBoot;
#if defined(YAPOR) || defined(TABLING) #if defined(YAPOR) || defined(TABLING)
make_root_frames(); make_root_frames();
#ifdef YAPOR #ifdef YAPOR
@ -723,6 +724,7 @@ YapFastInit(char saved_state[])
init_args.YapLibDir = NULL; init_args.YapLibDir = NULL;
init_args.YapPrologBootFile = NULL; init_args.YapPrologBootFile = NULL;
init_args.HaltAfterConsult = FALSE; init_args.HaltAfterConsult = FALSE;
init_args.FastBoot = FALSE;
init_args.NumberWorkers = 1; init_args.NumberWorkers = 1;
init_args.SchedulerLoop = 10; init_args.SchedulerLoop = 10;
init_args.DelayedReleaseLoad = 3; init_args.DelayedReleaseLoad = 3;

View File

@ -280,6 +280,9 @@ parse_yap_arguments(int argc, char *argv[], yap_init_args *init_args)
} }
break; break;
#endif /* EMACS */ #endif /* EMACS */
case 'f':
init_args->FastBoot = TRUE;
break;
#ifdef MPWSHELL #ifdef MPWSHELL
case 'm': case 'm':
if (*++p == 'p' && *++p == 'w' && *++p == '\0') if (*++p == 'p' && *++p == 'w' && *++p == '\0')
@ -388,6 +391,7 @@ init_standard_system(int argc, char *argv[])
init_args.YapLibDir = NULL; init_args.YapLibDir = NULL;
init_args.YapPrologBootFile = NULL; init_args.YapPrologBootFile = NULL;
init_args.HaltAfterConsult = FALSE; init_args.HaltAfterConsult = FALSE;
init_args.FastBoot = FALSE;
init_args.NumberWorkers = 1; init_args.NumberWorkers = 1;
init_args.SchedulerLoop = 10; init_args.SchedulerLoop = 10;
init_args.DelayedReleaseLoad = 3; init_args.DelayedReleaseLoad = 3;

View File

@ -74,6 +74,8 @@ typedef struct {
char *YapPrologBootFile; char *YapPrologBootFile;
/* if previous NON-NULL and TRUE, halt after consulting that file */ /* if previous NON-NULL and TRUE, halt after consulting that file */
int HaltAfterConsult; int HaltAfterConsult;
/* ignore .yaprc, .prolog.ini, etc. files. */
int FastBoot;
/* the next three fields only interest YAPOR, but we keep them so that /* the next three fields only interest YAPOR, but we keep them so that
users don't need to recompile DLL in order to use YAPOR */ users don't need to recompile DLL in order to use YAPOR */
/* if NON-0, number of workers we want to have (default=1) */ /* if NON-0, number of workers we want to have (default=1) */

View File

@ -10,7 +10,7 @@
* File: Yap.h.m4 * * File: Yap.h.m4 *
* mods: * * mods: *
* comments: main header file for YAP * * comments: main header file for YAP *
* version: $Id: Yap.h.m4,v 1.17 2002-01-15 17:55:50 stasinos Exp $ * * version: $Id: Yap.h.m4,v 1.18 2002-01-27 20:40:10 vsc Exp $ *
*************************************************************************/ *************************************************************************/
#include "config.h" #include "config.h"
@ -482,7 +482,8 @@ typedef enum {
CHARACTER_ESCAPE_FLAG = 12, CHARACTER_ESCAPE_FLAG = 12,
WRITE_QUOTED_STRING_FLAG = 13, WRITE_QUOTED_STRING_FLAG = 13,
ALLOW_ASSERTING_STATIC_FLAG = 14, ALLOW_ASSERTING_STATIC_FLAG = 14,
HALT_AFTER_CONSULT_FLAG = 15 HALT_AFTER_CONSULT_FLAG = 15,
FAST_BOOT_FLAG = 16
} yap_flags; } yap_flags;
#define STRING_AS_CHARS 0 #define STRING_AS_CHARS 0

View File

@ -87,9 +87,13 @@ read_sig.
'$current_module'(_,prolog) '$current_module'(_,prolog)
; ;
'$current_module'(_,V), '$compile_mode'(_,0), '$current_module'(_,V), '$compile_mode'(_,0),
( exists('~/.yaprc') -> [-'~/.yaprc'] ; true ), ('$access_yap_flags'(16,0) ->
( exists('~/.prologrc') -> [-'~/.prologrc'] ; true ), ( exists('~/.yaprc') -> [-'~/.yaprc'] ; true ),
( exists('~/prolog.ini') -> [-'~/prolog.ini'] ; true ) ( exists('~/.prologrc') -> [-'~/.prologrc'] ; true ),
( exists('~/prolog.ini') -> [-'~/prolog.ini'] ; true )
;
true
)
), ),
'$db_clean_queues'(0), '$db_clean_queues'(0),
'$startup_reconsult', '$startup_reconsult',