mostly indenting
This commit is contained in:
parent
e5fc818c37
commit
166d4892f9
15
os/iopreds.c
15
os/iopreds.c
@ -360,7 +360,7 @@ Yap_InitStdStreams (void)
|
||||
|
||||
|
||||
Int
|
||||
PlIOError__ (const char *function, int lineno, const char *file, yap_error_number type, Term culprit, ...)
|
||||
PlIOError__ (const char *file, const char *function, int lineno, yap_error_number type, Term culprit, ...)
|
||||
{
|
||||
|
||||
if (trueLocalPrologFlag(FILEERRORS_FLAG) == MkIntTerm(1) ||
|
||||
@ -373,7 +373,7 @@ PlIOError__ (const char *function, int lineno, const char *file, yap_error_numbe
|
||||
format = va_arg(args, char *);
|
||||
vsnprintf(who, 1023, format, args);
|
||||
va_end( args );
|
||||
Yap_Error__(function, lineno,file, type, culprit, who);
|
||||
Yap_Error__(file, function, lineno, type, culprit, who);
|
||||
/* and fail */
|
||||
return FALSE;
|
||||
} else {
|
||||
@ -1787,11 +1787,13 @@ Yap_OpenStream(FILE *fd, char *name, Term file_name, int flags)
|
||||
sname = AtomUserOut;
|
||||
}
|
||||
}
|
||||
LOCK(GLOBAL_StreamDescLock);
|
||||
if ((sno = Yap_CheckAlias(sname)) == -1) {
|
||||
UNLOCK(GLOBAL_StreamDescLock);
|
||||
if ((sno = Yap_CheckAlias(sname)) < 0) {
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
Yap_Error(EXISTENCE_ERROR_STREAM, arg, msg);
|
||||
return -1;
|
||||
} else {
|
||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||
return sno;
|
||||
}
|
||||
} else if (IsApplTerm (arg) && FunctorOfTerm (arg) == FunctorStream) {
|
||||
arg = ArgOfTerm (1, arg);
|
||||
@ -1802,17 +1804,14 @@ Yap_OpenStream(FILE *fd, char *name, Term file_name, int flags)
|
||||
if (sno < 0)
|
||||
{
|
||||
Yap_Error(DOMAIN_ERROR_STREAM_OR_ALIAS, arg, msg);
|
||||
UNLOCK(GLOBAL_StreamDescLock);
|
||||
return (-1);
|
||||
}
|
||||
if (GLOBAL_Stream[sno].status & Free_Stream_f)
|
||||
{
|
||||
PlIOError(EXISTENCE_ERROR_STREAM, arg, msg);
|
||||
UNLOCK(GLOBAL_StreamDescLock);
|
||||
return (-1);
|
||||
}
|
||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||
UNLOCK(GLOBAL_StreamDescLock);
|
||||
if ((GLOBAL_Stream[sno].status & kind) == 0)
|
||||
{
|
||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||
|
Reference in New Issue
Block a user