mirror of
				https://github.com/troglobit/editline.git
				synced 2025-11-04 03:08:06 +08:00 
			
		
		
		
	Add support for disabling default SIGINT and EOF behavior.
This patch adds support for `--disable-eof` and `--disable-sigint` to the Editline configure script. With either of these two switches the `tty_special()` function bypasses the special TTY checks making it possible to bind Ctrl-C and Ctrl-D to custom callbacks. This can be useful if you want to emulate a Cisco style CLI rather than traditional UNIX. The user can of course also redefine the VINTR and VEOF special terminal control characters, but these configure script switches may be easier to use for some. Also, the CLI example has been updated to bind Ctrl-D, Ctrl-C and Ctrl-Z for testing purposes. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
		
							
								
								
									
										26
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@@ -764,6 +764,8 @@ enable_libtool_lock
 | 
			
		||||
enable_unique_history
 | 
			
		||||
enable_default_complete
 | 
			
		||||
enable_arrow_keys
 | 
			
		||||
enable_eof
 | 
			
		||||
enable_sigint
 | 
			
		||||
enable_sigstop
 | 
			
		||||
enable_terminal_bell
 | 
			
		||||
enable_termcap
 | 
			
		||||
@@ -1410,7 +1412,9 @@ Optional Features:
 | 
			
		||||
  --disable-default-complete
 | 
			
		||||
                          Disable default (filename) completion handler.
 | 
			
		||||
  --disable-arrow-keys    Disable ANSI arrow keys.
 | 
			
		||||
  --enable-sigstop        Enable SIGSTOP key.
 | 
			
		||||
  --disable-eof           Disable default EOF (Ctrl-D) behavior.
 | 
			
		||||
  --disable-sigint        Disable default SIGINT (Ctrl-C) behavior.
 | 
			
		||||
  --enable-sigstop        Enable SIGSTOP (Ctrl-Z) behavior.
 | 
			
		||||
  --enable-terminal-bell  Enable terminal bell on completion.
 | 
			
		||||
  --enable-termcap        Use termcap library to query terminal size.
 | 
			
		||||
 | 
			
		||||
@@ -12043,6 +12047,26 @@ $as_echo "#define CONFIG_ANSI_ARROWS 1" >>confdefs.h
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Check whether --enable-eof was given.
 | 
			
		||||
if test "${enable_eof+set}" = set; then :
 | 
			
		||||
  enableval=$enable_eof;
 | 
			
		||||
else
 | 
			
		||||
 | 
			
		||||
$as_echo "#define CONFIG_EOF 1" >>confdefs.h
 | 
			
		||||
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Check whether --enable-sigint was given.
 | 
			
		||||
if test "${enable_sigint+set}" = set; then :
 | 
			
		||||
  enableval=$enable_sigint;
 | 
			
		||||
else
 | 
			
		||||
 | 
			
		||||
$as_echo "#define CONFIG_SIGINT 1" >>confdefs.h
 | 
			
		||||
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Check whether --enable-sigstop was given.
 | 
			
		||||
if test "${enable_sigstop+set}" = set; then :
 | 
			
		||||
  enableval=$enable_sigstop;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user