2010-02-18 11:17:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								--- lib/readline/input.c
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ lib/readline/input.c	2003-03-17 19:03:51.000000000 +0000
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-28 15:45:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -459,6 +459,8 @@ rl_read_key ()
							 | 
						
					
						
							
								
									
										
										
										
											2006-12-15 17:03:59 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								   return (c);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+extern int _rl_read_zero_char_from_tty;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 int
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 rl_getc (stream)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      FILE *stream;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-28 15:45:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -482,7 +484,10 @@ rl_getc (stream)
							 | 
						
					
						
							
								
									
										
										
										
											2006-12-15 17:03:59 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								       /* If zero characters are returned, then the file that we are
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 	 reading from is empty!  Return EOF in that case. */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								       if (result == 0)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								-	return (EOF);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+	{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+	  _rl_read_zero_char_from_tty = 1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+	  return (EOF);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+	}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 #if defined (__BEOS__)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								       if (errno == EINTR)
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-18 11:17:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								--- lib/readline/readline.c
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+++ lib/readline/readline.c	2003-03-17 19:02:52.000000000 +0000
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-28 15:45:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -469,6 +469,9 @@ _rl_internal_char_cleanup ()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								     _rl_erase_entire_line ();
							 | 
						
					
						
							
								
									
										
										
										
											2006-12-15 17:03:59 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+/* Catch EOF from tty, do not return command line */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+int _rl_read_zero_char_from_tty = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 STATIC_CALLBACK int
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 #if defined (READLINE_CALLBACKS)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 readline_internal_char ()
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-28 15:45:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@@ -513,6 +516,10 @@ readline_internal_charloop ()
							 | 
						
					
						
							
								
									
										
										
										
											2006-12-15 17:03:59 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								       c = rl_read_key ();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								       RL_UNSETSTATE(RL_STATE_READCMD);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-28 15:45:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 
							 | 
						
					
						
							
								
									
										
										
										
											2006-12-15 17:03:59 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+      /* Return here if terminal is closed */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+      if (c == EOF && _rl_read_zero_char_from_tty)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								+	return (rl_done = 1);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-28 15:45:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								+
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								       /* look at input.c:rl_getc() for the circumstances under which this will
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 	 be returned; punt immediately on read error without converting it to
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 	 a newline. */
							 |