diff --git a/os/charsio.c b/os/charsio.c index cd691f0ee..84bf08a96 100644 --- a/os/charsio.c +++ b/os/charsio.c @@ -172,7 +172,7 @@ static Int at_end_of_stream_0(USES_REGS1) { /* at_end_of_stream */ return out; } -static int yap_fflush(sno) { +static int yap_fflush(int sno) { Yap_ReadlineFlush(sno); if ((GLOBAL_Stream[sno].status & Output_Stream_f) && !(GLOBAL_Stream[sno].status & @@ -186,11 +186,11 @@ static int yap_fflush(sno) { static Int get(USES_REGS1) { /* '$get'(Stream,-N) */ int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2"); int ch; - Int status; + //Int status; if (sno < 0) return FALSE; - status = GLOBAL_Stream[sno].status; + //status = GLOBAL_Stream[sno].status; while ((ch = GLOBAL_Stream[sno].stream_wgetc(sno)) <= 32 && ch >= 0) ; 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) */ int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get/2"); int ch; - Int status; + // Int status; if (sno < 0) return FALSE; - status = GLOBAL_Stream[sno].status; + //status = GLOBAL_Stream[sno].status; ch = GLOBAL_Stream[sno].stream_wgetc(sno); UNLOCK(GLOBAL_Stream[sno].streamlock); 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) */ int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2"); - Int status; + //Int status; Int out; if (sno < 0) return (FALSE); - status = GLOBAL_Stream[sno].status; + //status = GLOBAL_Stream[sno].status; out = GLOBAL_Stream[sno].stream_wgetc(sno); UNLOCK(GLOBAL_Stream[sno].streamlock); 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) */ int sno = LOCAL_c_input_stream; int ch; - Int status; + //Int status; 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) ; 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) */ int sno = LOCAL_c_input_stream; - Int status; + //Int status; Int out; - status = GLOBAL_Stream[sno].status; + //status = GLOBAL_Stream[sno].status; LOCK(GLOBAL_Stream[sno].streamlock); out = GLOBAL_Stream[sno].stream_wgetc(sno); 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) */ int sno = LOCAL_c_input_stream; - Int status; + //Int status; Int out; LOCK(GLOBAL_Stream[sno].streamlock); - status = GLOBAL_Stream[sno].status; + //status = GLOBAL_Stream[sno].status; out = GLOBAL_Stream[sno].stream_wgetc(sno); UNLOCK(GLOBAL_Stream[sno].streamlock); 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) */ int sno = Yap_CheckTextStream(ARG1, Input_Stream_f, "get0/2"); - Int status; + //Int status; Term out; Int ch = '\0'; int rewind; @@ -270,7 +270,7 @@ static Int get0_line_codes(USES_REGS1) { /* '$get0'(Stream,-N) */ if (sno < 0) return (FALSE); rewind = FALSE; - status = GLOBAL_Stream[sno].status; + //status = GLOBAL_Stream[sno].status; out = read_line(sno); UNLOCK(GLOBAL_Stream[sno].streamlock); if (rewind) diff --git a/os/format.c b/os/format.c index 31dd2be20..f17085faa 100644 --- a/os/format.c +++ b/os/format.c @@ -276,7 +276,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS) { char tmp1[TMP_STRING_SIZE], *tmpbase; int ch; - int column_boundary; Term mytargs[8], *targs; Int tnum, targ; const char *fstr = NULL, *fptr; @@ -320,7 +319,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS) args = oargs; tail = otail; targ = 0; - column_boundary = 0; if (IsVarTerm(tail)) { Yap_Error(INSTANTIATION_ERROR,tail,"format/2"); return(FALSE); @@ -782,7 +780,6 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS) while (repeats--) { f_putc(sno, (int) '\n'); } - column_boundary = 0; finfo.padders = 0; break; case 'N': @@ -790,14 +787,12 @@ doformat(volatile Term otail, volatile Term oargs, int sno USES_REGS) has_repeats = 1; if (GLOBAL_Stream[sno].linepos != 0) { f_putc(sno, '\n'); - column_boundary = 0; finfo.padders = 0; } if (repeats > 1) { Int i; for (i = 1; i < repeats; i++) f_putc(sno, '\n'); - column_boundary = 0; finfo.padders = 0; } break;