1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-26 20:02:37 +00:00

Clean up MAIKO_HANDLE_CONSOLE_MESSAGES some. (#331)

* `LOGINT` is only useful when `MAIKO_HANDLE_CONSOLE_MESSAGES`
  is set.
* Only define some variables if `MAIKO_HANDLE_CONSOLE_MESSAGES`
  is set. Flag them as static.
* Remove setting `LOGINT` from the build system as it isn't
  needed because we aren't handling console messages.
This commit is contained in:
Bruce Mitchener
2021-02-01 12:22:13 +07:00
committed by GitHub
parent 261069f131
commit 275c5b9c13
18 changed files with 23 additions and 35 deletions

View File

@@ -348,7 +348,7 @@ getmore:
rs232c_read();
#endif /* RS232 */
#ifdef LOGINT
#if defined(MAIKO_HANDLE_CONSOLE_MESSAGES) && defined(LOGINT)
if (LogFileFd >= 0 && FD_ISSET(LogFileFd, &rfds)) { /* There's info in the log file. Tell Lisp to print it. */
flush_pty(); /* move the msg(s) to the log file */

View File

@@ -53,17 +53,19 @@
#include <stropts.h>
#endif
#ifdef MAIKO_HANDLE_CONSOLE_MESSAGES
#define MESSAGE_BUFFER_SIZE 1024
int cons_tty;
int cons_pty;
static int cons_tty;
static int cons_pty;
char logfile[100];
int log_id;
int previous_size;
int logChanged; /* T if log file has changed since last READ */
static char logfile[100];
static int log_id;
static int previous_size;
static int logChanged; /* T if log file has changed since last READ */
/* Set by flush_pty, to avoid the stat call */
int LogFileFd = -1;
extern fd_set LispReadFds;
#endif
/************************************************************************/
/* */