diff --git a/H/Regs.h b/H/Regs.h index 285bf9004..cc7a5b173 100644 --- a/H/Regs.h +++ b/H/Regs.h @@ -10,7 +10,7 @@ * File: Regs.h * * mods: * * comments: YAP abstract machine registers * -* version: $Id: Regs.h,v 1.12 2002-02-01 15:48:17 vsc Exp $ * +* version: $Id: Regs.h,v 1.13 2002-02-06 17:35:25 vsc Exp $ * *************************************************************************/ @@ -336,7 +336,7 @@ EXTERN inline void restore_TR(void) { TR = REGS.TR_; } -#elif defined(__GNUC__) && defined(mips) && defined(VSC_UNDEFINED) +#elif defined(__GNUC__) && defined(mips) #define P REGS.P_ /* prolog machine program counter */ #define YENV REGS.YENV_ /* current environment (may differ from ENV) */ diff --git a/console/yap.c b/console/yap.c index bacd678b1..333602cc1 100644 --- a/console/yap.c +++ b/console/yap.c @@ -211,7 +211,7 @@ parse_yap_arguments(int argc, char *argv[], yap_init_args *init_args) char *p; int BootMode = YAP_BOOT_FROM_SAVED_CODE; int *ssize; - + while (--argc > 0) { p = *++argv; @@ -348,6 +348,7 @@ parse_yap_arguments(int argc, char *argv[], yap_init_args *init_args) argc = 1; } init_args->YapPrologBootFile = *argv; + argv++; init_args->HaltAfterConsult = TRUE; break; case 'l': diff --git a/docs/yap.tex b/docs/yap.tex index 3440eda3b..dd9636dc4 100644 --- a/docs/yap.tex +++ b/docs/yap.tex @@ -6196,11 +6196,13 @@ close(mauri_tripa). yes ?- @end example -We first opened a stream in write mode and gave it an alias. Next, we -set @code{user_error} to the stream via the alias. Note that after we -did so prompts from the system were redirected to the stream -@code{mauri_tripa}. Last, when we closed the stream we automatically -redirect the @code{user_error} alias to the original @code{stderr}. +We execute three commands. First, we open a stream in write mode and +give it an alias, in this case @code{mauri_tripa}. Next, we set +@code{user_error} to the stream via the alias. Note that after we did so +prompts from the system were redirected to the stream +@code{mauri_tripa}. Last, we close the stream. At this point, YAP +automatically redirects the @code{user_error} alias to the original +@code{stderr}. @item user_input @findex user_input (yap_flag/2 option) diff --git a/pl/consult.yap b/pl/consult.yap index d3dd985d6..6c98ad160 100644 --- a/pl/consult.yap +++ b/pl/consult.yap @@ -232,7 +232,7 @@ reconsult(Fs) :- ( '$access_yap_flags'(15, 0) -> true ; halt). '$skip_unix_comments'(Stream) :- - '$peek_byte'(Stream, 0'#), !, % 35 is ASCII for # + '$peek'(Stream, 0'#), !, % 35 is ASCII for # '$get0_line_codes'(Stream, _), '$skip_unix_comments'(Stream). '$skip_unix_comments'(_).