unused vars
This commit is contained in:
parent
b76be19b61
commit
6a068a6e94
30
os/charsio.c
30
os/charsio.c
@ -172,7 +172,7 @@ static Int at_end_of_stream_0(USES_REGS1) { /* at_end_of_stream */
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int yap_fflush(sno) {
|
static int yap_fflush(int sno) {
|
||||||
Yap_ReadlineFlush(sno);
|
Yap_ReadlineFlush(sno);
|
||||||
if ((GLOBAL_Stream[sno].status & Output_Stream_f) &&
|
if ((GLOBAL_Stream[sno].status & Output_Stream_f) &&
|
||||||
!(GLOBAL_Stream[sno].status &
|
!(GLOBAL_Stream[sno].status &
|
||||||
@ -186,11 +186,11 @@ static int yap_fflush(sno) {
|
|||||||
static Int get(USES_REGS1) { /* '$get'(Stream,-N) */
|
static Int get(USES_REGS1) { /* '$get'(Stream,-N) */
|
||||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2");
|
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2");
|
||||||
int ch;
|
int ch;
|
||||||
Int status;
|
//Int status;
|
||||||
|
|
||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
status = GLOBAL_Stream[sno].status;
|
//status = GLOBAL_Stream[sno].status;
|
||||||
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) <= 32 && ch >= 0)
|
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) <= 32 && ch >= 0)
|
||||||
;
|
;
|
||||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
@ -200,11 +200,11 @@ static Int get(USES_REGS1) { /* '$get'(Stream,-N) */
|
|||||||
static Int get_char(USES_REGS1) { /* '$get'(Stream,-N) */
|
static Int get_char(USES_REGS1) { /* '$get'(Stream,-N) */
|
||||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2");
|
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2");
|
||||||
int ch;
|
int ch;
|
||||||
Int status;
|
// Int status;
|
||||||
|
|
||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
status = GLOBAL_Stream[sno].status;
|
//status = GLOBAL_Stream[sno].status;
|
||||||
ch = GLOBAL_Stream[sno].stream_wgetc(sno);
|
ch = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
return (Yap_unify_constant(ARG2, MkCharTerm(ch)));
|
return (Yap_unify_constant(ARG2, MkCharTerm(ch)));
|
||||||
@ -212,12 +212,12 @@ static Int get_char(USES_REGS1) { /* '$get'(Stream,-N) */
|
|||||||
|
|
||||||
static Int get_code(USES_REGS1) { /* get0(Stream,-N) */
|
static Int get_code(USES_REGS1) { /* get0(Stream,-N) */
|
||||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2");
|
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2");
|
||||||
Int status;
|
//Int status;
|
||||||
Int out;
|
Int out;
|
||||||
|
|
||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
status = GLOBAL_Stream[sno].status;
|
//status = GLOBAL_Stream[sno].status;
|
||||||
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
return (Yap_unify_constant(ARG2, MkIntegerTerm(out)));
|
return (Yap_unify_constant(ARG2, MkIntegerTerm(out)));
|
||||||
@ -226,10 +226,10 @@ static Int get_code(USES_REGS1) { /* get0(Stream,-N) */
|
|||||||
static Int get_1(USES_REGS1) { /* get_code1(Stream,-N) */
|
static Int get_1(USES_REGS1) { /* get_code1(Stream,-N) */
|
||||||
int sno = LOCAL_c_input_stream;
|
int sno = LOCAL_c_input_stream;
|
||||||
int ch;
|
int ch;
|
||||||
Int status;
|
//Int status;
|
||||||
|
|
||||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
status = GLOBAL_Stream[sno].status;
|
//status = GLOBAL_Stream[sno].status;
|
||||||
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) <= 32 && ch >= 0)
|
while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) <= 32 && ch >= 0)
|
||||||
;
|
;
|
||||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
@ -238,10 +238,10 @@ static Int get_1(USES_REGS1) { /* get_code1(Stream,-N) */
|
|||||||
|
|
||||||
static Int getcode_1(USES_REGS1) { /* get0(Stream,-N) */
|
static Int getcode_1(USES_REGS1) { /* get0(Stream,-N) */
|
||||||
int sno = LOCAL_c_input_stream;
|
int sno = LOCAL_c_input_stream;
|
||||||
Int status;
|
//Int status;
|
||||||
Int out;
|
Int out;
|
||||||
|
|
||||||
status = GLOBAL_Stream[sno].status;
|
//status = GLOBAL_Stream[sno].status;
|
||||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
@ -250,11 +250,11 @@ static Int getcode_1(USES_REGS1) { /* get0(Stream,-N) */
|
|||||||
|
|
||||||
static Int getchar_1(USES_REGS1) { /* get0(Stream,-N) */
|
static Int getchar_1(USES_REGS1) { /* get0(Stream,-N) */
|
||||||
int sno = LOCAL_c_input_stream;
|
int sno = LOCAL_c_input_stream;
|
||||||
Int status;
|
//Int status;
|
||||||
Int out;
|
Int out;
|
||||||
|
|
||||||
LOCK(GLOBAL_Stream[sno].streamlock);
|
LOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
status = GLOBAL_Stream[sno].status;
|
//status = GLOBAL_Stream[sno].status;
|
||||||
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
out = GLOBAL_Stream[sno].stream_wgetc(sno);
|
||||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
return (Yap_unify_constant(ARG1, MkCharTerm(out)));
|
return (Yap_unify_constant(ARG1, MkCharTerm(out)));
|
||||||
@ -262,7 +262,7 @@ static Int getchar_1(USES_REGS1) { /* get0(Stream,-N) */
|
|||||||
|
|
||||||
static Int get0_line_codes(USES_REGS1) { /* '$get0'(Stream,-N) */
|
static Int get0_line_codes(USES_REGS1) { /* '$get0'(Stream,-N) */
|
||||||
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2");
|
int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2");
|
||||||
Int status;
|
//Int status;
|
||||||
Term out;
|
Term out;
|
||||||
Int ch = '\0';
|
Int ch = '\0';
|
||||||
int rewind;
|
int rewind;
|
||||||
@ -270,7 +270,7 @@ static Int get0_line_codes(USES_REGS1) { /* '$get0'(Stream,-N) */
|
|||||||
if (sno < 0)
|
if (sno < 0)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
rewind = FALSE;
|
rewind = FALSE;
|
||||||
status = GLOBAL_Stream[sno].status;
|
//status = GLOBAL_Stream[sno].status;
|
||||||
out = read_line(sno);
|
out = read_line(sno);
|
||||||
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
UNLOCK(GLOBAL_Stream[sno].streamlock);
|
||||||
if (rewind)
|
if (rewind)
|
||||||
|
@ -276,7 +276,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
|||||||
{
|
{
|
||||||
char tmp1[TMP_STRING_SIZE], *tmpbase;
|
char tmp1[TMP_STRING_SIZE], *tmpbase;
|
||||||
int ch;
|
int ch;
|
||||||
int column_boundary;
|
|
||||||
Term mytargs[8], *targs;
|
Term mytargs[8], *targs;
|
||||||
Int tnum, targ;
|
Int tnum, targ;
|
||||||
const char *fstr = NULL, *fptr;
|
const char *fstr = NULL, *fptr;
|
||||||
@ -320,7 +319,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
|||||||
args = oargs;
|
args = oargs;
|
||||||
tail = otail;
|
tail = otail;
|
||||||
targ = 0;
|
targ = 0;
|
||||||
column_boundary = 0;
|
|
||||||
if (IsVarTerm(tail)) {
|
if (IsVarTerm(tail)) {
|
||||||
Yap_Error(INSTANTIATION_ERROR,tail,"format/2");
|
Yap_Error(INSTANTIATION_ERROR,tail,"format/2");
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
@ -782,7 +780,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
|||||||
while (repeats--) {
|
while (repeats--) {
|
||||||
f_putc(sno, (int) '\n');
|
f_putc(sno, (int) '\n');
|
||||||
}
|
}
|
||||||
column_boundary = 0;
|
|
||||||
finfo.padders = 0;
|
finfo.padders = 0;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
@ -790,14 +787,12 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS)
|
|||||||
has_repeats = 1;
|
has_repeats = 1;
|
||||||
if (GLOBAL_Stream[sno].linepos != 0) {
|
if (GLOBAL_Stream[sno].linepos != 0) {
|
||||||
f_putc(sno, '\n');
|
f_putc(sno, '\n');
|
||||||
column_boundary = 0;
|
|
||||||
finfo.padders = 0;
|
finfo.padders = 0;
|
||||||
}
|
}
|
||||||
if (repeats > 1) {
|
if (repeats > 1) {
|
||||||
Int i;
|
Int i;
|
||||||
for (i = 1; i < repeats; i++)
|
for (i = 1; i < repeats; i++)
|
||||||
f_putc(sno, '\n');
|
f_putc(sno, '\n');
|
||||||
column_boundary = 0;
|
|
||||||
finfo.padders = 0;
|
finfo.padders = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user