fix datime/1, system/2 and declaration for p_stream.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@40 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
59fdfadfa9
commit
c0ef937614
@ -4522,8 +4522,8 @@ StreamToFileNo(Term t)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
p_stream(Term t)
|
||||
static Int
|
||||
p_stream(void)
|
||||
{
|
||||
Term in = Deref(ARG1);
|
||||
if (IsVarTerm(in))
|
||||
|
@ -282,7 +282,7 @@ shell(Command, Status) :-
|
||||
system(Command, Status) :-
|
||||
G = system(Command, Status),
|
||||
check_command(Command, G),
|
||||
do_system(Status, Status).
|
||||
do_system(Command, Status).
|
||||
|
||||
sleep(Interval) :- var(Interval), !,
|
||||
throw(error(instantiation_error,sleep(Interval))).
|
||||
|
@ -80,8 +80,8 @@ datime(void)
|
||||
if (loc == NULL) {
|
||||
return(unify(ARG2, MkIntTerm(errno)));
|
||||
}
|
||||
out[0] = MkIntTerm(loc->tm_year);
|
||||
out[1] = MkIntTerm(loc->tm_mon);
|
||||
out[0] = MkIntTerm(1900+loc->tm_year);
|
||||
out[1] = MkIntTerm(1+loc->tm_mon);
|
||||
out[2] = MkIntTerm(loc->tm_mday);
|
||||
out[3] = MkIntTerm(loc->tm_hour);
|
||||
out[4] = MkIntTerm(loc->tm_min);
|
||||
@ -389,7 +389,7 @@ shell(void)
|
||||
|
||||
/* execute a command as a detached process */
|
||||
static int
|
||||
p_system(void)
|
||||
do_system(void)
|
||||
{
|
||||
char *command = AtomName(AtomOfTerm(ARG1));
|
||||
int sys = system(command);
|
||||
@ -543,7 +543,7 @@ init_sys(void)
|
||||
UserCPredicate("p_environ", p_environ, 2);
|
||||
UserCPredicate("exec_command", execute_command, 6);
|
||||
UserCPredicate("do_shell", shell, 2);
|
||||
UserCPredicate("do_system", p_system, 2);
|
||||
UserCPredicate("do_system", do_system, 2);
|
||||
UserCPredicate("popen", p_popen, 4);
|
||||
UserCPredicate("wait", p_wait, 3);
|
||||
UserCPredicate("host_name", host_name, 2);
|
||||
|
Reference in New Issue
Block a user