Tidy input buffer handling
[exim.git] / src / src / globals.c
index 7dfbc76080930e586d59e62c06be2c6555531c1c..0109cd711b82cd8ca4ffa4ad12ae4efe0ff004df 100644 (file)
@@ -3,7 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2018 */
-/* Copyright (c) The Exim Maintainers 2020 */
+/* Copyright (c) The Exim Maintainers 2020 - 2021 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* All the global variables are defined together in this one module, so
@@ -171,16 +171,18 @@ incoming TCP/IP. The defaults use stdin. We never need these for any
 stand-alone tests. */
 
 #if !defined(STAND_ALONE) && !defined(MACRO_PREDEF)
-int (*lwr_receive_getc)(unsigned) = stdin_getc;
+int    (*lwr_receive_getc)(unsigned)   = stdin_getc;
 uschar * (*lwr_receive_getbuf)(unsigned *) = NULL;
-int (*lwr_receive_ungetc)(int) = stdin_ungetc;
-int (*receive_getc)(unsigned)  = stdin_getc;
-uschar * (*receive_getbuf)(unsigned *)  = NULL;
-void (*receive_get_cache)(void)= NULL;
-int (*receive_ungetc)(int)     = stdin_ungetc;
-int (*receive_feof)(void)      = stdin_feof;
-int (*receive_ferror)(void)    = stdin_ferror;
-BOOL (*receive_smtp_buffered)(void) = NULL;   /* Only used for SMTP */
+int    (*lwr_receive_ungetc)(int)      = stdin_ungetc;
+BOOL   (*lwr_receive_hasc)(void)       = stdin_hasc;
+
+int    (*receive_getc)(unsigned)       = stdin_getc;
+uschar * (*receive_getbuf)(unsigned *)         = NULL;
+void   (*receive_get_cache)(unsigned)  = NULL;
+BOOL   (*receive_hasc)(void)           = stdin_hasc;
+int    (*receive_ungetc)(int)          = stdin_ungetc;
+int    (*receive_feof)(void)           = stdin_feof;
+int    (*receive_ferror)(void)         = stdin_ferror;
 #endif
 
 
@@ -953,7 +955,7 @@ volatile sig_atomic_t had_command_timeout = 0;
 volatile sig_atomic_t had_command_sigterm = 0;
 volatile sig_atomic_t had_data_timeout    = 0;
 volatile sig_atomic_t had_data_sigint     = 0;
-uschar *headers_charset        = US HEADERS_CHARSET;
+const uschar *headers_charset  = US HEADERS_CHARSET;
 int     header_insert_maxlen   = 64 * 1024;
 header_line  *header_last      = NULL;
 header_line  *header_list      = NULL;