[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-commits] gcl debianchangelog o/file.d o/read.d
From: |
Camm Maguire |
Subject: |
[Gcl-commits] gcl debianchangelog o/file.d o/read.d |
Date: |
Wed, 07 Jun 2006 15:04:59 +0000 |
CVSROOT: /cvsroot/gcl
Module name: gcl
Changes by: Camm Maguire <camm> 06/06/07 15:04:59
Modified files:
debian : changelog
o : file.d read.d
Log message:
fix read-char-no-hang
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gcl/debian/changelog?cvsroot=gcl&r1=1.1085&r2=1.1086
http://cvs.savannah.gnu.org/viewcvs/gcl/o/file.d?cvsroot=gcl&r1=1.62&r2=1.63
http://cvs.savannah.gnu.org/viewcvs/gcl/o/read.d?cvsroot=gcl&r1=1.43&r2=1.44
Patches:
Index: debian/changelog
===================================================================
RCS file: /cvsroot/gcl/gcl/debian/changelog,v
retrieving revision 1.1085
retrieving revision 1.1086
diff -u -b -r1.1085 -r1.1086
--- debian/changelog 5 Jun 2006 22:02:45 -0000 1.1085
+++ debian/changelog 7 Jun 2006 15:04:58 -0000 1.1086
@@ -172,8 +172,9 @@
gmp_randinit_default handling for gmp 4.2
* call-lambda info-type propagation
* auto-recompilation support
+ * fix read-char-no-hang
- -- Camm Maguire <address@hidden> Mon, 5 Jun 2006 22:01:13 +0000
+ -- Camm Maguire <address@hidden> Wed, 7 Jun 2006 15:04:48 +0000
gclcvs (2.7.0-53) unstable; urgency=low
Index: o/file.d
===================================================================
RCS file: /cvsroot/gcl/gcl/o/file.d,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -b -r1.62 -r1.63
--- o/file.d 5 Jun 2006 22:02:45 -0000 1.62
+++ o/file.d 7 Jun 2006 15:04:58 -0000 1.63
@@ -823,16 +823,16 @@
if (strm->sm.sm_fp == NULL)
closed_stream(strm);
c = kclgetc(strm->sm.sm_fp);
- if (c == EOF) {
- if (xkclfeof(c,strm->sm.sm_fp))
- end_of_stream(strm);
- else c = kclgetc(strm->sm.sm_fp);
- if (c == EOF) end_of_stream(strm);
- }
+/* if (c == EOF) { */
+/* if (xkclfeof(c,strm->sm.sm_fp)) */
+/* end_of_stream(strm); */
+/* else c = kclgetc(strm->sm.sm_fp); */
+/* if (c == EOF) end_of_stream(strm); */
+/* } */
- c &= 0377;
+/* c &= 0377; */
/* strm->sm.sm_int0++; */
- return(c);
+ return(c==EOF ? c : (c&0377));
case smm_synonym:
strm = symbol_value(strm->sm.sm_object0);
@@ -1462,6 +1462,8 @@
case smm_input:
if (strm->sm.sm_fp == NULL)
closed_stream(strm);
+ if (isatty(fileno(strm->sm.sm_fp)) && !listen_stream(strm))
+ return(feof(strm->sm.sm_fp) ? TRUE : FALSE);
{int prev_signals_allowed = signals_allowed;
AGAIN:
signals_allowed= sig_at_read;
Index: o/read.d
===================================================================
RCS file: /cvsroot/gcl/gcl/o/read.d,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- o/read.d 5 Jun 2006 22:02:45 -0000 1.43
+++ o/read.d 7 Jun 2006 15:04:59 -0000 1.44
@@ -295,6 +295,13 @@
x = read_object(in);
vs_push(x);
+ while (listen_stream(in)) {
+ object c=read_char(in);
+ if (cat(c)!=cat_whitespace) {
+ unread_char(c,in);
+ break;
+ }
+ }
if (sharp_eq_context_max > 0)
x = vs_head = patch_sharp(x);
@@ -2336,12 +2343,13 @@
else if (strm == Ct)
strm = symbol_value(sLAterminal_ioA);
check_type_stream(&strm);
- if (!listen_stream(strm)) {
+ if (stream_at_end(strm)) {
if (eof_errorp == Cnil)
@(return eof_value)
else
end_of_stream(strm);
}
+ if (!listen_stream(strm)) @(return Cnil)
@(return `read_char(strm)`)
@)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gcl-commits] gcl debianchangelog o/file.d o/read.d,
Camm Maguire <=