skip/2 was using user_input
This commit is contained in:
parent
edd5c007c8
commit
2466db7ff5
15552
docs/my.yap
Normal file
15552
docs/my.yap
Normal file
File diff suppressed because it is too large
Load Diff
15509
docs/yapdocs.yap
Normal file
15509
docs/yapdocs.yap
Normal file
File diff suppressed because it is too large
Load Diff
4
misc/gengroups
Normal file
4
misc/gengroups
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
grep -nHR -e group ../pl ../C ../H ../packages ../library | \
|
||||||
|
grep '(@|\\)'| \
|
||||||
|
grep -v \#| \
|
||||||
|
grep -v ^grep
|
@ -1,7 +1,6 @@
|
|||||||
x#!/usr/local/bin/yap -L -- *
|
#!/usr/local/bin/yap -L -- $*
|
||||||
#.
|
#.
|
||||||
|
|
||||||
|
|
||||||
:- style_check(all).
|
:- style_check(all).
|
||||||
|
|
||||||
:- yap_flag( write_strings, on).
|
:- yap_flag( write_strings, on).
|
||||||
@ -20,7 +19,9 @@ x#!/usr/local/bin/yap -L -- *
|
|||||||
:- yap_flag( double_quotes, string ).
|
:- yap_flag( double_quotes, string ).
|
||||||
%:- yap_flag( dollar_as_lower_case, on ).
|
%:- yap_flag( dollar_as_lower_case, on ).
|
||||||
|
|
||||||
:- dynamic edge/1,
|
:- dynamic
|
||||||
|
node/4,
|
||||||
|
edge/1,
|
||||||
public/2,
|
public/2,
|
||||||
private/2,
|
private/2,
|
||||||
module_on/3,
|
module_on/3,
|
||||||
@ -50,7 +51,7 @@ inline( []/0 ).
|
|||||||
%
|
%
|
||||||
|
|
||||||
main :-
|
main :-
|
||||||
init,
|
init,
|
||||||
fail.
|
fail.
|
||||||
main :-
|
main :-
|
||||||
unix(argv([D])),
|
unix(argv([D])),
|
||||||
@ -74,7 +75,6 @@ main :-
|
|||||||
c_links,
|
c_links,
|
||||||
mkdocs.
|
mkdocs.
|
||||||
|
|
||||||
|
|
||||||
init :-
|
init :-
|
||||||
retractall(dir(_)),
|
retractall(dir(_)),
|
||||||
retractall(edge(_)),
|
retractall(edge(_)),
|
||||||
@ -211,7 +211,7 @@ clinks(S) :-
|
|||||||
format( S, 'mod( ~q , ~q ).~n', [NM, F] ),
|
format( S, 'mod( ~q , ~q ).~n', [NM, F] ),
|
||||||
fail.
|
fail.
|
||||||
clinks(S) :-
|
clinks(S) :-
|
||||||
system_predicate(C),
|
system_predicate(C),
|
||||||
functor(C, N, A),
|
functor(C, N, A),
|
||||||
format( S, 'sys ~q/~d.~n', [N, A] ),
|
format( S, 'sys ~q/~d.~n', [N, A] ),
|
||||||
fail.
|
fail.
|
||||||
@ -223,7 +223,7 @@ clinks(S) :-
|
|||||||
% S1 =.. [F1| Args],
|
% S1 =.. [F1| Args],
|
||||||
% numbervars(Args, 0, _),
|
% numbervars(Args, 0, _),
|
||||||
format( S, '% ~q <- ~q.~n~q:~q imports ~q:~q. ~n', [Fi0, Fi1, M,F/A, M1,F1/A] ),
|
format( S, '% ~q <- ~q.~n~q:~q imports ~q:~q. ~n', [Fi0, Fi1, M,F/A, M1,F1/A] ),
|
||||||
fail.
|
fail.
|
||||||
clinks(S) :-
|
clinks(S) :-
|
||||||
close(S).
|
close(S).
|
||||||
|
|
||||||
@ -620,11 +620,11 @@ decl(I0, I) -->
|
|||||||
skip_early_comment(C) -->
|
skip_early_comment(C) -->
|
||||||
[C], !,
|
[C], !,
|
||||||
skip_early_comment(C).
|
skip_early_comment(C).
|
||||||
skip_early_comment(C) -->
|
skip_early_comment(C) -->
|
||||||
( " " ; "\t" ; "\n" ), !,
|
( " " ; "\t" ; "\n" ), !,
|
||||||
skip_early_comment(C).
|
skip_early_comment(C).
|
||||||
skip_early_comment(C) -->
|
skip_early_comment(C) -->
|
||||||
"@" ( "{" ; "}" ), !,
|
"@", ( "{" ; "}" ), !,
|
||||||
skip_early_comment(C).
|
skip_early_comment(C).
|
||||||
skip_early_comment(_) --> [].
|
skip_early_comment(_) --> [].
|
||||||
|
|
||||||
|
1
misc/tmp/foreigns.yap
Normal file
1
misc/tmp/foreigns.yap
Normal file
@ -0,0 +1 @@
|
|||||||
|
sys working_directory/2.
|
16
os/alias.c
16
os/alias.c
@ -18,7 +18,11 @@
|
|||||||
static char SccsId[] = "%W% %G%";
|
static char SccsId[] = "%W% %G%";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Aliases
|
/**
|
||||||
|
* @group
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Aliases:
|
||||||
* This file defines the main operations on aliases, a second name for a file. Aliases are always
|
* This file defines the main operations on aliases, a second name for a file. Aliases are always
|
||||||
* textual constants (atoms).
|
* textual constants (atoms).
|
||||||
*
|
*
|
||||||
@ -115,6 +119,16 @@ static char SccsId[] = "%W% %G%";
|
|||||||
static Atom FetchAlias (int sno);
|
static Atom FetchAlias (int sno);
|
||||||
static bool ExistsAliasForStream (int sno, Atom al);
|
static bool ExistsAliasForStream (int sno, Atom al);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify an alias to the stream. The alias <tt>Name</tt> must be an atom. The
|
||||||
|
* alias can be used instead of the stream descriptor for every operation
|
||||||
|
* concerning the stream.
|
||||||
|
*
|
||||||
|
* @param + _tname_ Name of Alias
|
||||||
|
* @param + _tstream_ stream identifier
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
static Int add_alias_to_stream (USES_REGS1)
|
static Int add_alias_to_stream (USES_REGS1)
|
||||||
{
|
{
|
||||||
Term tname = Deref(ARG1);
|
Term tname = Deref(ARG1);
|
||||||
|
@ -579,7 +579,7 @@ static Int put_byte_1(USES_REGS1) { /* '$put_byte'(Stream,N) */
|
|||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Int skip_1(USES_REGS1) { /* '$skip'(Stream,N) */
|
static Int skip_1(USES_REGS1) { /* 'skip'(N) */
|
||||||
Int n;
|
Int n;
|
||||||
Term t2;
|
Term t2;
|
||||||
int sno;
|
int sno;
|
||||||
@ -607,9 +607,11 @@ static Int skip_1(USES_REGS1) { /* '$skip'(Stream,N) */
|
|||||||
static Int skip(USES_REGS1) { /* '$skip'(Stream,N) */
|
static Int skip(USES_REGS1) { /* '$skip'(Stream,N) */
|
||||||
Int n;
|
Int n;
|
||||||
Term t2;
|
Term t2;
|
||||||
int sno;
|
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "skip/2");
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
|
if (sno < 0)
|
||||||
|
return (FALSE);
|
||||||
if (IsVarTerm(t2 = Deref(ARG2))) {
|
if (IsVarTerm(t2 = Deref(ARG2))) {
|
||||||
Yap_Error(INSTANTIATION_ERROR, t2, "skip/2");
|
Yap_Error(INSTANTIATION_ERROR, t2, "skip/2");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -620,7 +622,6 @@ static Int skip(USES_REGS1) { /* '$skip'(Stream,N) */
|
|||||||
Yap_Error(DOMAIN_ERROR_OUT_OF_RANGE, t2, "skip/2");
|
Yap_Error(DOMAIN_ERROR_OUT_OF_RANGE, t2, "skip/2");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
sno = LOCAL_c_input_stream;
|
|
||||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) != n && ch != -1)
|
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) != n && ch != -1)
|
||||||
;
|
;
|
||||||
|
@ -671,8 +671,8 @@ system_predicate(A,T1) :-
|
|||||||
|
|
||||||
Defines the relation: _P_ is a currently defined system predicate.
|
Defines the relation: _P_ is a currently defined system predicate.
|
||||||
*/
|
*/
|
||||||
system_predicate(P) :-
|
system_predicate(P0) :-
|
||||||
strip_module(M, P),
|
strip_module(P0, M, P),
|
||||||
system_predicate(_, M:P).
|
system_predicate(_, M:P).
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user