From 3f277cf93e86ea8f150f8b70981535924427f4f0 Mon Sep 17 00:00:00 2001
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Date: Wed, 31 May 2000 18:43:50 +0000
Subject: [PATCH] when getting an empty line check for Gl_eof(). If an eof
 found terminate. This is the case when there is no more input while reading
 from a pipe of from a file via stdin

git-svn-id: http://root.cern.ch/svn/root/trunk@67 27541ba8-7e3a-0410-8455-c3a389f83636
---
 rint/src/TRint.cxx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rint/src/TRint.cxx b/rint/src/TRint.cxx
index b5c21ac3ae8..52455366a80 100644
--- a/rint/src/TRint.cxx
+++ b/rint/src/TRint.cxx
@@ -1,4 +1,4 @@
-// @(#)root/rint:$Name$:$Id$
+// @(#)root/rint:$Name:  $:$Id: TRint.cxx,v 1.1.1.1 2000/05/16 17:00:46 rdm Exp $
 // Author: Rene Brun   17/02/95
 
 /*************************************************************************
@@ -332,6 +332,9 @@ void TRint::HandleTermInput()
    char *line;
 
    if ((line = Getlinem(kOneChar, 0))) {
+      if (line[0] == 0 && Gl_eof())
+         Terminate(0);
+
       if (gROOT->Timer()) timer.Start();
 
       Gl_histadd(line);
-- 
GitLab